Fonction SAP BAPI_BATCH_CREATE - Create Batch

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BATCH BAPIBATCHKEY-BATCH C 10 X Batch Number
BATCHATTRIBUTES BAPIBATCHATT u 137 X Batch Attributes
BATCHCONTROLFIELDS BAPIBATCHCTRL u 42 X Control Parameters
BATCHSTORAGELOCATION BAPIBATCHSTOLOC-STGE_LOC C 4 X Storage Location
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

Paramètre Reférence Type Long. Description
BATCH BAPIBATCHKEY-BATCH C 10 Batch Number
BATCHATTRIBUTES BAPIBATCHATT u 137 Batch Attributes

Paramètre Reférence Long. Facultatif Description
RETURN BAPIRET2 548 X Confirmations

Functionality
You use this method to

  • Create a batch master record

  • Create the 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

    • the storage location; parameter BatchStorageLocation
    • Notes
      The following authorization objects with activity 01 (create) arechecked:

      • M_MATE_CHG,,Material master: Batches/Packing

      • 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
        INCLUDE BAPI_KEYFIELD
        INCLUDE BAPI_PARAM_BATCHATT

        Description
        INCLUDE BAPI_KEYFIELD
        INCLUDE BAPI_PARAM_BATCHATT
        INCLUDE BAPI_PARAM_BATCHCONTROL

        Description
        You will find information on the meaning of the storage location in theappropriate data element documentation: Storagelocation.
        If you specify a storage location, the plant storage location batch iscreated.
        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 plant is specified, the system additionallycreates the plant batch and issues an information message.
        If the batch level is on plant level, you must specify a plant.
        INCLUDE BAPI_PARAM_RETURN

619913FAQ: Basic functions of batch management