Sub topic 17
Monitoring the process and spotting stuck documents
This chapter assumes you know the order-to-cash steps from the earlier chapters: sales order, delivery, goods issue, billing, accounting document and payment. It also assumes you can read basic SQL. Here you learn to find documents that stopped moving, and to work out why.
What "stuck" means
A document is stuck when its next step should have happened but has not. Most stuck documents fall into a few patterns:
| Symptom | Likely cause | Where to look |
|---|---|---|
| Order confirmed but no delivery | Delivery block, credit block, or no stock | Order header status and blocks |
| Delivery picked but not issued | Goods issue not posted | Delivery status |
| Goods issued but not billed | Billing block, or billing due list not run | Billing due list |
| Billing document without accounting document | Accounting posting error | Billing document, accounting status |
| Invoice open past due date | Payment not received or not matched | Open items of the customer |
Standard monitoring tools
Use the standard lists first. In SAP GUI, these transactions are common starting points:
- VA05 lists sales orders by customer, material or status.
- VL06O is the delivery monitor. It shows deliveries waiting for picking or goods issue.
- VF04 is the billing due list. It shows delivery-related items that are ready for billing but not yet billed.
- FBL5N shows customer line items, including open invoices.
In the Fiori launchpad, equivalent apps exist, such as Manage Sales Orders and Manage Billing Documents. Exact app names depend on your release, so check your launchpad catalog.
Following the stuck document
Start from the last good document and look at its successors. The document flow table VBFA stores them. If an order has no delivery row, the process stopped after the order.
DATA(lv_vbeln) = CONV vbeln_va( '0000012345' ).
SELECT vbelv, posnv, vbeln, posnn, vbtyp_n
FROM vbfa
WHERE vbelv = @lv_vbeln
INTO TABLE @DATA(lt_flow).An empty result, or a result with no delivery type, tells you the order never produced a delivery. Next, check the blocks and status on the order. Then check the credit status and the availability check result from the earlier chapters.
For the accounting step, search the Universal Journal for the billing document:
DATA(lv_billing) = CONV vbeln_vf( '0090001234' ).
SELECT rbukrs, gjahr, belnr, docln, racct, hsl
FROM acdoca
WHERE rldnr = '0L'
AND awtyp = 'VBRK'
AND awref = @lv_billing
INTO TABLE @DATA(lt_journal).If the billing document exists but this query returns nothing, the invoice was created without a posting to accounting. Check the billing document's accounting status and the posting error log.
Common mistakes
- Checking only the order. A completed order status does not prove billing happened.
- Ignoring partial flows. An order with several items can have one item billed and another stuck.
- Reading ACDOCA without the ledger. Filter on
rldnr, or you may count lines from other ledgers.
Exercise
A billing document 0090001234 shows in VF03, but the ACDOCA query for it returns no rows. Which step of the process is stuck, and where do you look first?
Show answer
The step between billing and accounting is stuck. The invoice exists in SD, but its posting to financial accounting did not complete. Look first at the billing document's accounting status and the related posting error log, for example a missing account determination or a closed posting period.