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
| Parameter | Type | Description | Required |
|---|---|---|---|
| CONTROLLINGAREA | BAPI0015ID2-CO_AREA | Controlling area | Yes |
| PROFITCENTER | BAPI0015ID2-PROFIT_CTR | Profit center | Yes |
| VALIDFROM | BAPI0015_3-DATE | Valid from date | Yes |
| VALIDTO | BAPI0015_3-DATE | Valid to date | Yes |
| BASICDATA | BAPI0015_4 | Basic data | — |
| BASICDATAX | BAPI0015_4X | Basic data change flags | — |
| ADDRESS | BAPI0015_5 | Address data | — |
| ADDRESSX | BAPI0015_5X | Address change flags | — |
| INDICATORS | BAPI0015_8 | Indicators | — |
| INDICATORSX | BAPI0015_8X | Indicator change flags | — |
| TESTRUN | BAPI0015_9 | Test run (no update) | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRET2 | Return message |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| COMPANYCODES | BAPI0015_7 | Company code assignments | — |
| COMPANYCODESX | BAPI0015_7X | Company 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.