<?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: how to set error message inside the loop...module pool in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697107#M1577583</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;as only the last digit(5-8) will change, write a select statement on   Z table write a where condition as below.&lt;/P&gt;&lt;P&gt;select matnr from ztab  into itab where (matnr like 1234*) &lt;/P&gt;&lt;P&gt;then looping through the table itab will not take much time and if duplicates  ar efoung while looping, raise message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;KIshore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Feb 2011 12:14:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-15T12:14:50Z</dc:date>
    <item>
      <title>how to set error message inside the loop...module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697104#M1577580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;     Am creating Table Control without wizard. In that i am looping the values, that is, Once if i entered 5 digit values means, 12345-08... the values should be stored in z-table like this 12345,12346,12347,12348 . That is 5-8 it as to update in z table. for this i createdloop at itab and inside that i written a code to count the value and all. and also its clearly updating the value in ztable too. now i want to know, if once again i entered the same value means, like 12345-08.. it as to show error messge.I dont know how to set the condition with error message inside the single loop .... Its all comes under module pool program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santhosh.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 09:11:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697104#M1577580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-15T09:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to set error message inside the loop...module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697105#M1577581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i understood your doubt, here goes the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT itab INTO wa_itab.  " This is your loop
  l_tabix = sy-tabix. "l_tabix receives the line of the loop
  READ TABLE itab WITH KEY itab = wa_itab.  "itab is the same tab of your loop 
  IF sy-subrc EQ 0 AND l_tabix NE sy-tabix.    "Here the sy tabix have the value of the read table.
*     Here you do your error treatment.
  ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explanation: When you are looping your internal table, you use a READ TABLE to see the already recorded registers. If the read table finds one register (sy-subrc EQ 0) and the this register is not the one of the current line (l_tabix NE sy-tabix). It means you have a duplicated register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe there is someway easier to do this, but this is what i thought now.&lt;/P&gt;&lt;P&gt;I hope this was your doubt hehe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thales Schmidt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 11:34:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697105#M1577581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-15T11:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to set error message inside the loop...module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697106#M1577582</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;What i will do is...if its a z table i will creaate one more field like "Combination Key". For each record of 12345,12346,12347,12348 i will store 12345-08 against it . So that its easy to do such manipulations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It can be also done through looping logic but lots of effort is needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 11:54:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697106#M1577582</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-02-15T11:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to set error message inside the loop...module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697107#M1577583</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;as only the last digit(5-8) will change, write a select statement on   Z table write a where condition as below.&lt;/P&gt;&lt;P&gt;select matnr from ztab  into itab where (matnr like 1234*) &lt;/P&gt;&lt;P&gt;then looping through the table itab will not take much time and if duplicates  ar efoung while looping, raise message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;KIshore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 12:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-set-error-message-inside-the-loop-module-pool/m-p/7697107#M1577583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-15T12:14:50Z</dc:date>
    </item>
  </channel>
</rss>

