<?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: Difference between PROVIDE AND LOOP Key words in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142923#M1367279</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcin so much about your attachment file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Dec 2010 08:07:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-23T08:07:04Z</dc:date>
    <item>
      <title>Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142916#M1367272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;i need some information between Provide and Loop Keywords.&lt;/P&gt;&lt;P&gt;iam working on ABAPHR, using PNP Logical LDB. iam using the LOOP statement only to retrive the information from infotypes.&lt;/P&gt;&lt;P&gt;iam not using the PROVIDE Keywords.Because iam not feeling any difference between these two Key words. &lt;/P&gt;&lt;P&gt;Can any one tell me when we have to go for PROVIDE and LOOP Keywords.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 11:57:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142916#M1367272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T11:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142917#M1367273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i guess only pressing F1 on provide will help&lt;/P&gt;&lt;P&gt;multiple number of internal tabled can be processed together&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 12:10:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142917#M1367273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T12:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142918#M1367274</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;1) Provide will be used for only infotype internal tables declared with key infotypes where as loop works with  internal tables and info type internal tables&lt;/P&gt;&lt;P&gt;2) Provide can be used with multiple infotype internal tables where as loop will work with only one internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details press F1 help on the key words&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 12:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142918#M1367274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T12:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142919#M1367275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For HR reporting purpose you should use PROVIDE whenever possible (but only on infotype tables). &lt;/P&gt;&lt;P&gt;There are couple main differences:&lt;/P&gt;&lt;P&gt;1) with &lt;EM&gt;loop&lt;/EM&gt; you use only one table, with provide couple tables can be used at once&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
provide * from p0001
              * from p0002....
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This divides records in p0001 and p0002 so that smaller pieces are provided &lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;P0001 '--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="--------" /&gt;'--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="-------------------" /&gt;&lt;P&gt;'  - two entries in P0001 b/w some dates&lt;/P&gt;&lt;P&gt;P0002 '--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;'--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;'  - and two entries in P0001 b/w some dates&lt;/P&gt;&lt;P&gt;result  '--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="--------" /&gt;'--&lt;DEL&gt;'&lt;/DEL&gt;--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;' - loop is process three times, so you have JOIN on each separate states in P0001 and P0002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) if you provide BEGDA and ENDDA in provide&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
provide * ...
                BETWEEN begda AND endda...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then each record which exceeds these data range will be truncated to fit excatly these period .i.e record has BEGDA 24.01.2009, ENDDA 05.02.2009 and you are interested only in dates b/w 25.01.2009 - 31.01.2009&lt;/P&gt;&lt;P&gt;then the record which will be provided has dates truncated to 25.01.2009 - 31.01.2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) certain predeifned flags are set when you have provide data from different tables&lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;P0001 '--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="-----" /&gt;'--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;P&gt;' &lt;/P&gt;&lt;P&gt;P0015 ' gap here'----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;'&lt;/P&gt;&lt;P&gt;result  '--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="-----" /&gt;'-'----&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in coding it would result in&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
provide * from P0001 
               * from P0015
     if p0001_valid = 'X'.    "in all loop steps P0001 is valid
     endif.
    
     if p0015_valid = 'X'.    "but P0015 is not valid in first two loop steps, while valid for 3rd one 
     endif.
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the most important advantages to use PROVIDE over LOOP in HR programming. &lt;/P&gt;&lt;P&gt;For more info refer [Report Programming in HR|http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/PAXX/PYINT_PROGRAMM.pdf]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 12:21:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142919#M1367275</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-09-02T12:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142920#M1367276</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;In provide.. endprovide any no. of internal tables can be processed while in case loop..endloop you only process single internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 12:21:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142920#M1367276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T12:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142921#M1367277</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;please refer this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa1, &lt;/P&gt;&lt;P&gt;        col1 TYPE i, &lt;/P&gt;&lt;P&gt;        col2 TYPE i, &lt;/P&gt;&lt;P&gt;        col3 TYPE string, &lt;/P&gt;&lt;P&gt;      END OF wa1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa2, &lt;/P&gt;&lt;P&gt;        col1 TYPE i, &lt;/P&gt;&lt;P&gt;        col2 TYPE i, &lt;/P&gt;&lt;P&gt;        col3 TYPE string, &lt;/P&gt;&lt;P&gt;      END OF wa2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab1 LIKE STANDARD TABLE OF wa1, &lt;/P&gt;&lt;P&gt;      itab2 LIKE STANDARD TABLE OF wa2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: flag1(1) TYPE c, &lt;/P&gt;&lt;P&gt;      flag2(1) TYPE c. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa1-col1 = 1. &lt;/P&gt;&lt;P&gt;wa1-col2 = 6. &lt;/P&gt;&lt;P&gt;wa1-col3 = 'Itab1 Int1'. &lt;/P&gt;&lt;P&gt;APPEND wa1 TO itab1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa1-col1 = 9. &lt;/P&gt;&lt;P&gt;wa1-col2 = 12. &lt;/P&gt;&lt;P&gt;wa1-col3 = 'Itab1 Int2'. &lt;/P&gt;&lt;P&gt;APPEND wa1 TO itab1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa2-col1 = 4. &lt;/P&gt;&lt;P&gt;wa2-col2 = 11. &lt;/P&gt;&lt;P&gt;wa2-col3 = 'Itab2 Int1'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROVIDE FIELDS col3 FROM itab1 INTO wa1 &lt;/P&gt;&lt;P&gt;                               VALID flag1 &lt;/P&gt;&lt;P&gt;                               BOUNDS col1 AND col2 &lt;/P&gt;&lt;P&gt;        FIELDS col3 FROM itab2 INTO wa2 &lt;/P&gt;&lt;P&gt;                               VALID flag2 &lt;/P&gt;&lt;P&gt;                               BOUNDS col1 AND col2 &lt;/P&gt;&lt;P&gt;        BETWEEN 2 AND 14. &lt;/P&gt;&lt;P&gt;  WRITE: / wa1-col1, wa1-col2, wa1-col3, flag1. &lt;/P&gt;&lt;P&gt;  WRITE: / wa2-col1, wa2-col2, wa2-col3, flag2. &lt;/P&gt;&lt;P&gt;  SKIP. &lt;/P&gt;&lt;P&gt;ENDPROVIDE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 12:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142921#M1367277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T12:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142922#M1367278</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;       Simply, Provide is on Infotype and Loop is on internal table, we can use the where statement, joining in Provide statement.&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;Ravi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 12:31:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142922#M1367278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T12:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between PROVIDE AND LOOP Key words</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142923#M1367279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcin so much about your attachment file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 08:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-provide-and-loop-key-words/m-p/6142923#M1367279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-23T08:07:04Z</dc:date>
    </item>
  </channel>
</rss>

