<?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 loop through an internal table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653649#M880073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks bro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I typed ABAPDOCU but then I got "You are not authorized to use Transaction ABAPDOCU" error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I tried my step:&lt;/P&gt;&lt;P&gt; LOOP at IF_PDL_APP~MYPARA&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I compiled, I got this error message:&lt;/P&gt;&lt;P&gt;With "LOOP AT itab", one of the additions "INTO", "ASSIGNING", or 'TRANSPORTING NO FIELDS" is required in the OO context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2008 07:52:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-14T07:52:13Z</dc:date>
    <item>
      <title>How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653638#M880062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a newbie in ABAP. Someone told me that Internal table is Array in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, now I need to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I loop through a given internal table of name-value pairs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please teach me &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 14, 2008 5:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 06:38:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653638#M880062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T06:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653639#M880063</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;You can do  as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"Assuming  you have some data in the itab.

loop at itab.
   write : / itab-field1, itab-field2, itab3-field3. etc.
endloop
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 06:41:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653639#M880063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T06:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653640#M880064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare ur internal table as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab type table of mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from MARA into table itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: itab-matnr,..........&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;Regards,&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 06:46:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653640#M880064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T06:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653641#M880065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wait wait...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look at your suggestion, do you assume that I already know the name of the field in the internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually i do not know what fields are available in the internal table (array). can you suggestion still work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice. i am really a newbie in abap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 06:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653641#M880065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T06:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653642#M880066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare ur internal table as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab type table of mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from MARA into table itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: itab-matnr,..........&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;(By double clicking on MARA, u can get field names)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 07:04:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653642#M880066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T07:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653643#M880067</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;Try like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data : begin of itab occurs 0.
           include structure lfa1.
data : end of itab.

select * from lfa1 into itab.

loop at itab.
  write : itab.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 08:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653643#M880067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T08:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653644#M880068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry guys, I am given this information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The internal table is MY_PARA type TT_MY_PARA of interface IF_PDL_APP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now, how do I declare something in my ABAP to loop through the given internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please pardon my poor knowledge in ABAP. I am only an art graduate who just learnt WinXp last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 07:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653644#M880068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T07:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653645#M880069</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;Can you post your code here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 07:27:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653645#M880069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T07:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653646#M880070</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;I do not have any code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am only told that an Internal Table defined as &lt;/P&gt;&lt;P&gt;MY_PARA type TT_MY_PARA of interface IF_PDL_APP&lt;/P&gt;&lt;P&gt;contains the information I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am requesting you guys to give me an ABAP code to loop through the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 14, 2008 5:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 07:30:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653646#M880070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T07:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653647#M880071</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;First of all I welcome you in the wonderfull world of ABAP &lt;/P&gt;&lt;P&gt;I will not send you any solution since most of the others has already sent you some of example.&lt;/P&gt;&lt;P&gt;But instead I will give you a usefull transaction that helps me a lot when I have some porblem in ABAP.&lt;/P&gt;&lt;P&gt;it's &lt;STRONG&gt;ABAPDOCU&lt;/STRONG&gt; transaction. It will provide you specific ABAP example code over all what is possible to find in ABAP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at it, and I thing that you will appreciate a lot this transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and have fun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 07:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653647#M880071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T07:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653648#M880072</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;TT_MY_PARA this is not standard table.&lt;/P&gt;&lt;P&gt;so, we don't the fields in it.&lt;/P&gt;&lt;P&gt;if u declere like  "MY_PARA type TT_MY_PARA of interface IF_PDL_APP"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is my_para have only work area no body for that.&lt;/P&gt;&lt;P&gt;if u need an internal table body u can define like "type table of".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with out knowing the fields there is no use in looping..&lt;/P&gt;&lt;P&gt;first u must know the fields in internal table and then do print/changes to that values...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;types: begin of ty_mara,&lt;/P&gt;&lt;P&gt;          matnr type matnr,&lt;/P&gt;&lt;P&gt;          ersda type ersda,&lt;/P&gt;&lt;P&gt; .........&lt;/P&gt;&lt;P&gt;          end of ty_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_mara type table of ty_mara.  &lt;/P&gt;&lt;P&gt;                            "for creating internal table body&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data:      wa_mara type ty_mara.&lt;/P&gt;&lt;P&gt;                           "for creating work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr ersda .... into table it_mara from mara where&amp;lt;...&amp;gt;.&lt;/P&gt;&lt;P&gt;   "select fetches the data from mara into u'r internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_mara into wa_mara.&lt;/P&gt;&lt;P&gt;"here one record is moved from body to work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_mara-matnr,wa_mara-ersda,.....  .&lt;/P&gt;&lt;P&gt;" here we print the data in work area.&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;regars,&lt;/P&gt;&lt;P&gt;chandu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 07:47:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653648#M880072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T07:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through an internal table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653649#M880073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks bro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I typed ABAPDOCU but then I got "You are not authorized to use Transaction ABAPDOCU" error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I tried my step:&lt;/P&gt;&lt;P&gt; LOOP at IF_PDL_APP~MYPARA&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I compiled, I got this error message:&lt;/P&gt;&lt;P&gt;With "LOOP AT itab", one of the additions "INTO", "ASSIGNING", or 'TRANSPORTING NO FIELDS" is required in the OO context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 07:52:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-loop-through-an-internal-table/m-p/3653649#M880073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T07:52:13Z</dc:date>
    </item>
  </channel>
</rss>

