In my support project,(HBI), I have been working on various search operation on IDOC in SAP ECC and SAP PI.
Problem: For all failed message's in sap pi, I need to identify corresponding idoc numbers.
Case 1: In one of the integration scenarios, Idoc packing has been used, each idoc with different delivery number, idoc packing in sap pi, bundles more than 50 Messages and treating as single message. sometimes one of the idoc is missed with packing item details,( which is e1edl24 segment), due to this message has been failed in sap pi, which is mandatory segment in sap pi to map target message, but it is not a mandatory in SAP ECC,( It would have been failed in SAP ECC, if it is mandatory). if search the same idoc number in ecc for this segment ( we09, we02) we would not see any values(empty row) for this.
My job: I need to identify only missed segments of idoc, ( only incorrect delivery numbers of idoc).
My solution: by download in the message and opening in notepad++ and it's break point , I was able to find incorrect idoc numbers.
Other good solution: by downloading that message, find all list of idoc numbers;(notepad++ trick)
Now open SAP ECC, zse16, enter table EDID4( based on sap ecc version choose right one), give the above list of idoc, search
(you will get another list with idoc number, for which segments are available with duplicates)
copy this list(idoc numbers) in excel, use remove duplicate option in excel to remove duplicates. now compare this list with notepad++, with previous list of idocs , which has been captured from SAP PI, you will find addition idoc number(SAP PI), then treat these are missed idoc numbers with segments.
Without checking in SAP PI also , we can check
Find the list of idoc are transmitted for that day, by putting idoc filter option
in we02, download the list and copy idoc numbers.
Now use this list of idoc number, in table (IDOC data records, by giving this idoc number list in EDID4 by putting segment name)
it will give another list, use this list (idoc number) compare with again with previous idoc number,
if any additional idoc's found, this means which does not that segment in those idoc's.
This trick will save more time in support project, where you have limited access on production systems.