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

BAPI_SERVICE_CHANGE Change Service Master Record

Changes the basic data, descriptions and long texts of an existing service master record (AC02). Developers use it in mass update programs that keep the service catalog in sync with an external source. Only fields flagged with 'X' in IM_SERVICE_DATAX are updated; the SERVICE_DESCRIPTION table is mandatory, so try it with TESTRUN and then call BAPI_TRANSACTION_COMMIT.

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

Importing parameters

ParameterTypeDescriptionRequired
SERVICENUMBERBAPISRV_ASMD-SERVICEService numberYes
IM_SERVICE_DATABAPISRV_ASMDService master data—
IM_SERVICE_DATAXBAPISRV_ASMDXService master data change flags—
TESTRUNBAPIFLAG-BAPIFLAGTest run (no update)—

Exporting parameters

ParameterTypeDescription
EX_SERVICE_DATABAPISRV_ASMDSaved service master data
EX_SERVICE_DATAXBAPISRV_ASMDXSaved field flags

Tables parameters

ParameterTypeDescriptionRequired
SERVICE_DESCRIPTIONBAPISRV_ASMDTService short texts (by language)Yes
SERVICE_LONG_TEXTSBAPISRV_TEXTService long texts—
EXTENSION_INBAPIPAREXCustomer extension fields (input)—
EXTENSION_OUTBAPIPAREXCustomer extension fields (output)—
RETURNBAPIRET2Return messagesYes

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_SERVICE_CHANGE'
  EXPORTING
    servicenumber = lv_servicenumber
  IMPORTING
    ex_service_data = lv_ex_service_data
    ex_service_datax = lv_ex_service_datax
  TABLES
    service_description = lt_service_description
    service_long_texts = lt_service_long_texts
    extension_in = lt_extension_in
    extension_out = lt_extension_out
    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