<?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: Ranges table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658495#M1445937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kim,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Grand Welcom to SCN/SDN&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;for Example it_period-low = 123450
IF it_period-LOW+4(2) LT '52'. " Means the 5th and 6th chars here it is 50
it_period-LOW+4(2) " the Same
 = it_period-LOW+4(2) + 1. Adding one to the Existing one then becomes 51
APPEND it_period.
ENDIF.
and regarding loop at ranges

if r_month contains Month names like JAN, FEB etc from T247 Table

loop at r_month.
write :/ r_month-low.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Mar 2010 13:50:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-19T13:50:24Z</dc:date>
    <item>
      <title>Ranges table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658494#M1445936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good day. I'm new to ABAP and wish to get your advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that there is no array concept in ABAP as internal table is used instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just read a topic on "Ranges table" and I came accross to this piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;============================================================&lt;/P&gt;&lt;P&gt;ranges: it_period for mcs0-sptag.  (the data type of sptag is DATS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_period-LOW+4(2) LT '52'.&lt;/P&gt;&lt;P&gt;          it_period-LOW&lt;EM&gt;4(2) = it_period-LOW&lt;/EM&gt;4(2) + 1.&lt;/P&gt;&lt;P&gt;          APPEND it_period.&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;May I know what is the meaning of the above piece of coding?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that it_period-LOW means lower limit for a range. BUT "it_period-LOW+4(2)" means what? &lt;/P&gt;&lt;P&gt;In C or C++, normally () means single dimension of an array, e.g. A(0) is the first item of array A, A(1) is the second item and etc. I am confused what is the usage of "()" in the ranges table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, can we loop at a Ranges table such as follow? If yes, appreciate you can provide an example when we can loop at a Ranges table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_period.&lt;/P&gt;&lt;P&gt;    ...&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 13:45:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658494#M1445936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T13:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658495#M1445937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kim,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Grand Welcom to SCN/SDN&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;for Example it_period-low = 123450
IF it_period-LOW+4(2) LT '52'. " Means the 5th and 6th chars here it is 50
it_period-LOW+4(2) " the Same
 = it_period-LOW+4(2) + 1. Adding one to the Existing one then becomes 51
APPEND it_period.
ENDIF.
and regarding loop at ranges

if r_month contains Month names like JAN, FEB etc from T247 Table

loop at r_month.
write :/ r_month-low.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 13:50:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658495#M1445937</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T13:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658496#M1445938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In it_period-LOW+4(2) , the 4(2) refers to the offset addition and its not specific to ranges. And yes you can loop at ranges table just as you do to a internal table. You should be getting the offset explanation easily from the SAP documentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 13:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658496#M1445938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T13:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658497#M1445939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The values here are 201052 where the first 4 digits are the year and the last two, are the week.  So in this code block they are simply incrementing the last two digits.  The use of the +4 means to skip the first four characters, and the (2) means use the last two for the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, you can simply loop the range table as you have coded.&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>Fri, 19 Mar 2010 13:52:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658497#M1445939</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2010-03-19T13:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658498#M1445940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read this document:  [Subfield Access|http://help.sap.com/abapdocu_70/en/ABENOFFSET_LENGTH.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB: it_period-LOW+4(2) is the month in a DATS field, but the code suggests it is a week number ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 13:52:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-table/m-p/6658498#M1445940</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-03-19T13:52:10Z</dc:date>
    </item>
  </channel>
</rss>

