<?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: replace into corresponding in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095313#M979310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make 4 internal table &lt;/P&gt;&lt;P&gt;one for each table you are hitting with only the fields you have to select in the same sequance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use statment like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select &lt;/P&gt;&lt;P&gt;matnr &lt;/P&gt;&lt;P&gt;from mara &lt;/P&gt;&lt;P&gt;into table it_mara&lt;/P&gt;&lt;P&gt;where mara = p_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when u get data in all three tables just consolidate them to one final table this will be performance wise much better then your curren program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2008 10:51:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-25T10:51:29Z</dc:date>
    <item>
      <title>replace into corresponding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095310#M979307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;following is my code, I want to remove into corresponding fields . but it should work same.. wat should i do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of zpart,&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;           KAPPL type KAPPL,&lt;/P&gt;&lt;P&gt;           KSCHL type KSCHA,&lt;/P&gt;&lt;P&gt;           VKORG type VKORG,&lt;/P&gt;&lt;P&gt;           MATNR type MATNR,&lt;/P&gt;&lt;P&gt;           DATBI type KODATBI,&lt;/P&gt;&lt;P&gt;           DATAB type KODATAB,&lt;/P&gt;&lt;P&gt;           KNUMH type KNUMH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           matkl type matkl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           KOPOS type KOPOS,&lt;/P&gt;&lt;P&gt;           KRECH type KRECH,&lt;/P&gt;&lt;P&gt;           KBETR type KBETR_KOND,&lt;/P&gt;&lt;P&gt;           KONWA type KONWA,&lt;/P&gt;&lt;P&gt;	   KPEIN type KPEIN,&lt;/P&gt;&lt;P&gt;           KMEIN type KMEIN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           VALTG type VALTG,&lt;/P&gt;&lt;P&gt;           VALDT type VALDT,&lt;/P&gt;&lt;P&gt;           ZTERM type DZTERM,&lt;/P&gt;&lt;P&gt;           KZNEP type KZNEP, &lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;P&gt;           pickey type pichd,&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt;        end of zpart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_a902 type standard table of a902,&lt;/P&gt;&lt;P&gt;       it_final type standard table of zpart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from A902&lt;/P&gt;&lt;P&gt;into it_a902&lt;/P&gt;&lt;P&gt;where KAPPL = 'V' and &lt;/P&gt;&lt;P&gt;      KSCHL = 'ZLST' and&lt;/P&gt;&lt;P&gt;      datab between sydatum and sydatum - 30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final = it_a902.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select imatn &lt;/P&gt;&lt;P&gt;from mara &lt;/P&gt;&lt;P&gt;into corresponding fields of it_final&lt;/P&gt;&lt;P&gt;for all entries in it_a902&lt;/P&gt;&lt;P&gt;where matnr = it_a902-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select PICKEY&lt;/P&gt;&lt;P&gt;from PICHD &lt;/P&gt;&lt;P&gt;into corresponding fields of it_final&lt;/P&gt;&lt;P&gt;for all entries in it_a902&lt;/P&gt;&lt;P&gt;where PICNUM = it_final-imatn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Amruta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095310#M979307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: replace into corresponding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095311#M979308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the Select query select all those which are there in the structure of it_final i.e. of zpart.In your case you have to pick the records from different tables.Make sure that all those internal table have some key field common.Consolidate them into the final internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:23:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095311#M979308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: replace into corresponding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095312#M979309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amruta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if the sequence of fields declaration is same in you query and internal table you can remove the 'into corresponding fields of'.but if you use corresponding fields of there will be some performance constraints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select PICKEY&lt;/P&gt;&lt;P&gt;from PICHD &lt;/P&gt;&lt;P&gt;into corresponding fields of it_final&lt;/P&gt;&lt;P&gt;for all entries in it_a902&lt;/P&gt;&lt;P&gt;where PICNUM = it_final-imatn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This query is wrong.the internal table in the for all entries and where condition should be the same.you should write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select PICKEY&lt;/P&gt;&lt;P&gt;from PICHD &lt;/P&gt;&lt;P&gt;into corresponding fields of it_final&lt;/P&gt;&lt;P&gt;for all entries in it_a902&lt;/P&gt;&lt;P&gt;where PICNUM = it_a902-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can declare two more internal tables and fetch data into that internal tables and you can later combine using loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Charumathi.B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095312#M979309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: replace into corresponding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095313#M979310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make 4 internal table &lt;/P&gt;&lt;P&gt;one for each table you are hitting with only the fields you have to select in the same sequance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use statment like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select &lt;/P&gt;&lt;P&gt;matnr &lt;/P&gt;&lt;P&gt;from mara &lt;/P&gt;&lt;P&gt;into table it_mara&lt;/P&gt;&lt;P&gt;where mara = p_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when u get data in all three tables just consolidate them to one final table this will be performance wise much better then your curren program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:51:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-into-corresponding/m-p/4095313#M979310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:51:29Z</dc:date>
    </item>
  </channel>
</rss>

