<?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: FS to Structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970578#M701028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on ur source code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i convert FS &amp;lt;gs_struc&amp;gt; to a structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Nov 2007 09:38:37 GMT</pubDate>
    <dc:creator>former_member426550</dc:creator>
    <dc:date>2007-11-14T09:38:37Z</dc:date>
    <item>
      <title>FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970572#M701022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good day experts...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i create a structure with reference to a FS?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; data &amp;lt;gt_itab&amp;gt;     TYPE table.&lt;/P&gt;&lt;P&gt;  CREATE DATA gdo_data TYPE (p_tabnam).&lt;/P&gt;&lt;P&gt;  ASSIGN gdo_data-&amp;gt;* TO &amp;lt;gt_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from the code above..i want to create a structure with the fields like &amp;lt;gt_itab&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 08:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970572#M701022</guid>
      <dc:creator>former_member426550</dc:creator>
      <dc:date>2007-11-14T08:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970573#M701023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to add the following coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;&amp;lt;fs_general&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;lc_description(100) TYPE c.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;field-symbols:&lt;/P&gt;&lt;P&gt;  &amp;lt;ld_descr&amp;gt;   type any.  " additional field symbol&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;fs_general&amp;gt; = i_fs.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;assign component 'Z_DESCRIPTION' OF STRUCTURE &amp;lt;fs_general&amp;gt; TO &amp;lt;ld_descr&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF ( &amp;lt;ld_descr&amp;gt; IS ASSIGNED ).&lt;/P&gt;&lt;P&gt;  lc_description = &amp;lt;ld_descr&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 08:10:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970573#M701023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T08:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970574#M701024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: wa TYPE gt_itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 08:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970574#M701024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T08:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970575#M701025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank u naresh for ur reply...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF ( &amp;lt;ld_descr&amp;gt; IS ASSIGNED ).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;the result is always unASSIGNED...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whats the purpose of variable  i_fs?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 08:41:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970575#M701025</guid>
      <dc:creator>former_member426550</dc:creator>
      <dc:date>2007-11-14T08:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970576#M701026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABLES bkpf.&lt;/P&gt;&lt;P&gt;data          : gdo_data       type REF TO data,&lt;/P&gt;&lt;P&gt;                  p_tabnam(30) type c.&lt;/P&gt;&lt;P&gt;field-SYMBOLS: &amp;lt;gt_itab&amp;gt; TYPE ANY TABLE,&lt;/P&gt;&lt;P&gt;                         &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;p_tabnam = 'BKPF'.&lt;/P&gt;&lt;P&gt;ASSIGN (p_tabnam) to &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;CREATE DATA gdo_data LIKE TABLE OF &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN gdo_data-&amp;gt;* TO &amp;lt;gt_itab&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 08:53:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970576#M701026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T08:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970577#M701027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think Naresh's code does not answer your question at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CREATE DATA gdo_data TYPE (p_tabnam).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;creates a structured variable, not an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Startig with ECC600 this should be &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CREATE DATA gdo_data TYPE table of (p_tabnam).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The declaration of field symbol is wrong, should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;gt_itab&amp;gt; TYPE ANY TABLE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a structure, add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;gs_struc&amp;gt; TYPE ANY.
CREATE DATA gdo_data LIKE LINE OF &amp;lt;gt_itab&amp;gt;.
ASSIGN gdo_data-&amp;gt;* TO &amp;lt;gs_struc&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that gdo_data is declared as TYPE REF TO DATA and can be re-used to take reference to created data objects. The refernce is the assigned to a field-symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 09:06:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970577#M701027</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-11-14T09:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970578#M701028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on ur source code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i convert FS &amp;lt;gs_struc&amp;gt; to a structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 09:38:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970578#M701028</guid>
      <dc:creator>former_member426550</dc:creator>
      <dc:date>2007-11-14T09:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970579#M701029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;jr_sap_developer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;gs_struc&amp;gt; is a field-symbol assigned to a structure and can be used as a structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because the field-symbol itself is of type any, you can't access it's components directly. If, i.e., the table and table line is of type vbap, you can't use &amp;lt;gs_struc&amp;gt;-vbeln. This will result in a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can declare another field-symbol and assign it:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field-symbols &amp;lt;component&amp;gt; type any.
assign component 'VBELN' of structure &amp;lt;gs_struc&amp;gt; to &amp;lt;component&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't know the field names of your structure, you can get them using this little method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS cc DEFINITION.
    CLASS-METHODS:
      fieldtab
        IMPORTING is_any                  TYPE any
        RETURNING value(rt_field)         TYPE ttfieldname.
ENDCLASS.    
CLASS cc IMPLEMENTATION.
**********************************************************************
* METHOD    :        fieldtab
* returns component names of structure or table
* result to be used for dynamic programming
* ATTN: This method is not release-stable: SAP redesigned the TYPE
*       concept with major changes to classes cl_abap_*descr
*       The type_kind attribute is replaced with type attribute
*       with changed values.
*       Release change/porting note:
*       activate lines with comment "starting rel 4.7
*       deactivate lines with comment "before rel 4.7
**********************************************************************
  METHOD fieldtab.
    DATA:
      lt_comp                             TYPE abap_compdescr_tab,
      lr_dat                              TYPE REF TO data,
      lr_typedescr                        TYPE REF TO cl_abap_typedescr,
      lr_structdescr                      TYPE REF TO
        cl_abap_structdescr.
    FIELD-SYMBOLS:
      &amp;lt;fs&amp;gt;                                TYPE ANY,
      &amp;lt;ft&amp;gt;                                TYPE ANY TABLE,
      &amp;lt;comp&amp;gt;                              TYPE LINE OF
        abap_compdescr_tab.
    lr_typedescr                          =
    cl_abap_typedescr=&amp;gt;describe_by_data( is_any ).
*    CASE lr_typedescr-&amp;gt;type.                       "starting rel 4.7
*      WHEN cl_abap_structdescr=&amp;gt;KIND_STRUCT.       "starting rel 4.7
    CASE lr_typedescr-&amp;gt;type_kind.                   "before rel 4.7
      WHEN cl_abap_structdescr=&amp;gt;typekind_struct1    "before rel 4.7
        OR cl_abap_structdescr=&amp;gt;typekind_struct2.   "before rel 4.7
        lr_structdescr ?= lr_typedescr.
        lt_comp                           = lr_structdescr-&amp;gt;components.
*      WHEN cl_abap_structdescr=&amp;gt;KIND_TABLE.       "starting rel 4.7
      WHEN cl_abap_structdescr=&amp;gt;typekind_table.    "before rel 4.7
        ASSIGN is_any TO &amp;lt;ft&amp;gt;.
        CREATE DATA lr_dat                LIKE LINE OF &amp;lt;ft&amp;gt;.
        ASSIGN lr_dat-&amp;gt;* TO &amp;lt;fs&amp;gt;.
        lr_structdescr ?= cl_abap_structdescr=&amp;gt;describe_by_data( &amp;lt;fs&amp;gt; ).
        lt_comp                           = lr_structdescr-&amp;gt;components.
      WHEN OTHERS.
        MESSAGE e241(00).
*   Function is invalid in this environment
    ENDCASE.
    LOOP AT lt_comp ASSIGNING &amp;lt;comp&amp;gt;.
      APPEND &amp;lt;comp&amp;gt;-name TO rt_field.
    ENDLOOP." at lt_comp assigning &amp;lt;comp&amp;gt;.
  ENDMETHOD.                    "fieldtab
ENDCLASS.                    "cc IMPLEMENTATION
* . to be used as i.e.
DATA:                                                               
  lt_field                              TYPE ttfieldname.
lt_field = cc=&amp;gt;fieldtab( &amp;lt;gs_struc&amp;gt; ).                              
* ... 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I don't know exactly what you are going to solve, I'll stop right here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 12:51:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970579#M701029</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-11-14T12:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970580#M701030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any update?....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is to create a structure based on &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &amp;lt;gt_itab&amp;gt; TYPE table.&lt;/P&gt;&lt;P&gt;CREATE DATA gdo_data TYPE (p_tabnam).&lt;/P&gt;&lt;P&gt;ASSIGN gdo_data-&amp;gt;* TO &amp;lt;gt_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data gs_struc type &amp;lt;gt_itab&amp;gt;..-----&amp;gt;like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 06:53:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970580#M701030</guid>
      <dc:creator>former_member426550</dc:creator>
      <dc:date>2007-11-16T06:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970581#M701031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;help...any?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 07:46:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970581#M701031</guid>
      <dc:creator>former_member426550</dc:creator>
      <dc:date>2007-11-16T07:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: FS to Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970582#M701032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you create data dynamically using the create data statement, the only way to access them is via field-symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the field-symbol in the same way you would use a structure cerated with DATA ... LIKE or TYPE ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 15:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fs-to-structure/m-p/2970582#M701032</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-11-16T15:25:19Z</dc:date>
    </item>
  </channel>
</rss>

