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

BAPI_PROFITCENTER_CHANGE Change Profit Center

Changes the master data of an existing profit center for the given validity period. Programs that mass-update the person responsible, segment or company code assignments use it instead of KE52. Set the flag to 'X' in the matching …X structure (BASICDATAX, ADDRESSX, etc.) for every field you change, then check RETURN and call BAPI_TRANSACTION_COMMIT.

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

Importing parameters

ParameterTypeDescriptionRequired
CONTROLLINGAREABAPI0015ID2-CO_AREAControlling areaYes
PROFITCENTERBAPI0015ID2-PROFIT_CTRProfit centerYes
VALIDFROMBAPI0015_3-DATEValid from dateYes
VALIDTOBAPI0015_3-DATEValid to dateYes
BASICDATABAPI0015_4Basic data—
BASICDATAXBAPI0015_4XBasic data change flags—
ADDRESSBAPI0015_5Address data—
ADDRESSXBAPI0015_5XAddress change flags—
INDICATORSBAPI0015_8Indicators—
INDICATORSXBAPI0015_8XIndicator change flags—
TESTRUNBAPI0015_9Test run (no update)—

Exporting parameters

ParameterTypeDescription
RETURNBAPIRET2Return message

Tables parameters

ParameterTypeDescriptionRequired
COMPANYCODESBAPI0015_7Company code assignments—
COMPANYCODESXBAPI0015_7XCompany code assignment change flags—

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_PROFITCENTER_CHANGE'
  EXPORTING
    controllingarea = lv_controllingarea
    profitcenter = lv_profitcenter
    validfrom = lv_validfrom
    validto = lv_validto
  IMPORTING
    return = lv_return
  TABLES
    companycodes = lt_companycodes
    companycodesx = lt_companycodesx.

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