# BAPI_ACC_STAT_KEY_FIG_POST — Accounting: Post Statistical Key Figures

> Posts actual statistical key figure values (headcount, square meters, consumption, etc.) to CO objects such as cost centers and orders (the counterpart of KB31N). Interfaces that transfer allocation keys from HR or facility systems every month use it. Fill the statistical key figure and quantity in the items, check RETURN and call BAPI_TRANSACTION_COMMIT.

- Modules: CO
- Type: BAPI
- Function group: K40C
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-acc-stat-key-fig-post/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| DOC_HEADER | BAPIDOCHDRP | Document header (controlling area, dates, user) | Yes |
| IGNORE_WARNINGS | BAPIIW-IGNWARN | Ignore warnings | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| DOC_NO | BAPIDOCHDRP-DOC_NO | Posted CO document number |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| DOC_ITEMS | BAPISKFITM | Statistical key figure items | Yes |
| CUSTOMER_FIELDS | BAPIEXTC | Customer fields | - |
| RETURN | BAPIRET2 | Return messages | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_ACC_STAT_KEY_FIG_POST'
  EXPORTING
    doc_header = lv_doc_header
  IMPORTING
    doc_no = lv_doc_no
  TABLES
    doc_items = lt_doc_items
    customer_fields = lt_customer_fields
    return = lt_return.
```

## Related tables

COBK, COSR

