<?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: Internal Table - logic for Chunk in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640130#M607745</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;PRE&gt;&lt;CODE&gt;
data : v_index like sy-tabix
loop at itab
  move corresponding itab to itab_t.
  append itab_t
  if v_index &amp;lt;= 20.
     v_index = v_index + 1.
     continue.
  else.
    clear v_index .
    perform BDC using itab_t.
    refresh itab_t 
  endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2007 19:47:51 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2007-08-01T19:47:51Z</dc:date>
    <item>
      <title>Internal Table - logic for Chunk</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640127#M607742</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 have an internal table with n records.&lt;/P&gt;&lt;P&gt;I want to use at a time say max of 20 records .&lt;/P&gt;&lt;P&gt;This is calling a BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. &lt;/P&gt;&lt;P&gt;loop at n record.&lt;/P&gt;&lt;P&gt;take 20 records.&lt;/P&gt;&lt;P&gt;call BDC.&lt;/P&gt;&lt;P&gt;then next set of recrds.&lt;/P&gt;&lt;P&gt;repeat process till all records processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 19:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640127#M607742</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-08-01T19:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table - logic for Chunk</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640128#M607743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: remainder type i.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;remainder = sy-tabix mod 20.&lt;/P&gt;&lt;P&gt;if remainder = 0.&lt;/P&gt;&lt;P&gt;*-- twenty records are accumulated&lt;/P&gt;&lt;P&gt;call bdc.&lt;/P&gt;&lt;P&gt;refresh all the concerned tables and variables for the next 20 records.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;accumulate the records until you have 20 records.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 19:43:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640128#M607743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T19:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table - logic for Chunk</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640129#M607744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maintain a counter to take 20 records to process and repeat the process still all records are completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA V_COUNT TYPE I.&lt;/P&gt;&lt;P&gt;DATA C_COUNT TYPE I VALUE '20'.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;V_COUNT = V_COUNT + 1.&lt;/P&gt;&lt;P&gt;IF V_COUNT = 20.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION ....for 20 records&lt;/P&gt;&lt;P&gt;REFRESH BDCDATA.&lt;/P&gt;&lt;P&gt;CLEAR V_COUNT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;IF V_COUNT IS NOT INITIAL AND V_COUNT &amp;lt; C_COUNT.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION ....for 20 records&lt;/P&gt;&lt;P&gt;REFRESH BDCDATA.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 19:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640129#M607744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T19:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table - logic for Chunk</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640130#M607745</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;PRE&gt;&lt;CODE&gt;
data : v_index like sy-tabix
loop at itab
  move corresponding itab to itab_t.
  append itab_t
  if v_index &amp;lt;= 20.
     v_index = v_index + 1.
     continue.
  else.
    clear v_index .
    perform BDC using itab_t.
    refresh itab_t 
  endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 19:47:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640130#M607745</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-08-01T19:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table - logic for Chunk</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640131#M607746</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 this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: count type i.

loop at table
  if count LE 20. 
    add 1 to count.
  else.
    clear count.
    call bdc.
    "refresh all the concerned tables and variables for the next 20 records.
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop ...

 WHILE count le 20.   
   ADD 1 TO count.
   ...            
 ENDWHILE.                    
    clear count.
    call bdc.
    "refresh all the concerned tables and variables for the next 20 records.

endloop&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 19:50:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640131#M607746</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-08-01T19:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table - logic for Chunk</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640132#M607747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope this may be alternative....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab&lt;/P&gt;&lt;P&gt;count = count + 1.&lt;/P&gt;&lt;P&gt;if count = 20.&lt;/P&gt;&lt;P&gt;call BDC.   "Using itab1 which holds 20 records&lt;/P&gt;&lt;P&gt;clear count.&lt;/P&gt;&lt;P&gt;refresh itab1.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;APPEND LINES OF itab TO itab1&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all usefuls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;vinsee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 19:58:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-for-chunk/m-p/2640132#M607747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T19:58:47Z</dc:date>
    </item>
  </channel>
</rss>

