SAP Function BAPI_BATCH_CHANGE - Change Batch

Parameter Reference Type Length Default Optional Text
BATCH BAPIBATCHKEY-BATCH C 10 Batch Number
BATCHATTRIBUTES BAPIBATCHATT u 137 Batch Attributes
BATCHATTRIBUTESX BAPIBATCHATTX u 20 Change Bar for Batch Attributes
BATCHCONTROLFIELDS BAPIBATCHCTRL u 42 X Control Parameters
EXTENSION1 BAPIBNCOMZ u 1 X Batch Number Assignment: Communication
INTERNALNUMBERCOM BAPIBNCOM u 439 X Batch Number Assignment: SAP Communication
MATERIAL BAPIBATCHKEY-MATERIAL C 18 Material Number
MATERIAL_EVG BAPIMGVMATNR u 82 X Long Material Number
PLANT BAPIBATCHKEY-PLANT C 4 X Plant

Parameter Reference Type Length Text
BATCHATTRIBUTES BAPIBATCHATT u 137 Batch Attributes

Parameter Reference Length Optional Text
RETURN BAPIRET2 548 X Confirmations

Functionality
You use this method to

  • Change a batch master record

  • Create and/or change classification of a batch in the background (object
  • characteristics only)
    You use this method, for example, when distributing batches.
    The INPUT information contains
    • the batch key; parameters Material, Batch and Plant

    • the batch attributes; parameter BatchAttributes

    • control parameters; parameter BatchControlFields
    • Notes
      The following authorization objects with activity 01 (create) arechecked:

      • M_MATE_CHG,,Material master: Batches/Packaging

      • M_MATE_WRK,,Material master: Plant

      • Batch Level
        If the batch level (BatchControlFields) is on plant level, youmust specify a plant in the Plant parameter.
        Classification
        If the batch is to be classified, you must specify a class in theBatchControlFields parameter. Only single classification ispossible.
        Confirmations
        INCLUDE BAPI_PARAM_RETDD

        Further information
        You will find further information in the SAP Library under BatchManagement.

        Description
        The table contains the batch attributes.
        You can use the export table that has the same name to check whetherthe changes were carried out.
        INCLUDE BAPI_DATAELEMENT
        To change the attributes you use the BatchAttributesX parameterto set the update indicator for each field that is to be changed.

        • BWTAR Valuation type

        • You can only change the valuation type of a batch, if the batch has notyet been given a valuated status.

          Description
          INCLUDE BAPI_KEYFIELD

          Description
          The table contains the batch attributes.
          You can use the export table that has the same name to check whetherthe changes were carried out.
          INCLUDE BAPI_DATAELEMENT
          To change the attributes you use the BatchAttributesX parameterto set the update indicator for each field that is to be changed.

          • BWTAR Valuation type

          • You can only change the valuation type of a batch, if the batch has notyet been given a valuated status.

            Description
            You will find further information concerning the meaning of the changebar in the corresponding data element documentation:Update-Information.

            Description
            The control parameters are transferred in structure.
            You will find information about the meaning of the individualparameters in the appropriate data element documentation.
            Structure
            KZDCH Batch level
            KLASSE_D Class number
            If you want to change the class of batch you must first delete theclassification for all batches of a material and, if necessary, thebatch class. You can then assign another class. At the moment, thereare no methods available to change the class of batch.
            XCLAS Classify object
            XKCFC Enhanced classification using CFC
            INCLUDE BAPI_PARAM_EXTENSION1
            INCLUDE BAPI_PARAM_INTNUMCOM

            Description
            INCLUDE BAPI_KEYFIELD

            Description
            Parameter for the long material number
            This parameter can be used to transfer long material numbers. Thesenumbers can be up to 40 characters long.
            To be able to use this parameter you must activate the switch for thebusiness function LAMA (long material number) in the system.
            The business function LAMA is available as a component of the businessfunction set for DIMP.

            Value range
            None

            Default
            None

            Description
            INCLUDE BAPI_KEYFIELD
            Note
            If the batch level is on material or client level, you do not need tospecify the plant.
            If the batch level is on plant level, you must specify a plant.
            INCLUDE BAPI_PARAM_RETURN

619913FAQ: Basic functions of batch management