‎2012 Jan 20 2:37 PM
I am processing a
IDOC (eg A )which inturn creates an another IDOC( eg B). Now I want idoc A to
have the information of idoc B in one of its segment. While I was debugging
the IDOC A I saw that IDOC B was being generated in FM
IDOC_INBOUND_ASYNCHRONOUS.
‎2012 Jan 20 4:38 PM
This would lead me to believe that you have a process that is creating and saving IDOC B upon arrival of IDOC A or after processing IDOC A. If that is the case, then perhaps you can code an exit for IDOC A (if you can figure out what the values in B will be) or programmatically add a row to IDOC A .
‎2012 Jan 20 5:27 PM
You have understood the question thank you. Now IDOC_INBOUND_ASYNCHRONOUS is the one that is generating the IDOC number for B. Now how to fetch IDOC number of B to IDOC A.
‎2012 Jan 20 7:35 PM
If there is no business requirement to process the IDOC A immediately, then you can deveop a small standalone program that will read the IDOC B data and then open the IDOC A for editing with the changes read from IDOC B and then process the IDOC A using transaction code BD87
‎2012 Feb 01 4:09 PM
IDOCS A and B are created successfully.........I want to store IDOC number of B in one of the segements of IDOC A....
‎2012 Feb 01 4:40 PM
Well, I don't like direct updates to DB tables, but if you know your IDOC number from A, you could retrieve it from EDIDC4, load the segnam you need into an appropriate structure and put the IDOC B number into the correct field, or put your IDOC B number into the correct positions in SDATA, and update EDIDC4 table from your table or structure you just worked on.
In somewhat similar situations, I've seen a custom table with both IDOC number written to it, and that serves as a cross-reference between A&B or B&A.
‎2012 Feb 01 5:13 PM
You must not change the Segment information once the IDOC is created.
What you should do is, once the IDOC B is created, add that information back into Status message with the IDOC B.
Regards,
Naimesh Patel