Sub topic 10
Copy control: who may follow whom, and what gets copied
This chapter assumes you can navigate the SAP GUI, know what SD, MM and FI cover, and understand headers and items. It also assumes you have seen the document flow display and table VBFA from earlier chapters.
What copy control does
Copy control is the customizing that governs what happens when one sales document is created with reference to another. It answers two questions:
- Which follow-on document types may be created from a given preceding document type?
- Which header and item data is copied, and under what conditions?
When a follow-on document is saved, SAP writes the link into VBFA. So copy control decides which links can exist in the document flow at all.
Where it is configured
Copy control is set per pair of source and target document types. Each pair has its own entry, so "order to delivery" and "order to invoice" are configured separately.
| Transition | Customizing path (transaction VTAA, VTLA, VTFA, VTFL) | Controlled by |
|---|---|---|
| Sales order to sales order | VTAA | Source and target order type |
| Sales order to delivery | VTLA | Source order type and delivery type |
| Sales order to billing | VTFA | Source order type and billing type |
| Delivery to billing | VTFL | Delivery type and billing type |
Each entry has three levels: header, item category and schedule line (for orders). Each level can name a data transfer routine and a copying requirement.
Copying requirements and data transfer routines
Two kinds of ABAP routines sit behind the settings.
- A copying requirement is a check. If it fails, the follow-on document cannot be created, or the item is skipped. For example, a requirement can block billing of an item that is not yet delivered.
- A data transfer routine changes or fills fields while the data is copied, for example to adjust quantities or set a reference field.
Routines are numbered and maintained in VOFM. Custom routines usually start at 900 or higher. Check them first when a copy behaves unexpectedly.
Also controlled here
- Quantity and pricing: whether pricing is copied from the source or determined again, through the pricing type.
- Reference number and item number: how the source document number is stored in the new document.
- Update of document flow: whether the link is recorded for the transition.
- Partial processing: whether an item can be copied once or repeatedly until its quantity is used up.
Diagram
Effect on the document flow
If no copy control entry exists for a pair of types, SAP refuses to create the document. A typical message says that the source document cannot be copied into the target type. In the document flow display, the missing follow-on is simply absent.
You can see the result of the configuration in VBFA. Each created follow-on has a row with the preceding document in VBELV and the subsequent one in VBELN.
DATA lv_order TYPE vbeln_va VALUE '0000004711'.
SELECT vbelv, posnv, vbeln, posnn, vbtyp_n
FROM vbfa
WHERE vbelv = @lv_order
INTO TABLE @DATA(lt_followers).If the table holds a delivery row but no billing row, check the VTFA entry and the billing relevance of the item category before you suspect a technical error.
Common errors
- Creating a document type that has no copy control entry for the source type.
- A copying requirement that rejects items, leaving them out of the follow-on document without an obvious reason.
- Changing copy control and expecting existing documents to update. Existing documents keep the data they already copied.
Exercise
A delivery exists for sales order 4711, but billing from the order fails with a message that copying is not possible. Which transaction do you check first, and why?
Show answer
Check VTFA, which holds the copy control entries from sales order type to billing type. A missing entry, or a copying requirement that rejects the items, blocks the follow-on. Also check the billing relevance of the item category.