<?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: Two Internal Tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278589#M495907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You are not supposed to write the data like that in internal table?&lt;/P&gt;&lt;P&gt;How many condition types for a single EBELN and EBELP will there, how do you know?&lt;/P&gt;&lt;P&gt;In that case if you write each Condition type as one column, how many condition types you will write? one EBELP will have 2 and other will have 5 and other will have 6 condition types, Is there any strict rule that it is only 5 or 6 cond types?&lt;/P&gt;&lt;P&gt;geneally we take the KNUMV field  or KNUMH field in both internal tables One in PO data and other in Tax data and use that field to read the tax related data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&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>Tue, 29 May 2007 10:23:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-29T10:23:35Z</dc:date>
    <item>
      <title>Two Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278586#M495904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have two internal tables with different data. But I have to cobined and make one entry,.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STRUCTURE OF IT_FINAL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;EBELN&lt;/P&gt;&lt;P&gt;EBELP&lt;/P&gt;&lt;P&gt;CNTYPE		" Condition type.&lt;/P&gt;&lt;P&gt;TAX.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;structure of it_fina1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBELN&lt;/P&gt;&lt;P&gt;EBELP&lt;/P&gt;&lt;P&gt;JIP1&lt;/P&gt;&lt;P&gt;JIP2&lt;/P&gt;&lt;P&gt;JMO1.&lt;/P&gt;&lt;P&gt;ZVAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is in the first internal table It_final contains more that one record for a particular EBELN and EBELP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBELN	EBELP		CNTYPE 	TAX.&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;185	10		JMO1.	150.&lt;/P&gt;&lt;P&gt;	10		JIP1.	120&lt;/P&gt;&lt;P&gt;			JIP2	130.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT I WANT ONLY ONE RECORD PER EBELN AND EBELP COMBINATIO. LIKE THIS IN THE SECOND INTENAL TABLE IT_FINAL1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBELN	EBELP	 JMO1	JIP1	JIP2	ZVAS.&lt;/P&gt;&lt;P&gt;185	10	150	120	130&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one write the code please ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Satya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278586#M495904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Two Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278587#M495905</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;Data : l_tabix type sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_final1 into wa_final1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_final into wa_final with key ebeln = wa_final1-ebeln&lt;/P&gt;&lt;P&gt;                                                          ebelp = wa_final1-ebelp&lt;/P&gt;&lt;P&gt;                                                          cntype = 'JM01'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;wa_final1-jm01 = wa_final-tax.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;read table it_final into wa_final with key ebeln = wa_final1-ebeln&lt;/P&gt;&lt;P&gt;                                                          ebelp = wa_final1-ebelp&lt;/P&gt;&lt;P&gt;                                                          cntype = 'JIP1'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;wa_final1-jip1 = wa_final-tax.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;read table it_final into wa_final with key ebeln = wa_final1-ebeln&lt;/P&gt;&lt;P&gt;                                                          ebelp = wa_final1-ebelp&lt;/P&gt;&lt;P&gt;                                                          cntype = 'JIP2'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;wa_final1-jip2 = wa_final-tax.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify it_final1 from wa_final1 index l_tabix.&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;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:17:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278587#M495905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Two Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278588#M495906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you put that many read statements performance will decrease.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from that is there any another method by using on change of like that ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Satya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:20:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278588#M495906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Two Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278589#M495907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You are not supposed to write the data like that in internal table?&lt;/P&gt;&lt;P&gt;How many condition types for a single EBELN and EBELP will there, how do you know?&lt;/P&gt;&lt;P&gt;In that case if you write each Condition type as one column, how many condition types you will write? one EBELP will have 2 and other will have 5 and other will have 6 condition types, Is there any strict rule that it is only 5 or 6 cond types?&lt;/P&gt;&lt;P&gt;geneally we take the KNUMV field  or KNUMH field in both internal tables One in PO data and other in Tax data and use that field to read the tax related data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&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>Tue, 29 May 2007 10:23:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278589#M495907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Two Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278590#M495908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data : l_tabix type sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SORT IT_FINAL by EBELN EBELP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_final1 into wa_final1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_final into wa_final with key ebeln = wa_final1-ebeln&lt;/P&gt;&lt;P&gt;ebelp = wa_final1-ebelp&lt;/P&gt;&lt;P&gt;cntype = 'JM01'&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BINARY SEARCH&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;wa_final1-jm01 = wa_final-tax.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;read table it_final into wa_final with key ebeln = wa_final1-ebeln&lt;/P&gt;&lt;P&gt;ebelp = wa_final1-ebelp&lt;/P&gt;&lt;P&gt;cntype = 'JIP1'&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BINARY SEARCH.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;wa_final1-jip1 = wa_final-tax.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;read table it_final into wa_final with key ebeln = wa_final1-ebeln&lt;/P&gt;&lt;P&gt;ebelp = wa_final1-ebelp&lt;/P&gt;&lt;P&gt;cntype = 'JIP2'&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BINARY SEARCH.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;wa_final1-jip2 = wa_final-tax.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify it_final1 from wa_final1 index l_tabix.&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;This is the optimized code. Read statements generally doesnt put that much load on server as compared to select statement inside a loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:23:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-tables/m-p/2278590#M495908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:23:48Z</dc:date>
    </item>
  </channel>
</rss>

