cancel
Showing results for 
Search instead for 
Did you mean: 

PO - Outbound Idoc -

Former Member
0 Kudos

Hi Everyone,

We have a scenario where we are trying to trigger outbound idocs for PO using a Z prg by calling  the FM - IDOC_OUTPUT_ORDERS.

When all the line items are deleted from the PO, it gives a hard message "No items exist" and stops.

Is there any way to get around this?

I have seen some posts in SDN about the same thing. I have not seen a solution though.

Any pointers in this regard would help me.

Thanks,

-Naveen.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I was able to fix this by copying the function group and all the function modules.

I copied the include LEINMF0Q to ZLEINMF0Q and commented the error message and now when all the line items are deleted, it would just send the header only.

Thank you every one.

Former Member
0 Kudos

Hi Naveen,

Even if the line items are deleted from the PO, the deleted items remain there in the EKPO table with deletion flag. Fetch the deleted items from EKPO table, and update the EDIDD importing table with the segment E1EDP01 (ACTION = 003) and then call FM IDOC_OUTPUT_ORDERS. It should solve your problem.

Thanks,

Baskar

Former Member
0 Kudos

Hi Baskar subramanian,

Your solution does not work. Please read my original post.

Thanks,

-Naveen.

Shiva_Ram
Active Contributor
shashi_thakur
Contributor
0 Kudos

Hi Naveen,

That is a standard SAP behaviour. I have a question though- Do you want to send an ORDERS idoc with the deleted line items with certain indicator or do you want to send an ORDERS idoc with only the Header data and no line item data. The solution will depend on the same.

Regards,

Shashi

Former Member
0 Kudos

Hi Shashi,

Thanks for your answer.

Ideally, I would like to send the header and all the line items with deletion indicator (if deleted).

If it is possible to send just the header, I can live with that.

Thanks,

-Naveen.

shashi_thakur
Contributor
0 Kudos

Hi Naveen,

Within the Function Module IDOC_OUTPUT_ORDERS, there is a PERFORM lesen_beleg, which reads the data from the PO.

Inside this Perform there is a Read from the item table EKPO, where there is a check on the Deletion Indicator Field (LOEKZ). It is because of this check that no line item data is fetched for the deleted items. So you might have to look at a modification in the standard code below to allow picking up of the deleted line items based on certain restricting criteria. Alternatively, copy IDOC_OUTPUT_ORDERS and create a new custom FM. and then instead of PERFORM beleg_lesen , copy and use z_beleg_lesen and create this custom Perform in INCLUDE LEINMF0Q using enhancement implementation. That way you can write your modified code in the new perform without touching the standard.

Hope this helps.

Regards,

Shashi