Find out how you can enhance the R/3 and mySAP ERP Central Component subcontracting process to document the transfer of materials involved in subcontracting orders. This process allows you to link the provision of subcontracting components to a specific subcontracting order so you always know how much of your product the subcontracting vendor has on hand and how much it needs to fulfill your subcontracting orders.
Key Concept
In subcontracting, a type of procurement, the subcontract vendor, or subcontractor, creates a product for you using materials that your company provides to it. These materials can come either from you directly or from one of your suppliers. After the subcontract vendor finishes the product, it delivers it to you and you pay the subcontract vendor for its services. I developed a two-part process to enhance the standard R/3 and mySAP ERP Central Component (ECC) subcontracting process. My process links the issue of components to each subcontracting order so you can track how many items a subcontractor receives with each order. (For more information about the standard process, refer to the sidebar, “Review Standard Subcontracting.”)
The custom development in part 1 simplifies the delivery route determination process and creates the delivery and post goods issue (PGI) document with the correct purchase order (PO) reference. In part 2, you complete a follow-up process that allows you to generate the documents required to ship a part to a subcontractor with the PO reference listed on the delivery documents.
Note
Standard R/3 and ECC systems support the basic subcontracting process, but provide limited capability to link document flow, track components at vendors, and create reports. SAP has not updated the basic subcontracting process in recent releases, so users must complement it with custom or external systems to track inventory at vendors and inventory in transit better, and tie the subcontracting logistics to the correct POs.
How You Can Use This Process
Say you order painted machine parts from a subcontractor. You provide the subcontractor with the unpainted machine parts and the subcontractor paints them to your specifications. The subcontractor is responsible for its service and for the components it adds (i.e., the paint). You pay for the service of painting and the additional components.
In this example, you place three orders for 400 parts each with the subcontractor. You send 1,000 unpainted machine parts to the subcontractor. The standard R/3 system shows that the subcontractor needs 200 more unpainted machine parts to complete your orders, but does not link the shortage to a specific order. This process allows you to create this link.
You also could use this process when you have a repair order for a customer-owned part that you need to service via a subcontracting order, and you want to make sure the customer receives the repaired part. The process allows you to link the PO to the shipment containing the broken part. In this case the subcontract PO number would appear on the customer’s sales order and you could use the subcontract PO to track the shipments connected with the parts.
Another way to use this process is if you export a part to have a service performed and then re-import it. You only want to pay duty on the service (added value) and not on the whole value of the material. In my example of painted machine parts, the unpainted and later painted material stays in your company’s ownership. This process provides the supporting documentation you would need for customs by identifying the subcontract PO on each transaction when you ship the part to and then receive the part back from the supplier.
Another benefit of implementing this process is that it allows you to create custom reports. Although this is outside of the scope of this article, let me briefly explain what you can do with the custom reports. With the help of your ABAP team you can use these cross-reference links to develop your own reports to control and monitor operations. These reports can help you track excess inventory or shortfalls due to order cancellations that cause changes to PO quantities and component parts. The custom reports, such as the one shown in Figure 1, provide the PO details (vendor, quantity) linked to shipments through delivery and material documents, which highlight discrepancies.

Figure 1
Custom report that shows component status (excess and shortage) on open POs
For tips to help improve the efficiency of the enhanced process, see the sidebar, “4 Tips for Using the Enhanced Subcontracting Process.”
Part 1: Custom Development
In the first part of this process you capture the PO number, pass it to the materials document at PGI, and introduce a simplified route determination procedure. Create a new data transfer routine and assign it to delivery type LB (delivery for subcontracting). In transaction VOFM, follow menu path Data Transfer>Deliveries.
With the data transfer routine, you can write custom code and display relevant messages, such as an error message when the system tries to create a delivery for a deleted PO line. Using function calls, you can code additional pop-up screens for user input. In this case, I need a pop-up screen so users can specify the PO number and line number to reference the delivery from the transaction ME2O results screen.
The system carries the PO and line number to the delivery using the data transfer routine, which you can assign to the delivery using transaction code VTLA or by following IMG path Logistics Execution>Shipping>Copying Control>Specify Copy Control for Deliveries. Use billing type FL for subcontracting deliveries. You can carry the PO reference here from the delivery using relevant copy control routines.
Validations within the data transfer routine include basic validations, such as ensuring that the PO line is valid or that the PO is for the same vendor who ordered the replacement part. The validations also may include complex function modules to perform elaborate checks such as those required for foreign trade. For example, the system can display an error message within a pop-up window when it creates a delivery. If the validations pass, the system stores the PO details in a suitable field, such as the External Delivery field, in the delivery document.
Once you create the delivery document, many more data fields, enhancements, copy routines, and standard validations become available. Some of these items include:
- Data fields: Fields to record shipment details, carrier, route, and other information
- Standard validations: The system carries out foreign trade checks and other required validations such as in the delivery at PGI and picking
- Business Add-In (BAdI) LE_SHP_GOODSMOVEMNT: Allows you to pass certain information from delivery data to material document tables MKPF and MSEG. The system passes the PO information recorded at creation to the material document using method CHANGE_INPUT_HEADER_AND_ITEMS.
- User exit 0VRF0001: You can find this in the route determination function module SD_ROUTE_DETERMINATION. (For more information, refer to SAP Note 386105.) This user exit allows you to search for generic routes when you do not want to use weight group-based routes. Activate user exit 0VRF0001. Within user exit EXIT_SAPL0VRF_001, set the parameter I_FLAG_GEN_VT to X to trigger a generic search for routes.
Part 2: The Follow-Up Process
To set up a complete process and to generate all of the documents required for shipping a part to a subcontractor, you need to follow these steps.
Step 1. Configure weight groups to determine shipment routes.
Step 2. Assign the pro forma invoice to delivery type LB.
Step 3. Assign billing relevance indicator D to item category LBN.
Step 4. Set the copy control for the billing document.
Step 5. Assign a pricing procedure to the pro forma invoice.
Step 6. Define transportation relevance for delivery type and line item category.
Step 7. Create a new customer account group. This is optional, depending on your requirements.
Step 8. Set up the master data.
Step 1. Configure weight groups to determine shipment routes. Weight groups are one of the factors R/3 and ECC use to schedule deliveries and determine pick and pack time. The route determination for subcontract delivery happens only if you use shipment routes with weight groups.
In this step, you map the deliveries in the shipping process so that relevant shipping documents receive the correct route information. The system determines the shipment route in the sales order or PO in the normal sales or stock transport order cycle, respectively. The system copies the same shipment route in delivery from the sales order or PO.
You must configure the following for the system to determine the shipment route when you create a delivery. Use transaction code SPRO and follow menu path Logistics Execution>Warehouse management>Shipping>Basic shipping functions>Route determination>Define weight groups (Figure 2). Enter 01 for Weight group and add a description, such as Wt group for SC del. Next, add at least one entry for the weight group (Figure 3).

Figure 2
Maintain the weight group

Figure 3
Maintain the details for the weight group
Step 2. Assign the pro forma invoice to delivery type LB. This allows the system to generate a billing document for delivery type LB. The system creates a pro forma invoice during the issue of material to the vendor. Use transaction code SPRO and follow menu path Sales and Distribution>Billing>Billing document>Define Billing Type or use transaction code VOFA (Figure 4). The pro forma invoice type FL (pro forma for delivery type LB) is the standard invoice type you use for the subcontracting delivery type LB.

Figure 4
Pro forma invoice for delivery type LB
Assign the appropriate number range in the Number systems section to identify the subcontracting pro formas (in my example, 15). Next, assign the output, partner, and text determination procedures so the system can determine the relevant output types and partner functions and copy texts from preceding documents. Make sure the SD document categ. and Transaction group are set to Pro forma invoice and Proforma invoices, respectively. This is the SAP default for billing type FL and ensures that system does not generate accounting documents.
Step 3. Assign billing relevance indicator D to item category LBN. Use transaction code SPRO and follow menu path Sales and Distribution>Billing>Billing Plan>Assign Billing Plan Types To Item Categories. In the screen shown in Figure 5, assign relevance for billing indicator D (Relevant for pro forma) to item category LBN (“Mat. provided” item).

Figure 5
Assign the billing plan type to an item category
Step 4. Set the copy control for the billing document. This sets the system to exclude the pro forma invoices from the accounting due index because they are not relevant for accounting. Use transaction code SPRO and follow menu path Sales and Distribution>Billing>Billing document>Maintain copying control for Billing documents>Copying Control: Delivery document to Billing document or use transaction code VTFL. Enter 009 for the header level copying requirements and 010 for the item level copying requirements.
Step 5. Populate the price field for the pro forma invoice. This enables the system to trigger the appropriate pricing procedure to capture shipment values for commercial and customs purposes. You must assign a pricing procedure to the combination of sales organization, distribution channel, division, document pricing procedure, and customer pricing procedure.
Use transaction code SPRO and follow menu path Sales and Distribution>Master Data>Pricing>Pricing control>Define and Assign pricing procedure>Assign document pricing procedures to billing types or use transaction code OVTP. You can use predefined settings for billing type FL (Figure 6).

Figure 6
Pricing procedure L is the predefined setting for billing type LB
Next, use transaction code SPRO and follow menu path Sales and Distribution>Pricing>Pricing control>Define and Assign pricing procedure>Document pricing procedure>Define pricing procedure determination or use transaction code OVKK. Maintain the data for document pricing procedure, customer pricing procedure, and sales area (Figure 7). For example, I assigned document pricing procedure L (from Figure 6), customer pricing procedure 7, and pricing procedure AL10 for sales area 2000/01/22.

Figure 7
Data for sales area 2000/01/22
Step 6. Define transportation relevance for delivery type and item category. For the delivery type, use transaction code SPRO and follow menu path Logistics execution>Shipments>Maintain transportation relevance>Maintain transportation relevance for delivery types or use transaction code OVTR. Check the Rel.transport check box for delivery type LB so you can create shipments (Figure 8). You cannot plan delivery documents with delivery types that are not relevant for shipping in a shipment.

Figure 8
Check the relevant item category for delivery line item category LBN
For the item category, use transaction code SPRO and follow menu path Logistics execution>Shipments>Maintain transportation relevance>Maintain transportation relevance for delivery item types or use transaction code OVTL. Check the Rel.for transport check box for item category LBN (Figure 9).

Figure 9
Check the relevant item category for delivery line item category LBN
Step 7. Create a new customer account group. This is an optional step, depending on your Financial Accounting (FI) requirements. The new account group represents the vendor as a ship-to party, if you want to separate subcontracting ship-to parties from regular customer ship-to parties. A separate customer account group also enables unique field determination characteristics if you have a requirement to disable normal sales transactions to vendors. Use transaction code SPRO and follow menu path Logistics General>Business Partners>Customers>Control>Define Account Groups and Field Selection for Customers or use transaction code OVT0. For my example, I created the customer account group ZSCC.
With this new customer account group, the system creates the customer master and vendor field and updates the customer master control data with the corresponding vendor number. You must configure this setting to create the delivery with transaction ME2O. Make the vendor a required entry by choosing Req. Entry for the Vendor under the Control tab (Figure 10) so the system cannot create customers in this customer account group without a linked vendor master. The subcontracting POs are placed on vendors, so this link is the most critical master data.

Figure 10
Select Req. Entry for Vendor
After you configure the new customer account group, you must assign the partner functions for it. Use transaction code SPRO and follow menu path Sales and Distribution>Basic function>Partner determination>Set Up Partner Determination for Customer Master or use transaction code VOPA. Assign the new customer account groups to functions SH (Ship-to party) and SP (Sold-to party) (Figure 11). If your billing type requires it, also assign BP (Bill-to party) and PY (Payer).

Figure 11
Assign the partner functions to new account group ZSCC
Step 8. Set up the master data. In this step, you create customer master data (ship-to) and assign the vendor codes, pricing schema group, and sold-to and ship-to partner functions to the customer master using transaction VD01. Select the relevant areas such as General Data and Sales Area and tabs such as Address, Shipping Data, Pricing, and Partner Functions.
After you complete these steps, you are ready to deploy a more detailed and controlled subcontracting process.
Review Standard Subcontracting
Standard R/3 and ECC support basic subcontracting if you have the required configuration in place with master data set up. To review the details of the subcontracting process, go to the Materials Management (MM) home page at
https://service.sap.com/SCM. Follow menu path
mySAP Supply Chain Management>Procurement>Materials Management>SAP R/3 MM FAQs. Alternatively, you can use the Web link
https://service.sap.com/~form/sapnet?_ SHORTKEY= 011000 35870000283790&. You also may want to consult the basic configuration settings that Rajen Iyer explained in his article, “Improve Your Shipping Operations with R/3’s Subcontracting Purchase Order,” which appeared in the June 2005
SCM Expert. His article explains the fine-tuning required to build a robust operating process.
4 Tips for Using the Enhanced Subcontracting Process
Here are four tips to help improve the efficiency of the enhanced subcontracting process.
1. You can run transaction ME2O more efficiently by unchecking unwanted check boxes on the selection screen such as With requirements from Reqs. and With external receipts from Requisitions. The report runs much more quickly without the unnecessary selections. Uncheck the check boxes in the standard transaction variant using transaction SHD0. You also could do this by creating a variant STANDARD for program RM06ELLB using transaction SE38 and selecting the Protect variant check box. You then can assign the STANDARD variant to transaction ME2O using transaction SE93.
2. You can adjust configuration settings and linkages for delivery type LB, delivery item type LBN, and billing type FL as required using the IMG. If you want to go back to the SAP default settings, you can copy them from the reference client 000. Track any changes to configuration tables with table change logs. Notable adjustments include:
- You must exclude pro forma invoices from the accounting due index. I describe how to do this in step 4.
- You should create a delivery only if inventory is available. Follow IMG path Logistics Execution>Shipping>Deliveries>Define Item categories for Deliveries (Figure 1). Set Check quantity 0 to error level B for item category LBN.

Figure 1
Configure the system to raise an error message if the system tries to create a delivery without available inventory
- A billing document may not be required if the system can generate all the shipping documents off the delivery outputs. You may opt to generate billing documents if you want to follow a uniform shipping procedure in Logistics Execution (LE) for subcontracting shipments and regular sales related shipments.
3. You can reverse the material documents for 541 movements created through delivery PGI only by using transaction VL09. You cannot use transaction MBST.
4. If you use warehouse-managed storage locations, then you may require additional configuration for tables such as T321 and T340D. The delivery due list through transaction ME2O has certain quirks, such as hard-coded values in program RM06ELLB, which require specific entries in the above tables.
For reference movement types 541 and 542 in table T321, create entries for your warehouse in transaction OMLR with the special stock indicator (SpStInd) T321-BSLVS as 1, and the movement indicator (T321-KZBEW) as L by copying SAP default entries (Figure 2).

Figure 2
For table T321 set the special stock indicator to 1 and the movement indicator to L for reference movement types 541 and 542
For table T340D, enter 1 (picking with warehouse transfer orders) for the picking technique for your warehouse and leave the other settings as is (Figure 3). Maintain this table using transaction code SPRO and menu path Logistics Execution>Warehouse Management>Interfaces>Shipping>Define Shipping Control>Shipping control per warehouse number.

Figure 3
Settings for table T340D
Vishwas Karandikar
Vishwas Karandikar, CPIM, CSCP, PMP, is a systems project manager at Applied Materials, Inc. He has more than eight years of solution design and project management experience focused on supply chain planning. He has led multiple implementations of SAP R/3 logistics modules and designed interfaces with external systems.
You may contact the author at editor@SCMExpertOnline.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.