11-21-2011 3:51 PM
Hello.
I have added an extension to the IDOC type ORDERS05 in order to add a new data to the IDOC to get a KOSTL in it (I won't go into the details of how I get the right KOSTL, I have the solution and it's not quite pertinent to the question).
Though, I have read that the User Exit EXIT_SAPLEINM_011 is the one that allows to add fields to an IDOC and it is where I put my code. Unfrotunately, when I use the transaction code ME23N (or any others close to it), if I put a break point in the user-exit, I don't seem to be able to make it pass throught there. What is needed in ME23N to be able to pass in the User-Exit EXIT_SAPLEINM_011? How can I make it stop to the breakpoint I have inserted to see what happens once in there? Does the fact it is not stopping mean that it doesn't go in that user-exit? And even more general... am I even in the right User-Exit?
Thank you for helping me
<removed by moderator>
Edited by: SBenoit on Nov 21, 2011 4:53 PM
Edited by: Thomas Zloch on Nov 21, 2011 6:13 PM
11-21-2011 4:39 PM
In IDOC_OUTPUT_ORDERS function module that creates the outbound ORDERS05 IDoc.
--> EXIT_SAPLEINM_002 will be called repeatedly for each IDoc segment while the IDoc is still building
--> EXIT_SAPLEINM_011 will be called once for the whole IDoc, once SAP finished building it
So yes, you can use any of these user exits to manipulate the output IDoc.
Also, the break point won't get triggered when output type is set to trigger immediately (dispatch time 4) when you issue the output from ME22N / ME23N, because the IDoc will be triggered asynchronously in this mode by the system and not in your session, so your session break points are ineffective.
What you need to do is go into the ME22N output page (Click Messages on ME22N screen, select the condition type in yellow color (not yet processed), click on "Further data"and set "Dispatch time" to 1 (Send with periodically schedule job). After doing this issue the output (by saving the PO etc). This will mean that the output IDoc is not triggered immediately.
Now put the break point in the suggested user exit.
Come to SE38 and execute RSNAST00 program, give "Output application" as "EF", object key as your PO number (format it with leading zeros for full 10 digits) and enter your output type. Run it and then you will see that your break point is hit.
11-21-2011 4:39 PM
In IDOC_OUTPUT_ORDERS function module that creates the outbound ORDERS05 IDoc.
--> EXIT_SAPLEINM_002 will be called repeatedly for each IDoc segment while the IDoc is still building
--> EXIT_SAPLEINM_011 will be called once for the whole IDoc, once SAP finished building it
So yes, you can use any of these user exits to manipulate the output IDoc.
Also, the break point won't get triggered when output type is set to trigger immediately (dispatch time 4) when you issue the output from ME22N / ME23N, because the IDoc will be triggered asynchronously in this mode by the system and not in your session, so your session break points are ineffective.
What you need to do is go into the ME22N output page (Click Messages on ME22N screen, select the condition type in yellow color (not yet processed), click on "Further data"and set "Dispatch time" to 1 (Send with periodically schedule job). After doing this issue the output (by saving the PO etc). This will mean that the output IDoc is not triggered immediately.
Now put the break point in the suggested user exit.
Come to SE38 and execute RSNAST00 program, give "Output application" as "EF", object key as your PO number (format it with leading zeros for full 10 digits) and enter your output type. Run it and then you will see that your break point is hit.
11-21-2011 6:10 PM
02-22-2012 9:15 AM
Hi Vishnu,
We searched a lot..atlast we came to know your reply for this post..It really worked..thanks a lot..
11-21-2011 5:49 PM
Hi
Please, see Note 361068 - EDI export: Segment E1EDKA1; Fields insufficient. It talks about fields related with addresses, but perhaps it works too for your requirement.
I hope this helps you
Regards
Eduardo
11-21-2011 6:05 PM
Thank you very much for this info. It is not quite what I'm looking for but this is useful info that I'm keeping that I didn't know!