<?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: function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964801#M699557</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;The function module GET_COMPONENT_LIST does exactly what you wish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine that you want to get all the fields of an internal table named itab. This itab is defined in the program named 'ZPRGM', and a line of this itab is called work_area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is to say, you have a program like this :&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zprgm.&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;             f1(5) type c,&lt;/P&gt;&lt;P&gt;             f2(15) type c,&lt;/P&gt;&lt;P&gt;             f3 type matnr,&lt;/P&gt;&lt;P&gt;           end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Buffer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : work_area LIKE LINE OF 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;To get the name of the fields of this itab, you have to do the following :&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_COMPONENT_LIST'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            program    = 'ZPRGM'&lt;/P&gt;&lt;P&gt;            fieldname  = 'WORK_AREA'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            components = it_components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In it_components, you will have many information on your internal table fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be careful : WORK_AREA must have been defined as a global data in ZPRGM program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check this from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?=&amp;amp;p=832254" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?=&amp;amp;p=832254&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2007 10:40:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-22T10:40:25Z</dc:date>
    <item>
      <title>function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964799#M699555</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;What is the use of function module 'GET_COMPONENT_LIST'?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:32:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964799#M699555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T10:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964800#M699556</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;This FM return the List of Components in a Internal Table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_COMPONENT_LIST'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            program    = 'ZPRGM'&lt;/P&gt;&lt;P&gt;            fieldname  = 'IT_EKKO'  "Internal table name&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            components = it_components. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF HELPFUL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:40:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964800#M699556</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-10-22T10:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964801#M699557</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;The function module GET_COMPONENT_LIST does exactly what you wish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine that you want to get all the fields of an internal table named itab. This itab is defined in the program named 'ZPRGM', and a line of this itab is called work_area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is to say, you have a program like this :&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zprgm.&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;             f1(5) type c,&lt;/P&gt;&lt;P&gt;             f2(15) type c,&lt;/P&gt;&lt;P&gt;             f3 type matnr,&lt;/P&gt;&lt;P&gt;           end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Buffer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : work_area LIKE LINE OF 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;To get the name of the fields of this itab, you have to do the following :&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_COMPONENT_LIST'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            program    = 'ZPRGM'&lt;/P&gt;&lt;P&gt;            fieldname  = 'WORK_AREA'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            components = it_components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In it_components, you will have many information on your internal table fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be careful : WORK_AREA must have been defined as a global data in ZPRGM program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check this from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?=&amp;amp;p=832254" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?=&amp;amp;p=832254&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964801#M699557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T10:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964802#M699558</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;Check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3291826"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Muthu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:40:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2964802#M699558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T10:40:35Z</dc:date>
    </item>
  </channel>
</rss>

