3.3 Copying Control and Document Flow Between Sales Documents
Key Takeaways
Copying control defines which target document types can be created from which source document types, separately at header, item, and schedule line level.
Each level uses data transfer routines (which fields are copied), copying requirements (conditions that must be met), and switches such as the transfer of item numbers.
The Document flow update field at item level makes the system record referenced quantities or values so that completion rules can update the preceding item's status.
Copying control for sales documents is maintained in VTAA; related tables cover sales to delivery (VTLA), sales to billing (VTFA), delivery to billing (VTFL), billing to sales (VTAF), and billing to billing (VTFF).
Copying requirements and data transfer routines are ABAP routines maintained with VOFM; SAP uses numbers 001-599 and customers use 600-999.
Copying Control and Document Flow Between Sales Documents
The order-to-cash process is a chain of documents that refer to each other: an inquiry leads to a quotation, the quotation to a sales order, the order to a delivery, and the delivery to an invoice. Copying control is the Customizing that decides which of these references are allowed and what happens to the data when you create a document with reference. The official course calls the copy control tables important elements of your SAP S/4HANA system, because they control many functions executed whenever a document references a preceding one.
What Copying Control Determines
In Customizing, you define the business processes your company needs by deciding which document types can be copied to which other document types. You first define the target document and the source document, and you do this at the level that matches the document structure:
| Level | Target and Source | Example |
|---|---|---|
| Header | Target sales document type ← source sales document type | Standard order OR ← quotation QT |
| Item | Target ← source item category (within the header combination) | TAN ← AGN |
| Schedule line | Target ← source schedule line category | CP ← BN |
If a header combination does not exist, the business process is not possible: you cannot create the target document type with reference to that source document type.
At each level you maintain three kinds of settings:
- Data transfer routines: control which fields of the preceding document are transferred, for example header data, partner data, or business data.
- Copying requirements: conditions checked before copying. If they are not met, the system issues a warning or error and, if necessary, stops processing.
- Switches: specific controls, for example whether item numbers are transferred from the preceding document (a header switch) or whether the reference must be complete.
At item and schedule line level, the target category is optional. If you enter no target or an invalid one, the system determines the target from the normal item category or schedule line category assignment. Any value you do enter must exist in that assignment, at least as an allowed alternative.
Copying Requirements
Before data is copied, the system checks whether certain requirements are met. The official course gives these examples:
- Do the source and target documents have the same sold-to party?
- Is the item being copied already rejected in the source document?
- Have the items being copied already been fully referenced?
- Has the validity period of the source document been exceeded?
The data transfer routines run only after the copying requirements are fulfilled. Requirements and routines are ABAP routines, maintained in Customizing for Sales and Distribution under System Modifications → Routines → Define Copying Requirements (transaction VOFM). In a project, you first check whether the delivered requirements fit. If they do not, a developer creates a copy in the customer number range: routine numbers 001-599 are reserved for SAP, and 600-999 are for customers. A standard example from outline agreements: header requirement 002 (Header - Diff. Customer) allows the releasing sold-to party to differ from the contract's sold-to party.
Updating the Preceding Document: Completion Rule and Reference Status
When you create a document with reference, the preceding document must know how much has been referenced. To make this happen, the Document flow update field must be set at item level in copying control (official S46050 content). The system then updates the referenced quantity or value, and the completion rule of the preceding item category decides the status:
- Completion rule A: an inquiry item becomes Completed as soon as it is referenced in a quotation, even if only part of the quantity is copied.
- Completion rule B: a quotation item becomes Completed only when the complete quantity has been copied into orders. Until then it is Partially referenced, so further orders can be created from it.
- Contracts use further rules (target quantity, target value).
Entering a reason for rejection also gives the item the status Completed.
Using Create with Reference
The Create with reference function is available on the initial screen when you create a sales document and on the overview screen during entry. It lets you, for example, combine several quotations of one customer in one sales order. On the reference screen you can copy complete documents or select individual items and quantities.
Process Flow and Document Flow
The result of all references is visible in two forms:
- In UI5-based apps such as Manage Sales Orders or Manage Sales Quotations, the chain is shown as a process flow.
- In classic transactions such as
VA02, it is shown as the document flow, from which you can branch to each document and back.
For each document in the flow you can display the status overview, for example the delivery status of the order, the picking status of the delivery, the billing status, and the posting status of the billing document. This is the quickest way to find where a process is stuck.
The Family of Copying Control Tables
| Transaction | Source → Target | Typical Use |
|---|---|---|
VTAA | Sales document → sales document | Inquiry → quotation, quotation → order, contract → release order |
VTLA | Sales document → delivery | Order → outbound delivery (section 7.3) |
VTFA | Sales document → billing document | Order-related billing, credit memo request → credit memo (section 8.2) |
VTFL | Delivery → billing document | Delivery-related billing (section 8.2) |
VTAF | Billing document → sales document | Credit or debit memo request created with reference to an invoice |
VTFF | Billing document → billing document | Cancellation, invoice list |
Worked Example: Quotation to Order
A customer accepts quotation QT 20000050 for 100 units but orders only 60 now.
- In
VA01, you create a standard order with reference to the quotation. Copying controlOR ← QTexists, so the reference is allowed. - The header copying requirement checks, for example, that the sold-to party matches and the quotation is still valid. The data transfer routines copy partners and business data.
- At item level,
TAN ← AGNis maintained with Document flow update set. You copy 60 units. - Because
AGNuses completion rule B, the quotation item becomes Partially referenced with 40 units still open. A second order for 40 units makes it Completed. - The process flow in Manage Sales Quotations now shows the quotation with two successor orders.
Tip
If a reference fails with "copying is not possible", check in this order: does the header combination exist in VTAA, does a copying requirement block it (for example, a different sold-to party or an expired validity date), and is the item already fully referenced or rejected?
Which setting in copying control makes the system record the referenced quantities so that the preceding item's completion status can be updated?
The item number transfer switch at header level
The completion rule in the sales document type
The pricing type at schedule line level
The Document flow update field at item level
A credit memo request should be created with reference to an invoice. Which copying control table must contain the combination?
VTAA (sales document to sales document)
VTFL (delivery to billing document)
VTAF (billing document to sales document)
VTLA (sales document to delivery)
In copying control at item level, no target item category is entered for a source item category. What happens when the document is copied?
It comes from the normal item category assignment (VOV4).
The source item category is always copied unchanged.
The copy is rejected because a target item category is mandatory.
The system uses the item category of the first item in the target document.
Sections you finish are checked off in the contents.