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.
cancel
Showing results for 
Search instead for 
Did you mean: 

ORDCHG IDOC - IDOC_INPUT_ORDCHG FM processing

Former Member
0 Kudos
1,504

Hi All,

We are trying to use the Order Change IDOC to receive SO changes from customer and post the changes to SAP.

Scenario - The original EDI order contains 4 line items, the customer wants to change/delete one line item, he triggers an EDI message for the changed line item which creates an ORDCHG IDOC in SAP.

Challenge - The IDOC_INPUT_ORDCHG FM is looking for all the line items from the original order even though the change is in one line item only.

Is there a standard solution/work-around for this?

Thanks,

Reddy

2 REPLIES 2

Former Member
0 Kudos
426

If the other lines are not added we get the error - 'Mandatory segment E1EDP20 missing'.

0 Kudos
426

Hi,

Ideally it should update the change/delete item only.  Can you debug the below code and if you want to do the any changes the user-exits are available for each and every segment.  The function module is also updating the sales orders through the BDC.

LVEDBF2O

  Auftragsposition ---------------------------------------------------*
*- item data ----------------------------------------------------------*
       when 'E1EDP01'.
         move idoc_data-sdata to e1edp01.
         perform zuordnen_orders_e1edp01.
*-Zusätzliche Daten aus IDOC-Struktur (Kundenerweiterungen)------------*
*-additional data's from IDOC (customer exit)--------------------------*
         sy-subrc = 0.
         perform customer_function_idoc using idoc_data.


case xaprau.
             when ' '.
               perform call_va02_new_orders using ok.
             when 'L'.