<?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: Please help with LOOP...WHERE in dynamic internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613414#M599693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_cnt(2) TYPE n,&lt;/P&gt;&lt;P&gt;        l_cnt1(3) TYPE n,&lt;/P&gt;&lt;P&gt;        l_nam(12),&lt;/P&gt;&lt;P&gt;        l_con(18) TYPE c,&lt;/P&gt;&lt;P&gt;        l_con1(18) TYPE c,&lt;/P&gt;&lt;P&gt;        lf_mat TYPE matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_bom_expl BY bom_comp bom_mat level.&lt;/P&gt;&lt;P&gt;  CLEAR: l_cnt1, &amp;lt;fs_dyn_wa&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Looping the component internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT it_bom_expl INTO gf_it_bom_expl.&lt;/P&gt;&lt;P&gt;    CLEAR: l_cnt1.&lt;/P&gt;&lt;P&gt;    AT NEW bom_comp.&lt;/P&gt;&lt;P&gt;      CLEAR: l_cnt, &amp;lt;fs_dyn_wa&amp;gt;, lf_mat.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For every new bom component the material data is moved to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;temp material table which will be used for assigning the levels&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;checking the count&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      it_mat_temp[] = it_mat[].&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Component data is been assigned to the field symbol which is checked&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;against the field of dynamic internal table and the value of the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;component number is been passed to the dynamic internal table field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ASSIGN COMPONENT c_comp_list OF STRUCTURE &amp;lt;fs_dyn_wa&amp;gt; TO&lt;/P&gt;&lt;P&gt;      &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;      &amp;lt;fs_check&amp;gt; = gf_it_bom_expl-bom_comp.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;    AT NEW bom_mat.&lt;/P&gt;&lt;P&gt;      CLEAR l_con.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;    lf_mat = gf_it_bom_expl-bom_mat.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Looping the temp internal table and looping the dynamic internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*by reading line by line into workarea, the materialxxn is been assigned&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;to field symbol which will be checked and used.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    LOOP AT it_mat_temp.&lt;/P&gt;&lt;P&gt;      l_nam = c_mat.&lt;/P&gt;&lt;P&gt;      l_cnt1 = l_cnt1 + 1.&lt;/P&gt;&lt;P&gt;      CONCATENATE l_nam l_cnt1 INTO l_nam.&lt;/P&gt;&lt;P&gt;      LOOP AT &amp;lt;fs_dyn_table2&amp;gt; ASSIGNING &amp;lt;fs_dyn_wa2&amp;gt;.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT l_nam OF STRUCTURE &amp;lt;fs_dyn_wa2&amp;gt; TO &amp;lt;fs_xy&amp;gt;.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;      IF &amp;lt;fs_xy&amp;gt; = lf_mat.&lt;/P&gt;&lt;P&gt;        CLEAR lf_mat.&lt;/P&gt;&lt;P&gt;        l_con1 = l_con.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Checking whether the material exists for a component and if so it is&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;been assigned to the field symbol which is checked against the field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;of dynamic internal table and the level of the component number&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;against material is been passed to the dynamic internal table field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IF &amp;lt;fs_xy&amp;gt; = gf_it_bom_expl-bom_mat.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT l_nam OF STRUCTURE &amp;lt;fs_dyn_wa&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;        CLEAR l_con.&lt;/P&gt;&lt;P&gt;        MOVE gf_it_bom_expl-level TO l_con.&lt;/P&gt;&lt;P&gt;        CONCATENATE c_val_l l_con INTO l_con.&lt;/P&gt;&lt;P&gt;        CONDENSE l_con NO-GAPS.&lt;/P&gt;&lt;P&gt;        IF l_con1 NE space.&lt;/P&gt;&lt;P&gt;          CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.&lt;/P&gt;&lt;P&gt;          CLEAR l_con1.&lt;/P&gt;&lt;P&gt;          l_cnt = l_cnt - 1.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        &amp;lt;fs_check&amp;gt; = l_con.&lt;/P&gt;&lt;P&gt;        l_cnt = l_cnt + 1.&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;    AT END OF bom_comp.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;At end of every new bom component the count is moved to the field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;symbol which is checked against the field of dynamic internal table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and the count is been passed to the dynamic internal table field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ASSIGN COMPONENT c_count OF STRUCTURE &amp;lt;fs_dyn_wa&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;      &amp;lt;fs_check&amp;gt; = l_cnt.&lt;/P&gt;&lt;P&gt;      INSERT &amp;lt;fs_dyn_wa&amp;gt; INTO TABLE &amp;lt;fs_dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2007 12:25:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-25T12:25:17Z</dc:date>
    <item>
      <title>Please help with LOOP...WHERE in dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613412#M599691</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;&lt;/P&gt;&lt;P&gt;i have a problem with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have an internal table &amp;lt;dyn_table&amp;gt; created dynamically with a column 'aaa'.&lt;/P&gt;&lt;P&gt;Now, in this column are groupid's are stored like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now what i want to do is to loop at &amp;lt;dyn_table&amp;gt; but only within the same group, so i would loop where 'aaa' = 2. After that where 'aaa' = 3.&lt;/P&gt;&lt;P&gt;How to achieve that with dynamic internal tables ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, i will be fast with assigning points!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 12:20:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613412#M599691</guid>
      <dc:creator>former_member5350</dc:creator>
      <dc:date>2007-07-25T12:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with LOOP...WHERE in dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613413#M599692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dynamic internal table is internal table that we create on the fly with flexible column numbers. &lt;/P&gt;&lt;P&gt;For sample code, please look at this code tutorial. Hopefully it can help you &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechnical.com/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm" target="test_blank"&gt;http://www.saptechnical.com/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 12:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613413#M599692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T12:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with LOOP...WHERE in dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613414#M599693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_cnt(2) TYPE n,&lt;/P&gt;&lt;P&gt;        l_cnt1(3) TYPE n,&lt;/P&gt;&lt;P&gt;        l_nam(12),&lt;/P&gt;&lt;P&gt;        l_con(18) TYPE c,&lt;/P&gt;&lt;P&gt;        l_con1(18) TYPE c,&lt;/P&gt;&lt;P&gt;        lf_mat TYPE matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_bom_expl BY bom_comp bom_mat level.&lt;/P&gt;&lt;P&gt;  CLEAR: l_cnt1, &amp;lt;fs_dyn_wa&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Looping the component internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT it_bom_expl INTO gf_it_bom_expl.&lt;/P&gt;&lt;P&gt;    CLEAR: l_cnt1.&lt;/P&gt;&lt;P&gt;    AT NEW bom_comp.&lt;/P&gt;&lt;P&gt;      CLEAR: l_cnt, &amp;lt;fs_dyn_wa&amp;gt;, lf_mat.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For every new bom component the material data is moved to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;temp material table which will be used for assigning the levels&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;checking the count&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      it_mat_temp[] = it_mat[].&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Component data is been assigned to the field symbol which is checked&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;against the field of dynamic internal table and the value of the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;component number is been passed to the dynamic internal table field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ASSIGN COMPONENT c_comp_list OF STRUCTURE &amp;lt;fs_dyn_wa&amp;gt; TO&lt;/P&gt;&lt;P&gt;      &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;      &amp;lt;fs_check&amp;gt; = gf_it_bom_expl-bom_comp.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;    AT NEW bom_mat.&lt;/P&gt;&lt;P&gt;      CLEAR l_con.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;    lf_mat = gf_it_bom_expl-bom_mat.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Looping the temp internal table and looping the dynamic internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*by reading line by line into workarea, the materialxxn is been assigned&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;to field symbol which will be checked and used.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    LOOP AT it_mat_temp.&lt;/P&gt;&lt;P&gt;      l_nam = c_mat.&lt;/P&gt;&lt;P&gt;      l_cnt1 = l_cnt1 + 1.&lt;/P&gt;&lt;P&gt;      CONCATENATE l_nam l_cnt1 INTO l_nam.&lt;/P&gt;&lt;P&gt;      LOOP AT &amp;lt;fs_dyn_table2&amp;gt; ASSIGNING &amp;lt;fs_dyn_wa2&amp;gt;.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT l_nam OF STRUCTURE &amp;lt;fs_dyn_wa2&amp;gt; TO &amp;lt;fs_xy&amp;gt;.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;      IF &amp;lt;fs_xy&amp;gt; = lf_mat.&lt;/P&gt;&lt;P&gt;        CLEAR lf_mat.&lt;/P&gt;&lt;P&gt;        l_con1 = l_con.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Checking whether the material exists for a component and if so it is&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;been assigned to the field symbol which is checked against the field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;of dynamic internal table and the level of the component number&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;against material is been passed to the dynamic internal table field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IF &amp;lt;fs_xy&amp;gt; = gf_it_bom_expl-bom_mat.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT l_nam OF STRUCTURE &amp;lt;fs_dyn_wa&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;        CLEAR l_con.&lt;/P&gt;&lt;P&gt;        MOVE gf_it_bom_expl-level TO l_con.&lt;/P&gt;&lt;P&gt;        CONCATENATE c_val_l l_con INTO l_con.&lt;/P&gt;&lt;P&gt;        CONDENSE l_con NO-GAPS.&lt;/P&gt;&lt;P&gt;        IF l_con1 NE space.&lt;/P&gt;&lt;P&gt;          CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.&lt;/P&gt;&lt;P&gt;          CLEAR l_con1.&lt;/P&gt;&lt;P&gt;          l_cnt = l_cnt - 1.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        &amp;lt;fs_check&amp;gt; = l_con.&lt;/P&gt;&lt;P&gt;        l_cnt = l_cnt + 1.&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;    AT END OF bom_comp.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;At end of every new bom component the count is moved to the field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;symbol which is checked against the field of dynamic internal table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and the count is been passed to the dynamic internal table field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ASSIGN COMPONENT c_count OF STRUCTURE &amp;lt;fs_dyn_wa&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;      &amp;lt;fs_check&amp;gt; = l_cnt.&lt;/P&gt;&lt;P&gt;      INSERT &amp;lt;fs_dyn_wa&amp;gt; INTO TABLE &amp;lt;fs_dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 12:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613414#M599693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T12:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with LOOP...WHERE in dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613415#M599694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you, but i do not really get the point how to solve the issue out of your sample. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the lack really is, that i cannot use where clause in dynamic internal table - so how could i solve the problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 14:12:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613415#M599694</guid>
      <dc:creator>former_member5350</dc:creator>
      <dc:date>2007-07-25T14:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with LOOP...WHERE in dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613416#M599695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Hi clemens,

try something like this

field-symbols : &amp;lt;FS&amp;gt; type any.

loop at &amp;lt;ITAB&amp;gt; ASSIGNING &amp;lt;WA_ITAB&amp;gt;.

 DO.
   ASSIGN COMPONENT 'AAA' OF STRUCTURE &amp;lt;WA_ITAB&amp;gt; TO &amp;lt;FS&amp;gt;.
   IF SY-SUBRC NE 0.
       EXIT.
    ENDIF.
   CASE &amp;lt;FS&amp;gt;.
       WHEN '2'.

            * do something

        WHEN '3'.

                  * do something
   ENDCASE.
ENDDO.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 14:18:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613416#M599695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T14:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with LOOP...WHERE in dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613417#M599696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, what i have is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  READ TABLE &amp;lt;dyn_table&amp;gt; INTO &amp;lt;dyn_wa&amp;gt; INDEX 1.
  ASSIGN COMPONENT 'CLSID' OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_field_g&amp;gt;.
  grpid = &amp;lt;dyn_field_g&amp;gt;.
  ze = 1.
  LOOP AT &amp;lt;dyn_table&amp;gt; INTO &amp;lt;dyn_wa&amp;gt; FROM ze.
    ASSIGN COMPONENT 'CLSID' OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_field&amp;gt;.
    IF &amp;lt;dyn_field&amp;gt; = grpid.
      WRITE:/ &amp;lt;dyn_field&amp;gt;.
      WRITE: grpid.
      ze = ze + 1.
    ELSE.
*      ze = ze - 1.
      READ TABLE &amp;lt;dyn_table&amp;gt; INTO &amp;lt;dyn_wa&amp;gt; INDEX ze.
      ASSIGN COMPONENT 'CLSID' OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_field_g&amp;gt;.
      grpid = &amp;lt;dyn_field_g&amp;gt;.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i want to achieve is, that when the CLSID changes, it does loop only within the rows that have same CLSID. If it is finished with the loop, it should go to the next row ( which has the different CLSID ) and loop within this group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where am I wrong ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 08:31:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613417#M599696</guid>
      <dc:creator>former_member5350</dc:creator>
      <dc:date>2007-07-26T08:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with LOOP...WHERE in dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613418#M599697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SORT &amp;lt;dyn_table&amp;gt; BY (filename).       &amp;lt;------dynamic.&lt;/P&gt;&lt;P&gt; LOOP AT &amp;lt;dyn_table&amp;gt; INTO &amp;lt;dyn_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT (filename) OF &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF &amp;lt;dyn_field&amp;gt; IS ASSIGNED.&lt;/P&gt;&lt;P&gt;       IF &amp;lt;dyn_field&amp;gt; EQ &amp;lt;last_val&amp;gt; OR SY-INDEX EQ 1.&lt;/P&gt;&lt;P&gt;           WRITE:/ &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;        ESLE.&lt;/P&gt;&lt;P&gt;           WRITE:/ 'New group'&lt;/P&gt;&lt;P&gt;           WRITE:/ &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    &amp;lt;last_val&amp;gt; = &amp;lt;dyn_field&amp;gt;    &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;A.Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:03:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-with-loop-where-in-dynamic-internal-table/m-p/2613418#M599697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-26T10:03:54Z</dc:date>
    </item>
  </channel>
</rss>

