Your system has to manage a multitude of sales, delivery, and billing documents. R/3 offers a powerful piece of configuration that controls how the source documents are copied into target documents in a document flow.
Key Concept
In R/3, copy control allows you to move critical data from a source document to a target document and plays a key role in creating documents that make up a document flow. Document flows are sequences of documents that make up a business transaction in ERP systems like R/3. They link documents together and allow relevant data to be copied from one document in the flow to another. When a delivery document is created, for example, the system copies the relevant information from a sales order. Document flows are crucial to the Sales and Distribution (SD) module.
With copy control, documents such as sales orders can be generated based on information in existing sales, delivery, and billing documents, which are the components of some of the most common document flows in SD. The copy control function also provides the mechanics for performing other tasks such as checking what prerequisites must be met before any copying can take place.
Copy control settings are a flexible piece of the configuration that determine how information is moved from source to target documents in a document flow. Copy control's role in this process is to manage all the copying required for subsequent documents.
In this article, I will provide you with an overview of the copy control functionality and the various flexible features it offers. My focus is primarily on the copy control settings for billing documents, but the concepts are similar for copying information into sales and delivery documents. I will also detail the role that source and target document types and pricing types play in the process as well as explain how ABAP routines control certain copying prerequisites.
Configure Copy Control
As noted earlier, copy control manages the creation of sales, delivery, and billing documents in SD. Sales documents often reference other sales documents including quotations, contracts, and sales orders, which can be created from invoice documents. Billing documents can be created with references to delivery documents, sales documents, or other billing documents. Delivery documents are created using sales orders as their source.
Examples of the various copy control options for target and source documents are summarized in Table 1. Customizing copy control functionality is done within SD or by entering the transaction codes listed in the table.
| Sales document | Sales document | VTAA | | Sales document | Billing document | VTAF | | | | | | Delivery document | Sales document | VTLA | | | | | | Billing document | Delivery document | VTFL | | Billing document | Sales document | VTFA | | Billing document | Billing document | VTFF | |
| Table 1 | Target and source documents for copy control |
Note the naming convention. Transaction codes for copy controls begin with VT, the third letter represents the target document, and the fourth letter represents the source document. Sale documents are designated with an A, an F is used for billing documents, and an L is for delivery documents.
Build a Basic Bill
One basic application of the copy control function is to create a billing document. Billing documents are usually generated after a sales order ships or an order for a service item is completed. Using copy control, the billing document data is sourced from a sales order along with other documents, eliminating the need to re-enter information. The system automatically copies pricing information from the sales order to the billing document as well as the date, which is based on the delivery document, and other relevant information from preceding documents in the document flow.
There are three scenarios for creating billing documents with copy control. Billing documents can be created with references to delivery documents. If no delivery is involved such as for services-rendered contracts, a billing document can be sourced from a sales document. Billing documents can also reference another billing document. The system can then generate an invoice cancellation document using the original billing document if it is cancelled. I will walk you through each of these.
Unique copy control settings must be configured for each of the three billing scenarios and there are separate customizing options for each. This is true for all documents created with the copy control functionality. Copying prerequisites must be set if you wish to establish requirements prior to transferring data. You also define how data transfer takes place between the source and target documents as well as how the quantity and values are updated. The settings are maintained at the header- and item-line level and, if required, at the schedule-line level for sales documents. The copy control for billing documents is configured within SD Customizing > Billing > Billing document > Maintain copying control for billing documents.
Note
The principles used to create billing documents are the same for creating sales and delivery documents with copy control.
Delivery Documents to Billing Document Targets
Enter transaction VTFL to manage the copy control functions for billing document targets with delivery document sources. Document types determine the copy controls. For this example, I have used a couple of the most common document types. An Invoice billing document is the F2 target referencing an LF Delivery document source (Figure 1).

Figure 1
Copy control for billing document types from delivery document types
Double-clicking on the row moves you to the header-level copy control configuration screen (Figure 2). The header-level settings determine the copying requirements, export data, allocation number, and reference numbers.

Figure 2
Header-level settings for billing type F2 Invoice and delivery type LF Delivery
The copying requirements are small ABAP routines that dictate what (if any) prerequisites exist for each document type. At the header level, for instance, these routines can be used to validate document headers before copying. In my example, information from the LF Delivery document type is copied to billing document type F2, and the copy requirements determine what data will be exported.
The 003 Header/Div-related setting requires the system to check whether there are any blocks on delivery headers and, if so, prevents the information from being copied to the billing documents.
The Determ. export data field specifies how the system determines export data. For example, when dealing with customers from countries where the economic or political conditions are not stable, it often makes sense to redetermine the export data in the billing document rather than simply referring or copying the export data from the delivery document.
The Allocation number is a user-defined field on the billing document and accounting document that can be used to provide additional information. You can choose, for example, to enter the delivery number on the billing document you are creating. Then, you don't have to revert back to the delivery document when viewing the billing document. Allocation number options are selected from a drop-down menu (Figure 3) accessed by clicking on the Allocation number field.

Figure 3
Settings for filling allocation numbers
The reference number refers to a field in the accounting document header. You can define the Reference number field when creating a billing document by choosing from a list of options offered in the field's drop-down menu (Figure 4). It allows you to provide additional information such as a vendor invoice number or a customer's check number.

Figure 4
Options for filling the Reference number field
In addition to the allocation and reference numbers, you can copy item numbers from the delivery document source. Set a flag in the copy item numbers check box and item numbers are copied to the billing document.
Item-Level Settings
In addition to header-level settings, you must also configure settings at the item level and item-category level. Click on the Item folder in the Dialog Structure field (Figure 5). Setting the item- category level determines the copying requirements for an item as well as the data transfer logic for invoice tables. These settings establish what quantity to bill and how pricing should be carried out. In this example, TAN populates the Item category field.

Figure 5
Item-category level settings
Like in the header-level controls, the Copying requirements field at the item level defines VOFM routines. The ABAP code might be used to check for billing blocks at the header level, and similar VOFM routines would check the item-level billing blocks at the item level. In both cases, the copy requirement routines determine the prerequisites that must be met before copying takes place.
The Data VBRK/VBRP field manages the data transfer from a delivery to a billing document. In the R/3 system, billing information is stored in tables VBRK (billing header) and VBRP (billing item data). Data transfer is managed with VOFM routines and accordingly, a routine number is defined in this field. In my example, I've shown data transfer routine 001, which is a standard data transfer routine that determines how the system splits the invoices.
For billing documents sourced from delivery documents, the billing quantity can be defined as the delivered quantity less the already invoiced quantity when multiple deliveries and invoices exist. This is a mathematical formula performed automatically by the system when the Billing quantity field is set to B.
No new pricing calculations should be done at the time of billing. Prices should be carried over from the sales order, where conditions such as discounts have been defined. Pricing types define how condition types are determined and if they need to be recalculated or copied as is. Setting the Pricing type with a G value copies the pricing elements unchanged, but redetermines the taxes.
The Price source setting controls from where and in what sequence the conditions from the reference documents are copied to the billing document. The various price source options are chosen from a drop-down menu (Figure 6) that you access by clicking on the Price source field. Option E is used in this example, which determines the conditions from a delivery.

Figure 6
Price source options
Source Sales Documents to Billing Document Targets
The document types in Figure 7 determine the copy control for billing documents with reference to sales documents. I'll show you an example using an F2 target (Invoice) with an OR (Standard Order) source. These are common billing and sales document types.

Figure 7
Document types for billing targets (Tgt) and sales document sources
Settings at the header level for sourcing a sales document to a billing document (Figure 8) are similar to sourcing delivery documents, except for the copying requirements, which are order related in this case rather than delivery related.

Figure 8
Header-level copy control settings for sourcing a sales order document to an invoice target
The item-level copy control settings are configured as shown in Figure 9. In the first example, I used the item category TAN, which includes a delivery component. In this example, I used item category TAD for services, because with a service you invoice after an order and do not need to accommodate any delivery information.

Figure 9
Item category-level copy control settings for sales order to invoice
For billing documents created from sales orders, the billing quantity is determined based on the order quantity. Set the Billing quantity field to A using the drop-down menu. This calculates the order quantity less the invoiced quantity. The definition for billing quantity A is predefined in SD and does not need to be maintained. The other fields in this screen including Copying requirements, Data VBRK/VBRP, and Pricing type are maintained as they were in the earlier example.
Billing Document from a Billing Document Source
If you need to cancel a billing document in SD, R/3 does not delete it from the system. Instead, it creates another billing document with equal but opposite amounts and assigns a different billing type, an invoice cancellation. For these cases, the copy control allows you to create a billing document based on another billing document.
The Invoice Cancellation target header-level settings shown in Figure 10 use an original billing document as a source. The header-level settings are similar to the item-category level settings shown in Figure 11. Most of the settings perform the same functions discussed in the prior examples. You should be aware of a couple of exceptions, however.

Figure 10
Header-level settings for a billing document target with a billing document source

Figure 11
Item-category level settings for sourcing a billing documents to a target billing document
When creating an invoice cancellation from a billing document, the pricing elements should be copied exactly as they were in the source document. No changes should be made. The Pricing type is always set to D, which dictates that the copy pricing elements are copied unchanged.
Tip! If you define your own custom document types, e.g., sales document types or item categories, it is advisable to copy from existing elements so that the system automatically copies all the relevant customization settings. Always double-check the copy control settings for your customized items.
Billing Document Summary
You can see that the copy control function is a critical piece for customizing in SD. Table 2 on the next page offers a summary of the settings I used for targeting data to billing documents. Understanding the influence each of these settings has on how and what data flows from source documents to target documents will provide you with a clear picture of what is possible using copy control. Remember that these settings are some of the more common options employed in SD and they can be customized significantly.
| Select document-type configurations | LF source to F2 target | OR source to F2 target | F2 source to S1 target | | Copying requirements | 003 — Header (Delivery related) | 001 — Header (Order related) | 005 — Header (Cancellation) | | Allocation number | C — Delivery number | N/A | N/A | | Reference number | E — Current billing document number | E — Current billing document number | N/A | | Copy item numbers | Yes | Yes | Yes | | Item category | TAN — Standard item | TAD — Service item | TAN — Standard item | | Copying requirements | 004 — Delivery-related item | 002 — Item/order-related item | 006 — Cancellationitem | | Data VBRK/VBRP | 001 — Invoice split | 001 — Invoice split | N/A | | Billing quantity | B — Delivered quantity, less invoicedquantity | A — Ordered quantity, less invoicedquantity | N/A | | Pricing type | G — Copy pricing elements unchanged, but redetermine taxes | G — Copy pricing elements unchanged, but redetermine taxes | D — Copy pricing elements unchanged | | Price source | E — Delivery/order | | | |
| Table 2 | Summary of copy control settings for creating select billing documents |
Similar to creating billing documents, as I noted earlier, copy control settings also work for sales documents and delivery documents. For predefined sales and delivery document types, configuration settings are already maintained in the standard system. If you want to change or modify the settings, instead of modifying the standard settings, you may create another Z set of document types for your custom needs.

Mitresh Kundalia
Mitresh Kundalia heads the SAP practice at Quality Systems & Software (www.QSandS.com), a consulting firm specializing in SAP S/4HANA, SAP General Ledger, and complex System Landscape Optimization (SLO)-type reorganizations. Mitresh is widely acknowledged as a leading SAP expert, with multiple publications and an SAP-PRESS book to his credit. He has published more than 50 peer-reviewed articles and white papers, and he has given presentations at various SAP conferences and events. Mitresh is the chief solutions architect of General Ledger Migration Optimizer (GLMO), a leading product to accelerate and jump-start the SAP S/4HANA and SAP General Ledger initiatives; SAP Data Reorganization Optimizer (SDRO), an SLO-type product for managing complex system landscape reorganizations; and Group Currency Activation and Conversion (GCAC), a product suite to manage introduction of parallel currencies and conversion of data in a live SAP system.
You may contact the author at Mitresh@QSandS.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.