# BAPI_OUTB_DELIVERY_CREATE_SLS — Create Outbound Delivery for Sales Order

> Creates one or more outbound deliveries for sales order items that are due for shipping, like VL01N. It is used in batch jobs and interfaces that trigger shipping automatically after order entry. Fill SALES_ORDER_ITEMS, optionally SHIP_POINT and DUE_DATE, then call BAPI_TRANSACTION_COMMIT afterwards only when RETURN contains no message of type E or A.

- Modules: SD
- 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-create-sls/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| SHIP_POINT | BAPIDLVCREATEHEADER-SHIP_POINT | Shipping point | - |
| DUE_DATE | BAPIDLVCREATEHEADER-DUE_DATE | Selection date for due items | - |
| DEBUG_FLG | BAPIDLVCONTROL-DEBUG_FLG | Debug flag | - |
| NO_DEQUEUE | BAPIFLAG-BAPIFLAG | Do not release locks | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| DELIVERY | BAPISHPDELIVNUMB-DELIV_NUMB | Delivery number created |
| NUM_DELIVERIES | BAPIDLVCREATEHEADER-NUM_DELIVERIES | Number of deliveries created |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| SALES_ORDER_ITEMS | BAPIDLVREFTOSALESORDER | Sales order items to deliver | Yes |
| SERIAL_NUMBERS | BAPIDLVSERIALNUMBER | Serial numbers | - |
| EXTENSION_IN | BAPIPAREX | Customer enhancement fields | - |
| DELIVERIES | BAPISHPDELIVNUMB | Deliveries created | - |
| CREATED_ITEMS | BAPIDLVITEMCREATED | Delivery items created | - |
| RETURN | BAPIRET2 | Return messages | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_SLS'
  IMPORTING
    delivery = lv_delivery
    num_deliveries = lv_num_deliveries
  TABLES
    sales_order_items = lt_sales_order_items
    serial_numbers = lt_serial_numbers
    extension_in = lt_extension_in
    deliveries = lt_deliveries
    created_items = lt_created_items
    return = lt_return.
```

## Related tables

LIKP, LIPS, VBAK, VBAP, VBFA

