Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

SO IDOC inbound create SO with reference to INV or SO #

Former Member
0 Kudos

Hi all,

I have a situation where I will get the inbound SO IDOC, through IDOC_INPUT_ORDERS and create a sales order with reference to a invoice number or another sales order (eg: consignment pick up and consignment fill up).

Except modifying the standard formed BDC in the FM, by adding additional screen code into the BDC, is there any other way to do so?

(eg: assign value into certain field in IDOC? Using another IDOC FM?)

Please advice.


Best Regards,



Former Member
0 Kudos

Hi ,

At a high level, the IDOC processing executes in the following manner:

1. Interpret IDOC header segments and captures organizational, customer master and purchase

order header details. Performs user exits for each segment to process customizations to data


2. Interprets item level segments and captures item level details like material information. Again, it

performs user exits for each segment.

3. Sums up the order data and determines the posting criterion viz. creating order with reference


4. Builds up batch data communication sequence (BDC) with respect to the required screen

sequence of posting a sales order.

5. While building up the BDC data, system performs user exit to process customizations to BDC


6. Calls transactions VA01 using the BDC data.

7. If the processing fails, an appropriate workitem is generated for workflow processing.

User Exit - ZXVEDU03

This user exit will be performed after each segment read in the IDOC processing function module. Exit is called during the perform interpret_idoc_orders in the idoc processing function module. The exit is executed before the BDC data building process and it is here where the invoice number would be retrieved into a variable from segment E1EDK02.



Save the you Number XXXXXXXXXX into a temporary variable.



User Exit - ZXVEDU04

In the function module IDOC_INPUT_ORDERS, form call_va01_new_orders is performed wherein BDC data is built up for every screen required to post a sales order. User Exit ZXVEDU04 is performed at various stages during the built up of BDC data. It is here in this user exit that a coding needs to be performed to insert BDC data for assigning sales order to the invoice

The BDC data for assign to invoice should be added soon after the BDC data for purchase order type is generated. The following BDC data logic should be coded in the user exit to facilitate assign to invoice

if you give me brief i can help you out more.

if helpful REWARD points

Thank you .



0 Kudos

Hi Ramana,

Thanks for the explanation, it's very details.

So meaning except modifying the BDC data in userexit, there's no other way that standard SAP able to handle create with reference scenario..

When we look in the standard SAP code, IDOC_INPUT_ORDERS, it can create SO with refer to quote number and create by refer to contract number...just wondering is there any way that the SAP code able to cater this kind of create with reference scenario....

(eg: by assigning certain field in segment's field will form the BDC that create SO with reference. Or..customized the order type that will prompt out the screen which filling in the reference billing #...)

Thanks again for the detail explanation.

Best Regards,