<?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: reg fetching data from table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950832#M1154409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You have to use Field symbols in order to fetch the records at run time or dynamically.&lt;/P&gt;&lt;P&gt;Please, go through it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Dec 2008 08:44:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-24T08:44:25Z</dc:date>
    <item>
      <title>reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950819#M1154396</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;         i had a requirement where i need to fetch number of records from table given in the selection screen, by considering other secletion screen input details. can any one please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 07:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950819#M1154396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T07:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950820#M1154397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;The better way is use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SY-DBCNT.        ------&amp;gt; DB operations, number of table lines processed
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:03:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950820#M1154397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950821#M1154398</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;Your question is not clear, By other selection screen means Other Report selection screen, if this is the case then you can use "SUBMIT" statement. check the syntax with SAP Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950821#M1154398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950822#M1154399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My question is how to select data from table which is given as input in the selection screen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:07:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950822#M1154399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950823#M1154400</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;have a look at this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter p_table type tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;          from (p_table)&lt;/P&gt;&lt;P&gt;          into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&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>Wed, 24 Dec 2008 08:11:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950823#M1154400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950824#M1154401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;copy the value of selection screen to some string variable say table_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then write select query like&lt;/P&gt;&lt;P&gt;select * from (table_name)  upto 100 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also write like upto n row's&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:13:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950824#M1154401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950825#M1154402</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;parameters: table type tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from (table)&lt;/P&gt;&lt;P&gt;into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950825#M1154402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950826#M1154403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May i know what is the DATA declaration for ITAB.&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>Wed, 24 Dec 2008 08:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950826#M1154403</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-12-24T08:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950827#M1154404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks santosh, but if i need to use where condition, how to compare the table fields which we do not know until runtime, can you please help in this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950827#M1154404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950828#M1154405</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;Refer this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;**Selection screen for Input screen.&lt;/P&gt;&lt;P&gt;  selection-screen begin of block b with frame title text-001.&lt;/P&gt;&lt;P&gt;  select-options: s_werks for aufm-werks obligatory,     "Plant&lt;/P&gt;&lt;P&gt;  selection-screen end of block b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s_werks is not initial and s_budat is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fetch the Order Number from table AUFNR.&lt;/P&gt;&lt;P&gt;    select mblnr&lt;/P&gt;&lt;P&gt;           mjahr&lt;/P&gt;&lt;P&gt;           zeile&lt;/P&gt;&lt;P&gt;           werks&lt;/P&gt;&lt;P&gt;           aufnr&lt;/P&gt;&lt;P&gt;           from aufm&lt;/P&gt;&lt;P&gt;           into table it_aufm&lt;/P&gt;&lt;P&gt;           where werks in s_werks&lt;/P&gt;&lt;P&gt;           and   budat in s_budat&lt;/P&gt;&lt;P&gt;           and   aufnr in s_aufnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      message 'Value is not avalibale as per you INPUT' type 'E'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    message 'Plant and Posting date both are mandatory' type 'E'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:26:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950828#M1154405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950829#M1154406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi santosh/Akash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             can you please help me how to fetch data using the where condition of the fields which we do not know until runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards.&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950829#M1154406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950830#M1154407</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;You can find the table fields in table DD03L.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:34:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950830#M1154407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950831#M1154408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think this is a logical requirement? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get the fieldnames of the table from DD03L, but you need to have values to use against these fields. How to you intend to do this @ runtime? (Santosh your comments on this issues)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you plz elaborate what's ur actual requirement is ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Dec 24, 2008 9:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:38:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950831#M1154408</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-12-24T08:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950832#M1154409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You have to use Field symbols in order to fetch the records at run time or dynamically.&lt;/P&gt;&lt;P&gt;Please, go through it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 08:44:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950832#M1154409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T08:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950833#M1154410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;You can give your conditions dynamically with dynamic table name as below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: vbak.

DATA: t_vbak TYPE STANDARD TABLE OF vbak,
      wa_vbak LIKE LINE OF t_vbak.

TYPES: ty_field(50) TYPE c,
       ty_cond  TYPE TABLE OF ty_field.

DATA: t_cond TYPE ty_cond, "Internal table to store conditions
      wa_cond TYPE ty_field.

DATA: w_tab TYPE tabname VALUE 'VBAK'.

SELECT-OPTIONS: so_vbeln FOR vbak-vbeln. "Input selection screen

wa_cond = 'VBELN IN SO_VBELN '. "Giving the condition
APPEND wa_cond TO t_cond.

SELECT * FROM (w_tab)
  INTO TABLE t_vbak
  WHERE (t_cond). "&amp;lt;=This is same as  'WHERE VBELN IN SO_VBELN'

WRITE: / 'Number of records : ' , sy-dbcnt.
WRITE: / 'VBELN'.
LOOP AT t_vbak INTO wa_vbak.
  WRITE:  / wa_vbak-vbeln.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 09:18:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950833#M1154410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T09:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950834#M1154411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For fetching the data from the table given at selection screen, you can use the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  Z_DYNAMIC_ITAB_TEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description  :  USING FIELD SYMBOLS TO DISPLAY TABLE FIELDS OF A TABLE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                ENTERED BY USER AT THE SELECTION SCREEN.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                SELECTION SCREEN CONTAINS     :&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                            DB TABLE NAME     :--------&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                            SELECTION FIELDS  :--------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------" /&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  z_dynamic_itab_test .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include z_table_fs_top.&lt;/P&gt;&lt;P&gt;include z_table_fs_forms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;  perform clear_fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;  perform fetch_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;  Include           Z_TABLE_FS_TOP&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type Pools                                                           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis,&lt;/P&gt;&lt;P&gt;            rsds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Tables                                                               *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables :sscrfields,                "Fields on selection screens&lt;/P&gt;&lt;P&gt;        dd03l.                     "Table Fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Types                                                                *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_dd03l,&lt;/P&gt;&lt;P&gt;        tabname like dd03l-tabname,              "Table Name&lt;/P&gt;&lt;P&gt;        fieldname like dd03l-fieldname,          "Field Name&lt;/P&gt;&lt;P&gt;        keyflag   like dd03l-keyflag,            "Key Flag&lt;/P&gt;&lt;P&gt;        rollname  like dd03l-rollname,           "Roll Name&lt;/P&gt;&lt;P&gt;        position like dd03l-position,            "Position&lt;/P&gt;&lt;P&gt;        ddtext(30),                              "Description&lt;/P&gt;&lt;P&gt;       end of t_dd03l.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of t_fname,                        "To hold the field names&lt;/P&gt;&lt;P&gt;          fld like dd03l-fieldname,&lt;/P&gt;&lt;P&gt;        end of t_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Tables                                                      *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_dd03l   type table of t_dd03l,       "To hold the field names of dd03l.&lt;/P&gt;&lt;P&gt;       it_flds    type table of rsdsfields,    "To hold the field names&lt;/P&gt;&lt;P&gt;       it_fields  type table of dd03l,         "To hold the field names&lt;/P&gt;&lt;P&gt;       it_cat     type table of lvc_s_fcat,    "To hold Field Catalog&lt;/P&gt;&lt;P&gt;       it_fname   type table of t_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work areas                                                           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_dd03l  like line of it_dd03l,     "Workarea for IT_DD03L&lt;/P&gt;&lt;P&gt;      wa_flds   like line of it_flds,      "Workarea for IT_FLDS&lt;/P&gt;&lt;P&gt;      wa_fields like line of it_fields,    "Workarea for IT_FIELDS&lt;/P&gt;&lt;P&gt;      wa_cat    like line of it_cat ,      "Workarea for IT_CAT&lt;/P&gt;&lt;P&gt;      wa_fname  like line of it_fname.     "Workarea for IT_FNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------" /&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*SELECTION SCREEN WITH BLOCK DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b2 with frame title text-004.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_tbname type dd03l-tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: s_field for dd03l-fieldname no intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen end of block b2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------" /&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variables                                                            *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : lv_where type string,&lt;/P&gt;&lt;P&gt;       lv_cnt   type i value '1',&lt;/P&gt;&lt;P&gt;       v_records type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : gv_where_cl(100) type c.              "Variable to hold Where clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_flname(5) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_fldcat type lvc_s_fcat.&lt;/P&gt;&lt;P&gt;data: it_fldcat type lvc_t_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it type ref to data.&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;DECLARATION OF FIELD SYMBOLS :&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;field-symbols: &amp;lt;fs_table&amp;gt; type table.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs_temp&amp;gt; type any,&lt;/P&gt;&lt;P&gt;               &amp;lt;fs_final&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;  Include           Z_TABLE_FS_FORMS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  clear_fields&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     To clear all work areas and refresh all internal tables.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form clear_fields .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear wa_dd03l.&lt;/P&gt;&lt;P&gt;  clear wa_flds.&lt;/P&gt;&lt;P&gt;  clear wa_fields.&lt;/P&gt;&lt;P&gt;  clear wa_cat.&lt;/P&gt;&lt;P&gt;  clear wa_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh it_dd03l.&lt;/P&gt;&lt;P&gt;  refresh it_flds.&lt;/P&gt;&lt;P&gt;  refresh it_fields.&lt;/P&gt;&lt;P&gt;  refresh it_cat.&lt;/P&gt;&lt;P&gt;  refresh it_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " clear_fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  FETCH_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Fetch data from different tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form fetch_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe table s_field lines v_records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate it_flds from s_field, to hold the fields to be Selected.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if s_field is not initial.&lt;/P&gt;&lt;P&gt;    loop at s_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_flname = s_field-low.&lt;/P&gt;&lt;P&gt;      write: s_field-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    BUILD FIELD CATALOG FOR ALL FIELDS.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      wa_flds-fieldname = wa_flname.&lt;/P&gt;&lt;P&gt;      append wa_flds to it_flds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Populate the Where clause as a string.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; if s_where[] is not initial.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   loop at s_where.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;     concatenate lv_where s_where-low into lv_where separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&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;Populate it_dd03l, to hold the field names from DD03L.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select tabname&lt;/P&gt;&lt;P&gt;         fieldname&lt;/P&gt;&lt;P&gt;         keyflag&lt;/P&gt;&lt;P&gt;         rollname&lt;/P&gt;&lt;P&gt;         position&lt;/P&gt;&lt;P&gt;         from dd03l&lt;/P&gt;&lt;P&gt;         into table it_dd03l&lt;/P&gt;&lt;P&gt;         where tabname eq p_tbname&lt;/P&gt;&lt;P&gt;               and fieldname ne 'MANDT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    sort it_dd03l by position.&lt;/P&gt;&lt;P&gt;    delete it_dd03l where fieldname cp '.INCLU*'.          ""CP = Covers Pattern&lt;/P&gt;&lt;P&gt;  endif.&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;Populate it_fname, with fields which have to be selected (entered in selection).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at it_dd03l into wa_dd03l.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Read table it_flds.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    read table it_flds into wa_flds with key fieldname = wa_dd03l-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Move data from it_dd03l to it_fname&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      wa_fname-fld = wa_dd03l-fieldname.&lt;/P&gt;&lt;P&gt;      append wa_fname to it_fname.&lt;/P&gt;&lt;P&gt;      clear wa_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&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;*TO CHECK IF TABLE EXISTS.&lt;/P&gt;&lt;P&gt;  call function 'SCPR_DB_TABLE_EXIST'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      tabname        = p_tbname&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      tab_dont_exist = 1&lt;/P&gt;&lt;P&gt;      others         = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    GIVE A POP UP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      call function 'POPUP_TO_DECIDE_INFO'&lt;/P&gt;&lt;P&gt;        exporting&lt;/P&gt;&lt;P&gt;          textline1    = 'Table Does Not Exist !'&lt;/P&gt;&lt;P&gt;          titel        = 'Invalid Table Name'&lt;/P&gt;&lt;P&gt;          start_column = 25&lt;/P&gt;&lt;P&gt;          start_row    = 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SELECT ALL RECORDS FROM DD03L.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select *&lt;/P&gt;&lt;P&gt;  into table it_fields&lt;/P&gt;&lt;P&gt;  from dd03l&lt;/P&gt;&lt;P&gt;  where tabname = p_tbname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    sort it_fields by position.&lt;/P&gt;&lt;P&gt;    delete it_fields where fieldname cp '.INCLU*'.         "CP = Covers Pattern.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate IT_CAT with fields which are REQUIRED.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display upto 150 fields only.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at it_fields into wa_fields to 150.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Read table it_fname&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    read table it_fname into wa_fname with key fld = wa_fields-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Move data from it_fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      wa_cat-tabname = p_tbname.&lt;/P&gt;&lt;P&gt;      wa_cat-fieldname = wa_fields-fieldname.&lt;/P&gt;&lt;P&gt;      wa_cat-col_pos = lv_cnt.&lt;/P&gt;&lt;P&gt;      wa_cat-inttype    = wa_fields-inttype.&lt;/P&gt;&lt;P&gt;      wa_cat-datatype = wa_fields-datatype.&lt;/P&gt;&lt;P&gt;      wa_cat-intlen = wa_fields-intlen.&lt;/P&gt;&lt;P&gt;      wa_cat-seltext = wa_fields-fieldname.&lt;/P&gt;&lt;P&gt;      wa_cat-decimals = wa_fields-decimals.&lt;/P&gt;&lt;P&gt;      wa_cat-ref_field = wa_fields-fieldname.&lt;/P&gt;&lt;P&gt;      wa_cat-ref_table = p_tbname.&lt;/P&gt;&lt;P&gt;      append wa_cat to it_cat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      clear wa_cat.&lt;/P&gt;&lt;P&gt;      lv_cnt = lv_cnt + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&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;CREATE A DYNAMIC INTERNAL TABLE.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      it_fieldcatalog = it_cat&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      ep_table        = it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ASSIGN IT TO &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  assign it-&amp;gt;* to &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Select the data from the table given as input and populate&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it into the dynamic internal table created based on the where&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;condition.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select (it_fname)&lt;/P&gt;&lt;P&gt;         from (p_tbname)&lt;/P&gt;&lt;P&gt;         into table &amp;lt;fs_table&amp;gt;&lt;/P&gt;&lt;P&gt;         where (lv_where).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    message 'No data found' type 'I'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Displaying dynamic internal table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at &amp;lt;fs_table&amp;gt; assigning &amp;lt;fs_temp&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   write:/ &amp;lt;fs_temp&amp;gt; quickinfo 'CONTENTS'.&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;endform.                    " FETCH_DATA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 09:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950834#M1154411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T09:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: reg fetching data from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950835#M1154412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example for data selection based on the input field:&lt;/P&gt;&lt;P&gt;here Inpit value is Purchase requisition number(BANFN)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection criteria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from EBAN in to table itab&lt;/P&gt;&lt;P&gt;   where BANFN EQ P_BANFN.&lt;/P&gt;&lt;P&gt;p_banfn is input value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or provide me your selection criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Hameed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 10:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-fetching-data-from-table/m-p/4950835#M1154412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T10:35:43Z</dc:date>
    </item>
  </channel>
</rss>

