CO
BAPI
RFC
Used the same way in S/4HANA
BAPI_COSTCENTER_CREATEMULTIPLE Create One or More Cost Centers
Creates one or more cost center master records in a controlling area in a single call. It replaces KS01 in cost center upload programs and master data interfaces. Run it first with TESTRUN = 'X', check the RETURN table for type E/A messages, then call BAPI_TRANSACTION_COMMIT.
- Function group
- 0012
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| CONTROLLINGAREA | BAPI0012_GEN-CO_AREA | Controlling area | Yes |
| TESTRUN | BAPI0012_GEN-TESTRUN | Test run (no update) | — |
| MASTER_DATA_INACTIVE | BAPI0012_GEN-MASTER_DATA_INACTIVE | Create master data as inactive | — |
| LANGUAGE | BAPI0015_10 | Language for texts | — |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| COSTCENTERLIST | BAPI0012_CCINPUTLIST | Cost centers to create | Yes |
| RETURN | BAPIRET2 | Return messages | Yes |
| EXTENSIONIN | BAPIPAREX | Customer extension fields (input) | — |
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_COSTCENTER_CREATEMULTIPLE'
EXPORTING
controllingarea = lv_controllingarea
TABLES
costcenterlist = lt_costcenterlist
return = lt_return
extensionin = lt_extensionin.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.