2 Replies Latest reply: Feb 22, 2012 10:16 AM by priya sekar RSS

user exit for ME21N

priya sekar
Currently Being Moderated

Hello ,

we have issues in outbound idocs triggered while creating a purchase order in ME21N.

when i create a purchase order , three oubound idocs triggered for vendor ,customer and forwarder.

i want to know the logic of date field sent for the vendor in IDOC SEGMENT-E1EDP20 .

Actually the issue with the date is in production and not in quality.

I found that the logic is written in the user exit -EXIT_SAPLEINM_011 .

I kept breakpoint in this user exit and create a purchase order in ME21N. But the breakpoint didn't stop.

I am unable to find the issue ,please help me.

 

Regards

Manjusha.

  • Re: user exit for ME21N
    Ananthapadmanaban V
    Currently Being Moderated

    Hi

    check the below link

     

    For a list of IDoc Interfaces that support IDoc views, see SAPNet Note 185445.

     

    Prerequisites

    You must have IDoc development authorization (authorization object S_IDOCDEFT, for example in the role SAP_BC_SRV_EDI_DEVELOPER) before you can define a view.

     

    check by transaction /nSU53

  • Re: user exit for ME21N
    priya sekar
    Currently Being Moderated

    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.