CO
BAPI
RFC
Used the same way in S/4HANA
BAPI_COSTCENTERGROUP_CREATE Create Cost Center Group
Creates a cost center group in a controlling area, with its hierarchy nodes and the cost center values assigned to them. Programs that load a cost center hierarchy from an external system use it instead of KSH1. Pass the nodes in hierarchy order in HIERARCHYNODES and the value ranges of each node in HIERARCHYVALUES, then check RETURN and call BAPI_TRANSACTION_COMMIT.
- Function group
- KGR2
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| CONTROLLINGAREAIMP | BAPICO_GROUP-CO_AREA | Controlling area | Yes |
| TOPNODEONLY | BAPICO_GROUP-TOPNODEONLY | Top node only | — |
| LANGUAGE | BAPI0015_10 | Language for texts | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| CONTROLLINGAREA | BAPICO_GROUP-CO_AREA | Controlling area |
| GROUPNAME | BAPICO_GROUP-GROUPNAME | Name of the created group |
| RETURN | BAPIRET2 | Return message |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| HIERARCHYNODES | BAPISET_HIER | Hierarchy nodes | Yes |
| HIERARCHYVALUES | BAPI1112_VALUES | Hierarchy values | 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_COSTCENTERGROUP_CREATE'
EXPORTING
controllingareaimp = lv_controllingareaimp
IMPORTING
controllingarea = lv_controllingarea
groupname = lv_groupname
return = lv_return
TABLES
hierarchynodes = lt_hierarchynodes
hierarchyvalues = lt_hierarchyvalues.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.