<?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: Dividing multiple internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758494#M1775012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narsingh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value of the sy-tfill always remain same during the execution of loop. It always contain the value of no. of records in your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important :-- if u are using the DO operation please check the proper sorting of all the internal table before DO operation.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the while &amp;amp; do-loop&amp;nbsp; sy-tfill and sy-tabix are blank sy-index is used in while and do while loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take one counter variable and update the variable + 1 after your bapi execute.&lt;/P&gt;&lt;P&gt;if you conform that all the internal table contains the same number of record then u can use this logic also.&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 i type i . &lt;/P&gt;&lt;P&gt;data count type i value 1 .&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DESCRIBE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;itab &lt;SPAN class="L0S52"&gt;LINES i.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;now i contains the number of record fill in the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************** Before this ensure that all internal table must be in sequence .. according to your requirement .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;do i times. " now u can use do loop use dynamically &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;call BAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count = count + 1. " now count variable update every time after your bapi is execute.&lt;/P&gt;&lt;P&gt;endddo.&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;Nishant Bansal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Oct 2013 09:17:28 GMT</pubDate>
    <dc:creator>nishantbansal91</dc:creator>
    <dc:date>2013-10-21T09:17:28Z</dc:date>
    <item>
      <title>Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758487#M1775005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have four internal tables having 4 records each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I want to take one record of each at a time and pass this one record&amp;nbsp; of each itab to a BAPI. After the BAPI has processed first records of all the four itabs, then I have to pass the second record of the itabs to the BAPI to process and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say I have internal tables itab1, itab2, itab3 and itab4, each having 4 records each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI takes 4 itabs as input (each having one row) and processes accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me in the logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think we can play with sy-tabix, but not sure how to implement it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narsingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 07:36:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758487#M1775005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-21T07:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758488#M1775006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narsingh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DO.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;lv_index = sy-index.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;READ TABLE tab1 ASSIGNING &amp;lt;fs_1&amp;gt; INDEX lv_index.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF sy-subrc NE 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;EXIT.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ENDIF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;READ TABLE tab2 ASSIGNING &amp;lt;fs_2&amp;gt; INDEX lv_index.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;READ TABLE tab3 ASSIGNING &amp;lt;fs_3&amp;gt; INDEX lv_index.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;READ TABLE tab4 ASSIGNING &amp;lt;fs_4&amp;gt; INDEX lv_index.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CALL FUNCTION 'YOURFUNCTION'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ENDDO.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 07:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758488#M1775006</guid>
      <dc:creator>former_member192854</dc:creator>
      <dc:date>2013-10-21T07:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758489#M1775007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narsingh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this can be achieved by following logic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES. " 4 or number of records &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ ITAB1 INTO WA_1 INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;READ ITAB2 INTO WA_2 INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;READ ITAB3 INTO WA_3 INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;READ ITAB4 INTO WA_4 INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_MAIN-FIELD_1 = WA_1-FIELD_1.&lt;/P&gt;&lt;P&gt;WA_MAIN-FIELD_2 = WA_1-FIELD_2.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;WA_MAIN-FIELD_n = WA_2-FIELD_1.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;WA_MAIN-FIELD_n = WA_3-FIELD_1.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;WA_MAIN-FIELD_n = WA_4-FIELD_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL BAPI_FUNCTION_MODULE.&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " by passing WA_MAIN&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR WA_MAIN, WA_1, WA_2, WA_3, WA_4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;-Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 07:59:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758489#M1775007</guid>
      <dc:creator>VijayaKrishnaG</dc:creator>
      <dc:date>2013-10-21T07:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758490#M1775008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Narsingh.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Get the record count of any one internal table.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; describe &lt;/STRONG&gt;table itab1.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Declare a temporary variable for loop counter.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA: cnt like sy-tabix.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt = 1.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3) Use While..Endwhile to fetch each record of 4 itabs and pass to BAPI.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; While &lt;/STRONG&gt;cnt &amp;lt;= sy-tfill.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; READ TABLE: itab1 INDEX cnt,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itab2 INDEX cnt,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itab3 INDEX cnt,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itab4 INDEX cnt.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL BAPI.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt = cnt + 1.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndWhile&lt;/STRONG&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 08:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758490#M1775008</guid>
      <dc:creator>Arun_Prabhu_K</dc:creator>
      <dc:date>2013-10-21T08:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758491#M1775009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for d reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But can u pls say where we will be using the record count of step 1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what will be the value of sy-tfill initially?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 08:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758491#M1775009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-21T08:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758492#M1775010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nargish,&lt;/P&gt;&lt;P&gt;There are multiple solution for your problem,Some logic are already written by expert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more logic is there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have some common value or key based value&amp;nbsp; inside the four internal table example if you are using bapi for matnr field then matnr field must present in each internal table, then use the loop. Using this logic you can do more validation in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at (one of your internal table has the max. entries that must present in each remaining 3 table) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;read itab2 with key = INTERNAL-TABLE-FIELDNAME.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;read itab3 with key&amp;nbsp; = INTERNAL-TABLE-FIELDNAME.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;read itab4 with key&amp;nbsp;&amp;nbsp; = INTERNAL-TABLE-FIELDNAME. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL 'BAPI' by passing all these field.&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;Thanks &lt;/P&gt;&lt;P&gt;Nishant Bansal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 08:56:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758492#M1775010</guid>
      <dc:creator>nishantbansal91</dc:creator>
      <dc:date>2013-10-21T08:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758493#M1775011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Narsingh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Initially sy-tfill will be zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Only after execution of describe table statement, &lt;STRONG&gt;SY-TFILL&lt;/STRONG&gt; will be filled with the total number of records in the internal table. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; We are using this value in step 3 to read each record of 4 itabs.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 09:02:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758493#M1775011</guid>
      <dc:creator>Arun_Prabhu_K</dc:creator>
      <dc:date>2013-10-21T09:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758494#M1775012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narsingh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value of the sy-tfill always remain same during the execution of loop. It always contain the value of no. of records in your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important :-- if u are using the DO operation please check the proper sorting of all the internal table before DO operation.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the while &amp;amp; do-loop&amp;nbsp; sy-tfill and sy-tabix are blank sy-index is used in while and do while loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take one counter variable and update the variable + 1 after your bapi execute.&lt;/P&gt;&lt;P&gt;if you conform that all the internal table contains the same number of record then u can use this logic also.&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 i type i . &lt;/P&gt;&lt;P&gt;data count type i value 1 .&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DESCRIBE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;itab &lt;SPAN class="L0S52"&gt;LINES i.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;now i contains the number of record fill in the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************** Before this ensure that all internal table must be in sequence .. according to your requirement .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;do i times. " now u can use do loop use dynamically &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;read table1 index&amp;nbsp; = sy-index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;call BAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count = count + 1. " now count variable update every time after your bapi is execute.&lt;/P&gt;&lt;P&gt;endddo.&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;Nishant Bansal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 09:17:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758494#M1775012</guid>
      <dc:creator>nishantbansal91</dc:creator>
      <dc:date>2013-10-21T09:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing multiple internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758495#M1775013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narasingh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with below process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside loop write READ Statement if you have any common keys from itab1 to itab2, itab3, itab4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you dont have any common keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the record by using INDEX values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 09:19:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dividing-multiple-internal-tables/m-p/9758495#M1775013</guid>
      <dc:creator>former_member188282</dc:creator>
      <dc:date>2013-10-21T09:19:39Z</dc:date>
    </item>
  </channel>
</rss>

