# BAPI_OUTB_DELIVERY_SAVEREPLICA — Save Outbound Delivery Replica

> Creates a copy (replica) of an outbound delivery that was created in another system, keeping the original delivery number. It is used when deliveries are distributed through ALE to a decentralized warehouse or shipping system. To create new outbound deliveries in the same system, use BAPI_OUTB_DELIVERY_CREATE_SLS or BAPI_OUTB_DELIVERY_CREATE_STO instead.

- Modules: WM
- Type: BAPI
- Function group: V50I
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-outb-delivery-savereplica/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| HEADER_DATA | BAPIOBDLVHDR | Delivery header data | Yes |
| HEADER_ORG | BAPIOBDLVHDRORG | Header organizational data | Yes |
| SENDER_SYSTEM | TBDLS-LOGSYS | Sending logical system | Yes |
| TECHN_CONTROL | BAPIDLVCONTROL | Technical control data | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| DELIVERY | LIKP-VBELN | Created delivery number |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| HEADER_PARTNER | BAPIDLVPARTNER | Header partners | Yes |
| HEADER_PARTNER_ADDR | BAPIADDR1 | Partner addresses | - |
| HEADER_DEADLINES | BAPIDLVDEADLN | Header deadlines | Yes |
| ITEM_DATA | BAPIOBDLVITEM | Item data | Yes |
| ITEM_ORG | BAPIOBDLVITEMORG | Item organizational data | Yes |
| ITEM_REF_PURCHASE_ORDER | BAPIDLVITEMRPO | Reference purchase order | - |
| ITEM_SERIAL_NO | BAPIDLVITMSERNO | Item serial numbers | - |
| HANDLING_UNIT_HEADER | BAPIDLVHDUNHDR | Handling unit header | - |
| HANDLING_UNIT_ITEM | BAPIDLVHDUNITM | Handling unit items | - |
| TEXT_HEADER | BAPIDLVTXTHDR | Text headers | - |
| TEXT_LINES | BAPIDLVTXTITEM | Text lines | - |
| EXTENSION1 | BAPIEXTC | Customer extension data | - |
| RETURN | BAPIRET2 | Return messages | Yes |
| ITEM_REFERENCE_ORDER | BAPIOBDLVITEMRFO | Reference sales order | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_OUTB_DELIVERY_SAVEREPLICA'
  EXPORTING
    header_data = lv_header_data
    header_org = lv_header_org
    sender_system = lv_sender_system
  IMPORTING
    delivery = lv_delivery
  TABLES
    header_partner = lt_header_partner
    header_partner_addr = lt_header_partner_addr
    header_deadlines = lt_header_deadlines
    item_data = lt_item_data
    item_org = lt_item_org
    item_ref_purchase_order = lt_item_ref_purchase_order
    item_serial_no = lt_item_serial_no
    handling_unit_header = lt_handling_unit_header
    handling_unit_item = lt_handling_unit_item
    text_header = lt_text_header.
```

## Related tables

LIKP, LIPS

