<?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: Passing Dynamic Internal Table values to another program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226546#M1628683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I got it solved using &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: WA_INDX TYPE INDX.
 
WA_INDX-USERA = SY-UNAME.
WA_INDX-PGMID = 'MAXMAX'.
 
EXPORT TAB = &amp;lt;ITAB&amp;gt;
  TO DATABASE INDX(XY)
  FROM WA_INDX
  CLIENT SY-MANDT
  ID 'TABLE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; I am still confused on how to achieve this using memory ID and field symbols.. But I can at least continue with my work. &lt;/P&gt;&lt;P&gt;Thanks a lot..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suzie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2011 10:13:50 GMT</pubDate>
    <dc:creator>lijisusan_mathews</dc:creator>
    <dc:date>2011-10-25T10:13:50Z</dc:date>
    <item>
      <title>Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226528#M1628665</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 have a program ZSAPNEW.&lt;/P&gt;&lt;P&gt;In this I have created a Dynamic internal table &amp;lt;fs_emp&amp;gt;. The number of fields differ for each run. The values are passed into &amp;lt;fs_emp&amp;gt; in this program.  Now I need to submit thsi program from a main program ZHEAD and then display the values got from ZHEAD. For this I need to access the values retrieved from ZSAPNEW in &amp;lt;fs_emp&amp;gt; in ZHEAD. I cant figure out how to do this. I tried IMPORT ing the reference of teh field symbol too/ But its not allowing references in IMPORT/EXPORT. And since the table is of type ANY( as structure varies) I cant assign it to an internal table and then pass. Can some one suggest a solution please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suzie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 06:59:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226528#M1628665</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T06:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226529#M1628666</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 user following techniq for this using (Pgm name)&amp;lt;fs_name&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;NEW_FIELD&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: FIELD_SYMBOL_NAME(30) VALUE '(ZPROGRAM)&amp;lt;FS&amp;gt;'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ASSIGN (FIELD_SYMBOL_NAME) TO &amp;lt;NEW_FIELD&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;NEW_FIELD&amp;gt; = ......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 07:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226529#M1628666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-25T07:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226530#M1628667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fayaz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my Code..The Assign statement returns value 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
FIELD-SYMBOLS: &amp;lt;NEW_FIELD&amp;gt; TYPE ANY table.

DATA: FIELD_SYMBOL_NAME(30) VALUE '(ZSDR010)&amp;lt;FS_EMP&amp;gt;'.

ASSIGN (FIELD_SYMBOL_NAME) TO &amp;lt;NEW_FIELD&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there something wrong in what I have written?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suzie on Oct 25, 2011 2:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 08:04:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226530#M1628667</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T08:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226531#M1628668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ignore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Keshav.T on Oct 25, 2011 2:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 08:37:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226531#M1628668</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-25T08:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226532#M1628669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this option already. Bu the problem is: While Importing &amp;lt;fs&amp;gt; will have no values in it. And if I try to read &amp;lt;fs&amp;gt; in the debugger after this statement, it still says that &amp;lt;fs&amp;gt; has not been assigned yet. &lt;/P&gt;&lt;P&gt;I have passed another table( the field catalog for the dynamic table ) using IMPORT/EXPORT in the same program. But there is no problem there and I get this internal table in my calling program via IMPORT. But for &amp;lt;fs&amp;gt;, it does not work. May be I have to assign it to something??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 08:42:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226532#M1628669</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T08:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226533#M1628670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on what you are creating  &amp;lt;fs_emp&amp;gt; in program 1 ?&lt;/P&gt;&lt;P&gt;If you can export the field catalouge to progrm 2 then create a dyn table in program 2 first , then assing it to &amp;lt;fs_emp&amp;gt; and then import it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS:&amp;lt;fs&amp;gt; TYPE ANY.
DATA:wf_ref TYPE REF TO data.
PARAMETERS:pa TYPE tabname.

START-OF-SELECTION.
  CREATE DATA wf_ref TYPE (pa).
  ASSIGN wf_ref-&amp;gt;* TO &amp;lt;fs&amp;gt;.
  EXPORT pa TO MEMORY ID 'ABC'.
  EXPORT &amp;lt;fs&amp;gt; TO MEMORY ID 'TAB'.
  SUBMIT zxyz.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zxyz .
FIELD-SYMBOLS:&amp;lt;fs&amp;gt; TYPE ANY.
DATA:wf_ref TYPE REF TO data.
DATA:pa TYPE tabname.

START-OF-SELECTION.
  IMPORT pa FROM MEMORY ID 'ABC'.
  CREATE DATA wf_ref TYPE (pa).
  ASSIGN wf_ref-&amp;gt;* TO &amp;lt;fs&amp;gt;.
  IF &amp;lt;fs&amp;gt; IS ASSIGNED.
    IMPORT &amp;lt;fs&amp;gt; FROM MEMORY ID 'TAB'.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 08:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226533#M1628670</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-25T08:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226534#M1628671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats exactly what I tried to do in my program. It worked for normal internal table , but for dynamic internal table... No way, it dosnt return any error, but dosnt assign either.  Infact I created the same dynamic table again in my program and assigned it to the new &amp;lt;fs&amp;gt;. But it still does not import the values.!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:01:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226534#M1628671</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T09:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226535#M1628672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try Exporting with DATABASE INDX(ST) ID INDXKEY where INDXKEY is ur memory id. It happened once with me that i was nt getting any error but data was not getting transferred only when i added DATABASE INDX(ST) ID INDXKEY the transfer was successfully taking place.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:09:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226535#M1628672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-25T09:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226536#M1628673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please execute this &amp;amp; check. As im using a very lower version of sap , i have used cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;to create dyn table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPE-POOLS:slis.

PARAMETERS:pa TYPE tabname.

FIELD-SYMBOLS :   &amp;lt;tbl_output&amp;gt; TYPE STANDARD TABLE,
                  &amp;lt;wa_output&amp;gt;  TYPE ANY.
DATA: new_line  TYPE REF TO data,  " dereference &amp;lt;fs&amp;gt;
      new_table TYPE REF TO data.

DATA: ref_descr TYPE REF TO cl_abap_structdescr,
      wa_comp TYPE abap_compdescr.

DATA: it_fieldcat TYPE lvc_t_fcat,
      is_fieldcat LIKE LINE OF it_fieldcat.

DATA: ct_fieldcat TYPE  slis_t_fieldcat_alv,
      wa_fc LIKE LINE OF ct_fieldcat.

CREATE DATA new_line TYPE (pa).
ASSIGN new_line-&amp;gt;* TO &amp;lt;wa_output&amp;gt;.

ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;wa_output&amp;gt; ).

LOOP AT ref_descr-&amp;gt;components INTO wa_comp.
  MOVE:wa_comp-name  TO is_fieldcat-fieldname,
       wa_comp-name  TO is_fieldcat-ref_field,
       pa TO is_fieldcat-ref_table.
  APPEND is_fieldcat TO it_fieldcat.
ENDLOOP.

CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
  EXPORTING
    it_fieldcatalog           = it_fieldcat
  IMPORTING
    ep_table                  = new_table.

IF sy-subrc = 0.
  ASSIGN   new_table-&amp;gt;* TO &amp;lt;tbl_output&amp;gt;.
ENDIF.

SELECT * FROM (pa) UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE &amp;lt;tbl_output&amp;gt;.
IF sy-subrc = 0.
  EXPORT pa TO MEMORY ID 'ABC'.
  EXPORT &amp;lt;tbl_output&amp;gt; TO MEMORY ID 'TAB'.
ENDIF.
submit zxyz.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226536#M1628673</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-25T09:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226537#M1628674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zxyz .
TYPE-POOLS:slis.

FIELD-SYMBOLS :   &amp;lt;tbl_output&amp;gt; TYPE STANDARD TABLE,
                  &amp;lt;wa_output&amp;gt;  TYPE ANY.
DATA:pa TYPE tabname.
DATA: new_line  TYPE REF TO data,  " dereference &amp;lt;fs&amp;gt;
      new_table TYPE REF TO data.

DATA: ref_descr TYPE REF TO cl_abap_structdescr,
      wa_comp TYPE abap_compdescr.

DATA: it_fieldcat TYPE lvc_t_fcat,
      is_fieldcat LIKE LINE OF it_fieldcat.

DATA: ct_fieldcat TYPE  slis_t_fieldcat_alv,
      wa_fc LIKE LINE OF ct_fieldcat.

IMPORT pa FROM MEMORY ID 'ABC'.
CREATE DATA new_line TYPE (pa).
ASSIGN new_line-&amp;gt;* TO &amp;lt;wa_output&amp;gt;.

ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;wa_output&amp;gt; ).

LOOP AT ref_descr-&amp;gt;components INTO wa_comp.
  MOVE:wa_comp-name  TO is_fieldcat-fieldname,
       wa_comp-name  TO is_fieldcat-ref_field,
       pa TO is_fieldcat-ref_table.
  APPEND is_fieldcat TO it_fieldcat.
ENDLOOP.

CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
  EXPORTING
    it_fieldcatalog           = it_fieldcat
  IMPORTING
    ep_table                  = new_table.

IF sy-subrc = 0.
  ASSIGN   new_table-&amp;gt;* TO &amp;lt;tbl_output&amp;gt;.
ENDIF.


IMPORT &amp;lt;tbl_output&amp;gt; FROM MEMORY ID 'TAB'.
BREAK-POINT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another method is you can also create two function modules and pass the reference variables. You can also search for shared memory objects ( I m not aware of this much ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:15:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226537#M1628674</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-25T09:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226538#M1628675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA wf_ref TYPE (pa).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in my program I do not know the table structure directly. i am creating a dynamic table &amp;lt;FS_EMP&amp;gt; and then trying to pass it. So how can I replace pa??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226538#M1628675</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T09:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226539#M1628676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PA is the table name given as input in selection screen. Its not directly written.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:22:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226539#M1628676</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-25T09:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226540#M1628677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya but i will not get the table name.. I mean My dynamic table created internally. It is not based on any structure in the DB. I create it based on teh combination of inputs like country, state , customer etc... For eg.. if IN, 11 and 1000005, then my int table will have 5 fields. if values are 'IN' 11 and 10000101 then  I will have to create a table with 7 fields.. etc... So in this case, how can I assign a tablename??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:30:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226540#M1628677</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T09:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226541#M1628678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tablename was just an example used. Pass your own criteria to program 2 and create the dyn tab.&lt;/P&gt;&lt;P&gt;I better suggest to create two function modules and pass the reference within both. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can do as Amit suggested.I didnot suggested it because accessing from meory is much better than accessing from database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Amit-It happened once with me that i was nt getting any error but data was not getting transferred &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its because EXport/Import will not work in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:35:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226541#M1628678</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-25T09:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226542#M1628679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is the code I have used:. Please check and suggest the changes...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part - 1 The Submitted Code - here is where the Dynamic Table is created.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*    Create the Dynamic Table
    CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
      EXPORTING
        it_fieldcatalog = it_dynfield[]
      IMPORTING
        ep_table        = cl_employees.

    ASSIGN cl_employees-&amp;gt;* TO &amp;lt;fs_emp&amp;gt;.
    CREATE DATA cl_employees LIKE LINE OF &amp;lt;fs_emp&amp;gt;.
    ASSIGN cl_employees-&amp;gt;* TO &amp;lt;fs_line&amp;gt;.
    LOOP AT it_targets ASSIGNING &amp;lt;fs_tar&amp;gt; .

      READ TABLE &amp;lt;fs_rslt&amp;gt; ASSIGNING &amp;lt;fs_field&amp;gt; WITH KEY (lw_field) = &amp;lt;fs_tar&amp;gt;-kunnr.
      MOVE-CORRESPONDING &amp;lt;fs_field&amp;gt; TO &amp;lt;fs_line&amp;gt;.
      MOVE-CORRESPONDING &amp;lt;fs_tar&amp;gt; TO &amp;lt;fs_line&amp;gt;.
      INSERT &amp;lt;fs_line&amp;gt; INTO TABLE  &amp;lt;fs_emp&amp;gt;.
    ENDLOOP.

*    CREATE DATA lw_id TYPE &amp;lt;fs_emp&amp;gt;.
*  ASSIGN lw_id-&amp;gt;* TO &amp;lt;fs&amp;gt;.
*  EXPORT &amp;lt;fs_emp&amp;gt; TO MEMORY ID 'ABC'.
*  EXPORT &amp;lt;fs&amp;gt; TO MEMORY ID 'TAB'.
    GET REFERENCE OF &amp;lt;fs_emp&amp;gt; INTO lw_id.
    EXPORT &amp;lt;fs_emp&amp;gt;  TO MEMORY ID 'TAB' .

    CALL FUNCTION 'C14Z_EXPORT_TO_MEMORY'
      EXPORTING
        i_id = 'FLD'
      TABLES
        tab  = it_dynfield[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part - 2 The program calling the Above program &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
     DATA :cl_employees TYPE REF TO data.
      DATA: lit_fc TYPE lvc_t_fcat.
      FIELD-SYMBOLS: &amp;lt;fs_tab&amp;gt; TYPE ANY TABLE.
      FIELD-SYMBOLS: &amp;lt;new_field&amp;gt; TYPE ANY.

      DATA: field_symbol_name(30) VALUE '(ZSDR010)&amp;lt;FS_EMP&amp;gt;'.

      ASSIGN (field_symbol_name) TO &amp;lt;new_field&amp;gt;.
      SUBMIT zsdr010 WITH so_lnd00 IN so_lnd00
                WITH so_zon00 IN so_zon00
                WITH so_reg00 IN so_reg00
                WITH so_cit00 IN so_cit00
                WITH so_des00 IN  so_des00
                WITH so_emp00 IN so_emp00
                WITH so_cou00 IN so_cou00
                WITH so_kun00 IN so_kun00
                WITH so_mat00 IN so_mat00 AND RETURN .


      CALL FUNCTION 'C14Z_IMPORT_FROM_MEMORY'
        EXPORTING
          i_id = 'FLD'
        TABLES
          tab  = lit_fc.
      CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
        EXPORTING
          it_fieldcatalog = lit_fc[]
        IMPORTING
          ep_table        = cl_employees.

      ASSIGN cl_employees-&amp;gt;* TO &amp;lt;fs_tab&amp;gt;.
      IMPORT &amp;lt;fs_tab&amp;gt; FROM DATABASE indx(st) ID 'TAB'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; And Keshav,&lt;/P&gt;&lt;P&gt;I want to Resort to FM only if I have no other option with this method, as I would have to change it in many areas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:47:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226542#M1628679</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T09:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226543#M1628680</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 need to know how the strcture of your table is generated In both programm:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Calling program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: LR_VALUE_DESCR  TYPE REF TO CL_ABAP_ELEMDESCR,
      COMPONENT       TYPE CL_ABAP_STRUCTDESCR=&amp;gt;COMPONENT,
      LT_COMPONENTS   TYPE CL_ABAP_STRUCTDESCR=&amp;gt;COMPONENT_TABLE.

DATA: LT_STRUC        TYPE REF TO CL_ABAP_STRUCTDESCR,
      LT_TAB          TYPE REF TO CL_ABAP_TABLEDESCR.

DATA: L_INDEX TYPE C.

DATA: W_LINE          TYPE REF TO DATA,
      INT_TABLE       TYPE REF TO DATA.

FIELD-SYMBOLS: &amp;lt;WA&amp;gt;    TYPE ANY,
               &amp;lt;ITAB&amp;gt;  TYPE TABLE,
               &amp;lt;VALUE&amp;gt; TYPE ANY.

DO 4 TIMES.
  CLEAR COMPONENT.
  MOVE SY-INDEX TO L_INDEX.
  CONCATENATE 'FIELD' L_INDEX INTO COMPONENT-NAME.
  MOVE CL_ABAP_ELEMDESCR=&amp;gt;GET_C( P_LENGTH = 4 ) TO LR_VALUE_DESCR.
  COMPONENT-TYPE = LR_VALUE_DESCR.
  INSERT COMPONENT INTO TABLE LT_COMPONENTS.
ENDDO.

* Workarea
LT_STRUC = CL_ABAP_STRUCTDESCR=&amp;gt;CREATE( P_COMPONENTS = LT_COMPONENTS
                                                   P_STRICT     = 'X' ).
CREATE DATA W_LINE TYPE HANDLE LT_STRUC.
ASSIGN W_LINE-&amp;gt;* TO &amp;lt;WA&amp;gt;.

* Table
LT_TAB = CL_ABAP_TABLEDESCR=&amp;gt;CREATE( P_LINE_TYPE = LT_STRUC ).

CREATE DATA INT_TABLE TYPE HANDLE LT_TAB.
ASSIGN INT_TABLE-&amp;gt;* TO &amp;lt;ITAB&amp;gt;.

DO 3 TIMES.
  CLEAR &amp;lt;WA&amp;gt;.
  DO 4 TIMES.
    MOVE SY-INDEX TO L_INDEX.
    CONCATENATE 'FIELD' L_INDEX INTO COMPONENT-NAME.
    ASSIGN COMPONENT COMPONENT-NAME OF STRUCTURE &amp;lt;WA&amp;gt; TO &amp;lt;VALUE&amp;gt;.
    MOVE SY-INDEX TO &amp;lt;VALUE&amp;gt;.
  ENDDO.
  APPEND &amp;lt;WA&amp;gt; TO &amp;lt;ITAB&amp;gt;.
ENDDO.


DATA: WA_INDX TYPE INDX.

WA_INDX-USERA = SY-UNAME.
WA_INDX-PGMID = 'MAXMAX'.

EXPORT TAB = &amp;lt;ITAB&amp;gt;
  TO DATABASE INDX(XY)
  FROM WA_INDX
  CLIENT SY-MANDT
  ID 'TABLE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Called program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: LR_VALUE_DESCR  TYPE REF TO CL_ABAP_ELEMDESCR,
      COMPONENT       TYPE CL_ABAP_STRUCTDESCR=&amp;gt;COMPONENT,
      LT_COMPONENTS   TYPE CL_ABAP_STRUCTDESCR=&amp;gt;COMPONENT_TABLE.

DATA: LT_STRUC        TYPE REF TO CL_ABAP_STRUCTDESCR,
      LT_TAB          TYPE REF TO CL_ABAP_TABLEDESCR.

DATA: L_INDEX TYPE C.

DATA: W_LINE          TYPE REF TO DATA,
      INT_TABLE       TYPE REF TO DATA.

FIELD-SYMBOLS: &amp;lt;WA&amp;gt;    TYPE ANY,
               &amp;lt;ITAB&amp;gt;  TYPE TABLE,
               &amp;lt;VALUE&amp;gt; TYPE ANY.

DO 4 TIMES.
  CLEAR COMPONENT.
  MOVE SY-INDEX TO L_INDEX.
  CONCATENATE 'FIELD' L_INDEX INTO COMPONENT-NAME.
  MOVE CL_ABAP_ELEMDESCR=&amp;gt;GET_C( P_LENGTH = 4 ) TO LR_VALUE_DESCR.
  COMPONENT-TYPE = LR_VALUE_DESCR.
  INSERT COMPONENT INTO TABLE LT_COMPONENTS.
ENDDO.

* Workarea
LT_STRUC = CL_ABAP_STRUCTDESCR=&amp;gt;CREATE( P_COMPONENTS = LT_COMPONENTS
                                                   P_STRICT     = 'X' ).
CREATE DATA W_LINE TYPE HANDLE LT_STRUC.
ASSIGN W_LINE-&amp;gt;* TO &amp;lt;WA&amp;gt;.

* Table
LT_TAB = CL_ABAP_TABLEDESCR=&amp;gt;CREATE( P_LINE_TYPE = LT_STRUC ).

CREATE DATA INT_TABLE TYPE HANDLE LT_TAB.
ASSIGN INT_TABLE-&amp;gt;* TO &amp;lt;ITAB&amp;gt;.


DATA: WA_INDX TYPE INDX.

WA_INDX-USERA = SY-UNAME.
WA_INDX-PGMID = 'MAXMAX'.

IMPORT TAB = &amp;lt;ITAB&amp;gt;
  FROM DATABASE INDX(XY)
  TO WA_INDX
  CLIENT SY-MANDT
  ID 'TABLE'.

LOOP AT &amp;lt;ITAB&amp;gt; ASSIGNING &amp;lt;WA&amp;gt;.
  WRITE: / &amp;lt;WA&amp;gt;.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample above use IMPORT/EXPORT from database: if the called program can't know the structure of the dynaic table, you need to transfer it by the same way you transfer the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:52:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226543#M1628680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-25T09:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226544#M1628681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORT &amp;lt;fs_emp&amp;gt;  TO MEMORY ID 'TAB' .&lt;/P&gt;&lt;P&gt;IMPORT &amp;lt;fs_tab&amp;gt; FROM DATABASE indx(st) ID 'TAB'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In your code you are exporting to memory and importing from database which is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In part one add.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
export it_dynfield[] to memory id 'FCG'.
export &amp;lt;fs_emp&amp;gt; to memory id 'TAB'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In part two after submit add.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
import it_dynfield from memory id 'FCG'.

 CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
      EXPORTING
        it_fieldcatalog = it_dynfield[]
      IMPORTING
        ep_table        = cl_employees.

if cl_employees is bound.
ASSIGN cl_employees-&amp;gt;* TO &amp;lt;fs_emp&amp;gt;.
if sy-subrc = 0.
import &amp;lt;fs_emp&amp;gt; from memory id 'TAB'.
endif.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 09:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226544#M1628681</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-25T09:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226545#M1628682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No actually I was trying Amits way. I Have Imported and Exported both from memory itself. Not database. Amits solution of replacing with database index too dint work by the way.&lt;/P&gt;&lt;P&gt;It_dynfld if imported using a FM 'C14Z_IMPORT_TO_MEMORY'&lt;/P&gt;&lt;P&gt; and it is exported bacj as Lit_fc again using a FM.. It works for this. the values assigned are imported successfully in Prog 2,&lt;/P&gt;&lt;P&gt;I added the Cl_employees is bound section....&lt;/P&gt;&lt;P&gt;It gives sy-subrc = 0. in all steps.. But the value in &amp;lt;fs_emp&amp;gt; is blank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 10:06:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226545#M1628682</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T10:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Internal Table values to another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226546#M1628683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I got it solved using &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: WA_INDX TYPE INDX.
 
WA_INDX-USERA = SY-UNAME.
WA_INDX-PGMID = 'MAXMAX'.
 
EXPORT TAB = &amp;lt;ITAB&amp;gt;
  TO DATABASE INDX(XY)
  FROM WA_INDX
  CLIENT SY-MANDT
  ID 'TABLE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; I am still confused on how to achieve this using memory ID and field symbols.. But I can at least continue with my work. &lt;/P&gt;&lt;P&gt;Thanks a lot..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suzie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 10:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-dynamic-internal-table-values-to-another-program/m-p/8226546#M1628683</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-10-25T10:13:50Z</dc:date>
    </item>
  </channel>
</rss>

