SD Program Custom development Background program

Overnight Outbound Delivery Creation Job for Due Sales Orders with Exception List

Short answer: A custom background program that creates outbound deliveries every night for confirmed sales order items whose material availability date has come, and lists the orders it could not deliver with their reason, such as credit block, delivery block, incomplete data or missing confirmation, and emails that list to the shipping team.

Estimated effort
M · 4–6 working days
System
ECC and S/4HANA
Tables
7
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

VL10A can also run delivery creation in the background with a variant, but its collective processing log only holds messages for the orders it processed. Orders that were never selected because of a credit block, a delivery block or missing confirmation do not appear in the log, and nobody is informed. VA14L gives orders blocked for delivery in a separate list. The custom job creates the deliveries and sends the "why no delivery" list to the responsible team every morning.

Who uses it? Shipping planners, warehouse teams, customer service and SD consultants.

Closest standard alternatives

  • VL10A Sales Orders Due for Delivery. Creates deliveries for due orders and can run in the background; does not report why orders were not selected.
  • VA14L Sales Documents Blocked for Delivery. Lists orders blocked for delivery; does not create deliveries or show missing confirmations.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
VBAKSales Document HeaderOrder header: customer, delivery block, complete delivery indicatorReadECC + S/4
VBAPSales Document ItemItem: material, shipping point, delivery priorityReadECC + S/4
VBEPSales Document: Schedule Line DataMaterial availability date, confirmed quantity, schedule-line blockReadECC + S/4
VBUKSales Document Header Status (ECC)Credit status and incompletion status for delivery in ECCReadECC only
KNA1Customer Master (General Section)Customer nameReadECC + S/4
LIKPDelivery HeaderDelivery headers createdWriteECC + S/4
LIPSDelivery Item DataDelivery items and quantities createdWriteECC + S/4

S/4HANA notes

  • VBUK → VBAK: VBUK is not used in S/4HANA. The status fields moved to the respective document header: VBAK for sales, LIKP for deliveries, VBRK for billing. It is one of the most common fixes when custom reports move from ECC.

BAPIs and functions used

  • BAPI_OUTB_DELIVERY_CREATE_SLSCreate Outbound Delivery for Sales Order. Creates outbound deliveries for the order items that passed the checks
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves the deliveries created permanently
  • SO_DOCUMENT_SEND_API1SAPoffice: Send Document with Attachments. Emails the exception list to the shipping team

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_VSTELShipping pointRange / multipleVBAP-VSTELYes1000
S_VKORGSales organizationRange / multipleVBAK-VKORGNo1000
S_KUNNRSold-to partyRange / multipleVBAK-KUNNRNo200100
S_LPRIODelivery priorityRange / multipleVBAP-LPRIONo01
P_DUEDTMaterial availability date upper limit (default: tomorrow)Single valueVBEP-MBDATYes18.11.2026
P_COMPLHold orders requiring complete delivery that have unconfirmed itemsCheckbox—NoX
P_MAILEmail address for the exception listSingle value—No[email protected]
P_TESTTest mode (check without creating deliveries)Checkbox—No—

Result list columns

#ColumnSource
1Sales orderVBAK-VBELN
2ItemVBAP-POSNR
3CustomerVBAK-KUNNR
4Customer nameKNA1-NAME1
5MaterialVBAP-MATNR
6Availability dateVBEP-MBDAT
7Confirmed qtyVBEP-BMENG
8DeliveryLIKP-VBELN
9Delivery qtyLIPS-LFIMG
10ResultCalculated Created, test OK, on hold or error
11ReasonCalculated Text of the first failed pre-check or the BAPI error message

Sample result list

Sales orderItemCustomerCustomer nameMaterialAvailability dateConfirmed qtyDeliveryDelivery qtyResultReason
0000012450000010200100Marmara GıdaFG-100111/18/202670080004712700Created
0000012488000020200245Karadeniz Market ZinciriFG-112011/18/202600On holdNo confirmed quantity
0000012502000010200388Toros Yapı MarketFG-205011/17/20262,4000On holdCredit block (release with VKM3)
0000012530000010200512Anadolu Toptan GıdaFG-330011/18/20261500ErrorOrder is being processed by another user
A view built with fictional sample data; not real system data.

How does the program work?

  1. Selection: from the schedule lines of open order items at the shipping point (VBAP-VSTEL), those whose material availability date (VBEP-MBDAT) is not later than the upper limit are taken; fully delivered items are skipped (VBUP-LFSTA in ECC, VBAP-LFSTA in S/4HANA).
  2. Pre-checks and reasons: header delivery block (VBAK-LIFSK), schedule-line delivery block (VBEP-LIFSP), credit status (VBUK-CMGST in ECC, VBAK-CMGST in S/4HANA), data incomplete for delivery (VBUK-UVVLK in ECC), zero confirmed quantity (VBEP-BMENG) and, if selected, an unconfirmed item on an order that requires complete delivery (VBAK-AUTLF).
  3. Items that pass are passed to BAPI_OUTB_DELIVERY_CREATE_SLS per order; split rules by shipping point, date and ship-to follow the standard delivery logic.
  4. BAPI_TRANSACTION_COMMIT is called after each successful order; the delivery number and quantity created (LIKP, LIPS) are written to the result list. In test mode only the pre-checks run and the items that would be delivered are listed.
  5. Held and failed lines are emailed to the shipping team with SO_DOCUMENT_SEND_API1; the full list stays in the job spool.

Performance notes

Split the job into separate steps per shipping point; the shipping point ranges must not overlap so that two parallel jobs never process the same order. Locked orders are listed as errors and retried in the next run.

Features

  • Runs as a background job
  • Test mode (check without posting)
  • Line-by-line result and error log
  • Send the result by email The exception list is sent to the person responsible for the shipping point every morning.
  • ALV list (sort, filter, subtotals)

Authorization objects

  • V_LIKP_VSTAuthorization to create deliveries by shipping point
  • V_VBAK_VKOAuthorization to read orders by sales area
  • S_OC_SENDAuthorization to send email (for the job user)

Frequently asked questions

Why a custom job instead of a VL10A background run?

The standard background run creates the deliveries but gives no reason for orders that were never selected. The custom job uses the same delivery logic through the BAPI and writes a reason for every order on hold, so customer service knows the problem before the customer calls.

Do the delivery split rules change?

No. Split criteria such as shipping point, ship-to, route and date come from the standard delivery creation and copy control settings; the program only decides which items go to delivery.

Does the program work on S/4HANA?

Yes. BAPI_OUTB_DELIVERY_CREATE_SLS is also used in S/4HANA. Status fields are read from VBAK and VBAP instead of VBUK/VBUP; for warehouses that run EWM, the warehouse request is distributed by the standard after the delivery is created.

Packages that include this solution

SD Package Custom

Order Fulfilment and Backorder Pack

A three-component pack that tracks every day whether customer orders are delivered on time and in full: unconfirmed and backordered order items, a …

3 components · v1.0

Related reports

SD Report Custom ALV report

Backorders and Unconfirmed Sales Order Items Report

A custom ALV report that shows, for open sales orders, how much of the requested quantity is not confirmed, the value of that quantity, how many days …

VBAK · VBAP · VBEP · VBUP

SD Report Custom ALV report

Credit-Blocked Sales Orders by Value and Age Report

A custom ALV report that groups credit-blocked sales orders per credit account and shows the blocked order value, the age of the oldest block, the …

VBUK · VBAK · VBAP · VBUP

Let us build this program for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Overnight Outbound Delivery Creation Job for Due Sales Orders with Exception List