<?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: How do i get all Function-Groups + their Function-Modules of a Package ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927476#M384634</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report ZP_GET_FM_FRM_PKG
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
REPORT ZP_GET_FM_FRM_PKG.


PARAMETERS: P_PACKG TYPE DEVCLASS. " Parameter for Package Name

TYPES: BEGIN OF TY_FM_DTLS,
         PACKAGE  TYPE DEVCLASS,
         F_GROUP  TYPE AREA,
         F_MODULE TYPE FUNCNAME,
         FM_TEXT  TYPE STEXT,
       END OF TY_FM_DTLS.


DATA: LT_FM_DTLS TYPE TABLE OF TY_FM_DTLS,
      LS_FM_DTLS TYPE TY_FM_DTLS.

"Fetch Function Group name from Package
SELECT OBJ_NAME
  FROM TADIR
  INTO TABLE @DATA(LT_FG)
  WHERE OBJECT = 'FUGR'
  AND DEVCLASS = @P_PACKG.

IF LT_FG IS NOT INITIAL.

"Fetch Function module name from Function Group
  SELECT FUNCNAME,
         AREA
    FROM ENLFDIR
    INTO TABLE @DATA(LT_FM_FG)
    FOR ALL ENTRIES IN @LT_FG
    WHERE AREA = @LT_FG-OBJ_NAME+0(26).


ENDIF.

IF LT_FM_FG IS NOT INITIAL.

"Fetch Function module Short Text Using Function module name
  SELECT FUNCNAME,
         STEXT
    FROM TFTIT
    INTO TABLE @DATA(LT_FM_TXT)
    FOR ALL ENTRIES IN @LT_FM_FG
    WHERE SPRAS = 'E'
    AND FUNCNAME = @LT_FM_FG-FUNCNAME.
ENDIF.


"Filling all data into one internal table

LOOP AT LT_FM_TXT INTO DATA(LS_FM_TXT).
  LS_FM_DTLS-F_MODULE = LS_FM_TXT-FUNCNAME.
  LS_FM_DTLS-FM_TEXT = LS_FM_TXT-STEXT.

  READ TABLE LT_FM_FG
  INTO DATA(LS_FM_FG)
  WITH KEY FUNCNAME = LS_FM_TXT-FUNCNAME.

  IF SY-SUBRC = 0.
    LS_FM_DTLS-F_GROUP = LS_FM_FG-AREA.
  ENDIF.


  LS_FM_DTLS-PACKAGE = P_PACKG.


  APPEND LS_FM_DTLS TO LT_FM_DTLS.
  CLEAR LS_FM_DTLS.


ENDLOOP.


SORT LT_FM_DTLS BY F_GROUP F_MODULE ASCENDING.

" Export internal table data into excel file

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
  EXPORTING
*   I_FIELD_SEPERATOR          =
*   I_LINE_HEADER              =
    I_FILENAME                 = 'F:\Abc.xls' " File Path and Name
*   I_APPL_KEEP                = ' '
  TABLES
    I_TAB_SAP_DATA             = LT_FM_DTLS
* CHANGING
*   I_TAB_CONVERTED_DATA       =
* EXCEPTIONS
*   CONVERSION_FAILED          = 1
*   OTHERS                     = 2
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
ENDIF.


WRITE: 'FM_NAME'.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Sep 2019 13:01:43 GMT</pubDate>
    <dc:creator>former_member488232</dc:creator>
    <dc:date>2019-09-26T13:01:43Z</dc:date>
    <item>
      <title>How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927465#M384623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need a report which gets all function-groups from a given package and then all function-modules of each function group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a package &amp;lt;b&amp;gt;/MSG/R_VERTRAG&amp;lt;/b&amp;gt; , i need all function groups which begin with &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;/MSG/R_VPLAUSI&lt;STRONG&gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/MSG/R_VPRUEF&lt;/STRONG&gt;&amp;lt;/b&amp;gt; and then a table with all their function-modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i do that? &lt;/P&gt;&lt;P&gt;Hope you can help.&lt;/P&gt;&lt;P&gt;&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;Basti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 16:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927465#M384623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T16:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927466#M384624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goto SE80 and you would find all the FMs under Function Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 16:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927466#M384624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T16:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927467#M384625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Go to table TADIR and pass DEVCLASS = ackage name.&lt;/P&gt;&lt;P&gt;All the objects that are returned belong to that pacjage.&lt;/P&gt;&lt;P&gt;You can further filter them based on the Object = 'FUGR' for function group.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 16:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927467#M384625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T16:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927468#M384626</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;GO to the table TADIR..Give the development class name..in the field DEVCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then In the object give FUGR..which is for function group..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the object name give the function group name with *..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also get Function modules for the function group..use the table TFDIR..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the function group name in the field PNAME ...Ex..if the function group name is XM06..you have to give SAPLXM06 in the field PNAME to get the FMs..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Tue, 27 Feb 2007 16:28:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927468#M384626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T16:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927469#M384627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;you can select table ENLFDIR to get the FM from each FG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 16:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927469#M384627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T16:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927470#M384628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, i made a little report with "TADIR". ( sorry that comments are in german &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* Lokale Datendeklaration
*----------------------------------------
TYPES: BEGIN OF typ_fugr,
          fugr TYPE sobj_name,
          fugr_t TYPE areat,
       END OF typ_fugr.

DATA: lt_fugr   TYPE TABLE OF typ_fugr,
      ls_fugr   LIKE LINE OF lt_fugr.


* Auswahl des Paketes

PARAMETERS: paket TYPE devclass DEFAULT '/MSG/'.

*----------------------------------------

[REFRESH lt_fugr.

* Überschriftsspalten aufnehmen
*----------------------------------------

ls_fugr-fugr   = 'Functionsbaustein'.
ls_fugr-fugr_t = 'Text'.
APPEND ls_fugr TO lt_fugr.

*----------------------------------------

* Funktionsgruppen und Text auslesen
*--------------------------------------------

SELECT obj_name
   FROM tadir
   INTO ls_fugr-fugr
   WHERE devclass = paket
     AND object   = 'FUGR'
  AND obj_name LIKE '/MSG/R_VPLAUSI%' OR obj_name LIKE '/MSG/R_VPRUEF%'.
  IF ( sy-subrc = 0 ).

    APPEND ls_fugr TO lt_fugr.
endif.
ENDSELECT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in 'lt_fugr'    there are my functiongroups. i m too stupid to get the modules for it &lt;STRONG&gt;fg&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;can you try to help again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;other problem is, i don t know who i should give those post points &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; lemme think..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 17:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927470#M384628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T17:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927471#M384629</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;  DATA: T_FM TYPE TABLE OF TFDIR.&lt;/P&gt;&lt;P&gt;  DATA: T_FM_LCL TYPE TABLE OF TFDIR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: WA TYPE TFDIR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the correct program name..&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT LT_FUGR INTO LS_FUGR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CONCANTENATE 'SAPL' LS_FUGR-FUGR INTO WA-PNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND WA TO T_FM_LCL.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Function modules..&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT T_FM_LCL[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT * FROM TFDIR&lt;/P&gt;&lt;P&gt;                 INTO TABLE T_FM&lt;/P&gt;&lt;P&gt;                 FOR ALL ENTRIES IN T_FM_LCL&lt;/P&gt;&lt;P&gt;                 WHERE PNAME = T_FM_LCL-PNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Tue, 27 Feb 2007 17:35:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927471#M384629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T17:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927472#M384630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Hi Naren, I modified my report as you mentioned above but the last select doesn t work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  z_kohl_fuba2.

* local data declaration

TYPES: BEGIN OF typ_fugr,
          fugr TYPE sobj_name,
          fugr_t TYPE areat,
       END OF typ_fugr.

DATA: lt_fugr   TYPE TABLE OF typ_fugr,
      ls_fugr   LIKE LINE OF lt_fugr,
      lt_fm TYPE TABLE OF tfdir,
      lt_fm_lcl TYPE TABLE OF tfdir,
      wa TYPE tfdir.

*----------------------------------------

* Choice of package
PARAMETERS: paket TYPE devclass DEFAULT '/MSG/'.

*----------------------------------------

REFRESH lt_fugr.

* Überschriftsspalten aufnehmen
ls_fugr-fugr   = 'Functiongroup'.
ls_fugr-fugr_t = 'Text'.
APPEND ls_fugr TO lt_fugr.

*----------------------------------------

* get functiongroups and texts

SELECT obj_name
   FROM tadir
   INTO ls_fugr-fugr
   WHERE devclass = paket
     AND object   = 'FUGR'
  AND obj_name LIKE '/MSG/R_VPLAUSI%' OR obj_name LIKE '/MSG/R_VPRUEF%'.
  IF ( sy-subrc = 0 ).
    SELECT SINGLE areat
      FROM tlibt
      INTO ls_fugr-fugr_t
      WHERE spras = sy-langu
        AND area  = ls_fugr-fugr.
    APPEND ls_fugr TO lt_fugr.
  ENDIF.
ENDSELECT.

LOOP AT lt_fugr INTO ls_fugr.
  CONCATENATE 'SAPL' ls_fugr-fugr INTO wa-pname.
  APPEND wa TO lt_fm_lcl.
ENDLOOP.

*checken if lt_fm_lcl has content ( works till here )
*LOOP AT lt_fm_lcl INTO wa.
*  WRITE: / wa-pname.
*ENDLOOP.


* Get the Function modules..

IF NOT lt_fm_lcl[] IS INITIAL.

  SELECT * FROM tfdir
    INTO TABLE lt_fm
    FOR ALL ENTRIES IN lt_fm_lcl
    WHERE pname = lt_fm_lcl-pname.
ENDIF.



*the select above doesn t give anything
LOOP AT lt_fm INTO wa.
  WRITE: / 'Bausteinname: ', wa-pname.
  WRITE: / 'Funktionsname: ', wa-funcname.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;can you help a last time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 18:24:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927472#M384630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T18:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927473#M384631</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 select works for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INstead of your function group name..I tried with XM06..It is working fine..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manually check if there is any data in SE16...in the table TADIR &amp;amp; TFDIR..For the corrresponding function group..&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>Tue, 27 Feb 2007 18:31:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927473#M384631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T18:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927474#M384632</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 believe you don't need a own your custom report but u can use the trx SE84 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Programming-&amp;gt;Function Builder-&amp;gt;Function Modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 18:33:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927474#M384632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T18:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927475#M384633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;hey naren, thx i found the mistake now.. :X You got the points &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s.o. is interested in the code .. here you are..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Z_KOHL_FUBAALV
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report für Verwendungsnachweis ausgewählter Funktionsgruppen
*&amp;amp;
*&amp;amp; erstellt:         01.03.07 von Bastian Kohl
*&amp;amp; letzte Änderung:  06.03.07 von Bastian Kohl
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

report  z_kohl_fubaalv no standard page heading.

* local data declaration

types: begin of typ_fugr,
          fugr type sobj_name,
          fugr_t type areat,
       end of typ_fugr.

data: lt_fugr   type table of typ_fugr,
      ls_fugr   like line of lt_fugr,
      lt_fm type table of tfdir,
      lt_fm_lcl type table of tfdir,
      wa type tfdir,
      lt_findstring type table of rsfind,
      ls_findstring type rsfind,
      lt_func type standard table of funcname,
      wa2 like tfdir-funcname,
      lv_devclass type tdevc-devclass,
      lt_scope_object_cls type standard table of seu_obj,
      ls_scope_object_cls type seu_obj,
      ls_scope_devclass type range_dev,
      lt_scope_devclass type table of range_dev,
      lt_founds type table of rsfindlst,
      lt_founds2 type table of rsfindlst,
      ls_founds like rsfindlst,
      v_lsd1 type c value 'I',
      v_lsd2(2) type c value 'EQ',
      lt_sa like table of zzsa,
      ls_sa like line of lt_sa,
      nix(50) type c value 'Baustein wird noch nicht verwendet',
      container_r type ref to cl_gui_custom_container,
      grid_r type ref to cl_gui_alv_grid,
      ok_code like sy-ucomm,
      save_ok like sy-ucomm.

field-symbols: &amp;lt;ls_func&amp;gt; type funcname.

*----------------------------------------

* Choice of package
selection-screen begin of screen 100
                  as window title text-010.
selection-screen: skip,
               begin of block b1
               with frame title text-020.

parameters: paket type tdevc-devclass default '/MSG/'.

selection-screen: end of block b1,
                  skip,
                  begin of block b2
                  with frame title text-030.

parameters: fugrn1(50) type c default '/MSG/R_VPRUEF%'.
parameters: fugrn2(50) type c default '/MSG/R_VPLAUSI%'.

selection-screen: end of block b2,
                  skip,
                  begin of block b3
                  with frame title text-040.

parameters: such_p as checkbox,
            such_o as checkbox,
            such_wo as checkbox,
            such_ff as checkbox,
            such_ps as checkbox,
            such_dd as checkbox.
selection-screen: end of block b3,
                  skip,
                  end of screen 100.

start-of-selection.

  call selection-screen 100.

*----------------------------------------

  refresh lt_fugr.

*----------------------------------------

* get functiongroups
  if fugrn2 is not initial.
    select obj_name
       from tadir
       into ls_fugr-fugr
       where devclass = paket
         and object   = 'FUGR'
      and obj_name like fugrn1 or obj_name like fugrn2.
      if ( sy-subrc = 0 ).
        append ls_fugr to lt_fugr.
      endif.
    endselect.
  else.
*IF fugrn2 = ''.
    select obj_name
     from tadir
     into ls_fugr-fugr
     where devclass = paket
       and object   = 'FUGR'
    and obj_name like fugrn1.
      if ( sy-subrc = 0 ).
        append ls_fugr to lt_fugr.
      endif.
    endselect.
  endif.

* add 'SAPL' into right position of ls_fugr-fugr
* to get pname of tfdir

  loop at lt_fugr into ls_fugr.
    replace '/MSG/' with '/MSG/SAPL' into ls_fugr-fugr.
    move ls_fugr-fugr to wa-pname.
    append wa to lt_fm_lcl.
  endloop.

  if not lt_fm_lcl[] is initial.
    select * from tfdir
      into table lt_fm
      for all entries in lt_fm_lcl
      where pname = lt_fm_lcl-pname.
  endif.
  sort lt_fm.

* parsing of lt_fm in lt_func
  loop at lt_fm into wa.
    append wa to lt_func.
  endloop.

* add locations where to search for the fuba's
  if such_p = 'X'.
    ls_scope_object_cls = 'P'.  "Programmen
    append ls_scope_object_cls to lt_scope_object_cls.
  elseif such_o = 'X'.
    ls_scope_object_cls = 'O'.  "Klassen/Interfaces
    append ls_scope_object_cls to lt_scope_object_cls.
  elseif such_wo = 'X'.
    ls_scope_object_cls = 'WO'. "BSP-Applikationen
    append ls_scope_object_cls to lt_scope_object_cls.
  elseif such_ff = 'X'.
    ls_scope_object_cls = 'FF'. "Funktionsbausteinschnittstellen
    append ls_scope_object_cls to lt_scope_object_cls.
  elseif such_ps = 'X'.
    ls_scope_object_cls = 'PS'. "Dynpros
    append ls_scope_object_cls to lt_scope_object_cls.
  elseif such_dd = 'X'.
    ls_scope_object_cls = 'DD'. "Domänen
    append ls_scope_object_cls to lt_scope_object_cls.
  endif.
*  casting of paket to type tdevc-devclass
  lv_devclass = paket.

* append paket in lt_scope_devclass for crossref check
* add values in fields of lt_scope_devclass
  if lv_devclass is not initial.
    move v_lsd1 to ls_scope_devclass-sign.
    move v_lsd2 to ls_scope_devclass-option.
    move lv_devclass to ls_scope_devclass-low.
    append ls_scope_devclass to lt_scope_devclass.
  endif.


* where-used check for all lines of lt_func

  loop at lt_func assigning &amp;lt;ls_func&amp;gt;.

    refresh lt_findstring.
    refresh lt_founds.


    ls_findstring-object = &amp;lt;ls_func&amp;gt;.
    append ls_findstring to lt_findstring.



* call where-used function
    call function 'RS_EU_CROSSREF'
      exporting
        i_find_obj_cls           = 'FF'
        no_dialog                = 'X'
      tables
        i_findstrings            = lt_findstring
        o_founds                 = lt_founds
        i_scope_devclass         = lt_scope_devclass
      exceptions
        not_executed             = 1
        not_found                = 2
        illegal_object           = 3
        no_cross_for_this_object = 4
        batch                    = 5
        batchjob_error           = 6
        wrong_type               = 7
        object_not_exist         = 8
        others                   = 9.
    if sy-subrc &amp;lt;&amp;gt; 0.
      if sy-subrc = 2.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endif.


    concatenate 'Funktionsbaustein :' ls_findstring into ls_sa.
    append ls_sa to lt_sa.
    clear ls_sa.
    append ls_sa to lt_sa.


    loop at lt_founds into ls_sa.
      append ls_sa-sa1 to lt_sa.
    endloop.
    if lt_founds is initial.
      append nix to lt_sa.
    endif.
    clear ls_sa.
    append ls_sa to lt_sa.
  endloop.

  call screen '200'.


  include z_kohl_fubaalv_status_0200.

  include z_kohl_fubaalv_user_200.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 08:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927475#M384633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T08:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get all Function-Groups + their Function-Modules of a Package ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927476#M384634</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report ZP_GET_FM_FRM_PKG
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
REPORT ZP_GET_FM_FRM_PKG.


PARAMETERS: P_PACKG TYPE DEVCLASS. " Parameter for Package Name

TYPES: BEGIN OF TY_FM_DTLS,
         PACKAGE  TYPE DEVCLASS,
         F_GROUP  TYPE AREA,
         F_MODULE TYPE FUNCNAME,
         FM_TEXT  TYPE STEXT,
       END OF TY_FM_DTLS.


DATA: LT_FM_DTLS TYPE TABLE OF TY_FM_DTLS,
      LS_FM_DTLS TYPE TY_FM_DTLS.

"Fetch Function Group name from Package
SELECT OBJ_NAME
  FROM TADIR
  INTO TABLE @DATA(LT_FG)
  WHERE OBJECT = 'FUGR'
  AND DEVCLASS = @P_PACKG.

IF LT_FG IS NOT INITIAL.

"Fetch Function module name from Function Group
  SELECT FUNCNAME,
         AREA
    FROM ENLFDIR
    INTO TABLE @DATA(LT_FM_FG)
    FOR ALL ENTRIES IN @LT_FG
    WHERE AREA = @LT_FG-OBJ_NAME+0(26).


ENDIF.

IF LT_FM_FG IS NOT INITIAL.

"Fetch Function module Short Text Using Function module name
  SELECT FUNCNAME,
         STEXT
    FROM TFTIT
    INTO TABLE @DATA(LT_FM_TXT)
    FOR ALL ENTRIES IN @LT_FM_FG
    WHERE SPRAS = 'E'
    AND FUNCNAME = @LT_FM_FG-FUNCNAME.
ENDIF.


"Filling all data into one internal table

LOOP AT LT_FM_TXT INTO DATA(LS_FM_TXT).
  LS_FM_DTLS-F_MODULE = LS_FM_TXT-FUNCNAME.
  LS_FM_DTLS-FM_TEXT = LS_FM_TXT-STEXT.

  READ TABLE LT_FM_FG
  INTO DATA(LS_FM_FG)
  WITH KEY FUNCNAME = LS_FM_TXT-FUNCNAME.

  IF SY-SUBRC = 0.
    LS_FM_DTLS-F_GROUP = LS_FM_FG-AREA.
  ENDIF.


  LS_FM_DTLS-PACKAGE = P_PACKG.


  APPEND LS_FM_DTLS TO LT_FM_DTLS.
  CLEAR LS_FM_DTLS.


ENDLOOP.


SORT LT_FM_DTLS BY F_GROUP F_MODULE ASCENDING.

" Export internal table data into excel file

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
  EXPORTING
*   I_FIELD_SEPERATOR          =
*   I_LINE_HEADER              =
    I_FILENAME                 = 'F:\Abc.xls' " File Path and Name
*   I_APPL_KEEP                = ' '
  TABLES
    I_TAB_SAP_DATA             = LT_FM_DTLS
* CHANGING
*   I_TAB_CONVERTED_DATA       =
* EXCEPTIONS
*   CONVERSION_FAILED          = 1
*   OTHERS                     = 2
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
ENDIF.


WRITE: 'FM_NAME'.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Sep 2019 13:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-all-function-groups-their-function-modules-of-a-package/m-p/1927476#M384634</guid>
      <dc:creator>former_member488232</dc:creator>
      <dc:date>2019-09-26T13:01:43Z</dc:date>
    </item>
  </channel>
</rss>

