<?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: Help with User-Exit. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-user-exit/m-p/1536326#M244680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears that it is running an older version of the code,  please make sure that the include program in your user exit is "Active".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jul 2006 23:13:16 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-07-27T23:13:16Z</dc:date>
    <item>
      <title>Help with User-Exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-user-exit/m-p/1536325#M244679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm kind of new in the area of developing enhancements such as a User Exit. What i'm trying to do is to control that some document clases cannot contain certain account assignment category, especifically the 'T'. The user exit i'm using is EXIT_SAPLMEREQ_008, this is called before a process called post. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;DATA:        lt_req_items        TYPE mmpur_requisition_items,&lt;/P&gt;&lt;P&gt;             ls_req_items        LIKE LINE OF lt_req_items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: TABLA TYPE MMPUR_REQUISITION_ITEMS.&lt;/P&gt;&lt;P&gt;DATA: ZMEREQ_ITEM like MEREQ_ITEM.&lt;/P&gt;&lt;P&gt;DATA: IDMEN(5).&lt;/P&gt;&lt;P&gt;DATA: LINEA TYPE UEBAN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TABLA2 LIKE MEREQ_ITEM-BNFPO OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Call method IM_REQ_HEADER-&amp;gt;GET_ITEMS&lt;/P&gt;&lt;P&gt;       receiving RE_ITEMS = TABLA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL METHOD IM_REQ_HEADER-&amp;gt;LOOKUP&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      RECEIVING IM_BNFPO = TABLA2.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORT ZMEREQ_ITEM  FROM MEMORY ID 'ZM'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT TABLA INTO ls_req_items.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ls_req_items-&amp;gt;ITEM-IM_DATA = ZMEREQ_ITEM.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;* MODIFICACION REALIZADA POR GLI 27-07-2006 ******&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Valida que los documentos indicados por el req&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MM-SOLP-001 no tengan tipo de imputacion T.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT IM_EBAN_CHANGES INTO LINEA.&lt;/P&gt;&lt;P&gt; if ( LINEA-BSART = 'G021' or ( LINEA-BSART between 'G201' and 'G219' )&lt;/P&gt;&lt;P&gt;    OR LINEA-BSART = 'G660' ) and  LINEA-KNTTP = 'T'.&lt;/P&gt;&lt;P&gt;    MESSAGE ID 'ZM' TYPE 'E' NUMBER '002'.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IDMEN = LINEA-BNFPO .&lt;/P&gt;&lt;P&gt;   IMPORT ZMEREQ_ITEM  FROM MEMORY ID IDMEN.&lt;/P&gt;&lt;P&gt;   LINEA-ZZAVANR1 = ZMEREQ_ITEM-ZZAVANR1 .&lt;/P&gt;&lt;P&gt;   LINEA-ZZNETWR1 = ZMEREQ_ITEM-ZZNETWR1 .&lt;/P&gt;&lt;P&gt;   LINEA-ZZAVANR2 = ZMEREQ_ITEM-ZZAVANR2  .&lt;/P&gt;&lt;P&gt;   LINEA-ZZNETWR2 = ZMEREQ_ITEM-ZZNETWR2 .&lt;/P&gt;&lt;P&gt;   LINEA-ZZAVANR3 = ZMEREQ_ITEM-ZZAVANR3  .&lt;/P&gt;&lt;P&gt;   LINEA-ZZNETWR3 = ZMEREQ_ITEM-ZZNETWR3  .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MODIFY IM_EBAN_CHANGES-ZZNETWR3 FROM LINEA-ZZNETWR3.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ENDLOOP.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problems are:&lt;/P&gt;&lt;P&gt;1. Strangely when I debug this code, the debugger checks the comments. It goes through it, don't really get this behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When it gets in: &lt;/P&gt;&lt;P&gt; LOOP AT IM_EBAN_CHANGES INTO LINEA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It executes like the 3 lines then stops, and it exits and don't execute the message, nor the following code when the if statement is false:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IDMEN = LINEA-BNFPO .&lt;/P&gt;&lt;P&gt;   IMPORT ZMEREQ_ITEM  FROM MEMORY ID IDMEN.&lt;/P&gt;&lt;P&gt;   LINEA-ZZAVANR1 = ZMEREQ_ITEM-ZZAVANR1 .&lt;/P&gt;&lt;P&gt;   LINEA-ZZNETWR1 = ZMEREQ_ITEM-ZZNETWR1 .&lt;/P&gt;&lt;P&gt;   LINEA-ZZAVANR2 = ZMEREQ_ITEM-ZZAVANR2  .&lt;/P&gt;&lt;P&gt;   LINEA-ZZNETWR2 = ZMEREQ_ITEM-ZZNETWR2 .&lt;/P&gt;&lt;P&gt;   LINEA-ZZAVANR3 = ZMEREQ_ITEM-ZZAVANR3  .&lt;/P&gt;&lt;P&gt;   LINEA-ZZNETWR3 = ZMEREQ_ITEM-ZZNETWR3  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Are there any lines limit for an user-exit, because this behavior is pretty strange for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Why does this user-exit executes comments? (Just in case, the comments are fine)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Gilberto Li&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 23:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-user-exit/m-p/1536325#M244679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T23:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with User-Exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-user-exit/m-p/1536326#M244680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears that it is running an older version of the code,  please make sure that the include program in your user exit is "Active".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 23:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-user-exit/m-p/1536326#M244680</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-27T23:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with User-Exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-user-exit/m-p/1536327#M244681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reich.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That wasn't the real problem, just didn't knew I had to reinitialize the transaction so he can update the changes made in the user exit. You just gave me an idea of what was going on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, that solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 23:20:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-user-exit/m-p/1536327#M244681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T23:20:45Z</dc:date>
    </item>
  </channel>
</rss>

