<?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: problem in table data transfer in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047591#M1173363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mukesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to add the FOR ALL ENTRIES stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select ernam from mara into corresponding fields of table jtab
for all entries in ktab
where matnr = ktab-matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot assign ITAB, JTAB &amp;amp; KTAB to ATAB as done by you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jan 2009 05:37:38 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2009-01-05T05:37:38Z</dc:date>
    <item>
      <title>problem in table data transfer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047590#M1173362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt; i am takin some fields from three different table and i hav to merge it into a single table and den display consequently.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools : slis.&lt;/P&gt;&lt;P&gt;"break-point.&lt;/P&gt;&lt;P&gt;tables: vbap,&lt;/P&gt;&lt;P&gt;        vbak,&lt;/P&gt;&lt;P&gt;        mara.&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      vbeln     like vbak-vbeln,&lt;/P&gt;&lt;P&gt;      erdat     like vbak-erdat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   end of itab.&lt;/P&gt;&lt;P&gt;data: begin of ktab occurs 0,&lt;/P&gt;&lt;P&gt;      posnr     like vbap-posnr,&lt;/P&gt;&lt;P&gt;      matnr     like vbap-matnr,&lt;/P&gt;&lt;P&gt;      kwmeng    like vbap-kwmeng,&lt;/P&gt;&lt;P&gt;      netpr     like vbap-netpr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     end of ktab.&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: begin of jtab occurs 0,&lt;/P&gt;&lt;P&gt;        ernam   like mara-ernam,&lt;/P&gt;&lt;P&gt;        end of jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: begin of atab occurs 0,&lt;/P&gt;&lt;P&gt;        vbeln     like vbak-vbeln,&lt;/P&gt;&lt;P&gt;        erdat     like vbak-erdat,&lt;/P&gt;&lt;P&gt;        posnr     like vbap-posnr,&lt;/P&gt;&lt;P&gt;        matnr     like vbap-matnr,&lt;/P&gt;&lt;P&gt;        kwmeng    like vbap-kwmeng,&lt;/P&gt;&lt;P&gt;        netpr     like vbap-netpr,&lt;/P&gt;&lt;P&gt;        ernam     like mara-ernam,&lt;/P&gt;&lt;P&gt;    end of atab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: alv_fieldcat type slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; *  selection screen declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen: begin of block abc with frame title text-001.&lt;/P&gt;&lt;P&gt; select-options: vb for vbak-vbeln.&lt;/P&gt;&lt;P&gt;selection-screen: end of block abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  start-of-selection.&lt;/P&gt;&lt;P&gt;   perform get_data.&lt;/P&gt;&lt;P&gt;  perform display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   form get_data.&lt;/P&gt;&lt;P&gt;     select * from vbak into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;       where vbeln in vb.&lt;/P&gt;&lt;P&gt;       select * from vbap into corresponding fields of table ktab for all entries in&lt;/P&gt;&lt;P&gt;         itab where vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;         select ernam from mara into corresponding fields of table jtab&lt;/P&gt;&lt;P&gt;           where matnr = ktab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       atab[] = itab[].&lt;/P&gt;&lt;P&gt;       atab[] = ktab[].&lt;/P&gt;&lt;P&gt;       atab[] = jtab[].&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but first 2 are executing and im getting the values also but 3rd query is not working .im not getting the values in jtab.&lt;/P&gt;&lt;P&gt;and also for atab[] = ktab[]  im getting syntax error ""ATAB" and "KTAB" are not mutually convertible. In Unicode programs,"ATAB" must have the same structure layout as "KTAB", independent of the length of a Unicode character."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me out with this problem.&lt;/P&gt;&lt;P&gt;thnks n regards,&lt;/P&gt;&lt;P&gt;mukesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 05:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047590#M1173362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T05:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: problem in table data transfer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047591#M1173363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mukesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to add the FOR ALL ENTRIES stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select ernam from mara into corresponding fields of table jtab
for all entries in ktab
where matnr = ktab-matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot assign ITAB, JTAB &amp;amp; KTAB to ATAB as done by you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 05:37:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047591#M1173363</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-05T05:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem in table data transfer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047592#M1173364</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;use the below logic.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select * from vbak into corresponding fields of table itab
where vbeln in vb.
if itab[] is not initial.
select * from vbap into corresponding fields of table ktab for all entries in
itab where vbeln = itab-vbeln.
if ktab[] is not initial.
select ernam from mara into corresponding fields of table jtab for all entries in ktab
where matnr = ktab-matnr.
endif.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Santosh Thorat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 05:38:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047592#M1173364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T05:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem in table data transfer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047593#M1173365</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;Use inner join to update into a custom table and then pick up required data from the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 13:54:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047593#M1173365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T13:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: problem in table data transfer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047594#M1173366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have few suggestions for you,&lt;/P&gt;&lt;P&gt;Modify Structure of "ktab" like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
DATA: BEGIN OF ktab OCCURS 0,
vbeln      LIKE vbap-vbeln, "&amp;lt;---- New field  
posnr     LIKE vbap-posnr,
matnr     LIKE vbap-matnr,
kwmeng LIKE vbap-kwmeng,
netpr      LIKE vbap-netpr,
END OF ktab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;after getting the data from database&lt;/P&gt;&lt;P&gt;loop at Item table "ktab"&lt;/P&gt;&lt;P&gt;inside the loop &lt;/P&gt;&lt;P&gt;read header table "itab" (here u will need the new field in katab) &amp;amp; material table "jtab".&lt;/P&gt;&lt;P&gt;get all the feilds which u want from these table in a work area which is like line of atab.&lt;/P&gt;&lt;P&gt;then just append this work area to "atab" at the end of loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing is &lt;/P&gt;&lt;P&gt;you should make sure that when getting ernam from mara internal table used "ktab"&lt;/P&gt;&lt;P&gt;should not have duplicate entries for matnr it will improve performance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 14:38:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-table-data-transfer/m-p/5047594#M1173366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T14:38:23Z</dc:date>
    </item>
  </channel>
</rss>

