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

BAPI_SERVICE_CREATE Create Service Master Record

Creates a service master record (AC01) from basic data, descriptions and long texts and returns the new service number. Developers use it in programs that load service catalogs from legacy systems or spreadsheets. Set the matching flag to 'X' in IM_SERVICE_DATAX for every field you fill, try it first with TESTRUN and call BAPI_TRANSACTION_COMMIT when RETURN has no errors.

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

Importing parameters

ParameterTypeDescriptionRequired
IM_SERVICE_DATABAPISRV_ASMDService master dataYes
IM_SERVICE_DATAXBAPISRV_ASMDXService master data change flagsYes
TESTRUNBAPIFLAG-BAPIFLAGTest run (no update)—
NO_NUMBER_RANGE_CHECKBAPIFLAG-BAPIFLAGSkip number range check—

Exporting parameters

ParameterTypeDescription
SERVICEBAPISRV_ASMD-SERVICECreated service number
EX_SERVICE_DATABAPISRV_ASMDSaved service master data
EX_SERVICE_DATAXBAPISRV_ASMDXSaved field flags

Tables parameters

ParameterTypeDescriptionRequired
SERVICE_DESCRIPTIONBAPISRV_ASMDTService short texts (by language)—
SERVICE_LONG_TEXTSBAPISRV_TEXTService long texts—
EXTENSION_INBAPIPAREXCustomer extension fields (input)—
EXTENSION_OUTBAPIPAREXCustomer extension fields (output)—
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_SERVICE_CREATE'
  EXPORTING
    im_service_data = lv_im_service_data
    im_service_datax = lv_im_service_datax
  IMPORTING
    service = lv_service
    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