Scheduled Billing Job with Pre-Billing Checks and Hold List
Short answer: A custom background job that bills goods-issued, unbilled deliveries at set times and runs customer-specific checks before billing. Deliveries that fail a check are not billed; they go to a hold list with the reason and the billing team is notified by email.
- Estimated effort
- M · 5–7 working days
- System
- ECC and S/4HANA
- Tables
- 9
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
VF04 processes the billing due list and VF06 runs it in the background with a variant. Neither applies business rules outside standard copy control: customers who require a customer PO number, payment terms or incoterms that differ from master data and goods issue dates outside the period are billed anyway and then cancelled and re-billed. A job that checks these rules before billing and reports the held items is needed.
Who uses it? Billing teams, sales operations, accounts receivable and SD consultants.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| LIKPDelivery Header | Deliveries to bill and goods issue date | Read | ECC + S/4 |
| LIPSDelivery Item Data | Delivery item, value and reference order | Read | ECC + S/4 |
| VBUPSales Document: Item Status | Item billing status in ECC | Read | ECC only |
| VBAKSales Document Header | Order header and billing block | Read | ECC + S/4 |
| VBKDSales Document: Business Data | Customer PO number, payment terms and incoterms | Read | ECC + S/4 |
| KNVVCustomer Master Sales Data | Customer sales area data: payment terms, incoterms, billing block | Read | ECC + S/4 |
| VBRKBilling Document Header | Billing headers created | Write | ECC + S/4 |
| VBRPBilling Document: Item Data | Billing items created | Write | ECC + S/4 |
| KNA1Customer Master (General Section) | Customer name | Read | ECC + S/4 |
S/4HANA notes
- VBUP → VBAP: VBUP was removed in S/4HANA; the item status fields moved directly into VBAP (sales), LIPS (delivery) and VBRP (billing).
BAPIs and functions used
- BAPI_BILLINGDOC_CREATEMULTIPLECreate Billing Documents (Multiple). Bills the deliveries that passed the checks; also supports a test run
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves the invoices created permanently
- SO_DOCUMENT_SEND_API1SAPoffice: Send Document with Attachments. Emails the hold list to the billing team
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_VKORG | Sales organization | Range / multiple | VBAK-VKORG | Yes | 1000 |
| S_VSTEL | Shipping point | Range / multiple | LIKP-VSTEL | No | 1000 |
| S_KUNNR | Ship-to party | Range / multiple | LIKP-KUNNR | No | 200100 |
| S_GIDAT | Goods issue date range | Range / multiple | LIKP-WADAT_IST | Yes | 01.11.2026 – 17.11.2026 |
| P_FKDAT | Billing date (blank = goods issue date) | Single value | VBRK-FKDAT | No | 17.11.2026 |
| P_MAIL | Email address for the hold list | Single value | — | No | [email protected] |
| P_TEST | Test mode (check without creating invoices) | Checkbox | — | No | X |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Delivery | LIKP-VBELN |
| 2 | Ship-to | LIKP-KUNNR |
| 3 | Customer name | KNA1-NAME1 |
| 4 | Goods issue date | LIKP-WADAT_IST |
| 5 | Delivery value | Calculated Sum of LIPS-NETWR of the delivery |
| 6 | Billing document | VBRK-VBELN |
| 7 | Invoice value | VBRK-NETWR |
| 8 | Result | Calculated Billed, test OK, on hold or error |
| 9 | Reason | Calculated Text of the first failed check or the BAPI error message |
Sample result list
| Delivery | Ship-to | Customer name | Goods issue date | Delivery value | Billing document | Invoice value | Result | Reason |
|---|---|---|---|---|---|---|---|---|
| 80004620 | 200100 | Marmara Gıda | 11/17/2026 | 56,400 | 90009012 | 56,400 | Billed | |
| 80004633 | 200388 | Toros Yapı Market | 11/16/2026 | 49,600 | 0 | On hold | Customer PO number missing | |
| 80004650 | 200245 | Karadeniz Market | 11/16/2026 | 18,300 | 0 | On hold | Payment terms differ from master data (Z030 / Z060) | |
| 80004658 | 300410 | Ege Tekstil Dış Ticaret | 11/17/2026 | 21,800 | 90009013 | 21,800 | Billed |
How does the program work?
- Deliveries in the selection are read: goods-issued (WADAT_IST filled) items whose billing status is open or partially processed (VBUP-FKSTA in ECC, LIPS-FKSTA in S/4HANA).
- For each delivery the order data is read and the checks run: the customer PO number (VBKD-BSTKD) must be filled for customers who require it, the payment terms (VBKD-ZTERM) and incoterms (VBKD-INCO1) on the order must match the customer’s sales area data (KNVV), there must be no billing block on the order (VBAK-FAKSK) or the customer (KNVV-FAKSD), and the goods issue date must be in an open period. Which rule applies to which customer is kept in a small rule table maintained by the business.
- Deliveries that pass are billed with BAPI_BILLINGDOC_CREATEMULTIPLE; in test mode the same BAPI is called as a test run and no invoice is created.
- Deliveries that fail are written to a hold list with the reason; the list is emailed to the billing team with SO_DOCUMENT_SEND_API1.
- Invoices created (VBRK, VBRP) and their values are listed in the job log; once the reason is fixed, the delivery is retried automatically in the next run.
Performance notes
Schedule the job once or a few times a day with separate variants per shipping point or sales organization. Call the BAPI in packages (for example 200 deliveries); deliveries that combine into one invoice must stay in the same package.
Features
- Runs as a background job
- Test mode (check without posting)
- Line-by-line result and error log
- Send the result by email The hold list is sent to the billing team after every run.
- ALV list (sort, filter, subtotals) The hold list can also be displayed as an ALV with drilldown to the delivery.
Authorization objects
- V_VBRK_FKABilling creation authorization by billing type
- V_VBRK_VKOBilling authorization by sales organization
- S_OC_SENDAuthorization to send email
Frequently asked questions
Does it change the invoice split rules?
No. Standard copy control decides which deliveries combine into one invoice. The program only filters which deliveries go to billing, so one faulty delivery does not hold up the whole group.
How are held deliveries released?
Once the reason is fixed on the order or in master data, the delivery is billed automatically in the next run. An authorized user can skip a specific check once for a single delivery; that decision is written to the log.
Can it be used on S/4HANA?
Yes. BAPI_BILLINGDOC_CREATEMULTIPLE is supported on S/4HANA as well; the billing status is read from LIPS instead of VBUP. It also works alongside the Fiori billing apps.
Related reports
Billing Documents Not Posted to Accounting Report
A custom ALV report that lists billing documents which exist in SD but have no accounting document yet, with the reason code, age and amount. At …
Sales Order – Delivery – Invoice Status Report
A custom ALV report that shows every sales order item on the same line as its delivery and invoice documents. You see in one list which orders have …
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.