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
| Parameter | Type | Description | Required |
|---|---|---|---|
| SERVICENUMBER | BAPISRV_ASMD-SERVICE | Service number | Yes |
| IM_SERVICE_DATA | BAPISRV_ASMD | Service master data | — |
| IM_SERVICE_DATAX | BAPISRV_ASMDX | Service master data change flags | — |
| TESTRUN | BAPIFLAG-BAPIFLAG | Test run (no update) | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| EX_SERVICE_DATA | BAPISRV_ASMD | Saved service master data |
| EX_SERVICE_DATAX | BAPISRV_ASMDX | Saved field flags |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| SERVICE_DESCRIPTION | BAPISRV_ASMDT | Service short texts (by language) | Yes |
| SERVICE_LONG_TEXTS | BAPISRV_TEXT | Service long texts | — |
| EXTENSION_IN | BAPIPAREX | Customer extension fields (input) | — |
| EXTENSION_OUT | BAPIPAREX | Customer extension fields (output) | — |
| RETURN | BAPIRET2 | Return messages | Yes |
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.