# BAPI_SHIPMENT_CHANGE — Change Shipment

> Changes the header data, delivery items, stages, deadlines and handling units of an existing shipment (VT02N); for each data table a separate ACTION table specifies whether rows are added, changed or deleted. It is used in interfaces that post status and date information (start of loading, shipment completion) from logistics service providers into SAP. Fill the matching ACTION structure for every field you want to change and call BAPI_TRANSACTION_COMMIT when there are no errors.

- Modules: SD
- Type: BAPI
- Function group: V56I_BAPI
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-shipment-change/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| HEADERDATA | BAPISHIPMENTHEADER | Shipment header data | Yes |
| HEADERDATAACTION | BAPISHIPMENTHEADERACTION | Header change indicators | Yes |
| TECHNCONTROL | BAPISHIPMENTCONTROL | Technical control data | - |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| HEADERDEADLINE | BAPISHIPMENTHEADERDEADLINE | Header deadlines | - |
| HEADERDEADLINEACTION | BAPISHIPMENTHEADERDEADLINEACT | Header deadline change indicators | - |
| ITEMDATA | BAPISHIPMENTITEM | Shipment items (deliveries) | - |
| ITEMDATAACTION | BAPISHIPMENTITEMACTION | Item change indicators | - |
| STAGEDATA | BAPISHIPMENTSTAGE | Shipment stages | - |
| STAGEDATAACTION | BAPISHIPMENTSTAGEACTION | Stage change indicators | - |
| STAGEDEADLINE | BAPISHIPMENTSTAGEDEADLINE | Stage deadlines | - |
| STAGEDEADLINEACTION | BAPISHIPMENTSTAGEDEADLINEACT | Stage deadline change indicators | - |
| ITEMONSTAGE | BAPISHIPMENTITEMONSTAGE | Items on stage | - |
| ITEMONSTAGEACTION | BAPISHIPMENTITEMONSTAGEACTION | Items on stage change indicators | - |
| HDUNHEADER | BAPISHIPMENTHDUNHEADER | Handling unit headers | - |
| HDUNHEADERACTION | BAPISHIPMENTHDUNHEADERACTION | Handling unit header change indicators | - |
| ADDRESS | BAPISHIPMENTADDRESS | Addresses | - |
| ADDRESSACTION | BAPISHIPMENTADDRESSACTION | Address change indicators | - |
| RETURN | BAPIRET2 | Return messages | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
  EXPORTING
    headerdata = lv_headerdata
    headerdataaction = lv_headerdataaction
  TABLES
    headerdeadline = lt_headerdeadline
    headerdeadlineaction = lt_headerdeadlineaction
    itemdata = lt_itemdata
    itemdataaction = lt_itemdataaction
    stagedata = lt_stagedata
    stagedataaction = lt_stagedataaction
    stagedeadline = lt_stagedeadline
    stagedeadlineaction = lt_stagedeadlineaction
    itemonstage = lt_itemonstage
    itemonstageaction = lt_itemonstageaction.
```

## Related tables

VTTK, VTTP, VTTS

