<?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: Looping in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397732#M815848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bujji&lt;/P&gt;&lt;P&gt;If am using IF or CASEit is coming as R1.If u dont mind can u tell me exactly where should i add  the piece of the code that u gave me .If u can write it in the code that i posted.it will be great use to me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2008 08:10:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-11T08:10:43Z</dc:date>
    <item>
      <title>Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397728#M815844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;In the below code if i give input for p1 as ' 1' and ' 3 ' .then i need to pick values of only april,may and june.P1 being select-option field.I am unable to run it in a loop.What i mean is if i give 1 and 3 as input in p1.I am getting only values for p1 =1.if i use p-low and p1-high then i am missing the middle value of p1 = 2.Please help me.Points will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: p1 FOR v_p1 OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM determine_power_cost USING&lt;/P&gt;&lt;P&gt;it_faglflext TYPE faglflext&lt;/P&gt;&lt;P&gt;v_gjahr TYPE gjahr&lt;/P&gt;&lt;P&gt;CHANGING lv_success_flag TYPE c.&lt;/P&gt;&lt;P&gt;DATA : lv_plant_maint_flag.&lt;/P&gt;&lt;P&gt;CLEAR lv_plant_maint_flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( it_faglflext-rcntr EQ '0000360101'&lt;/P&gt;&lt;P&gt;OR it_faglflext-rcntr LE '0000360111')&lt;/P&gt;&lt;P&gt;OR ( it_faglflext-rcntr EQ '0000360301'&lt;/P&gt;&lt;P&gt;OR it_faglflext-rcntr LE '0000360304').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( it_faglflext-racct EQ '0000332000' )&lt;/P&gt;&lt;P&gt;OR ( it_faglflext-racct EQ '0000332200' )&lt;/P&gt;&lt;P&gt;OR ( it_faglflext-racct EQ '0000332100' )&lt;/P&gt;&lt;P&gt;OR ( it_faglflext-racct EQ '0000332300' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_faglflext-ryear = v_gjahr."v_next_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_apr&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_apr + it_faglflext-hsl01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_may&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_may + it_faglflext-hsl02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_jun&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_jun + it_faglflext-hsl03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_jul&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_jul + it_faglflext-hsl04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&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>Mon, 11 Feb 2008 07:48:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397728#M815844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T07:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397729#M815845</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;SELECT-OPTIONS: p1 FOR v_p1 OBLIGATORY.&lt;/P&gt;&lt;P&gt;RANGES:r1 for v_p1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At selection-screen output.&lt;/P&gt;&lt;P&gt;read table p1 index 1.&lt;/P&gt;&lt;P&gt;r1-sign = 'I'.&lt;/P&gt;&lt;P&gt;r1-option = 'EQ'.&lt;/P&gt;&lt;P&gt;while p1-low LE p1-high.&lt;/P&gt;&lt;P&gt;r1-low = p1-low.&lt;/P&gt;&lt;P&gt;append r1.&lt;/P&gt;&lt;P&gt;p1-low = p1-low + 1.&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can use RANGES 'R1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 07:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397729#M815845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T07:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397730#M815846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi bujji&lt;/P&gt;&lt;P&gt;i understood most of it.Please tell me how to use the R1 now.Is dat like below am mentioning.Please coorect meif am wrong.Or should i use CASE condiotion.Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if R1 = 1.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_apr&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_apr + it_faglflext-hsl01.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if R1 = 2.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_may&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_may + it_faglflext-hsl02.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if R1 = 3.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_jun&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_jun + it_faglflext-hsl03.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if R1 = 4.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_jul&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_jul + it_faglflext-hsl04.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:04:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397730#M815846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397731#M815847</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;  Yes you can use CASE. I guess this is the best practice...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:08:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397731#M815847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397732#M815848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bujji&lt;/P&gt;&lt;P&gt;If am using IF or CASEit is coming as R1.If u dont mind can u tell me exactly where should i add  the piece of the code that u gave me .If u can write it in the code that i posted.it will be great use to me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397732#M815848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397733#M815849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bujji&lt;/P&gt;&lt;P&gt;If am using IF or CASE it is coming as R1 is unknown.If u dont mind can u tell me exactly where should i add the piece of the code that u gave me .If u can write it in the code that i posted.it will be great use to me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:11:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397733#M815849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397734#M815850</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;  Check the below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at R1.&lt;/P&gt;&lt;P&gt;CASE R1-low.&lt;/P&gt;&lt;P&gt;WHEN 1.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_apr&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_apr + it_faglflext-hsl01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 2.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_may&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_may + it_faglflext-hsl02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 3.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_jun&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_jun + it_faglflext-hsl03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 4.&lt;/P&gt;&lt;P&gt;t_power_cost_p2-power_cost_p2_jul&lt;/P&gt;&lt;P&gt;= t_power_cost_p2-power_cost_p2_jul + it_faglflext-hsl04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when others.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397734#M815850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397735#M815851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bujji&lt;/P&gt;&lt;P&gt;It is coming as R1 is unknown.And also int CASE condotion we are mentioning only R1-low what about values of R1-HIGH and also values between R1-LOW and R1-HIGH.If it covers then fine.Orelse pleae address my doubt.Thanks a lot for taking your time and supporting me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:19:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397735#M815851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397736#M815852</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;   R1 is the ranges what we need to define like below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGES:R1 FOR v_p1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Next we are initialising the R1 with P1. So as per our code R1 has all the low values, not high. Go with that code, still if you have any doubts then post your doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397736#M815852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Looping</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397737#M815853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bujji&lt;/P&gt;&lt;P&gt;AM getting evrything fine.But one small proiblem.IF i am giving input from 1 and 4 say.And the first time am not getting any values but the second time it showing me value.Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 08:39:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping/m-p/3397737#M815853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T08:39:14Z</dc:date>
    </item>
  </channel>
</rss>

