# BAPI_COSTCENTER_GETDETAIL1 — Cost Center Details on Key Date

> Returns the master data of a cost center valid on a given key date (description, person responsible, company code, profit center, locks). Interfaces and reports use it to read cost center data or to check that a record exists. Pass the cost center number in internal format (with leading zeros); if it is not found, RETURN contains an error message.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| CONTROLLINGAREA | BAPI0012_GEN-CO_AREA | Controlling area | Yes |
| COSTCENTER | BAPI0012_GEN-COSTCENTER | Cost center | Yes |
| KEYDATE | BAPI0012_GEN-SOME_DATE | Key date | - |
| LANGUAGE | BAPI0015_10 | Language for texts | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| COSTCENTERDETAIL | BAPI0012_CCOUTPUTLIST | Cost center details |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| RETURN | BAPIRET2 | Return messages | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_COSTCENTER_GETDETAIL1'
  EXPORTING
    controllingarea = lv_controllingarea
    costcenter = lv_costcenter
  IMPORTING
    costcenterdetail = lv_costcenterdetail
  TABLES
    return = lt_return.
```

## Related tables

CSKS, CSKT

