# BAPI_PLANNEDORDER_DELETE — Delete Planned Order

> Deletes a single planned order. It is used by clean-up programs and planning interfaces that remove orders no longer needed. When deleting many orders in a loop, use USE_COLL_UPDATE and set LAST_ORDER on the final call so planning file entries are updated once, then commit.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| PLANNEDORDER | BAPI_PLDORD-PLDORD_NUM | Planned order number | Yes |
| LAST_ORDER | BAPIPLAF_I1-LAST_ORDER | Last order of a collective update | - |
| USE_COLL_UPDATE | BAPIPLAF_I1-USE_COLL_UPD | Collective update of planning file entries | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN1 | Return messages |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_PLANNEDORDER_DELETE'
  EXPORTING
    plannedorder = lv_plannedorder
  IMPORTING
    return = lv_return.
```

## Related tables

PLAF

