<?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: PROBLEM IN LOOP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455772#M550672</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;use this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT T_KONP WHERE KSCHL = 'JVRD' OR KSCHL = 'JIPC'.
  IF T_KONP-KSCHL = 'JVRD'.
     TAX = 'Local Tax'.
  ELSEIF T_KONP-KSCHL = 'JIPC'.
    TAX = 'Central Tax'.
  ENDIF.
ENDLOOP.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
  TAX = 'Sales Tax'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2007 05:07:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-22T05:07:38Z</dc:date>
    <item>
      <title>PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455771#M550671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i HAVE USED THE BELOW LOOP for displaying the hearder text of Tax coloum based on condition(KSCHL). when ever it fine JVRD or JIPC conditions it shows in right manner but when it doesnt find any row, it wont show any text. I want it to show Sales Tax when JVRD or JIPC are not there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************************&lt;/P&gt;&lt;P&gt;LOOP AT T_KONP WHERE KSCHL = 'JVRD' OR KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;   IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;       IF T_KONP-KSCHL = 'JVRD'.&lt;/P&gt;&lt;P&gt;           TAX = 'Local Tax'.&lt;/P&gt;&lt;P&gt;       ELSEIF T_KONP-KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;           TAX = 'Central Tax'.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;         TAX = 'Sales Tax'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Khan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:04:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455771#M550671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455772#M550672</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;use this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT T_KONP WHERE KSCHL = 'JVRD' OR KSCHL = 'JIPC'.
  IF T_KONP-KSCHL = 'JVRD'.
     TAX = 'Local Tax'.
  ELSEIF T_KONP-KSCHL = 'JIPC'.
    TAX = 'Central Tax'.
  ENDIF.
ENDLOOP.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
  TAX = 'Sales Tax'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455772#M550672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455773#M550673</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;&lt;/P&gt;&lt;P&gt;LOOP AT T_KONP.&lt;/P&gt;&lt;P&gt;"Remove this.WHERE KSCHL = 'JVRD'OR KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;IF T_KONP-KSCHL = 'JVRD'.&lt;/P&gt;&lt;P&gt;TAX = 'Local Tax'.&lt;/P&gt;&lt;P&gt;ELSEIF T_KONP-KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;TAX = 'Central Tax'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;TAX = 'Sales Tax'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suruchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455773#M550673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455774#M550674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Khan,&lt;/P&gt;&lt;P&gt;You have already filtered out data in loop statement by saying&lt;/P&gt;&lt;P&gt;LOOP AT T_KONP WHERE KSCHL = 'JVRD' OR KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;So, you won't get any record which doesn't have  one of these values inside your loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your requirement you should have used:&lt;/P&gt;&lt;P&gt;LOOP AT T_KONP .&lt;/P&gt;&lt;P&gt;IF T_KONP-KSCHL = 'JVRD'.&lt;/P&gt;&lt;P&gt;TAX = 'Local Tax'.&lt;/P&gt;&lt;P&gt;ELSEIF T_KONP-KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;TAX = 'Central Tax'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;TAX = 'Sales Tax'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:09:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455774#M550674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455775#M550675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khan , &lt;/P&gt;&lt;P&gt;  Try this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_KONP WHERE KSCHL = 'JVRD' OR KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;IF T_KONP-KSCHL = 'JVRD'.&lt;/P&gt;&lt;P&gt;TAX = 'Local Tax'.&lt;/P&gt;&lt;P&gt;ELSEIF T_KONP-KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;TAX = 'Central Tax'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC ne  0.&lt;/P&gt;&lt;P&gt;TAX = 'Sales Tax'.&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455775#M550675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455776#M550676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;LOOP AT T_KONP WHERE KSCHL = 'JVRD' OR KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;TAX = 'Sales Tax'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;IF T_KONP-KSCHL = 'JVRD'.&lt;/P&gt;&lt;P&gt;TAX = 'Local Tax'.&lt;/P&gt;&lt;P&gt;ELSEIF T_KONP-KSCHL = 'JIPC'.&lt;/P&gt;&lt;P&gt;TAX = 'Central Tax'.&lt;/P&gt;&lt;P&gt;TAX = 'Sales Tax'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455776#M550676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455777#M550677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_KONP. &lt;/P&gt;&lt;P&gt;  CASE T_KONP-KSCHL.&lt;/P&gt;&lt;P&gt;    WHEN 'JVRD'.&lt;/P&gt;&lt;P&gt;         TAX = 'Local Tax'.&lt;/P&gt;&lt;P&gt;     WHEN  'JIPC'.&lt;/P&gt;&lt;P&gt;          TAX = 'Central Tax'.&lt;/P&gt;&lt;P&gt;     WHEN  others.&lt;/P&gt;&lt;P&gt;         TAX  =  'Sales Tax'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDCASE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:14:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455777#M550677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455778#M550678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sORRY aRUN , yOUR CODENT WORK.&lt;/P&gt;&lt;P&gt;I appritiate ur reply.&lt;/P&gt;&lt;P&gt;Khan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455778#M550678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455779#M550679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sORRY Richa, yOUR CODE doesnt WORK.&lt;/P&gt;&lt;P&gt;I appritiate ur reply.&lt;/P&gt;&lt;P&gt;Khan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455779#M550679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455780#M550680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;self answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 05:24:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-loop/m-p/2455780#M550680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T05:24:41Z</dc:date>
    </item>
  </channel>
</rss>

