<?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: Declaring variable dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562434#M857260</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;field symbol should be assigned to an internal table here, how do i declare that internal table whose type can not determined statically?  the user will enter the type&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Mar 2008 13:02:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-31T13:02:54Z</dc:date>
    <item>
      <title>Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562426#M857252</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 want to accept a table name, and declare an internal table which is of type of that accepted table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 12:47:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562426#M857252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T12:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562427#M857253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use type any.Type any is used when the type is unknown.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 12:49:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562427#M857253</guid>
      <dc:creator>former_member210123</dc:creator>
      <dc:date>2008-03-31T12:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562428#M857254</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 field symbols&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs1&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can assign any type to field symbol at run time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 12:49:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562428#M857254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T12:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562429#M857255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dont forget it should be a field symbol or it is not possible.&lt;/P&gt;&lt;P&gt;Example field symbols test type any.&lt;/P&gt;&lt;P&gt;Then u can assign it to any thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 12:50:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562429#M857255</guid>
      <dc:creator>former_member210123</dc:creator>
      <dc:date>2008-03-31T12:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562430#M857256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the below syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field-symbols: &amp;lt;fs&amp;gt; type any.

data: var(9).

var = 'IT_VBAP[]'.

assign (var) to &amp;lt;fs&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are many ways to do this. Above is one such.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 12:55:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562430#M857256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T12:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562431#M857257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can use&lt;/P&gt;&lt;P&gt;Field-symbols: &amp;lt;fs_tab&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This filed symbol then can accept any table dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can process this dynamically filled table by statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at &amp;lt;fs_tab&amp;gt; into &amp;lt;wa_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at &amp;lt;wa_tab&amp;gt; assigning componets of &amp;lt;wa_tab&amp;gt; to &amp;lt;field&amp;gt; &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;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you process any table dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 12:56:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562431#M857257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T12:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562432#M857258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;field symbol should be assigned to an internal table here, how do i declare that internal table whose type is unknown&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 12:57:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562432#M857258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T12:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562433#M857259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also do this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: tab type ref to data.

DATA: it_vabp TYPE STANDARD TABLE OF vbap WITH HEADER LINE.

select * from vbap into table it_vabp .

GET REFERENCE OF it_vabp[] INTO tab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562433#M857259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562434#M857260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;field symbol should be assigned to an internal table here, how do i declare that internal table whose type can not determined statically?  the user will enter the type&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:02:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562434#M857260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562435#M857261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to know how to fill the internal table dynamically?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:05:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562435#M857261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562436#M857262</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; Do use the code. I think it will give you some picture.&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; Report  ZDYNTEST                                                    *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&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;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&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;/P&gt;&lt;P&gt;report  zdyntest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools : slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : marc,t001w.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       matnr like marc-matnr,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : fieldstab type lvc_t_fcat,&lt;/P&gt;&lt;P&gt;       stab      type lvc_s_fcat,&lt;/P&gt;&lt;P&gt;       t_fieldcat type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;       s_fieldcat type slis_fieldcat_alv,&lt;/P&gt;&lt;P&gt;       new_line type ref to data,&lt;/P&gt;&lt;P&gt;       new_table type ref to data,&lt;/P&gt;&lt;P&gt;       index(3) type c,&lt;/P&gt;&lt;P&gt;       str(70),&lt;/P&gt;&lt;P&gt;       text(6),&lt;/P&gt;&lt;P&gt;       cnt(1),&lt;/P&gt;&lt;P&gt;       text1(16),&lt;/P&gt;&lt;P&gt;       repid like sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols : &amp;lt;fs&amp;gt; type standard table,&lt;/P&gt;&lt;P&gt;                &amp;lt;wa&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options : s_werks for marc-werks no intervals,&lt;/P&gt;&lt;P&gt;                 s_matnr for marc-matnr no intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from marc&lt;/P&gt;&lt;P&gt;           into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;           where matnr in s_matnr&lt;/P&gt;&lt;P&gt;           and   werks in s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  sort itab by matnr.&lt;/P&gt;&lt;P&gt;  delete adjacent duplicates from itab comparing matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  stab-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;  stab-datatype  = 'CHAR'.&lt;/P&gt;&lt;P&gt;  stab-intlen    = '18'.&lt;/P&gt;&lt;P&gt;  append stab to fieldstab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear cnt.&lt;/P&gt;&lt;P&gt;  loop at s_werks.&lt;/P&gt;&lt;P&gt;    clear text.&lt;/P&gt;&lt;P&gt;    cnt = cnt + 1.&lt;/P&gt;&lt;P&gt;    concatenate  'EISLO' cnt into text.&lt;/P&gt;&lt;P&gt;    stab-fieldname = text.&lt;/P&gt;&lt;P&gt;    stab-datatype  = 'CHAR'.&lt;/P&gt;&lt;P&gt;    stab-intlen    = '16'.&lt;/P&gt;&lt;P&gt;    append stab to fieldstab.&lt;/P&gt;&lt;P&gt;    clear s_werks.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&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 = fieldstab&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      ep_table        = new_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  assign new_table-&amp;gt;* to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  create data new_line like line of &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;  assign new_line-&amp;gt;* to &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform move_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear s_fieldcat.&lt;/P&gt;&lt;P&gt;  s_fieldcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;  s_fieldcat-tabname = itab.&lt;/P&gt;&lt;P&gt;  s_fieldcat-seltext_m = 'Part Number'.&lt;/P&gt;&lt;P&gt;  s_fieldcat-no_zero = 'X'.&lt;/P&gt;&lt;P&gt;  s_fieldcat-ddictxt   = 'M'.&lt;/P&gt;&lt;P&gt;  append s_fieldcat to t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear cnt.&lt;/P&gt;&lt;P&gt;  loop at s_werks.&lt;/P&gt;&lt;P&gt;    clear t001w.&lt;/P&gt;&lt;P&gt;    cnt = cnt + 1.&lt;/P&gt;&lt;P&gt;    select single * from t001w where werks = s_werks-low and spras = sy-langu.&lt;/P&gt;&lt;P&gt;    clear text.&lt;/P&gt;&lt;P&gt;    concatenate 'EISLO' cnt into text.&lt;/P&gt;&lt;P&gt;    s_fieldcat-fieldname = text.&lt;/P&gt;&lt;P&gt;    s_fieldcat-seltext_m = t001w-name2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; S_FIELDCAT-NO_ZERO = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    s_fieldcat-ddictxt   = 'M'.&lt;/P&gt;&lt;P&gt;    append s_fieldcat to t_fieldcat.&lt;/P&gt;&lt;P&gt;    clear s_werks.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      it_fieldcat = t_fieldcat[]&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      t_outtab    = &amp;lt;fs&amp;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  MOVE_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;      text&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 move_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;P&gt;    clear str.&lt;/P&gt;&lt;P&gt;    concatenate itab-matnr ' ' into str separated by space.&lt;/P&gt;&lt;P&gt;    loop at s_werks.&lt;/P&gt;&lt;P&gt;      clear marc.&lt;/P&gt;&lt;P&gt;      select single * from marc where matnr = itab-matnr and werks = s_werks-low.&lt;/P&gt;&lt;P&gt;      if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;        clear text1.&lt;/P&gt;&lt;P&gt;        text1 = marc-eislo.&lt;/P&gt;&lt;P&gt;        concatenate str text1 into str separated by space.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        concatenate str '0' into str separated by space.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    &amp;lt;wa&amp;gt; = str.&lt;/P&gt;&lt;P&gt;    append &amp;lt;wa&amp;gt; to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;    clear itab.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    "MOVE_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562436#M857262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562437#M857263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do that using the method of class&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cl_alv_table_create method is create_dynamic_table&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  Z_TEST_09.

PARAMETERS : p_table(10) TYPE C.

DATA:
  i_newtable  TYPE REF TO data.        " To create dyn.Itab
  DATA: w_tabname TYPE w_tabname,
        w_dref TYPE REF TO data,
        w_grid TYPE REF TO cl_gui_alv_grid.

  FIELD-SYMBOLS: &amp;lt;t_itab&amp;gt; TYPE ANY TABLE.

  w_tabname = p_table.

CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      i_style_table = 'SPFLI'
    IMPORTING
      ep_table        = i_newtable.

 ASSIGN i_newtable-&amp;gt;* TO &amp;lt;t_itab&amp;gt;.
  SELECT *
    FROM (w_tabname) UP TO 20 ROWS
    INTO TABLE &amp;lt;t_itab&amp;gt;.

CREATE OBJECT w_grid
    EXPORTING i_parent = cl_gui_container=&amp;gt;screen0.

  CALL METHOD w_grid-&amp;gt;set_table_for_first_display
EXPORTING
      i_structure_name = w_tabname
    CHANGING
      it_outtab        = &amp;lt;t_itab&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:11:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562437#M857263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variable dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562438#M857264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its giving syntax error, can u please have a look at it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:37:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-variable-dynamically/m-p/3562438#M857264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:37:40Z</dc:date>
    </item>
  </channel>
</rss>

