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: 

find the Inbound IDOC

Former Member
0 Kudos
1,137

Hi Experts,

I have a requirement to get the Inbound IDOC for particular PO. I have used the following method:

http://forums.sdn.sap.com/thread.jspa?threadID=1082790

That means using tables:

A) SRRELROLES

B) IDOCREL

This is working for most of the cases except if the inbound IDOC is amended by the sender ( ex:- requested quantity changed ).

1. If inbound IDOC received without any changes, it will be there in SRRELROLES as roletype = 'INBELEG'.

2. If inbound IDOC received with changes it is not there in SRRELROLES.

Could you please help me to resolve this issue?

Thanks,

Chaminda

3 REPLIES 3

former_member200345
Contributor
0 Kudos
524

Hi,

Use the tcode WE09 to search the IDOCs.

You can search by SEGMENT, SEGMENT FIELD, FIELD VALUE.

Regards,

Vijaymadhur.

0 Kudos
524

Hi,

Thank you very much for the reply. I want to find the inbound IDOC number based on the PO number and used in my Z report.

Is there any other way to find directly the IDOC based on PO without searching through all the IDOCs for the particular date of the PO?

(In WE09 - it retrieve all the IDOCs based on the date range and look through the given segment data to find the particular IDOC)

Thank you,

Chaminda

0 Kudos
524

Hi,

Thanks for your help.

anyway, finally i had to use the time consuming way as there is no any other way.

1. Get all the ORDRSP Idocs from EDIDC based on the selected date range

select docnum status

into table lt_edidc

from edidc

where credat in p_date1 and

mestyp = 'ORDRSP'.

if sy-subrc eq 0.

sort lt_edidc.

2. Get all segment data records for the control records

select mandt docnum counter segnum segnam psgnum hlevel dtint2 sdata

from edid4

into table lt_edid4

for all entries in lt_edidc

where docnum = lt_edidc-docnum and

segnam = 'E1EDK02'.

3. to imporve the performance, i have used BINARY SEARCH when search back the IDOC from PO.

Thanks,

Chaminda

Edited by: chamindakrat on Feb 17, 2012 12:07 AM