<?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: Get Components in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414733#M1048893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aparna Shekhar ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a internal table. I can not use this first function. thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narendran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function return the same information that i've already got in the attributes section, i could not see the name of the field, just type. The information that i need are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  begin of abap_componentdescr,&lt;/P&gt;&lt;P&gt;    name       type string,&lt;/P&gt;&lt;P&gt;    type       type ref to cl_abap_datadescr,&lt;/P&gt;&lt;P&gt;    as_include type abap_bool,&lt;/P&gt;&lt;P&gt;    suffix     type string,&lt;/P&gt;&lt;P&gt;  end of abap_componentdescr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the return parameter of the method GET_COMPONENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexandre&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2008 21:25:22 GMT</pubDate>
    <dc:creator>alexandre_docarmorocha</dc:creator>
    <dc:date>2008-09-05T21:25:22Z</dc:date>
    <item>
      <title>Get Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414729#M1048889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know how i can get components information from transparent tables or any structure in the data dictionary.&lt;/P&gt;&lt;P&gt;But, if i have just a internal table, how can i get components table? &lt;/P&gt;&lt;P&gt;E.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: BEGIN OF st_table,&lt;/P&gt;&lt;P&gt;        matnr type matnr,&lt;/P&gt;&lt;P&gt;        name1 type name1,&lt;/P&gt;&lt;P&gt;       END OF st_table.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;data: i_table TYPE TABLE OF st_table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_struc TYPE REF TO cl_abap_structdescr.&lt;/P&gt;&lt;P&gt;  DATA: lt_comp TYPE cl_abap_structdescr=&amp;gt;component_table.&lt;/P&gt;&lt;P&gt;  DATA: ls_comp LIKE LINE OF lt_comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_struc ?= cl_abap_typedescr=&amp;gt;describe_by_name( itab-tabname ).&lt;/P&gt;&lt;P&gt;  lt_comp = l_struc-&amp;gt;get_components( ).&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Does not work out&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i've already try the following ones:&lt;/P&gt;&lt;P&gt;DESCRIBE_BY_DATA&lt;/P&gt;&lt;P&gt;DESCRIBE_BY_NAME&lt;/P&gt;&lt;P&gt;DESCRIBE_BY_OBJECT_REF&lt;/P&gt;&lt;P&gt;DESCRIBE_BY_DATA_REF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexandre&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 20:15:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414729#M1048889</guid>
      <dc:creator>alexandre_docarmorocha</dc:creator>
      <dc:date>2008-09-05T20:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414730#M1048890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  Z_MP_TEST_STRUCT.
data: idfies type table of dfies with header line,
      s_file TYPE string.

parameters: p_table type ddobjname.
parameters: filename(80) type c default 'D:\Documents and Settings\Desktop\download.xls'.

call function 'DDIF_FIELDINFO_GET'
exporting
tabname = p_table
tables
dfies_tab = idfies
exceptions
not_found = 1
internal_error = 2
others = 3.

s_file = filename.

CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      FILENAME                = s_file
      FILETYPE                = 'DAT'
    TABLES
      DATA_TAB                = idfies
    EXCEPTIONS
      FILE_WRITE_ERROR        = 1
      NO_BATCH                = 2
      GUI_REFUSE_FILETRANSFER = 3
      INVALID_TYPE            = 4
      NO_AUTHORITY            = 5
      UNKNOWN_ERROR           = 6
      HEADER_NOT_ALLOWED      = 7
      SEPARATOR_NOT_ALLOWED   = 8
      FILESIZE_NOT_ALLOWED    = 9
      HEADER_TOO_LONG         = 10
      DP_ERROR_CREATE         = 11
      DP_ERROR_SEND           = 12
      DP_ERROR_WRITE          = 13
      UNKNOWN_DP_ERROR        = 14
      ACCESS_DENIED           = 15
      DP_OUT_OF_MEMORY        = 16
      DISK_FULL               = 17
      DP_TIMEOUT              = 18
      FILE_NOT_FOUND          = 19
      DATAPROVIDER_EXCEPTION  = 20
      CONTROL_FLUSH_ERROR     = 21
      OTHERS                  = 22.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 20:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414730#M1048890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-05T20:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414731#M1048891</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 use the FM GET_COMPONENT_LIST..to get the list of components for an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 20:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414731#M1048891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-05T20:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414732#M1048892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this, you get all the info you need in ls_components&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
type-pools abap.

types: begin of ty_est,
firstname type c,
second type i,
third type d,
end of ty_est.
DATA: ls_components TYPE ABAP_COMPDESCR_TAB,
      wa_components like line of ls_components.
DATA: lo_strucdescr TYPE REF TO cl_abap_structdescr.
data: itab type table of ty_est with header line.


lo_strucdescr ?= cl_abap_typedescr=&amp;gt;describe_by_data( itab ).
ls_components = lo_strucdescr-&amp;gt;components.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 21:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414732#M1048892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-05T21:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414733#M1048893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aparna Shekhar ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a internal table. I can not use this first function. thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narendran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function return the same information that i've already got in the attributes section, i could not see the name of the field, just type. The information that i need are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  begin of abap_componentdescr,&lt;/P&gt;&lt;P&gt;    name       type string,&lt;/P&gt;&lt;P&gt;    type       type ref to cl_abap_datadescr,&lt;/P&gt;&lt;P&gt;    as_include type abap_bool,&lt;/P&gt;&lt;P&gt;    suffix     type string,&lt;/P&gt;&lt;P&gt;  end of abap_componentdescr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the return parameter of the method GET_COMPONENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexandre&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 21:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414733#M1048893</guid>
      <dc:creator>alexandre_docarmorocha</dc:creator>
      <dc:date>2008-09-05T21:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get Components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414734#M1048894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ramiro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wow man! You got it right! &lt;/P&gt;&lt;P&gt;Points are rewards for everyone.&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 21:31:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-components/m-p/4414734#M1048894</guid>
      <dc:creator>alexandre_docarmorocha</dc:creator>
      <dc:date>2008-09-05T21:31:27Z</dc:date>
    </item>
  </channel>
</rss>

