<?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: FM to extract data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607454#M1662932</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;Check if there is a common link between all the tables. If yes, then you can go for &lt;STRONG&gt;JOINS&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Danish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2012 11:21:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-03-07T11:21:10Z</dc:date>
    <item>
      <title>FM to extract data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607453#M1662931</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;I have a requirement to extract data from 7 tables, for which i have written the code as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Created a FM.&lt;/P&gt;&lt;P&gt;2. Defined a structure with all the fields from all the tables ZZXXXX and assigned it to E_T_DATA in the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Created a structure (for each table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table A code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_aXX,&lt;/P&gt;&lt;P&gt;kschl TYPE AX-ksXXl,&lt;/P&gt;&lt;P&gt;knumXX TYPE AXX-knumXX,&lt;/P&gt;&lt;P&gt;vkorgXX TYPE AXX-vkorg,&lt;/P&gt;&lt;P&gt;END OF t_aXX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa_aXX1 TYPE t_aXX,&lt;/P&gt;&lt;P&gt;it_aXX TYPE STANDARD TABLE OF t_aXX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM aXX1 (Actual Table) INTO CORRESPONDING FIELDS OF TABLE it_aXX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_aXX INTO wa_aXX1.&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;Similarly for rest of the Tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the End &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING wa_Tab A TO e_t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING wa_Tab B TO e_t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lly .....like above for all the tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND e_t_data TO i_t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where E_T_DATA is like the Main Structure 'ZZXXXX.&lt;/P&gt;&lt;P&gt;' which i created with all the fields...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the above approach is correct or is there any better way of writing the code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need all the data from all the tables...into my final structure, because the users can post transactions in any table...of which i am not able to append based on some key field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All help is appreciated..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 11:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607453#M1662931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-07T11:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: FM to extract data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607454#M1662932</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;Check if there is a common link between all the tables. If yes, then you can go for &lt;STRONG&gt;JOINS&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Danish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 11:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607454#M1662932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-07T11:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: FM to extract data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607455#M1662933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Danish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some key fields but as these are client specific tables and client specific fields ...un able to do jon condition...&lt;/P&gt;&lt;P&gt;i tried it in creating a view but was not possible...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 11:25:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607455#M1662933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-07T11:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: FM to extract data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607456#M1662934</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;For those tables which are having common keys, you can then use &lt;STRONG&gt;FOR ALL ENTRIES IN&lt;/STRONG&gt;. For the rest of the tables you will have to fetch the data individually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Danish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 11:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-extract-data/m-p/8607456#M1662934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-07T11:42:01Z</dc:date>
    </item>
  </channel>
</rss>

