Sub topic 11
Billing documents and invoices
This chapter assumes you know the sales order and delivery steps and can read basic ABAP SQL. Billing is the step where SD turns a delivered order into a receivable. It creates the billing document, which is the invoice sent to the customer, and it triggers the accounting posting.
What billing does
A billing document (table VBRK for the header, VBRP for items) is created with reference to a delivery or a sales order. Billing copies quantities, prices and partners from the reference document. It then determines the billing type, the payment terms and the accounting data.
Common billing types:
| Billing type | Name | Effect |
|---|---|---|
| F2 | Invoice (delivery-related) | Debits the customer, credits revenue |
| F1 | Invoice (order-related) | Same, but based on the order |
| G2 | Credit memo | Reduces the receivable |
| S1 | Cancellation | Reverses a billing document |
Billing in the process
Creating an invoice
Use transaction VF01 or the Fiori app Create Billing Documents. For many orders, use the billing due list (VF04) or a background job with VF04-style selection. Billing must be allowed for the reference document. A delivery-related invoice normally needs goods issue to be posted first.
The billing type controls several settings:
- The number range of the document.
- The copy control rules from order or delivery.
- Whether the document posts to accounting.
- Which output (printed or electronic invoice) is proposed.
Pricing is not copied blindly. By default, billing copies the prices from the order. You can also set copy control to redetermine prices, which is useful for price changes between order and invoice.
Billing blocks and incompletion
A billing block on the order or the item stops the document from being billed. Typical reasons are a price check or a customer dispute. An incomplete billing document, for example one missing a required field, is not released to accounting. Fix it with the incompletion log and release it again.
Verifying in the database
The accounting document is linked to billing by the reference fields AWTYP and AWREF. This query reads the Universal Journal lines created from one 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).You should see at least one receivable line (debit) and one or more revenue lines (credit). The amounts equal the billing document's net value plus tax.
Common errors
- No billing due: goods issue is not posted, or the item is blocked.
- Account determination error: no G/L account is found for the combination of chart of accounts, sales organization, account assignment group and account key.
- Wrong price: copy control was set to copy rather than redetermine prices.
Exercise
A delivery-related invoice (F2) cannot be created for a delivery. Name two checks you would make.
Show answer
Check that goods issue is posted for the delivery, and check that no billing block exists on the order or item. You can also check the copy control and the billing due list for the reason.