<?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: Function Module to retrieve data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254790#M145867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Yes declare like P1, P2 ... P10 for table names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Similarly ITAB1 .... ITAB10. TYPE REF TO DATA.&lt;/P&gt;&lt;P&gt;As these are not pointing to any table, you don't have to create anything in SE11. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the way we use REUSE_ALV_GRID_DISPLAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the function what you will have to do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA ITAB1 type (P1).&lt;/P&gt;&lt;P&gt;field-symbols : &amp;lt;FT_TABLE&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign ITAB1-&amp;gt;* to &amp;lt;FT_TABLE&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from (p1) into corresponding fields of table &amp;lt;FT_TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should return you the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Apr 2006 11:02:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-13T11:02:10Z</dc:date>
    <item>
      <title>Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254778#M145855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;I created one FM to retrieve data from a database table.&lt;/P&gt;&lt;P&gt;It is working fine.In that FM i hard coded import parameter for table name.And in export parameter i created one internal table type in SE11 t-code.That table type is refered to one specific database table.So after getting data in the itab, i will update one more table usng insert statement.This FM i will set as remote enabled and i will call from other server.ie.retriving data from one server and updating data for same table in another server.It is working fine.But like this i have to update more than 50 tables.&lt;/P&gt;&lt;P&gt;Can any body tell me the logic for that? Can it be done using the same and single FM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is highly appreciated.I am sure of reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 14:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254778#M145855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-12T14:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254779#M145856</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 std SAP FM "RFC_READ_TABLE". This FM could be used to fetch any tables data across the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You dont have to build any complex logic. Used the above FM and you can get data from one system and update on other system. You might want to do a where used list to check how its being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hope this helps.&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 15:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254779#M145856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-12T15:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254780#M145857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below attached code is for dynamic table into dynamic internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take all 50 tables in one internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And modify below given program to update the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it is helpful..!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_NP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_tab TYPE dd02l-tabname,&lt;/P&gt;&lt;P&gt;            compon TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: field1 TYPE c VALUE '5',&lt;/P&gt;&lt;P&gt;      field2(2) TYPE c VALUE '10',&lt;/P&gt;&lt;P&gt;      field3(6)    TYPE c ,&lt;/P&gt;&lt;P&gt;      ref_tab TYPE REF TO data.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs&amp;gt; TYPE STANDARD TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create DATA ref_tab TYPE standard TABLE of (P_TAB).&lt;/P&gt;&lt;P&gt;ASSIGN ref_tab-&amp;gt;* TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM test TABLES &amp;lt;fs&amp;gt;  USING field1 .&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  test&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM test TABLES p_field1  USING p_field3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS &amp;lt;fs_wa&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS &amp;lt;fs_comp&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE DATA ref_tab TYPE (p_tab).&lt;/P&gt;&lt;P&gt;  ASSIGN ref_tab-&amp;gt;* TO &amp;lt;fs_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM (p_tab) INTO TABLE &amp;lt;fs&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;fs&amp;gt; INTO &amp;lt;fs_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT compon OF STRUCTURE &amp;lt;fs_wa&amp;gt; TO &amp;lt;fs_comp&amp;gt;.&lt;/P&gt;&lt;P&gt;    WRITE:/ &amp;lt;fs_comp&amp;gt;.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " test&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 15:05:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254780#M145857</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2006-04-12T15:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254781#M145858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a FM with two tables parameters  One to hold a table of names of the tables (say t_tables)&lt;/P&gt;&lt;P&gt;2) Another table with the data(say t_data).(Lets have two fields in   Name of the table, Data).&lt;/P&gt;&lt;P&gt;3) IN the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_tables.&lt;/P&gt;&lt;P&gt;call function 'RFC_READ_TABLE'&lt;/P&gt;&lt;P&gt;exporting QUERY_TABLE = t_tables-table_name.&lt;/P&gt;&lt;P&gt;tables DATA = t_data_temp.&lt;/P&gt;&lt;P&gt;loop at t_data_temp.&lt;/P&gt;&lt;P&gt;t_data-table_name = t_tables-table_name.&lt;/P&gt;&lt;P&gt;t_data-data = t_data_temp-data.&lt;/P&gt;&lt;P&gt;append t_data.&lt;/P&gt;&lt;P&gt;clear t_data.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;refresh t_data_temp.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Now your table will have t_data with the table name and the corresponding data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 15:13:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254781#M145858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-12T15:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254782#M145859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Thanks.&lt;/P&gt;&lt;P&gt;But it reads data from only 1 table at a time.&lt;/P&gt;&lt;P&gt;i have to retrieve data from one server and i will create&lt;/P&gt;&lt;P&gt;same table in another server and i have to update data that is retrieved data from the first server from work area.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 15:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254782#M145859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-12T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254783#M145860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks.pints are given.&lt;/P&gt;&lt;P&gt;You meant to say that first i have to create a new FM with two tables parameters in that source code of FM i have to call the FM RFC_READ_TABLE ??But while creating first FM what and how to give the import and export paramaters?.If i create a table parameter for that i have to create a table type in SE11..am i right?&lt;/P&gt;&lt;P&gt;I am not clear..can elobarate your logic?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 15:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254783#M145860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-12T15:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254784#M145861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;   Yes.&lt;/P&gt;&lt;P&gt;1) say your Function module name is ZRFC_READ_TABLES.&lt;/P&gt;&lt;P&gt;2) In the tables tab, declare a table t_tables type z_tables.This z_tables should be defined as a structure in se11.&lt;/P&gt;&lt;P&gt;Goto se11 create a z_tables structure with only one field which is of type DD02L-TABNAME.&lt;/P&gt;&lt;P&gt;3) In the tables tab, declare one more table t_data type z_data. This z_data should be defined as a structure in se11.&lt;/P&gt;&lt;P&gt;Goto se11 create z_data structure with two fields one is of type DD02L-TABNAME and the other is of type TAB512.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) IN source code, you can paste my last post code.&lt;/P&gt;&lt;P&gt;In that, t_data_temp can be declared as a local variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 15:33:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254784#M145861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-12T15:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254785#M145862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You Very much. Reward points are given. I will try this and let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 16:11:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254785#M145862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-12T16:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254786#M145863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi Kanth,&lt;/P&gt;&lt;P&gt;in the 2nd point i created z_tables structure(not table type) in se11.it is working fine. But&lt;/P&gt;&lt;P&gt;in the 3rd ppoint.&lt;/P&gt;&lt;P&gt;i created structure(not table type) in se11 with two fields.&lt;/P&gt;&lt;P&gt;the structuire name is zdata in this 2 fields:&lt;/P&gt;&lt;P&gt;1.tab_name like tabname(component type)&lt;/P&gt;&lt;P&gt;2.data like like tab512(componet type)&lt;/P&gt;&lt;P&gt;But when i give this in tables parameter in ZRFC_READ_TABLES,i given like this.&lt;/P&gt;&lt;P&gt;t_data like zdata..but it is giving error like:"Tables using LIKE may only reference flat structures"&lt;/P&gt;&lt;P&gt;Even if i create a table type for t_data it is not allowing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you look into this and give any suggesion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 08:13:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254786#M145863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T08:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254787#M145864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi Kanth,&lt;/P&gt;&lt;P&gt;i created FM ZRFC_READ_TABLES. it is active.&lt;/P&gt;&lt;P&gt;But there is no import paramaters for ths.&lt;/P&gt;&lt;P&gt;How will we call this FM in another ABAP pgm and how to give paramaters...Can you pls give solution for this?&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 10:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254787#M145864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T10:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254788#M145865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please look at my reply to Radhika's same question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="134000"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 10:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254788#M145865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T10:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254789#M145866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi Kumar,&lt;/P&gt;&lt;P&gt;Thank you for response.I need some clarification in this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Declare as many paramters as the no. of tables you want to retrieve in one SHOT. This parameter can refer to DD02L-TABNAME: means is it a import parameter to FM while creating?if so shall we have to declare like p1 like DD02l-TABNAME..p2 like DD02l-TABNAME..etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.Now, also declare as many TABLE paramters by referring to TYPE REF TO DATA so that you are not tied to a specific table: means like itab1,itab2...like this..?&lt;/P&gt;&lt;P&gt;These we have to create in se11?..as a structure or table type?..i did't get this second point...&lt;/P&gt;&lt;P&gt;Can you elobarate the 2nd point?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 10:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254789#M145866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T10:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254790#M145867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Yes declare like P1, P2 ... P10 for table names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Similarly ITAB1 .... ITAB10. TYPE REF TO DATA.&lt;/P&gt;&lt;P&gt;As these are not pointing to any table, you don't have to create anything in SE11. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the way we use REUSE_ALV_GRID_DISPLAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the function what you will have to do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA ITAB1 type (P1).&lt;/P&gt;&lt;P&gt;field-symbols : &amp;lt;FT_TABLE&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign ITAB1-&amp;gt;* to &amp;lt;FT_TABLE&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from (p1) into corresponding fields of table &amp;lt;FT_TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should return you the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 11:02:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254790#M145867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T11:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254791#M145868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi Kumar,&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;You mean to say:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the imort parametrs:&lt;/P&gt;&lt;P&gt;pi like DD02L-TABNAME,&lt;/P&gt;&lt;P&gt;p2 like DD02L-TABNAME,&lt;/P&gt;&lt;P&gt;..etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in Tables parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB1 TYPE REF TO DATA.HERE WAHT IS DATA? THIS WE HAVE TO DECLARE IN SE11?...PLEASE GIVE CLARIFY THIS..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS IN ADVANCE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 11:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254791#M145868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T11:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module to retrieve data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254792#M145869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P1, P2 yes, what you have written is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE REF TO DATA, is to tell the system that I want to use this variable but as of now I don't know the data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, later while CREATE DATA statement I refer it to a table using which it will get a structure. You don't have to declare in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which version of SAP you are working on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 11:39:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-retrieve-data/m-p/1254792#M145869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T11:39:02Z</dc:date>
    </item>
  </channel>
</rss>

