‎2007 Nov 07 9:16 AM
Dear all my friends,
I am new on ABAP development.
now, i am trying to read IDOC data into SAP-SD,
please help me to share your experience, documents, sample code !
many thanks !
Message was edited by:
Quoc Luc Nguyen
‎2007 Nov 07 12:42 PM
Hi Quoc Luc Nguyen,
Pls provide more info:
Is the IDoc in your ECC (or R/3) system or r u trying to bring it from outside/another system to your system?
If it's in your system, r u trying to process it through the standard way or do u want to read its content?
Igal
‎2007 Nov 07 2:39 PM
Dear Igal,
I am using ECC system.
i am trying to import IDOC file from other system (non-SAP system).
i want o read content of IDOC file, then i will import data into my system (ECC)
thank for your time !
‎2007 Nov 08 5:08 AM
hi,
just follow up this link and it will provide u the basic knowledge of performing it step by step:-
http://saptechnical.com/Tutorials/ALE/ALEMainPage.htm
if u find it useful den go give points also.
regards,
ric.s
‎2007 Nov 11 9:22 AM
Hi Quoc Luc Nguyen,
I still did not understand if the IDoc is now in your ECC - can find your idoc in WE05?
If not and it's in another system or on your file system then u should configure an ALE scenario (search for ALE scenario, u'll find tons of detailed info) or use tools such as lsmw.
If u found it, the idoc data is stored in 2 tables: edidc - for control data (number, status, partners/ports etc) and edid4 (as of ver. 4.0 and higher) for the actual data (its content). The best way to get the data is to use FM EDI_SEGMENTS_GET_ALL (u have 2 use EDI_DOCUMENT_OPEN_FOR_READ b4 and EDI_DOCUMENT_CLOSE_READ after) by the idoc number. The data is returned in the table IDOC_CONTAINERS which is also by the same logic as in db table EDID4: the data is concatenated in field SDATA, by the structure that is written in field SEGNAM (in your data declaration create a structure of the type of what's written in SEGNAM and then move SDATA to it).
Good luck
Pls reward points if helps
Igal