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

BAPI_CUSTOMERRETURN_CHANGE Change Customer Returns Order

Changes an existing customer returns order: header, items, schedule lines, partners and conditions. It is used to update returned quantities or reasons coming from an RMA system. RETURN_HEADER_INX is mandatory; set UPDATEFLAG and the X flags, then call BAPI_TRANSACTION_COMMIT afterwards only when RETURN contains no message of type E or A.

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

Importing parameters

ParameterTypeDescriptionRequired
SALESDOCUMENTBAPIVBELN-VBELNSales document numberYes
RETURN_HEADER_INBAPISDHD1Returns order header data—
RETURN_HEADER_INXBAPISDHD1XReturns order header change flags (X structure)Yes
SIMULATIONBAPIFLAG-BAPIFLAGSimulation mode (no update)—
CONVERTBAPIFLAG-BAPIFLAGConvert partner roles and document types to internal format—
LOGIC_SWITCHBAPISDLSSD logic switch (pricing, ATP control)—
NO_STATUS_BUF_INITBAPIFLAG-BAPIFLAGDo not refresh status buffer—

Tables parameters

ParameterTypeDescriptionRequired
RETURNBAPIRET2Return messages—
RETURN_ITEMS_INBAPISDITMReturns order item data—
RETURN_ITEMS_INXBAPISDITMXReturns order item change flags (X structure)—
PARTNERSBAPIPARNRDocument partners—
PARTNERCHANGESBAPIPARNRCPartner changes—
SCHEDULE_LINESBAPISCHDLSchedule lines—
SCHEDULE_LINESXBAPISCHDLXSchedule line change flags (X structure)—
CONDITIONS_INBAPICONDPricing conditions—
CONDITIONS_INXBAPICONDXCondition change flags (X structure)—
RETURN_TEXTBAPISDTEXTTexts—
RETURN_KEYSBAPISDKEYReference keys of created objects—
EXTENSIONINBAPIPAREXCustomer enhancement fields (EXTENSIONIN)—

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_CUSTOMERRETURN_CHANGE'
  EXPORTING
    salesdocument = lv_salesdocument
    return_header_inx = lv_return_header_inx
  TABLES
    return = lt_return
    return_items_in = lt_return_items_in
    return_items_inx = lt_return_items_inx
    partners = lt_partners
    partnerchanges = lt_partnerchanges
    schedule_lines = lt_schedule_lines
    schedule_linesx = lt_schedule_linesx
    conditions_in = lt_conditions_in
    conditions_inx = lt_conditions_inx
    return_text = lt_return_text.

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