<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: user exit MM06E001 and debug in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143279#M451767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your code, but it still dosen't work. Then I followed your way to debug (this was ok), I found &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;wa_idoc_data&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; was changed exactlly, but after &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE dint_edidd FROM wa_idoc_data&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The table &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dint_edidd &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; was not updated.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the reason may be that the data type of the sdata in table dint_edidd is "LCHR", which requires special processing. Do you know this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Apr 2007 12:48:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-08T12:48:51Z</dc:date>
    <item>
      <title>user exit MM06E001 and debug</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143276#M451764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use user exit EXIT_SAPLEINM_011 (enhancement: MM06E001) to modify the outbound purchase order IDoc (ORDERS).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: wa_e1edka1 type e1edka1,
      wa_idoc_data type edidd,
      segNo like edidd-SEGNUM.


  LOOP AT dINT_EDIDD into wa_idoc_data.
    CASE wa_idoc_data-SEGNAM.
      WHEN 'E1EDKA1'.
         MOVE wa_idoc_data-SDATA TO wa_e1edka1.
         if wa_e1edka1-PARVW = 'WE'.
           exit.          .
         endif.
    ENDCASE.
  ENDLOOP.

wa_e1edka1-LIFNR = '1225'.
move wa_e1edka1 to wa_idoc_data-sdata.
modify table dint_edidd from wa_idoc_data.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code is used to set the E1EDKA1-LIFNR (vendor number) as '1225' when E1EDKA1-PARVW ='WE' (partner function). But it dosen't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 1:&lt;/P&gt;&lt;P&gt;What's wrong with my code? I don't have much ABAP experience, please correct me if there is some errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2:&lt;/P&gt;&lt;P&gt;How to debug user exit? I  use&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;break uerid.&lt;/P&gt;&lt;P&gt;or set breakpoint in the code.&lt;/P&gt;&lt;P&gt;None of them works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone give some ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 00:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143276#M451764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T00:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: user exit MM06E001 and debug</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143277#M451765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User this code. The only issue with your code that you were updating the idoc data (dint_edidd) outside out loop which you should do inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, for updating data, i have written two different sets of code. USE ANY ONE OF THEM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
DATA: wa_e1edka1 TYPE e1edka1,
      wa_idoc_data TYPE edidd,
      segno LIKE edidd-segnum.

*" Loop at idoc record
LOOP AT dint_edidd INTO wa_idoc_data.
*" check  E1EDKA1
  CASE wa_idoc_data-segnam.
    WHEN 'E1EDKA1'.
*"    move the idoc data    
      MOVE wa_idoc_data-sdata TO wa_e1edka1.
*"    check if partner type is 'WE'
      IF wa_e1edka1-parvw = 'WE'.
*"      update partner number
        wa_e1edka1-lifnr = '1225'.
        MOVE wa_e1edka1 TO wa_idoc_data-sdata.
*"      modify idoc data        
        MODIFY TABLE dint_edidd FROM wa_idoc_data.
        EXIT.          .
      ENDIF.
  ENDCASE.
ENDLOOP.

*"OR user this code
*"-----------------

*" Loop at idoc record where segment is E1EDKA1
LOOP AT dint_edidd INTO wa_idoc_data WHERE segnam = 'E1EDKA1'.
*"move the idoc data
  MOVE wa_idoc_data-sdata TO wa_e1edka1.
*"check if partner type is 'WE'   
  IF wa_e1edka1-parvw = 'WE'.
*"  update partner number  
    wa_e1edka1-lifnr = '1225'.
    MOVE wa_e1edka1 TO wa_idoc_data-sdata.
*"  modify idoc data    
    MODIFY TABLE dint_edidd FROM wa_idoc_data.
    EXIT.          .
  ENDIF.
ENDLOOP.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The debugger is not stopping at your break point because this exit triggers in update task. During V2 update. To debug this code you &amp;lt;b&amp;gt;have to turn on "update debuggin"&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;Regarding debuggin the code&amp;lt;/b&amp;gt; in update task follow this steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Go to ME21N / ME22N and create / change the  PO&lt;/P&gt;&lt;P&gt;- Hit the "message" button and go to the screen where you select your output type  and add new output for IDOC output.&lt;/P&gt;&lt;P&gt;- Before saving the data, turn on the debuggin using &amp;lt;b&amp;gt;'/h'&amp;lt;/b&amp;gt; command&lt;/P&gt;&lt;P&gt;- Now save the document.&lt;/P&gt;&lt;P&gt;- Once you are in debugger, &amp;lt;b&amp;gt;go to tab "Settings".&amp;lt;/b&amp;gt; In debuggin you will see this tab. This is in the same line as "Field", "table", "BreakPoint" etc. "Setting" is last tab.&lt;/P&gt;&lt;P&gt;- In "Setting" tab, &amp;lt;b&amp;gt;select the box 'Update debugging'&amp;lt;/b&amp;gt;. Hit 'save' button to save the setting.&lt;/P&gt;&lt;P&gt;- Now hit 'F8 ( execute)'. This will open one more session, which is update debugging.&lt;/P&gt;&lt;P&gt;- Once you are in update debuggin you can put a break point with menu "&amp;lt;b&amp;gt;Breakpoint --&amp;gt; Breakpoint at --&amp;gt; Function module&amp;lt;/b&amp;gt; and enter the function module name &amp;lt;b&amp;gt;EXIT_SAPLEINM_011&amp;lt;/b&amp;gt;. Hit 'Save' button to save your settings.&lt;/P&gt;&lt;P&gt;- Now hit 'F8 ( execute)' and the debugger will stop in this exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you still have a issue in your code or in debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 00:54:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143277#M451765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T00:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: user exit MM06E001 and debug</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143278#M451766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks again RS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have awared you some points. i will try it tommorow. today it's too late for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 01:22:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143278#M451766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T01:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: user exit MM06E001 and debug</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143279#M451767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your code, but it still dosen't work. Then I followed your way to debug (this was ok), I found &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;wa_idoc_data&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; was changed exactlly, but after &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE dint_edidd FROM wa_idoc_data&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The table &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dint_edidd &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; was not updated.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the reason may be that the data type of the sdata in table dint_edidd is "LCHR", which requires special processing. Do you know this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Apr 2007 12:48:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-mm06e001-and-debug/m-p/2143279#M451767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-08T12:48:51Z</dc:date>
    </item>
  </channel>
</rss>

