<?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: Accessing a structure dynamical in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103417#M104064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everybody for ure help.&lt;/P&gt;&lt;P&gt;I guess i found the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; lc_fieldname = ls_fields-fieldname.&lt;/P&gt;&lt;P&gt; CONCATENATE 'ls_Table-' lc_fieldname INTO lc_fieldname.&lt;/P&gt;&lt;P&gt; ASSIGN (lc_fieldname) TO &amp;lt;FS_FIELDNAME&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Append &amp;lt;FS_fieldname&amp;gt; TO serializedTable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2005 13:40:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-10-25T13:40:44Z</dc:date>
    <item>
      <title>Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103408#M104055</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 hope someone knows a solution for the following problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to access a table. I know the tablename and create a structure to access the values, but the table and therfore also the fieldnames of the structure can differ everytime.&lt;/P&gt;&lt;P&gt;Thats why i want to access the structure dynamical. I get the fielsnames of the structure with the Function:&lt;/P&gt;&lt;P&gt;'RFC_GET_STRUCTURE_DEFINITION'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i program the following code:&lt;/P&gt;&lt;P&gt;...     &lt;/P&gt;&lt;P&gt;LOOP AT lt_fields INTO ls_fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_fieldname = ls_fields-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Append &amp;lt;b&amp;gt;ls_Table-lv_fieldname&amp;lt;/b&amp;gt; TO serializedTable.&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;the compile is saying: no such fieldname exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i make him clear, to use the content of the variable during runtime?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ure help or hint!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:28:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103408#M104055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-25T12:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103409#M104056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you'd need to use a field-symbol. Have a look at report SAPRDEMO_TABLES_IN_EXCEL; it uses the same function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103409#M104056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-25T12:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103410#M104057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which table is  "ls_Table" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try using field symbols for assigning fields dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:33:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103410#M104057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-25T12:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103411#M104058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;without the definition of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;lt_fields &lt;/P&gt;&lt;P&gt;ls_fields&lt;/P&gt;&lt;P&gt;lv_fieldname&lt;/P&gt;&lt;P&gt;ls_Table&lt;/P&gt;&lt;P&gt;serializedTable&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;addressing your question would be tough for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103411#M104058</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2005-10-25T12:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103412#M104059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@both:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i already tryed to solve it with Field Symbols, but failed.&lt;/P&gt;&lt;P&gt;How could I? &lt;/P&gt;&lt;P&gt;A FS is just a pointer maybe for something with unknown type. But i know the type of the table - means the name - which can differ from situation to situation. Therefore i just can access it dynamical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if someone of u knows how i can solve it with FS, i would appreciate your help - i dont know how to solve it with FS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:41:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103412#M104059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-25T12:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103413#M104060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no prob - if it help u:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lt_fields       TYPE itab_RFC_FIELDS&lt;/P&gt;&lt;P&gt;ls_fields       TYPE RFC_FIELDS,&lt;/P&gt;&lt;P&gt;lv_fieldname    TYPE CHAR100&lt;/P&gt;&lt;P&gt;ls_Table        TYPE ANY TABLE&lt;/P&gt;&lt;P&gt;serializedTable TYPE itab_XMLFile&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:48:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103413#M104060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-25T12:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103414#M104061</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;it seems to me that you can work with field-symbols:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign (tab-name) to &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;append &amp;lt;f&amp;gt; to itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:53:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103414#M104061</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-10-25T12:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103415#M104062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is this what you are looking for&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: tablename TYPE  x030l-tabname .

DATA: irfc_fields TYPE STANDARD TABLE OF rfc_fields .
DATA: wa_rfc_fields LIKE LINE OF irfc_fields .

DATA: serializedtable TYPE STANDARD TABLE OF string .

CLEAR tablename .

MOVE: 'MARA' TO tablename .

CALL FUNCTION 'RFC_GET_STRUCTURE_DEFINITION'
  EXPORTING
    tabname                = tablename
*   UCLEN                  = UCLEN
* IMPORTING
*   TABLENGTH              = TABLENGTH
  TABLES
    fields                 = irfc_fields
 EXCEPTIONS
   table_not_active       = 1
   OTHERS                 = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

LOOP AT irfc_fields INTO wa_rfc_fields .

  APPEND wa_rfc_fields-fieldname TO serializedtable .

ENDLOOP .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 12:55:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103415#M104062</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2005-10-25T12:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103416#M104063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Andreas: The compile is not accepting: assign(tab-&amp;lt;i&amp;gt;name&amp;lt;/i&amp;gt;)to &amp;lt;f&amp;gt;&lt;/P&gt;&lt;P&gt;if &amp;lt;i&amp;gt;name&amp;lt;/i&amp;gt; is a variable that contains the real fieldname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Raja: almost  what im looking for, but&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_rfc_fields-fieldname TO serializedtable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;isnt correct. It should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND &amp;lt;i&amp;gt;StructureName&amp;lt;/i&amp;gt;-wa_rfc_fields-fieldname TO serializedtable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 13:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103416#M104063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-25T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing a structure dynamical</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103417#M104064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everybody for ure help.&lt;/P&gt;&lt;P&gt;I guess i found the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; lc_fieldname = ls_fields-fieldname.&lt;/P&gt;&lt;P&gt; CONCATENATE 'ls_Table-' lc_fieldname INTO lc_fieldname.&lt;/P&gt;&lt;P&gt; ASSIGN (lc_fieldname) TO &amp;lt;FS_FIELDNAME&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Append &amp;lt;FS_fieldname&amp;gt; TO serializedTable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2005 13:40:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-a-structure-dynamical/m-p/1103417#M104064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-25T13:40:44Z</dc:date>
    </item>
  </channel>
</rss>

