<?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 Function module to get Structure components in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795693#M341894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;is there a function module to get structure components,if we give a structure name.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;kaushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Nov 2006 14:01:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-30T14:01:17Z</dc:date>
    <item>
      <title>Function module to get Structure components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795693#M341894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;is there a function module to get structure components,if we give a structure name.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;kaushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 14:01:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795693#M341894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T14:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get Structure components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795694#M341895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try function module GET_COMPONENT_LIST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 14:03:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795694#M341895</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-30T14:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get Structure components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795695#M341896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hi&lt;/P&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM DDIF_FIELDINFO_GET by giving the structure name/table name,&lt;/P&gt;&lt;P&gt;u will get all field names along with data types and everything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs&lt;/P&gt;&lt;P&gt;Manas Ranjan Panda&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        MANAS PANDA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 14:04:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795695#M341896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T14:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get Structure components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795696#M341897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sample program using the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0003.

types: begin of type_item,
       f1(3),
       f2(3),
       f3(3),
       f4(3),
       end of type_item.

types: begin of type_data,
       data(800),
       end of type_data.

data:  lineitems type table of type_item with header line,
       t_output type table of type_data with header line,
       fieldlist type table of rstrucinfo with header line,
       fieldsym  type table of rfieldlist with header line.

data:  syrepid type sy-repid.

data:  fieldname like fieldlist-compname,
       data_line type type_data.

field-symbols : &amp;lt;fs1&amp;gt; type any,
                &amp;lt;fs2&amp;gt; type any.

lineitems-f1 = 'a1'.
lineitems-f2 = 'a2'.
lineitems-f3 = 'a3'.
lineitems-f4 = 'a4'.
append lineitems.

lineitems-f1 = 'b1'.
lineitems-f2 = 'b2'.
lineitems-f3 = 'b3'.
lineitems-f4 = 'b4'.
append lineitems.

lineitems-f1 = 'c1'.
lineitems-f2 = 'c2'.
lineitems-f3 = 'c3'.
lineitems-f4 = 'c4'.
append lineitems.

lineitems-f1 = 'd1'.
lineitems-f2 = 'd2'.
lineitems-f3 = 'd3'.
lineitems-f4 = 'd4'.
append lineitems.

syrepid = sy-repid.

* Gets all of the global data types.
call function 'GET_GLOBAL_SYMBOLS'
     exporting
          program   = syrepid
     tables
          fieldlist = fieldsym.

* gets all of the components of a structure
call function 'GET_COMPONENT_LIST'
     exporting
          program    = syrepid
          fieldname  = 'lineitems'
     tables
          components = fieldlist.

format color 3.

loop at lineitems assigning &amp;lt;fs2&amp;gt; .

  loop at fieldlist.
    fieldname = fieldlist-compname .
    assign component  fieldname  of structure &amp;lt;fs2&amp;gt; to &amp;lt;fs1&amp;gt;.
    concatenate data_line &amp;lt;fs1&amp;gt; into data_line .
  endloop.
  append data_line to t_output.
  clear data_line.
endloop.

loop at t_output.
  write:/ t_output.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 14:04:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795696#M341897</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-30T14:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get Structure components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795697#M341898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  I am not sure of any function module. You can use table DD03L. This table contains the details of the fields for a SAP table/ Strucutre. The input to the select statement would be the name of the structure in your case. You can create your own function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from DD03L&lt;/P&gt;&lt;P&gt;   into &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;where tabname = &amp;lt;Structure-name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 15:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-structure-components/m-p/1795697#M341898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T15:05:52Z</dc:date>
    </item>
  </channel>
</rss>

