Fonction SAP BAPI_BATCH_SAVE_REPLICA - Replicate Batch

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BATCH BAPIBATCHKEY-BATCH C 10 Batch Number
BATCHATTRIBUTES BAPIBATCHATT u 137 X BAPI Transfer Structure Batch Attribute
BATCHATTRIBUTESX BAPIBATCHATTX u 20 X Change Bar for Batch Attributes
BATCHCONTROLFIELDS BAPIBATCHCTRL u 42 X Control Parameters
BATCHSTATUS BAPIBATCHSTATUS u 1 X BAPI Transfer Structure Batch Status
BATCHSTATUSX BAPIBATCHSTATUSX u 1 X Change Bar for Batch Status
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 Long. Facultatif Description
CLASSALLOCATIONS BAPI3060_ALLOCATION 224 X Classification: Assignments
CLASSVALUATIONSCHAR BAPI3060_VALUATION_CHAR 245 X Classification System: Obj. Descriptions and CHAR/BOOL Valuation
CLASSVALUATIONSCURR BAPI3060_VALUATION_CURR 232 X Classification: Object Descriptions and CURR Values
CLASSVALUATIONSNUM BAPI3060_VALUATION_NUM 224 X Classification: Object Descriptions and NUM Values
RETURN BAPIRET2 548 X Confirmations

Functionality
You use this method to replicate a batch in the target system.
For example, you use this method

  • To distribute batches

  • In connection with a decentralized warehouse

  • The INPUT information contains
    • The batch key; parameters Material, Batch and Plant

    • The batch attributes; parameter BatchAttributes

    • The control parameter; parameter BatchControlFields

    • The storage location; parameter BatchStorageLocation

    • The batch status; parameter BatchStatus
    • Example

      Notes
      The following authorization objects with activity 01 (Create) arechecked:

      • M_MATE_CHG,,Material master: Batches/Package

      • M_MATE_WRK,,Material master: Plant

      • Confirmations
        INCLUDE BAPI_PARAM_RETDD

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

        Description
        INCLUDE BAPI_KEYFIELD

        Description
        The table contains the batch attributes.
        To change the attributes, you must set the update indicator for eachfield to be changed. You do this with the parameterBatchAttributesX.
        INCLUDE BAPI_DATAELEMENT

        • BWTAR Valuation type

        • If you transfer a valuation type, you must always transfer the plant,independent of the batch level. The target system always checks whetherthe transferred valuation type exists for the specified material, thatis, that a corresponding material valuation record exists.
          Note
          The status of the batch is set in the target system. The batch is giventhe status that was specified as the initial status in Customizing forthe target system.

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

          Description
          You will find information on the meaning of the batch status in theappropriate data element documentation: Batch inrestricted-use stock.

          Description
          INCLUDE BAPI_PARAM_UPDATE

          Description
          You will find information on the meaning of the plant 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 you do specify the plant, the system additionallycreates a plant batch and issues an information message.
          If the batch level is on plant level, you must specify a plant.
          INCLUDE BAPI_PARAM_RETURN

1075141BAPIs valid for usage with AFS6.0
619913FAQ: Basic functions of batch management