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

ParameterTypeDescriptionRequired
CONTROLLINGAREAIMPBAPICO_GROUP-CO_AREAControlling areaYes
TOPNODEONLYBAPICO_GROUP-TOPNODEONLYTop node only—
LANGUAGEBAPI0015_10Language for texts—

Exporting parameters

ParameterTypeDescription
CONTROLLINGAREABAPICO_GROUP-CO_AREAControlling area
GROUPNAMEBAPICO_GROUP-GROUPNAMEName of the created group
RETURNBAPIRET2Return message

Tables parameters

ParameterTypeDescriptionRequired
HIERARCHYNODESBAPISET_HIERHierarchy nodesYes
HIERARCHYVALUESBAPI1112_VALUESHierarchy valuesYes

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.

Request a custom report