CA BAPI RFC Used the same way in S/4HANA

BAPI_BATCH_SAVE_REPLICA Save Batch Replica (Create or Change)

Creates or changes a batch including its status and classification in one call; it is the inbound BAPI used for distributing batches between systems (ALE message type BATMAS). Developers use it when a batch must be replicated with the same number and characteristic values, for example from a central system. Fill the …X flag structures for the fields you pass, provide classification in the CLASSVALUATIONS tables, check RETURN and call BAPI_TRANSACTION_COMMIT.

Function group
VBWB
Remote-enabled (RFC)
Yes
Type
BAPI

Importing parameters

ParameterTypeDescriptionRequired
MATERIALBAPIBATCHKEY-MATERIALMaterial numberYes
BATCHBAPIBATCHKEY-BATCHBatch numberYes
PLANTBAPIBATCHKEY-PLANTPlant—
BATCHATTRIBUTESBAPIBATCHATTBatch attributes—
BATCHATTRIBUTESXBAPIBATCHATTXChange flags for batch attributes—
BATCHSTATUSBAPIBATCHSTATUSBatch status—
BATCHSTATUSXBAPIBATCHSTATUSXChange flags for batch status—
BATCHCONTROLFIELDSBAPIBATCHCTRLControl parameters—
BATCHSTORAGELOCATIONBAPIBATCHSTOLOC-STGE_LOCStorage location—
INTERNALNUMBERCOMBAPIBNCOMData for internal number assignment—
EXTENSION1BAPIBNCOMZCustomer data for number assignment—
MATERIAL_LONGBAPIBATCHKEY-MATERIAL_LONGMaterial number (long)—

Tables parameters

ParameterTypeDescriptionRequired
CLASSALLOCATIONSBAPI3060_ALLOCATIONClass assignments—
CLASSVALUATIONSNUMBAPI3060_VALUATION_NUMNumeric characteristic values—
CLASSVALUATIONSCHARBAPI3060_VALUATION_CHARCharacter characteristic values—
CLASSVALUATIONSCURRBAPI3060_VALUATION_CURRCurrency characteristic values—
RETURNBAPIRET2Return messages—

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'BAPI_BATCH_SAVE_REPLICA'
  EXPORTING
    material = lv_material
    batch = lv_batch
  TABLES
    classallocations = lt_classallocations
    classvaluationsnum = lt_classvaluationsnum
    classvaluationschar = lt_classvaluationschar
    classvaluationscurr = lt_classvaluationscurr
    return = lt_return.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report