# BAPI_PRODORDCONF_CANCEL — Cancel Production Order Confirmation

> Cancels a single production order confirmation identified by confirmation number and counter, like CO13. It is used when an interface sent wrong quantities or a terminal posting has to be reversed. Read the cancellation record from CREATED_CONF_NO and CREATED_CONF_COUNT, check LOCKED and RETURN, and commit afterwards.

- Modules: PP
- Type: BAPI
- Function group: 2116
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-prodordconf-cancel/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| CONFIRMATION | BAPI_PP_CONF_KEY-CONF_NO | Confirmation number | Yes |
| CONFIRMATIONCOUNTER | BAPI_PP_CONF_KEY-CONF_CNT | Confirmation counter | Yes |
| CONF_TEXT | BAPI_PP_CONFIRM-CONF_TEXT | Confirmation text | - |
| POSTG_DATE | BAPI_PP_CONFIRM-POSTG_DATE | Posting date | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| CREATED_CONF_COUNT | BAPI_PP_CONF_KEY-CONF_CNT | Counter of the cancellation record |
| CREATED_CONF_NO | BAPI_PP_CONF_KEY-CONF_NO | Confirmation number of the cancellation record |
| LOCKED | BAPI_CORU_PARAM-LOCKED | Order is locked |
| RETURN | BAPIRET1 | Return messages |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_PRODORDCONF_CANCEL'
  EXPORTING
    confirmation = lv_confirmation
    confirmationcounter = lv_confirmationcounter
  IMPORTING
    created_conf_count = lv_created_conf_count
    created_conf_no = lv_created_conf_no
    locked = lv_locked
    return = lv_return.
```

## Related tables

AFKO, AFRU

