REPORT ZZBGS030 MESSAGE-ID 00 LINE-COUNT 65 LINE-SIZE 132
                NO STANDARD PAGE HEADING.
*----------------------------------------------------------------------*
* Description: This program list all functions module regards to the   *
*              selection criteria.                                     *
*                                                                      *
* Customizing: You need not to make any customizing to use this program*
*                                                                      *
* Change of    You only have to check that tables, functions and       *
* release:     includes till exists. Bedst just to check and run the   *
*              program.                                                *
*                                                                      *
* Programmer:  Benny G. Sørensen                                       *
* Date:        July 1995                                               *
* SAP R/3      2.2F                                                    *
*                                                                      *
*-------------------------------Corrections----------------------------*
* Date        Userid     Correction                                    *
* xx-xx-xxxx  xxxxxxxxx  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *
*----------------------------------------------------------------------*
TABLES: TFTIT                "Function module titles
        .
DATA: BEGIN OF FUNCTIONS OCCURS 100.
        INCLUDE STRUCTURE TFTIT.
DATA: END OF FUNCTIONS.
DATA: L        TYPE I,
      REPL(30) TYPE C VALUE '????????????????????????????'.
FIELD-SYMBOLS: <P>.

PARAMETERS:
  FUNCTION(30)    TYPE C,
  TITLE(74)       TYPE C LOWER CASE DEFAULT ' ',
  DOWNLOAD(1)     TYPE C DEFAULT ' ',
  FILENAME(65)    TYPE C DEFAULT 'c:\SAP\DOC\?',
  EXCEPT(30)      TYPE C DEFAULT ' '.

START-OF-SELECTION.
  IF FUNCTION = ''.
     FUNCTION = '*' .
  ENDIF.
  IF TITLE = ''.
     TITLE = '*' .
  ENDIF.
  TRANSLATE FUNCTION    USING '*%'.
  TRANSLATE TITLE       USING '*%'.
  CONDENSE EXCEPT NO-GAPS.
  L = STRLEN( EXCEPT ).
  IF L > 0.
    ASSIGN REPL(L) TO <P>.
  ENDIF.

  SELECT * FROM TFTIT INTO FUNCTIONS
    WHERE SPRAS    = SY-LANGU
      AND FUNCNAME LIKE FUNCTION
      AND STEXT    LIKE TITLE.

    IF EXCEPT NE ''.
      REPLACE EXCEPT LENGTH L WITH
              <P>    INTO FUNCTIONS-FUNCNAME.
    ENDIF.

    TRANSLATE FUNCTION USING '% '.
    CONDENSE FUNCTION NO-GAPS.
    IF FUNCTIONS-FUNCNAME CS FUNCTION.
      WRITE:/ FUNCTIONS-FUNCNAME, '   ', FUNCTIONS-STEXT.
      APPEND FUNCTIONS.
    ENDIF.
  ENDSELECT.

  IF DOWNLOAD NE ''.
    CALL FUNCTION 'WS_DOWNLOAD'
      EXPORTING
        FILENAME     = FILENAME
        FILETYPE     = 'WK1'   "ASC, WK1, DBF, DAT, bin
      TABLES
        DATA_TAB     = FUNCTIONS.
  ENDIF.

AT LINE-SELECTION.
  SET PARAMETER ID 'LIB' FIELD SY-LISEL(30) .
  CALL TRANSACTION 'SE37' AND SKIP FIRST SCREEN.