2007 Sep 07 3:37 PM
Hi,
I am searching for an IDoc that contains a particular customer number. Here is my scenario. I am sending a custom IDoc to third party system. Today i send 35 IDocs to the other system, The thrid party system owners informed me that one of IDoc they not received. But they don't know the IDoc number , but they know the customer number (CUSTNO) one of field in segment. Using this value how can i trace the IDoc in the sending system?
Sa_R
2007 Sep 07 3:47 PM
Hi,
If you know the IDoc type and date created, you can use transaction WE09 to search IDoc by content.
Regards,
Ferry Lianto
Hi,
I am searching for an IDoc that contains a particular customer number. Here is my scenario. I am sending a custom IDoc to third party system. Today i send 35 IDocs to the other system, The thrid party system owners informed me that one of IDoc they not received. But they don't know the IDoc number , but they know the customer number (CUSTNO) one of field in segment. Using this value how can i trace the IDoc in the sending system?
Sa_R
2007 Sep 07 3:47 PM
Hi,
If you know the IDoc type and date created, you can use transaction WE09 to search IDoc by content.
Regards,
Ferry Lianto
2007 Sep 07 3:54 PM
2007 Sep 07 3:54 PM
Or if you want to do it programmatically then you can read the data from the EDID4 table. The data you are looking for is contained in the SDATA field, but be careful when pulling this back because the field is 1000 characters long so you can run into memory issues. I tend to just fetch 100 records at a time.
First of all you need to find out where the customer number is held in the sdata field, you can use WE60 to find the position or simply write a test program that outputs sdata to a text file.
Here is some sample code.
* Split lt_edidc data into intervals of 100 to save memory
DESCRIBE TABLE lt_edidc LINES lv_num_of_lines.
lv_int_1 = 1.
lv_int_2 = lv_interval.
DO.
IF lv_int_1 > lv_num_of_lines.
exit.
ENDIF.
REFRESH lt_edidc2.
APPEND lines of lt_edidc from lv_int_1 to lv_int_2 to lt_edidc2.
* Get SDATA from edid4
SELECT DOCNUM
SEGNUM
SEGNAM
SDATA
INTO TABLE itab_edid4
FROM edid4
FOR ALL ENTRIES in lt_edidc2
WHERE docnum = lt_edidc2-docnum.
* and segnam = 'E1LTORH'.
SORT itab_edid4 by docnum segnum.
* for each interval get the data before we overwrite the data in
* itab_edid4. This way all the processing is done for only the
* amount of records specified in p_int
LOOP AT itab_edid4 INTO wa_edid4.
* The PO number is stored in thsi segment
IF wa_edid4-segnam = 'E1BPEKKOC'.
lv_po_num = wa_edid4-sdata+44(10).
lv_lifnr = wa_edid4-sdata+34(10).
ENDIF.
ENDLOOP.
lv_int_1 = lv_int_1 + lv_interval.
lv_int_2 = lv_int_2 + lv_interval.
ENDDO.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |