<?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 Splitting internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181406#M125880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an internal table which has 100 entries . I have a parameter on the selection screen which says how many entries to club. &lt;/P&gt;&lt;P&gt;Like if I say 5 entries on the screen to club , the program should submit 20 jobs, if 4 then 25, if 3 then  33 jobs with 3 entries and 1 job with one entry .&lt;/P&gt;&lt;P&gt;Any idea how this can be done easily ? Any sample code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ankur Bhandari .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2006 07:17:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-17T07:17:15Z</dc:date>
    <item>
      <title>Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181406#M125880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an internal table which has 100 entries . I have a parameter on the selection screen which says how many entries to club. &lt;/P&gt;&lt;P&gt;Like if I say 5 entries on the screen to club , the program should submit 20 jobs, if 4 then 25, if 3 then  33 jobs with 3 entries and 1 job with one entry .&lt;/P&gt;&lt;P&gt;Any idea how this can be done easily ? Any sample code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ankur Bhandari .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 07:17:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181406#M125880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T07:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181407#M125881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ankur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a counter inside the loop. Once the counter is equal to the value entered on the SELECTION screen, submit the job and reset the counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The loop is for the internal table that holds the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 07:20:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181407#M125881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T07:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181408#M125882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure but maybe this helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;entries = 5.
i = 0.

do.
from = entries * i.
to = from + entries.
describe itab lines sy-tfill.
if sy-tfill lt to. 
  to = sy-tfill.
  stop = 'X'.
endif.
loop itab from from to to.
endloop.
if stop eq 'X'.
  exit.
else.
  add 1 to i.
endif.
enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 07:23:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181408#M125882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T07:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181409#M125883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is exactly what I did , but this fails for odd numbers also when the total no of entries which are there in the main internal table then the job won't get submitted.&lt;/P&gt;&lt;P&gt;Ankur Bhandari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 07:24:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181409#M125883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T07:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181410#M125884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you are looking at loop at internal table to start at a particular index you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab FROM &amp;lt;counterstart&amp;gt; to &amp;lt;counterend&amp;gt;.&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;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 07:24:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181410#M125884</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-01-17T07:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181411#M125885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS club TYPE i DEFAULT 7.
DATA entries TYPE i.
DATA rest TYPE i.
DATA counter  TYPE i.

DESCRIBE TABLE itab LINES entries. "number of table entries
counter = trunc( entries / club )."number without rest
rest = entries MOD club."rest

*normal entries
DO club TIMES.
  DO counter TIMES.
*submit ...
  ENDDO.
ENDDO.

*rest - residuary
DO rest TIMES.
*submit...
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 08:13:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181411#M125885</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-01-17T08:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181412#M125886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;append records to a tmp table and use sy-tabix that is the index of the appended record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then handle the line to the secondary table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then free the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters : split type i.

Data: tab1 type XXX occurs 0,
      tab2 like tab1.

loop at tab1.
append tab1 to tab2.
check sy-tabix = split.
submit ....
.
.
.
free tab2.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 08:25:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181412#M125886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T08:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181413#M125887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Is it solved now ? don't forget the reward!&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2006 09:08:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-internal-table/m-p/1181413#M125887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-17T09:08:38Z</dc:date>
    </item>
  </channel>
</rss>

