# BAPI_PROFITCENTER_CREATE — Create Profit Center

> Creates a new profit center master record in a controlling area for the given validity period. Programs that load profit centers from an external system or Excel use it instead of KE51. Pass the company code assignments in the COMPANYCODES table and call BAPI_TRANSACTION_COMMIT if RETURN contains no type E/A message.

- Modules: CO
- Type: BAPI
- Function group: 0015
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-profitcenter-create/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| PROFITCENTERID | BAPI0015ID2 | Profit center key (controlling area + profit center) | Yes |
| VALIDFROM | BAPI0015_3-DATE | Valid from date | Yes |
| VALIDTO | BAPI0015_3-DATE | Valid to date | Yes |
| BASICDATA | BAPI0015_4 | Basic data | Yes |
| ADDRESS | BAPI0015_5 | Address data | - |
| COMMUNICATION | BAPI0015_6 | Communication data | - |
| INDICATORS | BAPI0015_8 | Indicators | - |
| TESTRUN | BAPI0015_9 | Test run (no update) | - |
| LANGUAGE | BAPI0015_10 | Language for texts | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| CONTROLLINGAREA | BAPI0015ID2-CO_AREA | Controlling area |
| PROFITCENTER | BAPI0015ID2-PROFIT_CTR | Created profit center |
| RETURN | BAPIRET2 | Return message |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| COMPANYCODES | BAPI0015_7 | Company code assignments | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_PROFITCENTER_CREATE'
  EXPORTING
    profitcenterid = lv_profitcenterid
    validfrom = lv_validfrom
    validto = lv_validto
    basicdata = lv_basicdata
  IMPORTING
    controllingarea = lv_controllingarea
    profitcenter = lv_profitcenter
    return = lv_return
  TABLES
    companycodes = lt_companycodes.
```

## Related tables

CEPC, CEPCT

