TMP programs

Hi,
would like to know how to access my older Programs that i stored in TMP Logical database?
I can't remember all of the names of my previous programs, and would like to access to some of them.
How can i find them?
Please help!

Hi,
  U can manually go the se11 transaction and enter the table name TRDIR (System Table TRDIR ).
enter selection parameters like
CNAM     CHAR     12     Author
CDAT     DATS     8     Created on
UNAM     CHAR     12     Last changed by
UDAT     DATS     8     Changed On
VERN     CHAR     6     Version number
APPL     CHAR     1     Application
and various other parameters
u will get all the report that u have created.
Mark Helfull Answers
Regards,

Similar Messages

  • How to retrieve Hidden ABAP program code

    Hi All,
    If a ABAP Source code is hidden by some special charaters or some other report.
    is there any way to retrieve the same.
    thanks
    Alexander

    Which release are you on and what is the name of the program?
    You first should find out how the code was hidden, and (possibly) why it was hidden (from you). Try to display the code from the ABAP Editor in the debugger. What is sy-subrc?
    Look in the attributes of the code (and it's package / transport request => go to the development system if applicable) and find out who is the author and released the transport and did the QA checks.
    Ask that person.
    If it is a $tmp program, then you will need to break it open or ask SAP to do it for you.
    Cheers,
    Julius

  • Z program to download all Z programs

    HI All!
    I herad that there is sample program which downloads all z programs in SAP and writes it onto PS into individual word documents.I mean it stores all z programs on a system which will be useful for one who moves onto the next project as a backup.
    Can anyone give me that sample code please..
    Regards
    Pavan

    Hi Pavan,
    Take this code the,. This is from http://www.dalestech.com/. It downloads everything. Programs, Tables, Screen Elements,  Function Modules....... Explore the options further.
    PROGRAM zdown.
    *=======================================================================
    *=================================
    Direct Download Enterprise version 1.2.
    THIS SOFTWARE IS FOR PERSONAL USE ONLY.
    THIS PROGRAM IS FREEWARE AND IS PROVIDED ON AN AS-IS BASIS WITHOUT
    *WARRANTY OF ANY KIND.
    THE PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR
    *IMPLIED, INCLUDING ANY WARRANTY OF
    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
    IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL,
    PROGRAM DESCRIPTION & USE
    Allows a user to download programs, Functions, DD definitions, etc
    *to the presentation server.  This
    version searches recursively for nested includes and function
    *modules, and allows you to download
    the resulting code as standard text or HTML web pages within a
    *suitable directory structure.
    You can either search by object name, using wildcards if you wish,
    *or a combination of Author and
    object name.  If you want all objects returned for a particular
    *author then select the author name
    and choose the most suitable radiobutton.  All objects will be
    *returned if the fields to the right
    hand side of the radiobutton are left completely blank.
    Compatible with R/3 Enterprise only, for older versions of SAP you
    *will need Direct Download version 5.xx.
    This version removes the programming limitations imposed by
    *developing across SAP releases 3 to 4.6.
    This program is intended to allow a person to keep a visual
    *representation of a program for backup
    purposes only as has not been designed to allow programs to be
    *uploaded to SAP systems.
    AUTHOR          : E.G.Mellodew
    PROGRAM CONTACT : [email protected]
                      www.dalestech.com
    Types
    text element structure
    TYPES: ttexttable LIKE textpool.
    GUI titles
    TYPES: tguititle LIKE d347t.
    Message classes
    TYPES: BEGIN OF tmessage,
             arbgb LIKE t100-arbgb,
             stext LIKE t100a-stext,
             msgnr LIKE t100-msgnr,
             text  LIKE t100-text,
           END OF tmessage.
    Screen flow.
    TYPES: BEGIN OF tscreenflow,
             screen LIKE d020s-dnum,
             code LIKE d022s-line,
           END OF tscreenflow.
    Holds a tablestructure definition
    TYPES: BEGIN OF tdicttablestructure,
             fieldname LIKE dd03l-fieldname,
             position  LIKE dd03l-position,
             keyflag   LIKE dd03l-keyflag,
             rollname  LIKE dd03l-rollname,
             domname   LIKE dd03l-domname,
             datatype  LIKE dd03l-datatype,
             leng      LIKE dd03l-leng,
             ddtext    LIKE dd04t-ddtext,
           END OF tdicttablestructure.
    Holds a tables attributes + its definition
    TYPES: BEGIN OF tdicttable,
             tablename    LIKE dd03l-tabname,
             tabletitle   LIKE dd02t-ddtext,
             istructure TYPE tdicttablestructure OCCURS 0,
           END OF tdicttable.
    Include program names
    TYPES: BEGIN OF tinclude,
             includename LIKE trdir-name,
             includetitle LIKE tftit-stext,
           END OF tinclude.
    Method
    TYPES: BEGIN OF tmethod,
             cmpname LIKE vseomethod-cmpname,
             descript LIKE vseomethod-descript,
             exposure LIKE vseomethod-exposure,
             methodkey TYPE string,
           END OF tmethod.
    Class
    TYPES: BEGIN OF tclass,
             scanned(1),
             clsname LIKE vseoclass-clsname,
             descript LIKE vseoclass-descript,
             msg_id LIKE vseoclass-msg_id,
             exposure LIKE vseoclass-exposure,
             state LIKE vseoclass-state,
             clsfinal LIKE vseoclass-clsfinal,
             r3release LIKE vseoclass-r3release,
             imethods TYPE tmethod OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
             itextelements TYPE ttexttable OCCURS 0,
             imessages TYPE tmessage OCCURS 0,
             textelementkey TYPE string,
             publicclasskey TYPE string,
             privateclasskey TYPE string,
             protectedclasskey TYPE string,
             typesclasskey TYPE string,
             exceptionclass TYPE i,
           END OF tclass.
    function modules
    TYPES: BEGIN OF tfunction,
             functionname LIKE tfdir-funcname,
             functiongroup LIKE enlfdir-area,
             includenumber LIKE tfdir-include,
             functionmaininclude LIKE tfdir-funcname,
             functiontitle LIKE tftit-stext,
             topincludename LIKE tfdir-funcname,
             progname LIKE tfdir-pname,
             programlinkname LIKE tfdir-pname,
             messageclass LIKE t100-arbgb,
             itextelements TYPE ttexttable OCCURS 0,
             iselectiontexts TYPE ttexttable OCCURS 0,
             imessages TYPE tmessage OCCURS 0,
             iincludes TYPE tinclude OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
             iguititle TYPE tguititle OCCURS 0,
             iscreenflow TYPE tscreenflow OCCURS 0,
           END OF tfunction.
    TYPES: BEGIN OF tprogram,
             progname LIKE trdir-name,
             programtitle LIKE tftit-stext,
             subc LIKE trdir-subc,
             messageclass LIKE t100-arbgb,
             imessages TYPE tmessage OCCURS 0,
             itextelements TYPE ttexttable OCCURS 0,
             iselectiontexts TYPE ttexttable OCCURS 0,
             iguititle TYPE tguititle OCCURS 0,
             iscreenflow TYPE tscreenflow OCCURS 0,
             iincludes TYPE tinclude OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
           END OF tprogram.
    Internal tables
    Dictionary object
    DATA: idictionary TYPE STANDARD TABLE OF tdicttable WITH HEADER LINE.
    Function modules.
    DATA: ifunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
    Tree display structure.
    DATA: itreedisplay TYPE STANDARD TABLE OF snodetext WITH HEADER LINE.
    Message class data
    DATA: imessages TYPE STANDARD TABLE OF tmessage WITH HEADER LINE.
    Holds a single message class an all of its messages
    DATA: isinglemessageclass TYPE STANDARD TABLE OF tmessage WITH HEADER
    LINE.
    Holds program related data
    DATA: iprograms TYPE STANDARD TABLE OF tprogram WITH HEADER LINE.
    Classes
    DATA: iclasses TYPE STANDARD TABLE OF tclass WITH HEADER LINE.
    Table prototypes
    DATA: dumidictstructure TYPE STANDARD TABLE OF tdicttablestructure.
    DATA: dumitexttab TYPE STANDARD TABLE OF ttexttable.
    DATA: dumiincludes TYPE STANDARD TABLE OF tinclude.
    DATA: dumihtml TYPE STANDARD TABLE OF string.
    DATA: dumiheader TYPE STANDARD TABLE OF string .
    DATA: dumiscreen TYPE STANDARD TABLE OF tscreenflow .
    DATA: dumiguititle TYPE STANDARD TABLE OF tguititle.
    DATA: dumimethods TYPE STANDARD TABLE OF tmethod.
      Global objects
    DATA: objfile TYPE REF TO cl_gui_frontend_services.
    DATA: objruntimeerror TYPE REF TO cx_root.
    Constants
    CONSTANTS: versionno TYPE string VALUE '1.2'.
    CONSTANTS: tables TYPE string VALUE 'TABLES'.
    CONSTANTS: like TYPE string VALUE 'LIKE'.
    CONSTANTS: type TYPE string VALUE 'TYPE'.
    CONSTANTS: typerefto TYPE string VALUE 'TYPE REF TO'.
    CONSTANTS: structure TYPE string VALUE 'STRUCTURE'.
    CONSTANTS: lowstructure TYPE string VALUE 'structure'.
    CONSTANTS: occurs TYPE string VALUE 'OCCURS'.
    CONSTANTS: function TYPE string VALUE 'FUNCTION'.
    CONSTANTS: callfunction TYPE string VALUE ' CALL FUNCTION'.
    CONSTANTS: message TYPE string  VALUE 'MESSAGE'.
    CONSTANTS: include TYPE string VALUE 'INCLUDE'.
    CONSTANTS: lowinclude TYPE string VALUE 'include'.
    CONSTANTS: destination TYPE string VALUE 'DESTINATION'.
    CONSTANTS: is_table TYPE string VALUE 'T'.
    CONSTANTS: is_program TYPE string VALUE 'P'.
    CONSTANTS: is_screen TYPE string VALUE 'S'.
    CONSTANTS: is_guititle TYPE string VALUE 'G'.
    CONSTANTS: is_documentation TYPE string VALUE 'D'.
    CONSTANTS: is_messageclass TYPE string VALUE 'MC'.
    CONSTANTS: is_function TYPE string VALUE 'F'.
    CONSTANTS: is_class TYPE string VALUE 'C'.
    CONSTANTS: is_method TYPE string VALUE 'M'.
    CONSTANTS: asterix TYPE string VALUE '*'.
    CONSTANTS: comma TYPE string VALUE ','.
    CONSTANTS: period TYPE string VALUE '.'.
    CONSTANTS: dash TYPE string VALUE '-'.
    CONSTANTS: true TYPE i VALUE 1.
    CONSTANTS: false TYPE i VALUE 0.
    CONSTANTS: lt TYPE string VALUE '<'.
    CONSTANTS: gt TYPE string VALUE '>'.
    CONSTANTS: unix TYPE string VALUE 'UNIX'.
    CONSTANTS: non_unix TYPE string VALUE 'not UNIX'.
    CONSTANTS: background_colour TYPE string VALUE '#FFFFE0'.
    CONSTANTS: colour_white TYPE string VALUE '#FFFFFF'.
    CONSTANTS: colour_black TYPE string VALUE '#000000'.
    CONSTANTS: colour_yellow TYPE string VALUE '#FFFF00'.
    CONSTANTS: comment_colour TYPE string VALUE '#0000FF'.
    CONSTANTS: htmlextension TYPE string VALUE 'html'.
    CONSTANTS: textextension TYPE string VALUE 'txt'.
    Global variables
    DATA: statusbarmessage(100).
    DATA: forcedexit TYPE i VALUE 0.
    DATA: starttime LIKE sy-uzeit.
    DATA: runtime LIKE sy-uzeit.
    DATA: downloadfileextension TYPE string.
    DATA: downloadfolder TYPE string.
    DATA: slashseparator TYPE string.
    DATA: frontendopsystem TYPE string.
    DATA: customernamespace TYPE string.
    RANGES: soprogramname FOR trdir-name.
    RANGES: soauthor FOR usr02-bname.
    RANGES: sotable FOR dd02l-tabname.
    RANGES: sofunctionname  FOR tfdir-funcname.
    RANGES: soclassname FOR vseoclass-clsname.
    RANGES: sofunctiongroup FOR enlfdir-area.
    FIELD-SYMBOLS:  TYPE tdicttable.
    Selection screen declaration
    Author
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE tblock1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(23) tauth.
    PARAMETERS: pauth LIKE usr02-bname MEMORY ID mauth.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) tpmod.
    PARAMETERS: pmod AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    *--- Local objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) t$tmp.
    PARAMETERS: p$tmp AS CHECKBOX DEFAULT ''.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE tblock2.
    Tables
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rtable RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(20) trtable.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tptable.
    PARAMETERS: ptable LIKE dd02l-tabname MEMORY ID mtable.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(79) ttnote.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(79) ttnote1.
    SELECTION-SCREEN END OF LINE.
    Message classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rmess RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(18) tpmes.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tmname.
    PARAMETERS: pmname LIKE t100-arbgb MEMORY ID mmname.
    SELECTION-SCREEN END OF LINE.
    Function modules
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rfunc RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(30) trfunc.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tpfname.
    PARAMETERS: pfname LIKE tfdir-funcname MEMORY ID mfname.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tfgroup.
    PARAMETERS: pfgroup LIKE enlfdir-area MEMORY ID mfgroup.
    SELECTION-SCREEN END OF LINE.
    Classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rclass RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(30) trclass.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tpcname.
    PARAMETERS: pclname LIKE seoclass-clsname MEMORY ID mcname.
    SELECTION-SCREEN END OF LINE.
    Programs / includes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rprog RADIOBUTTON GROUP r1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(18) tprog.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) trpname.
    PARAMETERS: pprog LIKE trdir-name MEMORY ID mprog.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    Language
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) tmlang.
    PARAMETERS: pmlang LIKE t100-sprsl DEFAULT 'EN'.
    SELECTION-SCREEN END OF LINE.
    Package
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) tpack.
    PARAMETERS: ppack LIKE tadiv-devclass MEMORY ID mpack.
    SELECTION-SCREEN END OF LINE.
    Customer objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(27) tcust.
    PARAMETERS: pcust AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 32(25) tnrange.
    PARAMETERS: pcname TYPE namespace MEMORY ID mnamespace.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b2.
    Additional things to download.
    SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE tblock3.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tptext.
    PARAMETERS: ptext AS CHECKBOX DEFAULT 'X' MEMORY ID mtext.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tmess.
    PARAMETERS: pmess AS CHECKBOX DEFAULT 'X' MEMORY ID mmess.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpinc.
    PARAMETERS: pinc AS CHECKBOX DEFAULT 'X' MEMORY ID minc.
    SELECTION-SCREEN COMMENT 40(20) trecc.
    PARAMETERS: preci AS CHECKBOX DEFAULT 'X' MEMORY ID mreci.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpfunc.
    PARAMETERS: pfunc AS CHECKBOX DEFAULT 'X' MEMORY ID mfunc.
    SELECTION-SCREEN COMMENT 40(20) trecf.
    PARAMETERS: precf AS CHECKBOX DEFAULT 'X' MEMORY ID mrecf.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tdoc.
    PARAMETERS: pdoc AS CHECKBOX DEFAULT 'X' MEMORY ID mdoc.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpscr.
    PARAMETERS: pscr AS CHECKBOX DEFAULT 'X' MEMORY ID mscr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpdict.
    PARAMETERS: pdict AS CHECKBOX DEFAULT 'X' MEMORY ID mdict.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tsortt.
    PARAMETERS: psortt AS CHECKBOX DEFAULT ' ' MEMORY ID msortt.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b3.
    File details
    SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE tblock4.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tphtml.
    PARAMETERS: phtml RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(25) tcomm.
    PARAMETERS: pcomm AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(25) tback.
    PARAMETERS: pback AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tptxt.
    PARAMETERS: ptxt RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tppath.
    PARAMETERS: pfolder LIKE rlgrap-filename OBLIGATORY MEMORY ID
    mfolder.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b4.
    Display a directory picker window
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfolder.
      DATA: objfile TYPE REF TO cl_gui_frontend_services.
      DATA: pickedfolder TYPE string.
      DATA: initialfolder TYPE string.
      CREATE OBJECT objfile.
      IF NOT pfolder IS INITIAL.
        initialfolder = pfolder.
      ELSE.
        objfile->get_temp_directory( CHANGING temp_dir = initialfolder
                                     EXCEPTIONS cntl_error = 1
                                               error_no_gui = 2
                                               not_supported_by_gui = 3 ).
      ENDIF.
      objfile->directory_browse( EXPORTING initial_folder = initialfolder
                                 CHANGING selected_folder = pickedfolder
                                 EXCEPTIONS cntl_error = 1
                                            error_no_gui = 2
                                            not_supported_by_gui = 3 ).
      IF sy-subrc = 0.
        pfolder = pickedfolder.
      ELSE.
        WRITE: / 'An error has occured picking a folder'.
      ENDIF.
    initialisation
    INITIALIZATION.
    Parameter screen texts.
      tblock1 = 'Author (Optional)'.
      t$tmp   = 'Programs only: include local objects'.
      tblock2 = 'Objects to download'.
      tblock3 = 'Additional downloads for progs, func modules and classes'.
      tblock4 = 'Download parameters'.
      tauth   = 'Author name'.
      tpmod   = 'Include programs modified by author'.
      tcust   = 'Only customer objects'.
      tnrange = 'Alt customer name range'.
      trtable = 'Tables / Structures'.
      tptable = 'Table name'.
      ttnote  = 'Please note: tables are stored under the username of the'.
      ttnote1 = 'last person who modified them.'.
      trfunc  = 'Function modules'.
      tpfname = 'Function name'.
      tfgroup = 'Function group'.
      trclass  = 'Classes'.
      tpcname = 'Class name'.
      tmess   = 'Message class'.
      tmname  = 'Class name'.
      tmlang  = 'Language'.
      tprog   = 'Programs'.
      trpname = 'Program name'.
      tpack   = 'Package'.
      tptxt   = 'Text document'.
      tphtml  = 'HTML document'.
      tcomm   = 'Highlight comments'.
      tback   = 'Include background colour'.
      tptext  = 'Text elements'.
      tpinc   = 'Include programs'.
      trecc   = 'Recursive search'.
      tppath  = 'File path'.
      tpmes   = 'Message classes'.
      tpfunc  = 'Function modules'.
      tdoc    = 'Function module documentation'.
      trecf   = 'Recursive search'.
      tpscr   = 'Screens'.
      tpdict  = 'Dictionary structures'.
      tsortt  = 'Sort table fields alphabetically'.
    Determine the frontend operating system type.
      PERFORM determinefrontendopsystem USING slashseparator.
    start-of-selection.
    START-OF-SELECTION.
      PERFORM checkcomboboxes.
      PERFORM fillselectionranges.
      downloadfolder = pfolder.
      starttime = sy-uzeit.
    Fool the HTML routines to stop them hyperlinking anything with a space
    *in them
      IF pcname IS INITIAL.
        customernamespace  = '^'.
      ELSE.
        customernamespace = pcname.
      ENDIF.
    Main program flow.
      CASE 'X'.
      Select tables
        WHEN rtable.
          PERFORM retrievetables USING idictionary[]
                                       sotable[]
                                       soauthor[].
      Select message classes tables
        WHEN rmess.
          PERFORM retrievemessageclass USING imessages[]
                                   soauthor[]      "Author
                                   pmname          "Message classname
                                   pmlang          "Message classanguage
                                  pmod.           "Modified by author
      Select function modules
        WHEN rfunc.
          IF pfname+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          IF pfgroup+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrievefunctions USING sofunctionname[]   "Function name
                                          sofunctiongroup[]  "Function group
                                      ifunctions[]       "Foundfunctions
                                      pauth         "Author
                                      ptext         "Get textelements
                                      pscr          "Get screens
                                      pcust         "Customer data only
                              customernamespace. "Customer name range
          LOOP AT ifunctions.
          Find Dict structures, messages, functions, includes etc.
            PERFORM scanforadditionalfuncstuff USING ifunctions[]
                                                     preci
          "Search for includes recursively
                                                     precf
          "Search for functions recursively
                                                     pinc
          "Search for includes
                                                     pfunc
          "Search for functions
                                                     pdict
          "search for dictionary objects
                                                     pmess
          "Search for messages
                                                     pcust
          "Customer data only
                                                     customernamespace.
            "Customer name range
          ENDLOOP.
      Select Classes
        WHEN rclass.
          IF pclname+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrieveclasses USING iclasses[]
                                        ifunctions[]
                                        soclassname[]       "Class name
                                        soauthor[]          "Author
                               customernamespace   "Customer namerange
                                        pmod       "Also modifiedby author
                                        pcust       "Customer objectonly
                                        pmess       "Find messages
                                        ptext               "Text Elements
                                   pdict               "Dictionarystructures
                                        pfunc               "Get functions
                                        pinc                "Get includes
                 precf               "Searchrecursively for functions
                preci               "Searchrecursively for includes
                'X'                 "Searchrecursively for classes
               pmlang.             "Language
          LOOP AT ifunctions.
          Find Dict structures, messages, functions, includes etc.
            PERFORM scanforadditionalfuncstuff USING ifunctions[]
                                                     preci
          "Search for includes recursively
                                                     precf
          "Search for functions recursively
                                                     pinc
          "Search for includes
                                                     pfunc
          "Search for functions
                                                     pdict
          "search for dictionary objects
                                                     pmess
          "Search for messages
                                                     pcust
          "Customer data only
                                                     customernamespace.
            "Customer name range
          ENDLOOP.
      Select programs
        WHEN rprog.
          IF pprog+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrieveprograms USING iprograms[]
                                         ifunctions[]
                                         soprogramname[]    "Program name
                                         soauthor[]         "Author
                               customernamespace  "Customer nam range
                               pmod               "Also modifiedby author
                               pcust              "Customer object only
                                         pmess              "Find messages
                                         ptext              "Text Elements
                                         pdict         "Dictionaystructures
                                         pfunc            "Get functions
                                         pinc               "Get includes
                                         pscr               "Get screens
           precf              "Search recursively for functions
           preci              "Searchrecursively for includes
                                        p$tmp              "local objects
                                         ppack.             "Package
      ENDCASE.
    end-of-selection
    END-OF-SELECTION.
      IF forcedexit = 0.
      Set the file extension and output type of the file
        IF ptxt IS INITIAL.
          downloadfileextension = htmlextension.
        ELSE.
          downloadfileextension = textextension.
        ENDIF.
      Decide what to download
        CASE 'X'.
        Download tables
          WHEN rtable.
            IF NOT ( idictionary[] IS INITIAL ).
              PERFORM downloadddstructures USING idictionary[]
                                                 pfolder
                                                 htmlextension
                                                 space
                                                 psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT idictionary.
                FREE MEMORY ID idictionary-tablename.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodetables USING idictionary[]
                                               itreedisplay[]
                                               runtime.
              CLEAR idictionary[].
            ENDIF.
        Download message class
          WHEN rmess.
            IF NOT ( imessages[] IS INITIAL ).
              SORT imessages ASCENDING BY arbgb msgnr.
              LOOP AT imessages.
                APPEND imessages TO isinglemessageclass.
                AT END OF arbgb.
                  PERFORM downloadmessageclass USING isinglemessageclass[]
                                                     imessages-arbgb
                                                     pfolder
                                                     downloadfileextension
                                                     phtml
                                                     space
                                                     pcomm
                                                     customernamespace
                                                     pinc
                                                     pdict
                                                     pmess.
                  CLEAR isinglemessageclass[].
                ENDAT.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodemessages USING imessages[]
                                                 itreedisplay[]
                                                 runtime.
              CLEAR imessages[].
            ENDIF.
        Download functions
          WHEN rfunc.
            IF NOT ( ifunctions[] IS INITIAL ).
              PERFORM downloadfunctions USING ifunctions[]
                                              pfolder
                                              downloadfileextension
                                              space
                                              pdoc
                                              phtml
                                              pcomm
                                              customernamespace
                                              pinc
                                              pdict
                                              textextension
                                              htmlextension
                                              psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodefunctions USING ifunctions[]
                                                  itreedisplay[]
                                                  runtime.
              CLEAR ifunctions[].
            ENDIF.
        Download Classes
          WHEN rclass.
            IF NOT ( iclasses[] IS INITIAL ).
              PERFORM downloadclasses USING iclasses[]
                                            ifunctions[]
                                            pfolder
                                            downloadfileextension
                                            htmlextension
                                            textextension
                                            phtml
                                            pcomm
                                            customernamespace
                                            pinc
                                            pdict
                                            pdoc
                                            psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodeclasses USING iclasses[]
                                                ifunctions[]
                                                itreedisplay[]
                                                runtime.
              CLEAR iclasses[].
              CLEAR ifunctions[].
            ENDIF.
        Download programs
          WHEN rprog.
            IF NOT ( iprograms[] IS INITIAL ).
              PERFORM downloadprograms USING iprograms[]
                                             ifunctions[]
                                             pfolder
                                             downloadfileextension
                                             htmlextension
                                             textextension
                                             phtml
                                             pcomm
                                             customernamespace
                                             pinc
                                             pdict
                                             pdoc
                                             psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodeprograms USING iprograms[]
                                                 ifunctions[]
                                                 itreedisplay[]
                                                 runtime.
              CLEAR iprograms[].
              CLEAR ifunctions[].
            ENDIF.
        ENDCASE.
        IF NOT ( itreedisplay[] IS INITIAL ).
          PERFORM displaytree USING itreedisplay[].
        ELSE.
          statusbarmessage = 'No items found matching selection criteria'.
          PERFORM displaystatus USING statusbarmessage 1.
        ENDIF.
      ENDIF.
    *--- Memory IDs
    User name
      SET PARAMETER ID 'MAUTH' FIELD pauth.
    Table name
      SET PARAMETER ID 'MTABLE' FIELD ptable.
    Message class
      SET PARAMETER ID 'MMNAME' FIELD pmname.
    Function
      SET PARAMETER ID 'MFNAME' FIELD pfname.
    Function group
      SET PARAMETER ID 'MFGROUP' FIELD pfgroup.
    Class
      SET PARAMETER ID 'MCNAME' FIELD pclname.
    Program
      SET PARAMETER ID 'MPROG' FIELD pprog.
    Customer namespace
      SET PARAMETER ID 'MNAMESPACE' FIELD pcname.
    Folder
      SET PARAMETER ID 'MFOLDER' FIELD pfolder.
    Package
      SET PARAMETER ID 'MPACK' FIELD ppack.
    Text element checkbox
      SET PARAMETER ID 'MTEXT' FIELD ptext.
    Messages checkbox
      SET PARAMETER ID 'MMESS' FIELD pmess.
    Includes checkbox
      SET PARAMETER ID 'MINC' FIELD pinc.
    Recursive includes checkbox.
      SET PARAMETER ID 'MRECI' FIELD preci.
    Functions checkbox
      SET PARAMETER ID 'MFUNC' FIELD pfunc.
    Recursive functions checkbox
      SET PARAMETER ID 'MRECF' FIELD precf.
    Function module documntation checkbox
      SET PARAMETER ID 'MDOC' FIELD pdoc.
    Screens checkbox
      SET PARAMETER ID 'MSCR' FIELD pscr.
    Dictionary checkbox
      SET PARAMETER ID 'MDICT' FIELD pdict.
    Sort table ascending checkBox
      SET PARAMETER ID 'MSORTT' FIELD psortt.
    ****************************************SUBROUTINES*******************
    checkComboBoxes...  Check input parameters
    FORM checkcomboboxes.
      IF pauth IS INITIAL.
        CASE 'X'.
          WHEN rtable.
            IF ptable IS INITIAL.
              statusbarmessage = 'You must enter either a table name or author.'.
            ENDIF.
          WHEN rfunc.
            IF ( pfname IS INITIAL ) AND ( pfgroup IS INITIAL ).
              IF pfname IS INITIAL.
                statusbarmessage = 'You must enter either a function name or author.'.
              ELSE.
                IF pfgroup IS INITIAL.
                  statusbarmessage = 'Must enter either a func gp, or an author name.'.
                ENDIF.
              ENDIF.
            ENDIF.
          WHEN rprog.
            IF pprog IS INITIAL.
                statusbarmessage = 'You must enter either a program name or
    author name.'.
            ENDIF.
        ENDCASE.
    Check the user name of the person objects are to be downloaded for
      ELSE.
        IF pauth = 'SAP*' OR pauth = 'SAP'.
          statusbarmessage = 'Sorry cannot download all objects for SAP
    standard user'.
        ENDIF.
      ENDIF.
      IF NOT statusbarmessage IS INITIAL.
        PERFORM displaystatus USING statusbarmessage 3.
        forcedexit = 1.
        STOP.
      ENDIF.
    ENDFORM.                    "
    "checkComboBoxes
    fillSelectionRanges...      for selection routines
    FORM fillselectionranges.
      DATA: valuetofind TYPE string.
      IF NOT pauth IS INITIAL.
        soauthor-sign = 'I'.
        soauthor-option = 'EQ'.
        soauthor-low = pauth.
        APPEND soauthor.
      ENDIF.
      IF NOT ptable IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT ptable+0(1) = '/'.
          CONCATENATE pcname ptable INTO valuetofind.
        ELSE.
          valuetofind = ptable.
        ENDIF.
        sotable-sign = 'I'.
        sotable-option = 'EQ'.
        sotable-low = valuetofind.
        APPEND sotable.
      ENDIF.
      IF NOT pfname IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pfname+0(1) = '/'.
          CONCATENATE pcname pfname INTO valuetofind.
        ELSE.
          valuetofind = pfname.
        ENDIF.
        sofunctionname-sign = 'I'.
        PERFORM addoption USING valuetofind sofunctionname-option.
        sofunctionname-low = valuetofind.
        APPEND sofunctionname.
      ENDIF.
      IF NOT pfgroup IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pfgroup+0(1) = '/'.
          CONCATENATE pcname pfgroup INTO valuetofind.
        ELSE.
          valuetofind = pfgroup.
        ENDIF.
        sofunctiongroup-sign = 'I'.
        PERFORM addoption USING valuetofind sofunctiongroup-option.
        sofunctiongroup-low = valuetofind.
        APPEND sofunctiongroup.
      ENDIF.
      IF NOT pclname IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pclname+0(1) = '/'.
          CONCATENATE pcname pclname INTO valuetofind.
        ELSE.
          valuetofind = pclname.
        ENDIF.
        soclassname-sign = 'I'.
        PERFORM addoption USING valuetofind soclassname-option.
        soclassname-low = valuetofind.
        APPEND soclassname.
      ENDIF.
      IF NOT pprog IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pprog+0(1) = '/'.
          CONCATENATE pcname pprog INTO valuetofind.
        ELSE.
          valuetofind = pprog.
        ENDIF.
        soprogramname-sign = 'I'.
        PERFORM addoption USING valuetofind soprogramname-option.
        soprogramname-low = valuetofind.
        APPEND soprogramname.
      ENDIF.
    ENDFORM.                    "
    " fillSelectionRanges
    addOption...  fills the option value of ranges
    FORM addoption USING value(valuetofind)
                               option.
      IF valuetofind CA asterix.
        option = 'CP'.
      ELSE.
        option = 'EQ'.
      ENDIF.
    ENDFORM.                    "
    "addOption
    retrieveTables...             Search for tables in dictionary

  • Download/Upload ABAP Programs, screens, texts, etc

    Hi Experts,
    Is there any standard program or any tool by which we can download/ upload ABAP programs, sapscripts, Screens, text-elements, Webdynpro for ABAP applications to a local file????
    The Download to local server option in SE38 just gives a text copy of program without any screens, text eleemnts, etc which is not as per my requirement.
    Points will be rewarded.
    Regards,
    Mansi.

    use This
    REPORT  ZDOWNLOAD.
    *& Report  ZDOWNLAOD
                     I N F O R M A T I O N                            *
    Module             :
    FUNCTIONAL         :
    Developer          :
    Functional Spec#   :
    Date Of Creation   :
    Transport Request# :
    Program NAME       :
    Transaction Code   :
    DEVELOPMENT CLASS  :
    DESCRIPTION        :
                     Change History
    FUNCTIONAL         :
    Developer          :
    Functional Spec#   :
    Date Of Change     :
    Transport Request# :
    Change DESCRIPTION :
    *======================================================================================================================
    Direct Download Enterprise version 1.3.1.
    THIS SOFTWARE IS FOR PERSONAL USE ONLY.
    THIS PROGRAM IS FREEWARE AND IS PROVIDED ON AN AS-IS BASIS WITHOUT WARRANTY OF ANY KIND.
    THE PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY
    OR FITNESS FOR A PARTICULAR PURPOSE.
    IN NO EVENT SHALL THE PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, SPECIAL OR INCIDENTAL DAMAGES, EVEN IF PROVIDER
    HAS BEEN ADVISED BY CLIENT OF THE POSSIBILITY OF SUCH POTENTIAL LOSS OR DAMAGE.
    CLIENT AGREES TO HOLD PROVIDER HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, LOSSES, LIABILITIES AND EXPENSES.  BY
    INSTALLING OR RUNNING THIS PROGRAM YOU ARE AGREEING TO THE TERMS AND CONDITONS STATED ABOVE.
    PROGRAM DESCRIPTION & USE
    Allows a user to download programs, Functions, DD definitions, etc to the presentation server.  This version searches
    recursively for nested includes and function modules, and allows you to download the resulting code as standard text
    or HTML web pages within a suitable directory structure.
    You can either search by object name, using wildcards if you wish, or a combination of Author and object name.  If
    you want all objects returned for a particular author then select the author name and choose the most suitable
    radiobutton.  All objects will be returned if the fields to the right hand side of the radiobutton are left completely
    blank.
    Compatible with R/3 Enterprise only, for older versions of SAP you will need Direct Download version 5.xx.
    This version removes the programming limitations imposed by developing across SAP releases 3 to 4.6.
    In order to be able to download files to the SAP server you must first set up a logical filepath within transaction
    'FILE', or use an existing one.  You must also create a external operating system command in SM69 called ZMKDIR. This
    will then be used to create any directories needed on the SAP server
    This program is intended to allow a person to keep a visual representation of a program for backup purposes only as
    has not been designed to allow programs to be uploaded to SAP systems.
    author          : E.G.Mellodew
    program cont
    SAP Tables
    TABLES: TRDIR, SEOCLASS, TFDIR, ENLFDIR, DD02L.
    Types
    text element structure
    TYPES: TTEXTTABLE LIKE TEXTPOOL.
    GUI titles
    TYPES: TGUITITLE LIKE D347T.
    Message classes
    TYPES: BEGIN OF TMESSAGE,
             ARBGB LIKE T100-ARBGB,
             STEXT LIKE T100A-STEXT,
             MSGNR LIKE T100-MSGNR,
             TEXT  LIKE T100-TEXT,
           END OF TMESSAGE.
    Screen flow.
    TYPES: BEGIN OF TSCREENFLOW,
             SCREEN LIKE D020S-DNUM,
             CODE LIKE D022S-LINE,
           END OF TSCREENFLOW.
    Holds a table\structure definition
    TYPES: BEGIN OF TDICTTABLESTRUCTURE,
             FIELDNAME LIKE DD03L-FIELDNAME,
             POSITION  LIKE DD03L-POSITION,
             KEYFLAG   LIKE DD03L-KEYFLAG,
             ROLLNAME  LIKE DD03L-ROLLNAME,
             DOMNAME   LIKE DD03L-DOMNAME,
             DATATYPE  LIKE DD03L-DATATYPE,
             LENG      LIKE DD03L-LENG,
             DDTEXT    LIKE DD04T-DDTEXT,
           END OF TDICTTABLESTRUCTURE.
    Holds a tables attributes + its definition
    TYPES: BEGIN OF TDICTTABLE,
             TABLENAME    LIKE DD03L-TABNAME,
             TABLETITLE   LIKE DD02T-DDTEXT,
             ISTRUCTURE TYPE TDICTTABLESTRUCTURE OCCURS 0,
           END OF TDICTTABLE.
    Include program names
    TYPES: BEGIN OF TINCLUDE,
             INCLUDENAME LIKE TRDIR-NAME,
             INCLUDETITLE LIKE TFTIT-STEXT,
           END OF TINCLUDE.
    Exception class texts
    TYPES: BEGIN OF TCONCEPT,
             CONSTNAME TYPE STRING,
             CONCEPT TYPE SOTR_CONC,
           END OF TCONCEPT.
    Method
    TYPES: BEGIN OF TMETHOD,
             CMPNAME LIKE VSEOMETHOD-CMPNAME,
             DESCRIPT LIKE VSEOMETHOD-DESCRIPT,
             EXPOSURE LIKE VSEOMETHOD-EXPOSURE,
             METHODKEY TYPE STRING,
           END OF TMETHOD.
    Class
    TYPES: BEGIN OF TCLASS,
             SCANNED(1),
             CLSNAME LIKE VSEOCLASS-CLSNAME,
             DESCRIPT LIKE VSEOCLASS-DESCRIPT,
             MSG_ID LIKE VSEOCLASS-MSG_ID,
             EXPOSURE LIKE VSEOCLASS-EXPOSURE,
             STATE LIKE VSEOCLASS-STATE,
             CLSFINAL LIKE VSEOCLASS-CLSFINAL,
             R3RELEASE LIKE VSEOCLASS-R3RELEASE,
             IMETHODS TYPE TMETHOD OCCURS 0,
             IDICTSTRUCT TYPE TDICTTABLE OCCURS 0,
             ITEXTELEMENTS TYPE TTEXTTABLE OCCURS 0,
             IMESSAGES TYPE TMESSAGE OCCURS 0,
             ICONCEPTS TYPE TCONCEPT OCCURS 0,
             TEXTELEMENTKEY TYPE STRING,
             PUBLICCLASSKEY TYPE STRING,
             PRIVATECLASSKEY TYPE STRING,
             PROTECTEDCLASSKEY TYPE STRING,
             TYPESCLASSKEY TYPE STRING,
             EXCEPTIONCLASS TYPE I,
           END OF TCLASS.
    function modules
    TYPES: BEGIN OF TFUNCTION,
             FUNCTIONNAME LIKE TFDIR-FUNCNAME,
             FUNCTIONGROUP LIKE ENLFDIR-AREA,
             INCLUDENUMBER LIKE TFDIR-INCLUDE,
             FUNCTIONMAININCLUDE LIKE TFDIR-FUNCNAME,
             FUNCTIONTITLE LIKE TFTIT-STEXT,
             TOPINCLUDENAME LIKE TFDIR-FUNCNAME,
             PROGNAME LIKE TFDIR-PNAME,
             PROGRAMLINKNAME LIKE TFDIR-PNAME,
             MESSAGECLASS LIKE T100-ARBGB,
             ITEXTELEMENTS TYPE TTEXTTABLE OCCURS 0,
             ISELECTIONTEXTS TYPE TTEXTTABLE OCCURS 0,
             IMESSAGES TYPE TMESSAGE OCCURS 0,
             IINCLUDES TYPE TINCLUDE OCCURS 0,
             IDICTSTRUCT TYPE TDICTTABLE OCCURS 0,
             IGUITITLE TYPE TGUITITLE OCCURS 0,
             ISCREENFLOW TYPE TSCREENFLOW OCCURS 0,
           END OF TFUNCTION.
    TYPES: BEGIN OF TPROGRAM,
             PROGNAME LIKE TRDIR-NAME,
             PROGRAMTITLE LIKE TFTIT-STEXT,
             SUBC LIKE TRDIR-SUBC,
             MESSAGECLASS LIKE T100-ARBGB,
             IMESSAGES TYPE TMESSAGE OCCURS 0,
             ITEXTELEMENTS TYPE TTEXTTABLE OCCURS 0,
             ISELECTIONTEXTS TYPE TTEXTTABLE OCCURS 0,
             IGUITITLE TYPE TGUITITLE OCCURS 0,
             ISCREENFLOW TYPE TSCREENFLOW OCCURS 0,
             IINCLUDES TYPE TINCLUDE OCCURS 0,
             IDICTSTRUCT TYPE TDICTTABLE OCCURS 0,
           END OF TPROGRAM.
    Internal tables
    Dictionary object
    DATA: IDICTIONARY TYPE STANDARD TABLE OF TDICTTABLE WITH HEADER LINE.
    Function modules.
    DATA: IFUNCTIONS TYPE STANDARD TABLE OF TFUNCTION WITH HEADER LINE.
    Tree display structure.
    DATA: ITREEDISPLAY TYPE STANDARD TABLE OF SNODETEXT WITH HEADER LINE.
    Message class data
    DATA: IMESSAGES TYPE STANDARD TABLE OF TMESSAGE WITH HEADER LINE.
    Holds a single message class an all of its messages
    DATA: ISINGLEMESSAGECLASS TYPE STANDARD TABLE OF TMESSAGE WITH HEADER LINE.
    Holds program related data
    DATA: IPROGRAMS TYPE STANDARD TABLE OF TPROGRAM WITH HEADER LINE.
    Classes
    DATA: ICLASSES TYPE STANDARD TABLE OF TCLASS WITH HEADER LINE.
    Table of paths created on the SAP server
    DATA: ISERVERPATHS TYPE STANDARD TABLE OF STRING WITH HEADER LINE.
    Table prototypes
    DATA: DUMIDICTSTRUCTURE TYPE STANDARD TABLE OF TDICTTABLESTRUCTURE.
    DATA: DUMITEXTTAB TYPE STANDARD TABLE OF TTEXTTABLE.
    DATA: DUMIINCLUDES TYPE STANDARD TABLE OF TINCLUDE.
    DATA: DUMIHTML TYPE STANDARD TABLE OF STRING.
    DATA: DUMIHEADER TYPE STANDARD TABLE OF STRING .
    DATA: DUMISCREEN TYPE STANDARD TABLE OF TSCREENFLOW .
    DATA: DUMIGUITITLE TYPE STANDARD TABLE OF TGUITITLE.
    DATA: DUMIMETHODS TYPE STANDARD TABLE OF TMETHOD.
    DATA: DUMICONCEPTS TYPE STANDARD TABLE OF TCONCEPT.
      Global objects
    DATA: OBJFILE TYPE REF TO CL_GUI_FRONTEND_SERVICES.
    DATA: OBJRUNTIMEERROR TYPE REF TO CX_ROOT.
    Constants
    CONSTANTS: VERSIONNO TYPE STRING VALUE '1.3.1'.
    CONSTANTS: TABLES TYPE STRING VALUE 'TABLES'.
    CONSTANTS: TABLE TYPE STRING VALUE 'TABLE'.
    CONSTANTS: LIKE TYPE STRING VALUE 'LIKE'.
    CONSTANTS: TYPE TYPE STRING VALUE 'TYPE'.
    CONSTANTS: TYPEREFTO TYPE STRING VALUE 'TYPE REF TO'.
    CONSTANTS: STRUCTURE TYPE STRING VALUE 'STRUCTURE'.
    CONSTANTS: LOWSTRUCTURE TYPE STRING VALUE 'structure'.
    CONSTANTS: OCCURS TYPE STRING VALUE 'OCCURS'.
    CONSTANTS: FUNCTION TYPE STRING VALUE 'FUNCTION'.
    CONSTANTS: CALLFUNCTION TYPE STRING VALUE ' CALL FUNCTION'.
    CONSTANTS: MESSAGE TYPE STRING  VALUE 'MESSAGE'.
    CONSTANTS: INCLUDE TYPE STRING VALUE 'INCLUDE'.
    CONSTANTS: LOWINCLUDE TYPE STRING VALUE 'include'.
    CONSTANTS: DESTINATION TYPE STRING VALUE 'DESTINATION'.
    CONSTANTS: IS_TABLE TYPE STRING VALUE 'T'.
    CONSTANTS: IS_PROGRAM TYPE STRING VALUE 'P'.
    CONSTANTS: IS_SCREEN TYPE STRING VALUE 'S'.
    CONSTANTS: IS_GUITITLE TYPE STRING VALUE 'G'.
    CONSTANTS: IS_DOCUMENTATION TYPE STRING VALUE 'D'.
    CONSTANTS: IS_MESSAGECLASS TYPE STRING VALUE 'MC'.
    CONSTANTS: IS_FUNCTION TYPE STRING VALUE 'F'.
    CONSTANTS: IS_CLASS TYPE STRING VALUE 'C'.
    CONSTANTS: IS_METHOD TYPE STRING VALUE 'M'.
    CONSTANTS: ASTERIX TYPE STRING VALUE '*'.
    CONSTANTS: COMMA TYPE STRING VALUE ','.
    CONSTANTS: PERIOD TYPE STRING VALUE '.'.
    CONSTANTS: DASH TYPE STRING VALUE '-'.
    CONSTANTS: TRUE TYPE I VALUE 1.
    CONSTANTS: FALSE TYPE I VALUE 0.
    CONSTANTS: LT TYPE STRING VALUE '&lt;'.
    CONSTANTS: GT TYPE STRING VALUE '&gt;'.
    CONSTANTS: UNIX TYPE STRING VALUE 'UNIX'.
    CONSTANTS: NON_UNIX TYPE STRING VALUE 'not UNIX'.
    CONSTANTS: BACKGROUND_COLOUR TYPE STRING VALUE '#FFFFE0'.
    CONSTANTS: COLOUR_WHITE TYPE STRING VALUE '#FFFFFF'.
    CONSTANTS: COLOUR_BLACK TYPE STRING VALUE '#000000'.
    CONSTANTS: COLOUR_YELLOW TYPE STRING VALUE '#FFFF00'.
    CONSTANTS: COMMENT_COLOUR TYPE STRING VALUE '#0000FF'.
    CONSTANTS: HTMLEXTENSION TYPE STRING VALUE 'html'.
    CONSTANTS: TEXTEXTENSION TYPE STRING VALUE 'txt'.
    Global variables
    DATA: STATUSBARMESSAGE(100).
    DATA: FORCEDEXIT TYPE I VALUE 0.
    DATA: STARTTIME LIKE SY-UZEIT.
    DATA: RUNTIME LIKE SY-UZEIT.
    DATA: DOWNLOADFILEEXTENSION TYPE STRING.
    DATA: DOWNLOADFOLDER TYPE STRING.
    DATA: SERVERSLASHSEPARATOR TYPE STRING.
    DATA: FRONTENDSLASHSEPARATOR TYPE STRING.
    DATA: SLASHSEPARATORTOUSE TYPE STRING.
    DATA: SERVERFILESYSTEM TYPE FILESYS_D.
    DATA: SERVERFOLDER TYPE STRING.
    DATA: FRONTENDOPSYSTEM TYPE STRING.
    DATA: SERVEROPSYSTEM TYPE STRING.
    DATA: CUSTOMERNAMESPACE TYPE STRING.
    RANGES: SOPROGRAMNAME FOR TRDIR-NAME.
    RANGES: SOAUTHOR FOR USR02-BNAME.
    RANGES: SOTABLENAMES FOR DD02L-TABNAME.
    RANGES: SOFUNCTIONNAME  FOR TFDIR-FUNCNAME.
    RANGES: SOCLASSNAME FOR VSEOCLASS-CLSNAME.
    RANGES: SOFUNCTIONGROUP FOR ENLFDIR-AREA.
    FIELD-SYMBOLS: <WADICTSTRUCT> TYPE TDICTTABLE.
    Selection screen declaration
    Author
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TBLOCK1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(23) TAUTH.
    PARAMETERS: PAUTH LIKE USR02-BNAME MEMORY ID MAUTH.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) TPMOD.
    PARAMETERS: PMOD AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    Local objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) T$TMP.
    PARAMETERS: P$TMP AS CHECKBOX DEFAULT ''.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TBLOCK2.
    Tables
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RTABLE RADIOBUTTON GROUP R1.
    SELECTION-SCREEN COMMENT 5(15) TRTABLE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TPTABLE.
    SELECT-OPTIONS: SOTABLE FOR DD02L-TABNAME.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(79) TTNOTE.
    SELECTION-SCREEN END OF LINE.
    Message classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RMESS RADIOBUTTON GROUP R1.
    SELECTION-SCREEN COMMENT 5(18) TPMES.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) TMNAME.
    PARAMETERS: PMNAME LIKE T100-ARBGB MEMORY ID MMNAME.
    SELECTION-SCREEN END OF LINE.
    Function modules
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RFUNC RADIOBUTTON GROUP R1.
    SELECTION-SCREEN COMMENT 5(30) TRFUNC.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TPFNAME.
    SELECT-OPTIONS: SOFNAME FOR TFDIR-FUNCNAME.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TFGROUP.
    SELECT-OPTIONS: SOFGROUP FOR ENLFDIR-AREA.
    SELECTION-SCREEN END OF LINE.
    Classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RCLASS RADIOBUTTON GROUP R1.
    SELECTION-SCREEN COMMENT 5(30) TRCLASS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TPCNAME.
    SELECT-OPTIONS: SOCLASS FOR SEOCLASS-CLSNAME.
    SELECTION-SCREEN END OF LINE.
    Programs / includes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RPROG RADIOBUTTON GROUP R1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(18) TPROG.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TRPNAME.
    SELECT-OPTIONS: SOPROG FOR TRDIR-NAME.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    Language
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) TMLANG.
    PARAMETERS: PMLANG LIKE T100-SPRSL DEFAULT 'EN'.
    SELECTION-SCREEN END OF LINE.
    Package
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) TPACK.
    PARAMETERS: PPACK LIKE TADIV-DEVCLASS MEMORY ID MPACK.
    SELECTION-SCREEN END OF LINE.
    Customer objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(27) TCUST.
    PARAMETERS: PCUST AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 32(25) TNRANGE.
    PARAMETERS: PCNAME TYPE NAMESPACE MEMORY ID MNAMESPACE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B2.
    Additional things to download.
    SELECTION-SCREEN: BEGIN OF BLOCK B3 WITH FRAME TITLE TBLOCK3.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TPTEXT.
    PARAMETERS: PTEXT AS CHECKBOX DEFAULT 'X' MEMORY ID MTEXT.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TMESS.
    PARAMETERS: PMESS AS CHECKBOX DEFAULT 'X' MEMORY ID MMESS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TPINC.
    PARAMETERS: PINC AS CHECKBOX DEFAULT 'X' MEMORY ID MINC.
    SELECTION-SCREEN COMMENT 40(20) TRECC.
    PARAMETERS: PRECI AS CHECKBOX DEFAULT 'X' MEMORY ID MRECI.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TPFUNC.
    PARAMETERS: PFUNC AS CHECKBOX DEFAULT 'X' MEMORY ID MFUNC.
    SELECTION-SCREEN COMMENT 40(20) TRECF.
    PARAMETERS: PRECF AS CHECKBOX DEFAULT 'X' MEMORY ID MRECF.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TDOC.
    PARAMETERS: PDOC AS CHECKBOX DEFAULT 'X' MEMORY ID MDOC.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TPSCR.
    PARAMETERS: PSCR AS CHECKBOX DEFAULT 'X' MEMORY ID MSCR.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TPDICT.
    PARAMETERS: PDICT AS CHECKBOX DEFAULT 'X' MEMORY ID MDICT.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TSORTT.
    PARAMETERS: PSORTT AS CHECKBOX DEFAULT ' ' MEMORY ID MSORTT.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B3.
    File details
    SELECTION-SCREEN: BEGIN OF BLOCK B4 WITH FRAME TITLE TBLOCK4.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) TPHTML.
    PARAMETERS: PHTML RADIOBUTTON GROUP G1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(29) TCOMM.
    PARAMETERS: PCOMM AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(29) TBACK.
    PARAMETERS: PBACK AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) TPTXT.
    PARAMETERS: PTXT RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    Download to SAP server
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(25) TSERV.
    PARAMETERS: PSERV RADIOBUTTON GROUP G2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 8(20) TSPATH.
    PARAMETERS: PLOGICAL LIKE FILENAME-FILEINTERN MEMORY ID MLOGICAL.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN COMMENT /28(60) TSDPATH.
    Download to PC
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(25) TPC.
    PARAMETERS: PPC RADIOBUTTON GROUP G2 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 8(20) TPPATH.
    PARAMETERS: PFOLDER LIKE RLGRAP-FILENAME MEMORY ID MFOLDER.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B4.
    Display options
    SELECTION-SCREEN: BEGIN OF BLOCK B5 WITH FRAME TITLE TBLOCK5.
    Display final report
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TREP.
    PARAMETERS: PREP AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    Display progress messages
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) TPROMESS.
    PARAMETERS: PPROMESS AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B5.
    Display a directory picker window
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PFOLDER.
      DATA: OBJFILE TYPE REF TO CL_GUI_FRONTEND_SERVICES.
      DATA: PICKEDFOLDER TYPE STRING.
      DATA: INITIALFOLDER TYPE STRING.
      IF SY-BATCH IS INITIAL.
        CREATE OBJECT OBJFILE.
        IF NOT PFOLDER IS INITIAL.
          INITIALFOLDER = PFOLDER.
        ELSE.
          OBJFILE->GET_TEMP_DIRECTORY( CHANGING TEMP_DIR = INITIALFOLDER
                                       EXCEPTIONS CNTL_ERROR = 1
                                                 ERROR_NO_GUI = 2
                                                 NOT_SUPPORTED_BY_GUI = 3 ).
        ENDIF.
        OBJFILE->DIRECTORY_BROWSE( EXPORTING INITIAL_FOLDER = INITIALFOLDER
                                   CHANGING SELECTED_FOLDER = PICKEDFOLDER
                                   EXCEPTIONS CNTL_ERROR = 1
                                              ERROR_NO_GUI = 2
                                              NOT_SUPPORTED_BY_GUI = 3 ).
        IF SY-SUBRC = 0.
          PFOLDER = PICKEDFOLDER.
        ELSE.
          WRITE: / 'An error has occured picking a folder'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
      CASE 'X'.
        WHEN PPC.
          IF PFOLDER IS INITIAL.
          User must enter a path to save to
            MESSAGE E000(OO) WITH 'You must enter a file path'.
          ENDIF.
        WHEN PSERV.
          IF PLOGICAL IS INITIAL.
          User must enter a logical path to save to
            MESSAGE E000(OO) WITH 'You must enter a logical file name'.
          ENDIF.
      ENDCASE.
    AT SELECTION-SCREEN ON PLOGICAL.
      IF NOT PSERV IS INITIAL.
        CALL FUNCTION 'FILE_GET_NAME'
          EXPORTING
            LOGICAL_FILENAME = PLOGICAL
          IMPORTING
            FILE_NAME        = SERVERFOLDER
          EXCEPTIONS
            FILE_NOT_FOUND   = 1
            OTHERS           = 2.
        IF SY-SUBRC = 0.
          IF SERVERFOLDER IS INITIAL.
            MESSAGE E000(OO) WITH 'No file path returned from logical filename'.
          ELSE.
          Path to display on the selection screen
            TSDPATH = SERVERFOLDER.
          Remove the trailing slash off the path as the subroutine buildFilename will add an extra one
            SHIFT SERVERFOLDER RIGHT DELETING TRAILING SERVERSLASHSEPARATOR.
            SHIFT SERVERFOLDER LEFT DELETING LEADING SPACE.
          ENDIF.
        ELSE.
          MESSAGE E000(OO) WITH 'Logical filename does not exist'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOPROG-LOW.
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
        EXPORTING
          OBJECT_TYPE           = 'PROG'
          OBJECT_NAME           = SOPROG-LOW
          SUPPRESS_SELECTION    = 'X'
          USE_ALV_GRID          = ''
          WITHOUT_PERSONAL_LIST = ''
        IMPORTING
          OBJECT_NAME_SELECTED  = SOPROG-LOW
        EXCEPTIONS
          CANCEL                = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOPROG-HIGH.
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
        EXPORTING
          OBJECT_TYPE           = 'PROG'
          OBJECT_NAME           = SOPROG-HIGH
          SUPPRESS_SELECTION    = 'X'
          USE_ALV_GRID          = ''
          WITHOUT_PERSONAL_LIST = ''
        IMPORTING
          OBJECT_NAME_SELECTED  = SOPROG-HIGH
        EXCEPTIONS
          CANCEL                = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOCLASS-LOW.
      CALL FUNCTION 'F4_DD_ALLTYPES'
        EXPORTING
          OBJECT               = SOCLASS-LOW
          SUPPRESS_SELECTION   = 'X'
          DISPLAY_ONLY         = ''
          ONLY_TYPES_FOR_CLIFS = 'X'
        IMPORTING
          RESULT               = SOCLASS-LOW.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOCLASS-HIGH.
      CALL FUNCTION 'F4_DD_ALLTYPES'
        EXPORTING
          OBJECT               = SOCLASS-HIGH
          SUPPRESS_SELECTION   = 'X'
          DISPLAY_ONLY         = ''
          ONLY_TYPES_FOR_CLIFS = 'X'
        IMPORTING
          RESULT               = SOCLASS-HIGH.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFNAME-LOW.
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
        EXPORTING
          OBJECT_TYPE           = 'FUNC'
          OBJECT_NAME           = SOFNAME-LOW
          SUPPRESS_SELECTION    = 'X'
          USE_ALV_GRID          = ''
          WITHOUT_PERSONAL_LIST = ''
        IMPORTING
          OBJECT_NAME_SELECTED  = SOFNAME-LOW
        EXCEPTIONS
          CANCEL                = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFNAME-HIGH.
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
        EXPORTING
          OBJECT_TYPE           = 'FUNC'
          OBJECT_NAME           = SOFNAME-HIGH
          SUPPRESS_SELECTION    = 'X'
          USE_ALV_GRID          = ''
          WITHOUT_PERSONAL_LIST = ''
        IMPORTING
          OBJECT_NAME_SELECTED  = SOFNAME-HIGH
        EXCEPTIONS
          CANCEL                = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFGROUP-LOW.
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
        EXPORTING
          OBJECT_TYPE           = 'FUGR'
          OBJECT_NAME           = SOFGROUP-LOW
          SUPPRESS_SELECTION    = 'X'
          USE_ALV_GRID          = ''
          WITHOUT_PERSONAL_LIST = ''
        IMPORTING
          OBJECT_NAME_SELECTED  = SOFGROUP-LOW
        EXCEPTIONS
          CANCEL                = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFGROUP-HIGH.
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
        EXPORTING
          OBJECT_TYPE           = 'FUGR'
          OBJECT_NAME           = SOFGROUP-HIGH
          SUPPRESS_SELECTION    = 'X'
          USE_ALV_GRID          = ''
          WITHOUT_PERSONAL_LIST = ''
        IMPORTING
          OBJECT_NAME_SELECTED  = SOFGROUP-HIGH
        EXCEPTIONS
          CANCEL                = 1.
    initialisation
    INITIALIZATION.
    Parameter screen texts.
      TBLOCK1 = 'Author (Optional)'.
      T$TMP   = 'Programs only: include local objects'.
      TBLOCK2 = 'Objects to download'.
      TBLOCK3 = 'Additional downloads for programs, function modules and classes'.
      TBLOCK4 = 'Download parameters'.
      TBLOCK5 = 'Display options'.
      TAUTH   = 'Author name'.
      TPMOD   = 'Include programs modified by author'.
      TCUST   = 'Only customer objects'.
      TNRANGE = 'Alt customer name range'.
      TRTABLE = 'Tables / Structures'.
      TPTABLE = 'Table name'.
      TTNOTE  = 'Note: tables are stored under the username of the last person who modified them'.
      TRFUNC  = 'Function modules'.
      TPFNAME = 'Function name'.
      TFGROUP = 'Function group'.
      TRCLASS  = 'Classes'.
      TPCNAME = 'Class name'.
      TMESS   = 'Message class'.
      TMNAME  = 'Class name'.
      TMLANG  = 'Language'.
      TPROG   = 'Programs'.
      TRPNAME = 'Program name'.
      TPACK   = 'Package'.
      TPTXT   = 'Text document'.
      TPHTML  = 'HTML document'.
      TCOMM   = 'Highlight comments'.
      TBACK   = 'Include background colour'.
      TPTEXT  = 'Text elements'.
      TPINC   = 'Include programs'.
      TRECC   = 'Recursive search'.
      TPPATH  = 'File path'.
      TSPATH  = 'Logical file name'.
      TPMES   = 'Message classes'.
      TPFUNC  = 'Function modules'.
      TDOC    = 'Function module documentation'.
      TRECF   = 'Recursive search'.
      TPSCR   = 'Screens'.
      TPDICT  = 'Dictionary structures'.
      TSORTT  = 'Sort table fields alphabetically'.
      TSERV   = 'Download to server'.
      TPC     = 'Download to PC'.
      TREP    = 'Display download report'.
      TPROMESS  = 'Display progress messages'.
    Determine the frontend operating system type.
      IF SY-BATCH IS INITIAL.
        PERFORM DETERMINEFRONTENDOPSYSTEM USING FRONTENDSLASHSEPARATOR FRONTENDOPSYSTEM.
      ENDIF.
      PERFORM DETERMINESERVEROPSYSTEM USING SERVERSLASHSEPARATOR SERVERFILESYSTEM SERVEROPSYSTEM.
    Determine if the external command exists.  If it doesn't then disable the server input field
      PERFORM FINDEXTERNALCOMMAND.
    start-of-selection.
    START-OF-SELECTION.
      PERFORM CHECKCOMBOBOXES.
      PERFORM FILLSELECTIONRANGES.
      STARTTIME = SY-UZEIT.
    Don't display status messages if we are running in the background
      IF NOT SY-BATCH IS INITIAL.
        PPROMESS = ''.
      ENDIF.
    Fool the HTML routines to stop them hyperlinking anything with a space in them
      IF PCNAME IS INITIAL.
        CUSTOMERNAMESPACE  = '^'.
      ELSE.
        CUSTOMERNAMESPACE = PCNAME.
      ENDIF.
    Determine which operating slash and download directory to use
      CASE 'X'.
        WHEN PPC.
          SLASHSEPARATORTOUSE = FRONTENDSLASHSEPARATOR.
          DOWNLOADFOLDER = PFOLDER.
        WHEN PSERV.
          SLASHSEPARATORTOUSE = SERVERSLASHSEPARATOR.
          DOWNLOADFOLDER = SERVERFOLDER.
      ENDCASE.
    Main program flow.
      CASE 'X'.
      Select tables
        WHEN RTABLE.
          PERFORM RETRIEVETABLES USING IDICTIONARY[]
                                       SOTABLENAMES[]
                                       SOAUTHOR[].
      Select message classes tables
        WHEN RMESS.
          PERFORM RETRIEVEMESSAGECLASS USING IMESSAGES[]
                                             SOAUTHOR[]      "Author
                                             PMNAME          "Message class name
                                             PMLANG          "Message class language
                                             PMOD.           "Modified by author
      Select function modules
        WHEN RFUNC.
          PERFORM RETRIEVEFUNCTIONS USING SOFUNCTIONNAME[]   "Function name
                                          SOFUNCTIONGROUP[]  "Function group
                                          IFUNCTIONS[]       "Found functions
                                          SOAUTHOR[]         "Author
                                          PTEXT              "Get text elements
                                          PSCR               "Get screens
                                          PCUST              "Customer data only
                                          CUSTOMERNAMESPACE. "Customer name range
          LOOP AT IFUNCTIONS.
          Find Dict structures, messages, functions, includes etc.
            PERFORM SCANFORADDITIONALFUNCSTUFF USING IFUNCTIONS[]
                                                     PRECI                   "Search for includes recursively
                                                     PRECF                   "Search for functions recursively
                                                     PINC                    "Search for includes
                                                     PFUNC                   "Search for functions
                                                     PDICT                   "search for dictionary objects
                                                     PMESS                   "Search for messages
                                                     PCUST                   "Customer data only
                                                     CUSTOMERNAMESPACE.      "Customer name range
          ENDLOOP.
      Select Classes
        WHEN RCLASS.
          PERFORM RETRIEVECLASSES USING ICLASSES[]
                                        IFUNCTIONS[]
                                        SOCLASSNAME[]       "Class name
                                        SOAUTHOR[]          "Author
                                        CUSTOMERNAMESPACE   "Customer name range
                                        PMOD                "Also modified by author
                                        PCUST               "Customer object only
                                        PMESS               "Find messages
                                        PTEXT               "Text Elements
                                        PDICT               "Dictionary structures
                                        PFUNC               "Get functions
                                        PINC                "Get includes
                                        PRECF               "Search recursively for functions
                                        PRECI               "Search recursively for includes
                                        'X'                 "Search recursively for classes
                                        PMLANG.             "Language
          LOOP AT IFUNCTIONS.
          Find Dict structures, messages, functions, includes etc.
            PERFORM SCANFORADDITIONALFUNCSTUFF USING IFUNCTIONS[]
                                                     PRECI                   "Search for includes recursively
                                                     PRECF                   "Search for functions recursively
                                                     PINC                    "Search for includes
                                                     PFUNC                   "Search for functions
                                                     PDICT                   "search for dictionary objects
                                                     PMESS                   "Search for messages
                                                     PCUST                   "Customer data only
                                                     CUSTOMERNAMESPACE.      "Customer name range
          ENDLOOP.
      Select programs
        WHEN RPROG.
          PERFORM RETRIEVEPROGRAMS USING IPROGRAMS[]
                                         IFUNCTIONS[]
                                         SOPROGRAMNAME[]    "Program name
                                         SOAUTHOR[]         "Author
                                         CUSTOMERNAMESPACE  "Customer name range
                                         PMOD               "Also modified by author
                                         PCUST              "Customer object only
                                         PMESS              "Find messages
                                         PTEXT              "Text Elements
                                         PDICT              "Dictionay structures
                                         PFUNC              "Get functions
                                         PINC               "Get includes
                                         PSCR               "Get screens
                                         PRECF              "Search recursively for functions
                                         PRECI              "Search recursively for includes
                                         P$TMP              "local objects
                                         PPACK.             "Package
      ENDCASE.
    end-of-selection
    END-OF-SELECTION.
      IF FORCEDEXIT = 0.
      Set the file extension and output type of the file
        IF PTXT IS INITIAL.
          DOWNLOADFILEEXTENSION = HTMLEXTENSION.
        ELSE.
          DOWNLOADFILEEXTENSION = TEXTEXTENSION.
        ENDIF.
      Decide what to download
        CASE 'X'.
        Download tables
          WHEN RTABLE.
            IF NOT ( IDICTIONARY[] IS INITIAL ).
              PERFORM DOWNLOADDDSTRUCTURES USING IDICTIONARY[]
                                                 DOWNLOADFOLDER
                                                 HTMLEXTENSION
                                                 SPACE
                                                 PSORTT
                                                 SLASHSEPARATORTOUSE
                                                 PSERV
                                                 PPROMESS.
            Free up any memory used for caching HTML versions of tables
              LOOP AT IDICTIONARY.
                FREE MEMORY ID IDICTIONARY-TABLENAME.
              ENDLOOP.
            Display donwload report
              IF NOT PREP IS INITIAL.
                GET TIME.
                RUNTIME = SY-UZEIT - STARTTIME.
                PERFORM FILLTREENODETABLES USING IDICTIONARY[]
                                                 ITREEDISPLAY[]
                                                 RUNTIME.
              ENDIF.
              CLEAR IDICTIONARY[].
            ENDIF.
        Download message class
          WHEN RMESS.
            IF NOT ( IMESSAGES[] IS INITIAL ).
              SORT IMESSAGES ASCENDING BY ARBGB MSGNR.
              LOOP AT IMESSAGES.
                APPEND IMESSAGES TO ISINGLEMESSAGECLASS.
                AT END OF ARBGB.
                  PERFORM DOWNLOADMESSAGECLASS USING ISINGLEMESSAGECLASS[]
                                                     IMESSAGES-ARBGB
                                                     DOWNLOADFOLDER
                                                     DOWNLOADFILEEXTENSION
                                                     PHTML
                                                     SPACE
                                                     PCOMM
                                                     CUSTOMERNAMESPACE
                                                     PINC
                                                     PDICT
                                                     PMESS
                                                     SLASHSEPARATORTOUSE
                                                     PSERV
                                                     PPROMESS.
                  CLEAR ISINGLEMESSAGECLASS[].
                ENDAT.
              ENDLOOP.
            Display download report
              IF NOT PREP IS INITIAL.
                GET TIME.
                RUNTIME = SY-UZEIT - STARTTIME.
                PERFORM FILLTREENODEMESSAGES USING IMESSAGES[]
                                                   ITREEDISPLAY[]
                                                   RUNTIME.
              ENDIF.
              CLEAR IMESSAGES[].
            ENDIF.
        Download functions
          WHEN RFUNC.
            IF NOT ( IFUNCTIONS[] IS INITIAL ).
              PERFORM DOWNLOADFUNCTIONS USING IFUNCTIONS[]
                                              DOWNLOADFOLDER
                                              DOWNLOADFILEEXTENSION
                                              SPACE
                                              PDOC
                                              PHTML
                                              PCOMM
          

  • Copying abap programs

    Dear Pals,
    I need some tips from you pals.
    My question is we have a development sytem there one transactions is running, I just wanted to copy the program, screens etc for that transaction to disk and move to some other company as it is for support. I had tried but i could not copy the screen painter forms etc.. How can i do it as it is very important.
    Your help will be appreciated.
    Regards
    Omer.

    Hi Mohamed,
    Here is a program given by someone last week in the forum.
    PROGRAM zdown.
    *=======================================================================
    *=================================
    Direct Download Enterprise version 1.2.
    THIS SOFTWARE IS FOR PERSONAL USE ONLY.
    THIS PROGRAM IS FREEWARE AND IS PROVIDED ON AN AS-IS BASIS WITHOUT
    *WARRANTY OF ANY KIND.
    THE PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR
    *IMPLIED, INCLUDING ANY WARRANTY OF
    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
    IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL,
    PROGRAM DESCRIPTION & USE
    Allows a user to download programs, Functions, DD definitions, etc
    *to the presentation server.  This
    version searches recursively for nested includes and function
    *modules, and allows you to download
    the resulting code as standard text or HTML web pages within a
    *suitable directory structure.
    You can either search by object name, using wildcards if you wish,
    *or a combination of Author and
    object name.  If you want all objects returned for a particular
    *author then select the author name
    and choose the most suitable radiobutton.  All objects will be
    *returned if the fields to the right
    hand side of the radiobutton are left completely blank.
    Compatible with R/3 Enterprise only, for older versions of SAP you
    *will need Direct Download version 5.xx.
    This version removes the programming limitations imposed by
    *developing across SAP releases 3 to 4.6.
    This program is intended to allow a person to keep a visual
    *representation of a program for backup
    purposes only as has not been designed to allow programs to be
    *uploaded to SAP systems.
    AUTHOR          : E.G.Mellodew
    PROGRAM CONTACT : [email protected]
                      www.dalestech.com
    Types
    text element structure
    TYPES: ttexttable LIKE textpool.
    GUI titles
    TYPES: tguititle LIKE d347t.
    Message classes
    TYPES: BEGIN OF tmessage,
             arbgb LIKE t100-arbgb,
             stext LIKE t100a-stext,
             msgnr LIKE t100-msgnr,
             text  LIKE t100-text,
           END OF tmessage.
    Screen flow.
    TYPES: BEGIN OF tscreenflow,
             screen LIKE d020s-dnum,
             code LIKE d022s-line,
           END OF tscreenflow.
    Holds a table\structure definition
    TYPES: BEGIN OF tdicttablestructure,
             fieldname LIKE dd03l-fieldname,
             position  LIKE dd03l-position,
             keyflag   LIKE dd03l-keyflag,
             rollname  LIKE dd03l-rollname,
             domname   LIKE dd03l-domname,
             datatype  LIKE dd03l-datatype,
             leng      LIKE dd03l-leng,
             ddtext    LIKE dd04t-ddtext,
           END OF tdicttablestructure.
    Holds a tables attributes + its definition
    TYPES: BEGIN OF tdicttable,
             tablename    LIKE dd03l-tabname,
             tabletitle   LIKE dd02t-ddtext,
             istructure TYPE tdicttablestructure OCCURS 0,
           END OF tdicttable.
    Include program names
    TYPES: BEGIN OF tinclude,
             includename LIKE trdir-name,
             includetitle LIKE tftit-stext,
           END OF tinclude.
    Method
    TYPES: BEGIN OF tmethod,
             cmpname LIKE vseomethod-cmpname,
             descript LIKE vseomethod-descript,
             exposure LIKE vseomethod-exposure,
             methodkey TYPE string,
           END OF tmethod.
    Class
    TYPES: BEGIN OF tclass,
             scanned(1),
             clsname LIKE vseoclass-clsname,
             descript LIKE vseoclass-descript,
             msg_id LIKE vseoclass-msg_id,
             exposure LIKE vseoclass-exposure,
             state LIKE vseoclass-state,
             clsfinal LIKE vseoclass-clsfinal,
             r3release LIKE vseoclass-r3release,
             imethods TYPE tmethod OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
             itextelements TYPE ttexttable OCCURS 0,
             imessages TYPE tmessage OCCURS 0,
             textelementkey TYPE string,
             publicclasskey TYPE string,
             privateclasskey TYPE string,
             protectedclasskey TYPE string,
             typesclasskey TYPE string,
             exceptionclass TYPE i,
           END OF tclass.
    function modules
    TYPES: BEGIN OF tfunction,
             functionname LIKE tfdir-funcname,
             functiongroup LIKE enlfdir-area,
             includenumber LIKE tfdir-include,
             functionmaininclude LIKE tfdir-funcname,
             functiontitle LIKE tftit-stext,
             topincludename LIKE tfdir-funcname,
             progname LIKE tfdir-pname,
             programlinkname LIKE tfdir-pname,
             messageclass LIKE t100-arbgb,
             itextelements TYPE ttexttable OCCURS 0,
             iselectiontexts TYPE ttexttable OCCURS 0,
             imessages TYPE tmessage OCCURS 0,
             iincludes TYPE tinclude OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
             iguititle TYPE tguititle OCCURS 0,
             iscreenflow TYPE tscreenflow OCCURS 0,
           END OF tfunction.
    TYPES: BEGIN OF tprogram,
             progname LIKE trdir-name,
             programtitle LIKE tftit-stext,
             subc LIKE trdir-subc,
             messageclass LIKE t100-arbgb,
             imessages TYPE tmessage OCCURS 0,
             itextelements TYPE ttexttable OCCURS 0,
             iselectiontexts TYPE ttexttable OCCURS 0,
             iguititle TYPE tguititle OCCURS 0,
             iscreenflow TYPE tscreenflow OCCURS 0,
             iincludes TYPE tinclude OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
           END OF tprogram.
    Internal tables
    Dictionary object
    DATA: idictionary TYPE STANDARD TABLE OF tdicttable WITH HEADER LINE.
    Function modules.
    DATA: ifunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
    Tree display structure.
    DATA: itreedisplay TYPE STANDARD TABLE OF snodetext WITH HEADER LINE.
    Message class data
    DATA: imessages TYPE STANDARD TABLE OF tmessage WITH HEADER LINE.
    Holds a single message class an all of its messages
    DATA: isinglemessageclass TYPE STANDARD TABLE OF tmessage WITH HEADER
    LINE.
    Holds program related data
    DATA: iprograms TYPE STANDARD TABLE OF tprogram WITH HEADER LINE.
    Classes
    DATA: iclasses TYPE STANDARD TABLE OF tclass WITH HEADER LINE.
    Table prototypes
    DATA: dumidictstructure TYPE STANDARD TABLE OF tdicttablestructure.
    DATA: dumitexttab TYPE STANDARD TABLE OF ttexttable.
    DATA: dumiincludes TYPE STANDARD TABLE OF tinclude.
    DATA: dumihtml TYPE STANDARD TABLE OF string.
    DATA: dumiheader TYPE STANDARD TABLE OF string .
    DATA: dumiscreen TYPE STANDARD TABLE OF tscreenflow .
    DATA: dumiguititle TYPE STANDARD TABLE OF tguititle.
    DATA: dumimethods TYPE STANDARD TABLE OF tmethod.
      Global objects
    DATA: objfile TYPE REF TO cl_gui_frontend_services.
    DATA: objruntimeerror TYPE REF TO cx_root.
    Constants
    CONSTANTS: versionno TYPE string VALUE '1.2'.
    CONSTANTS: tables TYPE string VALUE 'TABLES'.
    CONSTANTS: like TYPE string VALUE 'LIKE'.
    CONSTANTS: type TYPE string VALUE 'TYPE'.
    CONSTANTS: typerefto TYPE string VALUE 'TYPE REF TO'.
    CONSTANTS: structure TYPE string VALUE 'STRUCTURE'.
    CONSTANTS: lowstructure TYPE string VALUE 'structure'.
    CONSTANTS: occurs TYPE string VALUE 'OCCURS'.
    CONSTANTS: function TYPE string VALUE 'FUNCTION'.
    CONSTANTS: callfunction TYPE string VALUE ' CALL FUNCTION'.
    CONSTANTS: message TYPE string  VALUE 'MESSAGE'.
    CONSTANTS: include TYPE string VALUE 'INCLUDE'.
    CONSTANTS: lowinclude TYPE string VALUE 'include'.
    CONSTANTS: destination TYPE string VALUE 'DESTINATION'.
    CONSTANTS: is_table TYPE string VALUE 'T'.
    CONSTANTS: is_program TYPE string VALUE 'P'.
    CONSTANTS: is_screen TYPE string VALUE 'S'.
    CONSTANTS: is_guititle TYPE string VALUE 'G'.
    CONSTANTS: is_documentation TYPE string VALUE 'D'.
    CONSTANTS: is_messageclass TYPE string VALUE 'MC'.
    CONSTANTS: is_function TYPE string VALUE 'F'.
    CONSTANTS: is_class TYPE string VALUE 'C'.
    CONSTANTS: is_method TYPE string VALUE 'M'.
    CONSTANTS: asterix TYPE string VALUE '*'.
    CONSTANTS: comma TYPE string VALUE ','.
    CONSTANTS: period TYPE string VALUE '.'.
    CONSTANTS: dash TYPE string VALUE '-'.
    CONSTANTS: true TYPE i VALUE 1.
    CONSTANTS: false TYPE i VALUE 0.
    CONSTANTS: lt TYPE string VALUE '<'.
    CONSTANTS: gt TYPE string VALUE '>'.
    CONSTANTS: unix TYPE string VALUE 'UNIX'.
    CONSTANTS: non_unix TYPE string VALUE 'not UNIX'.
    CONSTANTS: background_colour TYPE string VALUE '#FFFFE0'.
    CONSTANTS: colour_white TYPE string VALUE '#FFFFFF'.
    CONSTANTS: colour_black TYPE string VALUE '#000000'.
    CONSTANTS: colour_yellow TYPE string VALUE '#FFFF00'.
    CONSTANTS: comment_colour TYPE string VALUE '#0000FF'.
    CONSTANTS: htmlextension TYPE string VALUE 'html'.
    CONSTANTS: textextension TYPE string VALUE 'txt'.
    Global variables
    DATA: statusbarmessage(100).
    DATA: forcedexit TYPE i VALUE 0.
    DATA: starttime LIKE sy-uzeit.
    DATA: runtime LIKE sy-uzeit.
    DATA: downloadfileextension TYPE string.
    DATA: downloadfolder TYPE string.
    DATA: slashseparator TYPE string.
    DATA: frontendopsystem TYPE string.
    DATA: customernamespace TYPE string.
    RANGES: soprogramname FOR trdir-name.
    RANGES: soauthor FOR usr02-bname.
    RANGES: sotable FOR dd02l-tabname.
    RANGES: sofunctionname  FOR tfdir-funcname.
    RANGES: soclassname FOR vseoclass-clsname.
    RANGES: sofunctiongroup FOR enlfdir-area.
    FIELD-SYMBOLS: <wadictstruct> TYPE tdicttable.
    Selection screen declaration
    Author
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE tblock1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(23) tauth.
    PARAMETERS: pauth LIKE usr02-bname MEMORY ID mauth.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) tpmod.
    PARAMETERS: pmod AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    *--- Local objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) t$tmp.
    PARAMETERS: p$tmp AS CHECKBOX DEFAULT ''.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE tblock2.
    Tables
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rtable RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(20) trtable.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tptable.
    PARAMETERS: ptable LIKE dd02l-tabname MEMORY ID mtable.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(79) ttnote.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(79) ttnote1.
    SELECTION-SCREEN END OF LINE.
    Message classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rmess RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(18) tpmes.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tmname.
    PARAMETERS: pmname LIKE t100-arbgb MEMORY ID mmname.
    SELECTION-SCREEN END OF LINE.
    Function modules
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rfunc RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(30) trfunc.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tpfname.
    PARAMETERS: pfname LIKE tfdir-funcname MEMORY ID mfname.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tfgroup.
    PARAMETERS: pfgroup LIKE enlfdir-area MEMORY ID mfgroup.
    SELECTION-SCREEN END OF LINE.
    Classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rclass RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(30) trclass.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tpcname.
    PARAMETERS: pclname LIKE seoclass-clsname MEMORY ID mcname.
    SELECTION-SCREEN END OF LINE.
    Programs / includes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rprog RADIOBUTTON GROUP r1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(18) tprog.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) trpname.
    PARAMETERS: pprog LIKE trdir-name MEMORY ID mprog.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    Language
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) tmlang.
    PARAMETERS: pmlang LIKE t100-sprsl DEFAULT 'EN'.
    SELECTION-SCREEN END OF LINE.
    Package
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) tpack.
    PARAMETERS: ppack LIKE tadiv-devclass MEMORY ID mpack.
    SELECTION-SCREEN END OF LINE.
    Customer objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(27) tcust.
    PARAMETERS: pcust AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 32(25) tnrange.
    PARAMETERS: pcname TYPE namespace MEMORY ID mnamespace.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b2.
    Additional things to download.
    SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE tblock3.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tptext.
    PARAMETERS: ptext AS CHECKBOX DEFAULT 'X' MEMORY ID mtext.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tmess.
    PARAMETERS: pmess AS CHECKBOX DEFAULT 'X' MEMORY ID mmess.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpinc.
    PARAMETERS: pinc AS CHECKBOX DEFAULT 'X' MEMORY ID minc.
    SELECTION-SCREEN COMMENT 40(20) trecc.
    PARAMETERS: preci AS CHECKBOX DEFAULT 'X' MEMORY ID mreci.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpfunc.
    PARAMETERS: pfunc AS CHECKBOX DEFAULT 'X' MEMORY ID mfunc.
    SELECTION-SCREEN COMMENT 40(20) trecf.
    PARAMETERS: precf AS CHECKBOX DEFAULT 'X' MEMORY ID mrecf.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tdoc.
    PARAMETERS: pdoc AS CHECKBOX DEFAULT 'X' MEMORY ID mdoc.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpscr.
    PARAMETERS: pscr AS CHECKBOX DEFAULT 'X' MEMORY ID mscr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpdict.
    PARAMETERS: pdict AS CHECKBOX DEFAULT 'X' MEMORY ID mdict.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tsortt.
    PARAMETERS: psortt AS CHECKBOX DEFAULT ' ' MEMORY ID msortt.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b3.
    File details
    SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE tblock4.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tphtml.
    PARAMETERS: phtml RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(25) tcomm.
    PARAMETERS: pcomm AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(25) tback.
    PARAMETERS: pback AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tptxt.
    PARAMETERS: ptxt RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tppath.
    PARAMETERS: pfolder LIKE rlgrap-filename OBLIGATORY MEMORY ID
    mfolder.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b4.
    Display a directory picker window
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfolder.
      DATA: objfile TYPE REF TO cl_gui_frontend_services.
      DATA: pickedfolder TYPE string.
      DATA: initialfolder TYPE string.
      CREATE OBJECT objfile.
      IF NOT pfolder IS INITIAL.
        initialfolder = pfolder.
      ELSE.
        objfile->get_temp_directory( CHANGING temp_dir = initialfolder
                                     EXCEPTIONS cntl_error = 1
                                               error_no_gui = 2
                                               not_supported_by_gui = 3 ).
      ENDIF.
      objfile->directory_browse( EXPORTING initial_folder = initialfolder
                                 CHANGING selected_folder = pickedfolder
                                 EXCEPTIONS cntl_error = 1
                                            error_no_gui = 2
                                            not_supported_by_gui = 3 ).
      IF sy-subrc = 0.
        pfolder = pickedfolder.
      ELSE.
        WRITE: / 'An error has occured picking a folder'.
      ENDIF.
    initialisation
    INITIALIZATION.
    Parameter screen texts.
      tblock1 = 'Author (Optional)'.
      t$tmp   = 'Programs only: include local objects'.
      tblock2 = 'Objects to download'.
      tblock3 = 'Additional downloads for progs, func modules and classes'.
      tblock4 = 'Download parameters'.
      tauth   = 'Author name'.
      tpmod   = 'Include programs modified by author'.
      tcust   = 'Only customer objects'.
      tnrange = 'Alt customer name range'.
      trtable = 'Tables / Structures'.
      tptable = 'Table name'.
      ttnote  = 'Please note: tables are stored under the username of the'.
      ttnote1 = 'last person who modified them.'.
      trfunc  = 'Function modules'.
      tpfname = 'Function name'.
      tfgroup = 'Function group'.
      trclass  = 'Classes'.
      tpcname = 'Class name'.
      tmess   = 'Message class'.
      tmname  = 'Class name'.
      tmlang  = 'Language'.
      tprog   = 'Programs'.
      trpname = 'Program name'.
      tpack   = 'Package'.
      tptxt   = 'Text document'.
      tphtml  = 'HTML document'.
      tcomm   = 'Highlight comments'.
      tback   = 'Include background colour'.
      tptext  = 'Text elements'.
      tpinc   = 'Include programs'.
      trecc   = 'Recursive search'.
      tppath  = 'File path'.
      tpmes   = 'Message classes'.
      tpfunc  = 'Function modules'.
      tdoc    = 'Function module documentation'.
      trecf   = 'Recursive search'.
      tpscr   = 'Screens'.
      tpdict  = 'Dictionary structures'.
      tsortt  = 'Sort table fields alphabetically'.
    Determine the frontend operating system type.
      PERFORM determinefrontendopsystem USING slashseparator.
    start-of-selection.
    START-OF-SELECTION.
      PERFORM checkcomboboxes.
      PERFORM fillselectionranges.
      downloadfolder = pfolder.
      starttime = sy-uzeit.
    Fool the HTML routines to stop them hyperlinking anything with a space
    *in them
      IF pcname IS INITIAL.
        customernamespace  = '^'.
      ELSE.
        customernamespace = pcname.
      ENDIF.
    Main program flow.
      CASE 'X'.
      Select tables
        WHEN rtable.
          PERFORM retrievetables USING idictionary[]
                                       sotable[]
                                       soauthor[].
      Select message classes tables
        WHEN rmess.
          PERFORM retrievemessageclass USING imessages[]
                                   soauthor[]      "Author
                                   pmname          "Message classname
                                   pmlang          "Message classanguage
                                  pmod.           "Modified by author
      Select function modules
        WHEN rfunc.
          IF pfname+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          IF pfgroup+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrievefunctions USING sofunctionname[]   "Function name
                                          sofunctiongroup[]  "Function group
                                      ifunctions[]       "Foundfunctions
                                      pauth         "Author
                                      ptext         "Get textelements
                                      pscr          "Get screens
                                      pcust         "Customer data only
                              customernamespace. "Customer name range
          LOOP AT ifunctions.
          Find Dict structures, messages, functions, includes etc.
            PERFORM scanforadditionalfuncstuff USING ifunctions[]
                                                     preci
          "Search for includes recursively
                                                     precf
          "Search for functions recursively
                                                     pinc
          "Search for includes
                                                     pfunc
          "Search for functions
                                                     pdict
          "search for dictionary objects
                                                     pmess
          "Search for messages
                                                     pcust
          "Customer data only
                                                     customernamespace.
            "Customer name range
          ENDLOOP.
      Select Classes
        WHEN rclass.
          IF pclname+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrieveclasses USING iclasses[]
                                        ifunctions[]
                                        soclassname[]       "Class name
                                        soauthor[]          "Author
                               customernamespace   "Customer namerange
                                        pmod       "Also modifiedby author
                                        pcust       "Customer objectonly
                                        pmess       "Find messages
                                        ptext               "Text Elements
                                   pdict               "Dictionarystructures
                                        pfunc               "Get functions
                                        pinc                "Get includes
                 precf               "Searchrecursively for functions
                preci               "Searchrecursively for includes
                'X'                 "Searchrecursively for classes
               pmlang.             "Language
          LOOP AT ifunctions.
          Find Dict structures, messages, functions, includes etc.
            PERFORM scanforadditionalfuncstuff USING ifunctions[]
                                                     preci
          "Search for includes recursively
                                                     precf
          "Search for functions recursively
                                                     pinc
          "Search for includes
                                                     pfunc
          "Search for functions
                                                     pdict
          "search for dictionary objects
                                                     pmess
          "Search for messages
                                                     pcust
          "Customer data only
                                                     customernamespace.
            "Customer name range
          ENDLOOP.
      Select programs
        WHEN rprog.
          IF pprog+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrieveprograms USING iprograms[]
                                         ifunctions[]
                                         soprogramname[]    "Program name
                                         soauthor[]         "Author
                               customernamespace  "Customer nam range
                               pmod               "Also modifiedby author
                               pcust              "Customer object only
                                         pmess              "Find messages
                                         ptext              "Text Elements
                                         pdict         "Dictionaystructures
                                         pfunc            "Get functions
                                         pinc               "Get includes
                                         pscr               "Get screens
           precf              "Search recursively for functions
           preci              "Searchrecursively for includes
                                        p$tmp              "local objects
                                         ppack.             "Package
      ENDCASE.
    end-of-selection
    END-OF-SELECTION.
      IF forcedexit = 0.
      Set the file extension and output type of the file
        IF ptxt IS INITIAL.
          downloadfileextension = htmlextension.
        ELSE.
          downloadfileextension = textextension.
        ENDIF.
      Decide what to download
        CASE 'X'.
        Download tables
          WHEN rtable.
            IF NOT ( idictionary[] IS INITIAL ).
              PERFORM downloadddstructures USING idictionary[]
                                                 pfolder
                                                 htmlextension
                                                 space
                                                 psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT idictionary.
                FREE MEMORY ID idictionary-tablename.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodetables USING idictionary[]
                                               itreedisplay[]
                                               runtime.
              CLEAR idictionary[].
            ENDIF.
        Download message class
          WHEN rmess.
            IF NOT ( imessages[] IS INITIAL ).
              SORT imessages ASCENDING BY arbgb msgnr.
              LOOP AT imessages.
                APPEND imessages TO isinglemessageclass.
                AT END OF arbgb.
                  PERFORM downloadmessageclass USING isinglemessageclass[]
                                                     imessages-arbgb
                                                     pfolder
                                                     downloadfileextension
                                                     phtml
                                                     space
                                                     pcomm
                                                     customernamespace
                                                     pinc
                                                     pdict
                                                     pmess.
                  CLEAR isinglemessageclass[].
                ENDAT.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodemessages USING imessages[]
                                                 itreedisplay[]
                                                 runtime.
              CLEAR imessages[].
            ENDIF.
        Download functions
          WHEN rfunc.
            IF NOT ( ifunctions[] IS INITIAL ).
              PERFORM downloadfunctions USING ifunctions[]
                                              pfolder
                                              downloadfileextension
                                              space
                                              pdoc
                                              phtml
                                              pcomm
                                              customernamespace
                                              pinc
                                              pdict
                                              textextension
                                              htmlextension
                                              psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING <wadictstruct>.
                  FREE MEMORY ID <wadictstruct>-tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodefunctions USING ifunctions[]
                                                  itreedisplay[]
                                                  runtime.
              CLEAR ifunctions[].
            ENDIF.
        Download Classes
          WHEN rclass.
            IF NOT ( iclasses[] IS INITIAL ).
              PERFORM downloadclasses USING iclasses[]
                                            ifunctions[]
                                            pfolder
                                            downloadfileextension
                                            htmlextension
                                            textextension
                                            phtml
                                            pcomm
                                            customernamespace
                                            pinc
                                            pdict
                                            pdoc
                                            psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodeclasses USING iclasses[]
                                                ifunctions[]
                                                itreedisplay[]
                                                runtime.
              CLEAR iclasses[].
              CLEAR ifunctions[].
            ENDIF.
        Download programs
          WHEN rprog.
            IF NOT ( iprograms[] IS INITIAL ).
              PERFORM downloadprograms USING iprograms[]
                                             ifunctions[]
                                             pfolder
                                             downloadfileextension
                                             htmlextension
                                             textextension
                                             phtml
                                             pcomm
                                             customernamespace
                                             pinc
                                             pdict
                                             pdoc
                                             psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodeprograms USING iprograms[]
                                                 ifunctions[]
                                                 itreedisplay[]
                                                 runtime.
              CLEAR iprograms[].
              CLEAR ifunctions[].
            ENDIF.
        ENDCASE.
        IF NOT ( itreedisplay[] IS INITIAL ).
          PERFORM displaytree USING itreedisplay[].
        ELSE.
          statusbarmessage = 'No items found matching selection criteria'.
          PERFORM displaystatus USING statusbarmessage 1.
        ENDIF.
      ENDIF.
    *--- Memory IDs
    User name
      SET PARAMETER ID 'MAUTH' FIELD pauth.
    Table name
      SET PARAMETER ID 'MTABLE' FIELD ptable.
    Message class
      SET PARAMETER ID 'MMNAME' FIELD pmname.
    Function
      SET PARAMETER ID 'MFNAME' FIELD pfname.
    Function group
      SET PARAMETER ID 'MFGROUP' FIELD pfgroup.
    Class
      SET PARAMETER ID 'MCNAME' FIELD pclname.
    Program
      SET PARAMETER ID 'MPROG' FIELD pprog.
    Customer namespace
      SET PARAMETER ID 'MNAMESPACE' FIELD pcname.
    Folder
      SET PARAMETER ID 'MFOLDER' FIELD pfolder.
    Package
      SET PARAMETER ID 'MPACK' FIELD ppack.
    Text element checkbox
      SET PARAMETER ID 'MTEXT' FIELD ptext.
    Messages checkbox
      SET PARAMETER ID 'MMESS' FIELD pmess.
    Includes checkbox
      SET PARAMETER ID 'MINC' FIELD pinc.
    Recursive includes checkbox.
      SET PARAMETER ID 'MRECI' FIELD preci.
    Functions checkbox
      SET PARAMETER ID 'MFUNC' FIELD pfunc.
    Recursive functions checkbox
      SET PARAMETER ID 'MRECF' FIELD precf.
    Function module documntation checkbox
      SET PARAMETER ID 'MDOC' FIELD pdoc.
    Screens checkbox
      SET PARAMETER ID 'MSCR' FIELD pscr.
    Dictionary checkbox
      SET PARAMETER ID 'MDICT' FIELD pdict.
    Sort table ascending checkBox
      SET PARAMETER ID 'MSORTT' FIELD psortt.
    ****************************************SUBROUTINES*******************
    checkComboBoxes...  Check input parameters
    FORM checkcomboboxes.
      IF pauth IS INITIAL.
        CASE 'X'.
          WHEN rtable.
            IF ptable IS INITIAL.
              statusbarmessage = 'You must enter either a table name or author.'.
            ENDIF.
          WHEN rfunc.
            IF ( pfname IS INITIAL ) AND ( pfgroup IS INITIAL ).
              IF pfname IS INITIAL.
                statusbarmessage = 'You must enter either a function name or author.'.
              ELSE.
                IF pfgroup IS INITIAL.
                  statusbarmessage = 'Must enter either a func gp, or an author name.'.
                ENDIF.
              ENDIF.
            ENDIF.
          WHEN rprog.
            IF pprog IS INITIAL.
                statusbarmessage = 'You must enter either a program name or
    author name.'.
            ENDIF.
        ENDCASE.
    Check the user name of the person objects are to be downloaded for
      ELSE.
        IF pauth = 'SAP*' OR pauth = 'SAP'.
          statusbarmessage = 'Sorry cannot download all objects for SAP
    standard user'.
        ENDIF.
      ENDIF.
      IF NOT statusbarmessage IS INITIAL.
        PERFORM displaystatus USING statusbarmessage 3.
        forcedexit = 1.
        STOP.
      ENDIF.
    ENDFORM.                    "
    "checkComboBoxes
    fillSelectionRanges...      for selection routines
    FORM fillselectionranges.
      DATA: valuetofind TYPE string.
      IF NOT pauth IS INITIAL.
        soauthor-sign = 'I'.
        soauthor-option = 'EQ'.
        soauthor-low = pauth.
        APPEND soauthor.
      ENDIF.
      IF NOT ptable IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT ptable+0(1) = '/'.
          CONCATENATE pcname ptable INTO valuetofind.
        ELSE.
          valuetofind = ptable.
        ENDIF.
        sotable-sign = 'I'.
        sotable-option = 'EQ'.
        sotable-low = valuetofind.
        APPEND sotable.
      ENDIF.
      IF NOT pfname IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pfname+0(1) = '/'.
          CONCATENATE pcname pfname INTO valuetofind.
        ELSE.
          valuetofind = pfname.
        ENDIF.
        sofunctionname-sign = 'I'.
        PERFORM addoption USING valuetofind sofunctionname-option.
        sofunctionname-low = valuetofind.
        APPEND sofunctionname.
      ENDIF.
      IF NOT pfgroup IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pfgroup+0(1) = '/'.
          CONCATENATE pcname pfgroup INTO valuetofind.
        ELSE.
          valuetofind = pfgroup.
        ENDIF.
        sofunctiongroup-sign = 'I'.
        PERFORM addoption USING valuetofind sofunctiongroup-option.
        sofunctiongroup-low = valuetofind.
        APPEND sofunctiongroup.
      ENDIF.
      IF NOT pclname IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pclname+0(1) = '/'.
          CONCATENATE pcname pclname INTO valuetofind.
        ELSE.
          valuetofind = pclname.
        ENDIF.
        soclassname-sign = 'I'.
        PERFORM addoption USING valuetofind soclassname-option.
        soclassname-low = valuetofind.
        APPEND soclassname.
      ENDIF.
      IF NOT pprog IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pprog+0(1) = '/'.
          CONCATENATE pcname pprog INTO valuetofind.
        ELSE.
          valuetofind = pprog.
        ENDIF.
        soprogramname-sign = 'I'.
        PERFORM addoption USING valuetofind soprogramname-option.
        soprogramname-low = valuetofind.
        APPEND soprogramname.
      ENDIF.
    ENDFORM.                    "
    " fillSelectionRanges
    addOption...  fills the option value of ranges
    FORM addoption USING value(valuetofind)
                               option.
      IF valuetofind CA asterix.
        option = 'CP'.
      ELSE.
        option = 'EQ'.
      ENDIF.
    ENDFORM.                    "
    "addOption
    retrieveTables...       

  • RMCA0768 - LIS update program for info-structure S076 will not regenerate

    Does anyone know how to trigger this program to regenerate?
    I was able to regenerate S501 - S999 using RMCSISIGN via SAP note 99507.
    However this one remains a problem.
    Thank you,
    Michelle

    By the way this is a unicode problem.   The unicode flag is not checked on the program.  The program is $TMP program that is generated by SAP for info-structures.

  • Is there any program to download function group?

    Hi
    I just want to download whole function group  and dictionary object (table type and structure) in specific package.
    not need to table contents though.
    is there anyway to download these object quick?

    Hi
    You can try this code
    [code]tables: trdir, seoclass, tfdir, enlfdir, dd02l.
    Types
    text element structure
    types: tTextTable like textpool.
    GUI titles
    types: tGUITitle like d347t.
    Message classes
    types: begin of tMessage,
             arbgb like t100-arbgb,
             stext like t100a-stext,
             msgnr like t100-msgnr,
             text  like t100-text,
           end of tMessage.
    Screen flow.
    types: begin of tScreenFlow,
             screen like d020s-dnum,
             code like d022s-line,
           end of tScreenFlow.
    Holds a table\structure definition
    types: begin of tDictTableStructure,
             fieldname like dd03l-fieldname,
             position  like dd03l-position,
             keyflag   like dd03l-keyflag,
             rollname  like dd03l-rollname,
             domname   like dd03l-domname,
             datatype  like dd03l-datatype,
             leng      like dd03l-leng,
             ddtext    like dd04t-ddtext,
           end of tdictTableStructure.
    Holds a tables attributes + its definition
    types: begin of tDictTable,
             tablename    like dd03l-tabname,
             tableTitle   like dd02t-ddtext,
             iStructure type tDictTableStructure occurs 0,
           end of tDictTable.
    Include program names
    types: begin of tInclude,
             includeName like trdir-name,
             includeTitle like tftit-stext,
           end of tInclude.
    Exception class texts
    types: begin of tConcept,
             constName type string,
             concept type sotr_conc,
           end of tConcept.
    Method
    types: begin of tMethod,
             cmpName like vseomethod-cmpname,
             descript like vseomethod-descript,
             exposure like vseomethod-exposure,
             methodKey type string,
           end of tMethod.
    Class
    types: begin of tClass,
             scanned(1),
             clsname like vseoclass-clsname,
             descript like vseoclass-descript,
             msg_id like vseoclass-msg_id,
             exposure like vseoclass-exposure,
             state like vseoclass-state,
             clsfinal like vseoclass-clsfinal,
             r3release like vseoclass-r3release,
             iMethods type tMethod occurs 0,
             iDictStruct type tDictTable occurs 0,
             iTextElements type tTextTable occurs 0,
             iMessages type tMessage occurs 0,
             iConcepts type tConcept occurs 0,
             textElementKey type string,
             publicClassKey type string,
             privateClassKey type string,
             protectedClassKey type string,
             typesClassKey type string,
             exceptionClass type i,
           end of tClass.
    function modules
    types: begin of tFunction,
             functionName like tfdir-funcName,
             functionGroup like enlfdir-area,
             includeNumber like tfdir-include,
             functionMainInclude like tfdir-funcName,
             functionTitle like tftit-stext,
             topIncludeName like tfdir-funcName,
             progname like tfdir-pname,
             programLinkName like tfdir-pname,
             messageClass like t100-arbgb,
             iTextElements type tTextTable occurs 0,
             iSelectiontexts type tTextTable occurs 0,
             iMessages type tMessage occurs 0,
             iIncludes type tInclude occurs 0,
             iDictStruct type tDictTable occurs 0,
             iGUITitle type tGUITitle occurs 0,
             iScreenFlow type tScreenFlow occurs 0,
           end of tFunction.
    types: begin of tProgram,
             progname like trdir-name,
             programTitle like tftit-stext,
             subc like trdir-subc,
             messageClass like t100-arbgb,
             iMessages type tMessage occurs 0,
             iTextElements type tTextTable occurs 0,
             iSelectiontexts type tTextTable occurs 0,
             iGUITitle type tGUITitle occurs 0,
             iScreenFlow type tScreenFlow occurs 0,
             iIncludes type tInclude occurs 0,
             iDictStruct type tDictTable occurs 0,
           end of tProgram.
    Internal tables
    Dictionary object
    data: iDictionary type standard table of tDictTable with header line.
    Function modules.
    data: iFunctions type standard table of tFunction with header line.
    Tree display structure.
    data: iTreeDisplay type standard table of snodetext with header line.
    Message class data
    data: iMessages type standard table of tMessage with header line.
    Holds a single message class an all of its messages
    data: iSingleMessageClass type standard table of tMessage with header line.
    Holds program related data
    data: iPrograms type standard table of tProgram with header line.
    Classes
    data: iClasses type standard table of tClass with header line.
    Table of paths created on the SAP server
    data: iServerPaths type standard table of string with header line.
    Table prototypes
    data: dumiDictStructure type standard table of tDictTableStructure.
    data: dumiTextTab type standard table of tTextTable.
    data: dumiIncludes type standard table of tInclude.
    data: dumiHtml type standard table of string.
    data: dumiHeader type standard table of string .
    data: dumiScreen type standard table of tScreenFlow .
    data: dumIGUITitle type standard table of tGUITitle.
    data: dumiMethods type standard table of tMethod.
    data: dumiConcepts type standard table of tConcept.
      Global objects
    data: objFile type ref to cl_gui_frontend_services.
    data: objRuntimeError type ref to cx_root.
    Constants
    constants: VERSIONNO type string value '1.3.1'.
    constants: TABLES type string value 'TABLES'.
    constants: TABLE type string value 'TABLE'.
    constants: LIKE type string value 'LIKE'.
    constants: TYPE type string value 'TYPE'.
    constants: TYPEREFTO type string value 'TYPE REF TO'.
    constants: STRUCTURE type string value 'STRUCTURE'.
    constants: LOWSTRUCTURE type string value 'structure'.
    constants: OCCURS type string value 'OCCURS'.
    constants: FUNCTION type string value 'FUNCTION'.
    constants: CALLFUNCTION type string value ' CALL FUNCTION'.
    constants: MESSAGE type string  value 'MESSAGE'.
    constants: INCLUDE type string value 'INCLUDE'.
    constants: LOWINCLUDE type string value 'include'.
    constants: DESTINATION type string value 'DESTINATION'.
    constants: IS_TABLE type string value 'T'.
    constants: IS_PROGRAM type string value 'P'.
    constants: IS_SCREEN type string value 'S'.
    constants: IS_GUITITLE type string value 'G'.
    constants: IS_DOCUMENTATION type string value 'D'.
    constants: IS_MESSAGECLASS type string value 'MC'.
    constants: IS_FUNCTION type string value 'F'.
    constants: IS_CLASS type string value 'C'.
    constants: IS_METHOD type string value 'M'.
    constants: ASTERIX type string value '*'.
    constants: COMMA type string value ','.
    constants: PERIOD type string value '.'.
    constants: DASH type string value '-'.
    constants: TRUE type i value 1.
    constants: FALSE type i value 0.
    constants: LT type string value '&lt;'.
    constants: GT type string value '&gt;'.
    constants: UNIX type string value 'UNIX'.
    constants: NON_UNIX type string value 'not UNIX'.
    constants: BACKGROUND_COLOUR type string value '#FFFFE0'.
    constants: COLOUR_WHITE type string value '#FFFFFF'.
    constants: COLOUR_BLACK type string value '#000000'.
    constants: COLOUR_YELLOW type string value '#FFFF00'.
    constants: COMMENT_COLOUR type string value '#0000FF'.
    constants: HTMLEXTENSION type string value 'html'.
    constants: TEXTEXTENSION type string value 'txt'.
    Global variables
    data: statusBarMessage(100).
    data: forcedExit type i value 0.
    data: startTime like sy-uzeit.
    data: runTime like sy-uzeit.
    data: downloadFileExtension type string.
    data: downloadFolder type string.
    data: serverSlashSeparator type string.
    data: frontendSlashSeparator type string.
    data: slashSeparatorToUse type string.
    data: serverFilesystem type filesys_d.
    data: serverFolder type string.
    data: frontendOpSystem type string.
    data: serverOpSystem type string.
    data: customerNameSpace type string.
    ranges: soProgramName for trdir-name.
    ranges: soAuthor for usr02-bname.
    ranges: soTableNames for dd02l-tabname.
    ranges: soFunctionName  for tfdir-funcName.
    ranges: soClassName for vseoclass-clsname.
    ranges: soFunctionGroup for enlfdir-area.
    field-symbols: <waDictStruct> type tDictTable.
    Selection screen declaration
    Author
    selection-screen: begin of block b1 with frame title tBlock1.
      selection-screen begin of line.
        selection-screen comment 5(23) tAuth.
        parameters: pAuth like usr02-bname memory id MAUTH.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 5(36) tPmod.
        parameters: pMod as checkbox.
      selection-screen end of line.
    Local objects
      selection-screen begin of line.
        selection-screen comment 5(36) t$tmp.
        parameters: p$tmp as checkbox default ''.
      selection-screen end of line.
    selection-screen: end of block b1.
    selection-screen begin of block b2 with frame title tBlock2.
    Tables
      selection-screen begin of line.
        parameters: rTable radiobutton group r1.
        selection-screen comment 5(15) tRtable.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(15) tPtable.
        select-options: soTable for dd02l-tabname.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(79) tTnote.
      selection-screen end of line.
    Message classes
      selection-screen begin of line.
        parameters: rMess radiobutton group r1.
        selection-screen comment 5(18) tPMes.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(18) tMname.
        parameters: pMname like t100-arbgb memory id MMNAME.
      selection-screen end of line.
    Function modules
      selection-screen begin of line.
        parameters: rFunc radiobutton group r1.
        selection-screen comment 5(30) tRfunc.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(15) tPfname.
        select-options: soFname for tfdir-funcName.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(15) tFgroup.
        select-options: soFgroup for enlfdir-area.
      selection-screen end of line.
    Classes
      selection-screen begin of line.
        parameters: rClass radiobutton group r1.
        selection-screen comment 5(30) tRClass.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(15) tPcName.
        select-options: soClass for seoclass-clsname.
      selection-screen end of line.
    Programs / includes
      selection-screen begin of line.
        parameters: rProg radiobutton group r1 default 'X'.
        selection-screen comment 5(18) tProg.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(15) tRpname.
        select-options: soProg for trdir-name.
      selection-screen end of line.
      selection-screen skip.
    Language
      selection-screen begin of line.
        selection-screen comment 1(18) tMLang.
        parameters: pMLang like t100-sprsl default 'EN'.
      selection-screen end of line.
    Package
      selection-screen begin of line.
        selection-screen comment 1(18) tPack.
        parameters: pPack like tadiv-devclass memory id MPACK.
      selection-screen end of line.
    Customer objects
      selection-screen begin of line.
        selection-screen comment 1(27) tCust.
        parameters: pCust as checkbox default 'X'.
        selection-screen comment 32(25) tNRange.
        parameters: pCName type namespace memory id MNAMESPACE.
      selection-screen end of line.
    selection-screen: end of block b2.
    Additional things to download.
    selection-screen: begin of block b3 with frame title tBlock3.
      selection-screen begin of line.
        selection-screen comment 1(33) tPtext.
        parameters: pText as checkbox default 'X' memory id MTEXT.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tMess.
        parameters: pMess as checkbox default 'X' memory id MMESS.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPinc.
        parameters: pInc as checkbox default 'X' memory id MINC.
        selection-screen comment 40(20) tRecc.
        parameters: pReci as checkbox default 'X' memory id MRECI.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPfunc.
        parameters: pFunc as checkbox default 'X' memory id MFUNC.
        selection-screen comment 40(20) tRecf.
        parameters: pRecf as checkbox default 'X' memory id MRECF.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tDoc.
        parameters: pDoc as checkbox default 'X' memory id MDOC.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPscr.
        parameters: pScr as checkbox default 'X' memory id MSCR.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPdict.
        parameters: pDict as checkbox default 'X' memory id MDICT.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tSortT.
        parameters: pSortT as checkbox default ' ' memory id MSORTT.
      selection-screen end of line.
    selection-screen: end of block b3.
    File details
    selection-screen: begin of block b4 with frame title tBlock4.
      selection-screen begin of line.
        selection-screen comment 1(20) tPhtml.
        parameters: pHtml radiobutton group g1 default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 5(29) tComm.
        parameters: pComm as checkbox default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 5(29) tBack.
        parameters: pBack as checkbox default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(20) tPtxt.
        parameters: pTxt radiobutton group g1.
      selection-screen end of line.
      selection-screen skip.
    Download to SAP server
      selection-screen begin of line.
        selection-screen comment 1(25) tServ.
        parameters: pServ radiobutton group g2.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 8(20) tSPath.
        parameters: pLogical like filename-fileintern memory id MLOGICAL.
      selection-screen end of line.
      selection-screen comment /28(60) tSDPath.
    Download to PC
      selection-screen begin of line.
        selection-screen comment 1(25) tPc.
        parameters: pPc radiobutton group g2 default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 8(20) tPpath.
        parameters: pFolder like rlgrap-filename memory id MFOLDER.
      selection-screen end of line.
    selection-screen: end of block b4.
    Display options
    selection-screen: begin of block b5 with frame title tBlock5.
    Display final report
      selection-screen begin of line.
        selection-screen comment 1(33) tRep.
        parameters: pRep as checkbox default 'X'.
      selection-screen end of line.
    Display progress messages
      selection-screen begin of line.
        selection-screen comment 1(33) tProMess.
        parameters: pProMess as checkbox default 'X'.
      selection-screen end of line.
    selection-screen: end of block b5.
    Display a directory picker window
    at selection-screen on value-request for pFolder.
    data: objFile type ref to cl_gui_frontend_services.
    data: pickedFolder type string.
    data: initialFolder type string.
      if sy-batch is initial.
        create object objFile.
        if not pFolder is initial.
          initialFolder = pFolder.
        else.
          objFile->get_temp_directory( changing temp_dir = initialFolder
                                       exceptions cntl_error = 1
                                                 error_no_gui = 2
                                                 not_supported_by_gui = 3 ).
        endif.
        objFile->directory_browse( exporting initial_folder = initialFolder
                                   changing selected_folder = pickedFolder
                                   exceptions cntl_error = 1
                                              error_no_gui = 2
                                              not_supported_by_gui = 3 ).
        if sy-subrc = 0.
          pFolder = pickedFolder.
        else.
          write: / 'An error has occured picking a folder'.
        endif.
      endif.
    at selection-screen.
      case 'X'.
        when pPc.
          if pFolder is initial.
          User must enter a path to save to
            message e000(oo) with 'You must enter a file path'.
          endif.
        when pServ.
          if pLogical is initial.
          User must enter a logical path to save to
            message e000(oo) with 'You must enter a logical file name'.
          endif.
      endcase.
    at selection-screen on pLogical.
      if not pServ is initial.
        call function 'FILE_GET_NAME' exporting logical_filename = pLogical
                                      importing file_name = serverFolder
                                      exceptions file_not_found = 1
                                                 others = 2.
        if sy-subrc = 0.
          if serverFolder is initial.
            message e000(oo) with 'No file path returned from logical filename'.
          else.
          Path to display on the selection screen
            tSDPath = serverFolder.
          Remove the trailing slash off the path as the subroutine buildFilename will add an extra one
            shift serverFolder right deleting trailing serverSlashSeparator.
            shift serverFolder left deleting leading space.
          endif.
        else.
          message e000(oo) with 'Logical filename does not exist'.
        endif.
      endif.
    at selection-screen on value-request for soProg-low.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'PROG'
                                                          object_name  = soProg-low
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soProg-low
                                                exceptions cancel = 1.
    at selection-screen on value-request for soProg-high.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'PROG'
                                                          object_name  = soProg-high
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soProg-high
                                                exceptions cancel = 1.
    at selection-screen on value-request for soClass-low.
      call function 'F4_DD_ALLTYPES' exporting object = soClass-low
                                               suppress_selection = 'X'
                                               display_only = ''
                                               only_types_for_clifs = 'X'
                                     importing result = soClass-low.
    at selection-screen on value-request for soClass-high.
      call function 'F4_DD_ALLTYPES' exporting object = soClass-high
                                               suppress_selection = 'X'
                                               display_only = ''
                                               only_types_for_clifs = 'X'
                                     importing result = soClass-high.
    at selection-screen on value-request for soFName-low.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUNC'
                                                          object_name  = soFname-low
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFName-low
                                                exceptions cancel = 1.
    at selection-screen on value-request for soFName-high.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUNC'
                                                          object_name  = soFname-high
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFName-high
                                                exceptions cancel = 1.
    at selection-screen on value-request for soFGroup-low.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUGR'
                                                          object_name  = soFGroup-low
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFGroup-low
                                                exceptions cancel = 1.
    at selection-screen on value-request for soFGroup-high.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUGR'
                                                          object_name  = soFGroup-high
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFGroup-high
                                                exceptions cancel = 1.
    initialisation
    initialization.
    Parameter screen texts.
      tBlock1 = 'Author (Optional)'.
      t$tmp   = 'Programs only: include local objects'.
      tBlock2 = 'Objects to download'.
      tBlock3 = 'Additional downloads for programs, function modules and classes'.
      tBlock4 = 'Download parameters'.
      tBlock5 = 'Display options'.
      tAuth   = 'Author name'.
      tPmod   = 'Include programs modified by author'.
      tCust   = 'Only customer objects'.
      tNRange = 'Alt customer name range'.
      tRtable = 'Tables / Structures'.
      tPtable = 'Table name'.
      tTnote  = 'Note: tables are stored under the username of the last person who modified them'.
      tRfunc  = 'Function modules'.
      tPfname = 'Function name'.
      tFgroup = 'Function group'.
      tRClass  = 'Classes'.
      tPcname = 'Class name'.
      tMess   = 'Message class'.
      tMName  = 'Class name'.
      tMLang  = 'Language'.
      tProg   = 'Programs'.
      tRpname = 'Program name'.
      tPack   = 'Package'.
      tPtxt   = 'Text document'.
      tPhtml  = 'HTML document'.
      tComm   = 'Highlight comments'.
      tBack   = 'Include background colour'.
      tPtext  = 'Text elements'.
      tPinc   = 'Include programs'.
      tRecc   = 'Recursive search'.
      tPpath  = 'File path'.
      tSPath  = 'Logical file name'.
      tPmes   = 'Message classes'.
      tPfunc  = 'Function modules'.
      tDoc    = 'Function module documentation'.
      tRecf   = 'Recursive search'.
      tPscr   = 'Screens'.
      tPdict  = 'Dictionary structures'.
      tSortT  = 'Sort table fields alphabetically'.
      tServ   = 'Download to server'.
      tPc     = 'Download to PC'.
      tRep    = 'Display download report'.
      tProMess  = 'Display progress messages'.
    Determine the frontend operating system type.
      if sy-batch is initial.
        perform determineFrontendOPSystem using frontendSlashSeparator frontendOpSystem.
      endif.
      perform determineServerOpsystem using serverSlashSeparator serverFileSystem serverOpsystem.
    Determine if the external command exists.  If it doesn't then disable the server input field
      perform findExternalCommand.
    start-of-selection.
    start-of-selection.
      perform checkComboBoxes.
      perform fillSelectionRanges.
      startTime = sy-uzeit.
    Don't display status messages if we are running in the background
      if not sy-batch is initial.
        pProMess = ''.
      endif.
    Fool the HTML routines to stop them hyperlinking anything with a space in them
      if pCName is initial.
        customerNameSpace  = '^'.
      else.
        customerNameSpace = pCName.
      endif.
    Determine which operating slash and download directory to use
      case 'X'.
        when pPc.
          slashSeparatorToUse = frontendSlashSeparator.
          downloadFolder = pFolder.
        when pServ.
          slashSeparatorToUse = serverSlashSeparator.
          downloadFolder = serverFolder.
      endcase.
    Main program flow.
      case 'X'.
      Select tables
        when rTable.
          perform retrieveTables using iDictionary[]
                                       soTableNames[]
                                       soAuthor[].
      Select message classes tables
        when rMess.
          perform retrieveMessageClass using iMessages[]
                                             soAuthor[]      "Author
                                             pMname          "Message class name
                                             pMLang          "Message class language
                                             pMod.           "Modified by author
      Select function modules
        when rFunc.
          perform retrieveFunctions using soFunctionName[]   "Function name
                                          soFunctionGroup[]  "Function group
                                          iFunctions[]       "Found functions
                                          soAuthor[]         "Author
                                          pText              "Get text elements
                                          pScr               "Get screens
                                          pCust              "Customer data only
                                          customerNameSpace. "Customer name range
          loop at iFunctions.
          Find Dict structures, messages, functions, includes etc.
            perform scanForAdditionalFuncStuff using iFunctions[]
                                                     pRecI                   "Search for includes recursively
                                                     pRecF                   "Search for functions recursively
                                                     pInc                    "Search for includes
                                                     pFunc                   "Search for functions
                                                     pDict                   "search for dictionary objects
                                                     pMess                   "Search for messages
                                                     pCust                   "Customer data only
                                                     customerNameSpace.      "Customer name range
          endloop.
      Select Classes
        when rClass.
          perform retrieveClasses using iClasses[]
                                        iFunctions[]
                                        soClassName[]       "Class name
                                        soAuthor[]          "Author
                                        customerNameSpace   "Customer name range
                                        pMod                "Also modified by author
                                        pCust               "Customer object only
                                        pMess               "Find messages
                                        pText               "Text Elements
                                        pDict               "Dictionary structures
                                        pFunc               "Get functions
                                        pInc                "Get includes
                                        pRecF               "Search recursively for functions
                                        pRecI               "Search recursively for includes
                                        'X'                 "Search recursively for classes
                                        pMLang.             "Language
          loop at iFunctions.
          Find Dict structures, messages, functions, includes etc.
            perform scanForAdditionalFuncStuff using iFunctions[]
                                                     pRecI                   "Search for includes recursively
                                                     pRecF                   "Search for functions recursively
                                                     pInc                    "Search for includes
                                                     pFunc                   "Search for functions
                                                     pDict                   "search for dictionary objects
                                                     pMess                   "Search for messages
                                                     pCust                   "Customer data only
                                                     customerNameSpace.      "Customer name range
          endloop.
      Select programs
        when rProg.
          perform retrievePrograms using iPrograms[]
                                         iFunctions[]
                                         soProgramName[]    "Program name
                                         soAuthor[]         "Author
                                         customerNamespace  "Customer name range
                                         pMod               "Also modified by author
                                         pCust              "Customer object only
                                         pMess              "Find messages
                                         pText              "Text Elements
                                         pDict              "Dictionay structures
                                         pFunc              "Get functions
                                         pInc               "Get includes
                                         pScr               "Get screens
                                         pRecF              "Search recursively for functions
                                         pRecI              "Search recursively for includes
                                         p$Tmp              "local objects
                                         pPack.             "Package
      endcase.
    end-of-selection
    end-of-selection.
      if forcedExit = 0.
      Set the file extension and output type of the file
        if pTxt is initial.
          downloadFileExtension = HTMLEXTENSION.
        else.
          downloadFileExtension = TEXTEXTENSION.
        endif.
      Decide what to download
        case 'X'.
        Download tables
          when rTable.
            if not ( iDictionary[] is initial ).
              perform downloadDDStructures using iDictionary[]
                                                 downloadFolder
                                                 HTMLEXtension
                                                 space
                                                 pSortT
                                                 slashSeparatorToUse
                                                 pServ
                                                 pProMess.
            Free up any memory used for caching HTML versions of tables
              loop at iDictionary.
                free memory id iDictionary-tablename.
              endloop.
            Display donwload report
              if not pRep is initial.
                get time.
                runTime = sy-uzeit - startTime.
                perform fillTreeNodeTables using iDictionary[]
                                                 iTreeDisplay[]
                                                 runTime.
              endif.
              clear iDictionary[].
            endif.
        Download message class
          when rMess.
            if not ( iMessages[] is initial ).
              sort iMessages ascending by arbgb msgnr.
              loop at iMessages.
                append iMessages to iSingleMessageClass.
                at end of arbgb.
                  perform downloadMessageClass using iSingleMessageClass[]
                                                     iMessages-arbgb
                                                     downloadFolder
                                                     downloadFileExtension
                                                     pHtml
                                                     space
                                                     pComm
                                                     customerNameSpace
                                                     pInc
                                                     pDict
                                                     pMess
                                                     slashSeparatorToUse
                                                     pServ
                                                     pProMess.
                  clear iSingleMessageClass[].
                endat.
              endloop.
            Display download report
              if not pRep is initial.
                get time.
                runTime = sy-uzeit - startTime.
                perform fillTreeNodeMessages using iMessages[]
                                                   iTreeDisplay[]
                                                   runTime.
              endif.
             clear iMessages[].
           endif.
        Download functions
          when rFunc.
            if not ( iFunctions[] is initial ).
               perform downloadFunctions using iFunctions[]
                                               downloadFolder
                                               downloadFileExtension
                                               space
                                               pDoc
                                               pHtml
                                               pComm
                                               customerNameSpace
                                               pInc
                                               pDict
                                               TEXTEXTENSION
                                               HTMLEXTENSION
                                               pSortT
                                               slashSeparatorToUse
                                               pServ
                                               pProMess.
            Free up any memory used for caching HTML versions of tables
              loop at iFunctions.
                loop at iFunctions-iDictStruct assigning <waDictStruct>.
                  free memory id <waDictStruct>-tablename.
                endloop.
              endloop.
            Display donwload report
              if not pRep is initial.
                get time.
                runTime = sy-uzeit - startTime.
                perform fillTreeNodeFunctions using iFunctions[]
                                                    iTreeDisplay[]
                                                    runTime.
              endif.
              clear iFunctions[].
            endif.
        Download Classes
          when rClass.
            if not ( iClasses[] is initial ).
              perform downloadClasses using iClasses[]
                                            iFunctions[]
                                            downloadFolder
                                            downloadFileExtension
                                            HTMLEXTENSION
                                            TEXTEXTENSION
                                            pHtml
                                            pComm
                                            custo

  • Utility for Downloading Z Programs and Sapscripts.

    HI!
    I want to Down load all my Z programs to a local drive. Please help me if you know any utility?
    Thank you,
    DARSHAN
    Message was edited by: Darshankumar Kanubhai Patel

    use this program:
    PROGRAM ZDOWN.
    *========================================================================================================
    Direct Download Enterprise version 1.2.
    THIS SOFTWARE IS FOR PERSONAL USE ONLY.
    THIS PROGRAM IS FREEWARE AND IS PROVIDED ON AN AS-IS BASIS WITHOUT WARRANTY OF ANY KIND.
    THE PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF
    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
    IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, SPECIAL OR INCIDENTAL DAMAGES,
    EVEN IF PROVIDER HAS BEEN ADVISED BY CLIENT OF THE POSSIBILITY OF SUCH POTENTIAL LOSS OR DAMAGE.
    CLIENT AGREES TO HOLD PROVIDER HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, LOSSES, LIABILITIES AND
    EXPENSES.  BY INSTALLING OR RUNNING THIS PROGRAM YOU ARE AGREEING TO THE TERMS AND CONDITONS STATED
    ABOVE.
    PROGRAM DESCRIPTION & USE
    Allows a user to download programs, Functions, DD definitions, etc to the presentation server.  This
    version searches recursively for nested includes and function modules, and allows you to download
    the resulting code as standard text or HTML web pages within a suitable directory structure.
    You can either search by object name, using wildcards if you wish, or a combination of Author and
    object name.  If you want all objects returned for a particular author then select the author name
    and choose the most suitable radiobutton.  All objects will be returned if the fields to the right
    hand side of the radiobutton are left completely blank.
    Compatible with R/3 Enterprise only, for older versions of SAP you will need Direct Download version 5.xx.
    This version removes the programming limitations imposed by developing across SAP releases 3 to 4.6.
    This program is intended to allow a person to keep a visual representation of a program for backup
    purposes only as has not been designed to allow programs to be uploaded to SAP systems.
    AUTHOR          : E.G.Mellodew
    PROGRAM CONTACT : [email protected]
                      www.dalestech.com
    Types
    text element structure
    types: tTextTable like textpool.
    GUI titles
    types: tGUITitle like d347t.
    Message classes
    types: begin of tMessage,
             arbgb like t100-arbgb,
             stext like t100a-stext,
             msgnr like t100-msgnr,
             text  like t100-text,
           end of tMessage.
    Screen flow.
    types: begin of tScreenFlow,
             screen like d020s-dnum,
             code like d022s-line,
           end of tScreenFlow.
    Holds a table\structure definition
    types: begin of tDictTableStructure,
             fieldname like dd03l-fieldname,
             position  like dd03l-position,
             keyflag   like dd03l-keyflag,
             rollname  like dd03l-rollname,
             domname   like dd03l-domname,
             datatype  like dd03l-datatype,
             leng      like dd03l-leng,
             ddtext    like dd04t-ddtext,
           end of tdictTableStructure.
    Holds a tables attributes + its definition
    types: begin of tDictTable,
             tablename    like dd03l-tabname,
             tableTitle   like dd02t-ddtext,
             iStructure type tDictTableStructure occurs 0,
           end of tDictTable.
    Include program names
    types: begin of tInclude,
             includeName like trdir-name,
             includeTitle like tftit-stext,
           end of tInclude.
    Method
    types: begin of tMethod,
             cmpName like vseomethod-cmpname,
             descript like vseomethod-descript,
             exposure like vseomethod-exposure,
             methodKey type string,
           end of tMethod.
    Class
    types: begin of tClass,
             scanned(1),
             clsname like vseoclass-clsname,
             descript like vseoclass-descript,
             msg_id like vseoclass-msg_id,
             exposure like vseoclass-exposure,
             state like vseoclass-state,
             clsfinal like vseoclass-clsfinal,
             r3release like vseoclass-r3release,
             iMethods type tMethod occurs 0,
             iDictStruct type tDictTable occurs 0,
             iTextElements type tTextTable occurs 0,
             iMessages type tMessage occurs 0,
             textElementKey type string,
             publicClassKey type string,
             privateClassKey type string,
             protectedClassKey type string,
             typesClassKey type string,
             exceptionClass type i,
           end of tClass.
    function modules
    types: begin of tFunction,
             functionName like tfdir-funcName,
             functionGroup like enlfdir-area,
             includeNumber like tfdir-include,
             functionMainInclude like tfdir-funcName,
             functionTitle like tftit-stext,
             topIncludeName like tfdir-funcName,
             progname like tfdir-pname,
             programLinkName like tfdir-pname,
             messageClass like t100-arbgb,
             iTextElements type tTextTable occurs 0,
             iSelectiontexts type tTextTable occurs 0,
             iMessages type tMessage occurs 0,
             iIncludes type tInclude occurs 0,
             iDictStruct type tDictTable occurs 0,
             iGUITitle type tGUITitle occurs 0,
             iScreenFlow type tScreenFlow occurs 0,
           end of tFunction.
    types: begin of tProgram,
             progname like trdir-name,
             programTitle like tftit-stext,
             subc like trdir-subc,
             messageClass like t100-arbgb,
             iMessages type tMessage occurs 0,
             iTextElements type tTextTable occurs 0,
             iSelectiontexts type tTextTable occurs 0,
             iGUITitle type tGUITitle occurs 0,
             iScreenFlow type tScreenFlow occurs 0,
             iIncludes type tInclude occurs 0,
             iDictStruct type tDictTable occurs 0,
           end of tProgram.
    Internal tables
    Dictionary object
    data: iDictionary type standard table of tDictTable with header line.
    Function modules.
    data: iFunctions type standard table of tFunction with header line.
    Tree display structure.
    data: iTreeDisplay type standard table of snodetext with header line.
    Message class data
    data: iMessages type standard table of tMessage with header line.
    Holds a single message class an all of its messages
    data: iSingleMessageClass type standard table of tMessage with header line.
    Holds program related data
    data: iPrograms type standard table of tProgram with header line.
    Classes
    data: iClasses type standard table of tClass with header line.
    Table prototypes
    data: dumiDictStructure type standard table of tDictTableStructure.
    data: dumiTextTab type standard table of tTextTable.
    data: dumiIncludes type standard table of tInclude.
    data: dumiHtml type standard table of string.
    data: dumiHeader type standard table of string .
    data: dumiScreen type standard table of tScreenFlow .
    data: dumIGUITitle type standard table of tGUITitle.
    data: dumiMethods type standard table of tMethod.
      Global objects
    data: objFile type ref to cl_gui_frontend_services.
    data: objRuntimeError type ref to cx_root.
    Constants
    constants: VERSIONNO type string value '1.2'.
    constants: TABLES type string value 'TABLES'.
    constants: LIKE type string value 'LIKE'.
    constants: TYPE type string value 'TYPE'.
    constants: TYPEREFTO type string value 'TYPE REF TO'.
    constants: STRUCTURE type string value 'STRUCTURE'.
    constants: LOWSTRUCTURE type string value 'structure'.
    constants: OCCURS type string value 'OCCURS'.
    constants: FUNCTION type string value 'FUNCTION'.
    constants: CALLFUNCTION type string value ' CALL FUNCTION'.
    constants: MESSAGE type string  value 'MESSAGE'.
    constants: INCLUDE type string value 'INCLUDE'.
    constants: LOWINCLUDE type string value 'include'.
    constants: DESTINATION type string value 'DESTINATION'.
    constants: IS_TABLE type string value 'T'.
    constants: IS_PROGRAM type string value 'P'.
    constants: IS_SCREEN type string value 'S'.
    constants: IS_GUITITLE type string value 'G'.
    constants: IS_DOCUMENTATION type string value 'D'.
    constants: IS_MESSAGECLASS type string value 'MC'.
    constants: IS_FUNCTION type string value 'F'.
    constants: IS_CLASS type string value 'C'.
    constants: IS_METHOD type string value 'M'.
    constants: ASTERIX type string value '*'.
    constants: COMMA type string value ','.
    constants: PERIOD type string value '.'.
    constants: DASH type string value '-'.
    constants: TRUE type i value 1.
    constants: FALSE type i value 0.
    constants: LT type string value '&lt;'.
    constants: GT type string value '&gt;'.
    constants: UNIX type string value 'UNIX'.
    constants: NON_UNIX type string value 'not UNIX'.
    constants: BACKGROUND_COLOUR type string value '#FFFFE0'.
    constants: COLOUR_WHITE type string value '#FFFFFF'.
    constants: COLOUR_BLACK type string value '#000000'.
    constants: COLOUR_YELLOW type string value '#FFFF00'.
    constants: COMMENT_COLOUR type string value '#0000FF'.
    constants: HTMLEXTENSION type string value 'html'.
    constants: TEXTEXTENSION type string value 'txt'.
    Global variables
    data: statusBarMessage(100).
    data: forcedExit type i value 0.
    data: startTime like sy-uzeit.
    data: runTime like sy-uzeit.
    data: downloadFileExtension type string.
    data: downloadFolder type string.
    data: slashSeparator type string.
    data: frontendOpSystem type string.
    data: customerNameSpace type string.
    ranges: soProgramName for trdir-name.
    ranges: soAuthor for usr02-bname.
    ranges: soTable for dd02l-tabname.
    ranges: soFunctionName  for tfdir-funcName.
    ranges: soClassName for vseoclass-clsname.
    ranges: soFunctionGroup for enlfdir-area.
    field-symbols: <waDictStruct> type tDictTable.
    Selection screen declaration
    Author
    selection-screen: begin of block b1 with frame title tBlock1.
      selection-screen begin of line.
        selection-screen comment 5(23) tAuth.
        parameters: pAuth like usr02-bname memory id MAUTH.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 5(36) tPmod.
        parameters: pMod as checkbox.
      selection-screen end of line.
    *--- Local objects
      selection-screen begin of line.
        selection-screen comment 5(36) t$tmp.
        parameters: p$tmp as checkbox default ''.
      selection-screen end of line.
    selection-screen: end of block b1.
    selection-screen begin of block b2 with frame title tBlock2.
    Tables
      selection-screen begin of line.
        parameters: rTable radiobutton group r1.
        selection-screen comment 5(20) tRtable.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(18) tPtable.
        parameters: pTable like dd02l-tabname memory id MTABLE.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(79) tTnote.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(79) tTnote1.
      selection-screen end of line.
    Message classes
      selection-screen begin of line.
        parameters: rMess radiobutton group r1.
        selection-screen comment 5(18) tPMes.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(18) tMname.
        parameters: pMname like t100-arbgb memory id MMNAME.
      selection-screen end of line.
    Function modules
      selection-screen begin of line.
        parameters: rFunc radiobutton group r1.
        selection-screen comment 5(30) tRfunc.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(18) tPfname.
        parameters: pFname like tfdir-funcName memory id MFNAME.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(18) tFgroup.
        parameters: pFgroup like enlfdir-area memory id MFGROUP.
      selection-screen end of line.
    Classes
      selection-screen begin of line.
        parameters: rClass radiobutton group r1.
        selection-screen comment 5(30) tRClass.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(18) tPcName.
        parameters: pClname like seoclass-clsname memory id MCNAME.
      selection-screen end of line.
    Programs / includes
      selection-screen begin of line.
        parameters: rProg radiobutton group r1 default 'X'.
        selection-screen comment 5(18) tProg.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(18) tRpname.
        parameters: pProg like trdir-name memory id MPROG.
      selection-screen end of line.
      selection-screen skip.
    Language
      selection-screen begin of line.
        selection-screen comment 1(18) tMLang.
        parameters: pMLang like t100-sprsl default 'EN'.
      selection-screen end of line.
    Package
      selection-screen begin of line.
        selection-screen comment 1(18) tPack.
        parameters: pPack like tadiv-devclass memory id MPACK.
      selection-screen end of line.
    Customer objects
      selection-screen begin of line.
        selection-screen comment 1(27) tCust.
        parameters: pCust as checkbox default 'X'.
        selection-screen comment 32(25) tNRange.
        parameters: pCName type namespace memory id MNAMESPACE.
      selection-screen end of line.
    selection-screen: end of block b2.
    Additional things to download.
    selection-screen: begin of block b3 with frame title tBlock3.
      selection-screen begin of line.
        selection-screen comment 1(33) tPtext.
        parameters: pText as checkbox default 'X' memory id MTEXT.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tMess.
        parameters: pMess as checkbox default 'X' memory id MMESS.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPinc.
        parameters: pInc as checkbox default 'X' memory id MINC.
        selection-screen comment 40(20) tRecc.
        parameters: pReci as checkbox default 'X' memory id MRECI.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPfunc.
        parameters: pFunc as checkbox default 'X' memory id MFUNC.
        selection-screen comment 40(20) tRecf.
        parameters: pRecf as checkbox default 'X' memory id MRECF.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tDoc.
        parameters: pDoc as checkbox default 'X' memory id MDOC.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPscr.
        parameters: pScr as checkbox default 'X' memory id MSCR.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tPdict.
        parameters: pDict as checkbox default 'X' memory id MDICT.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(33) tSortT.
        parameters: pSortT as checkbox default ' ' memory id MSORTT.
      selection-screen end of line.
    selection-screen: end of block b3.
    File details
    selection-screen: begin of block b4 with frame title tBlock4.
      selection-screen begin of line.
        selection-screen comment 1(20) tPhtml.
        parameters: pHtml radiobutton group g1 default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 5(25) tComm.
        parameters: pComm as checkbox default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 5(25) tBack.
        parameters: pBack as checkbox default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 1(20) tPtxt.
        parameters: pTxt radiobutton group g1.
      selection-screen end of line.
      selection-screen skip.
      selection-screen begin of line.
        selection-screen comment 1(20) tPpath.
        parameters: pFolder like rlgrap-filename obligatory memory id MFOLDER.
      selection-screen end of line.
    selection-screen: end of block b4.
    Display a directory picker window
    at selection-screen on value-request for pFolder.
    data: objFile type ref to cl_gui_frontend_services.
    data: pickedFolder type string.
    data: initialFolder type string.
      create object objFile.
      if not pFolder is initial.
        initialFolder = pFolder.
      else.
        objFile->get_temp_directory( changing temp_dir = initialFolder
                                     exceptions cntl_error = 1
                                               error_no_gui = 2
                                               not_supported_by_gui = 3 ).
      endif.
      objFile->directory_browse( exporting initial_folder = initialFolder
                                 changing selected_folder = pickedFolder
                                 exceptions cntl_error = 1
                                            error_no_gui = 2
                                            not_supported_by_gui = 3 ).
      if sy-subrc = 0.
        pFolder = pickedFolder.
      else.
        write: / 'An error has occured picking a folder'.
      endif.
    initialisation
    Initialization.
    Parameter screen texts.
      tBlock1 = 'Author (Optional)'.
      t$tmp   = 'Programs only: include local objects'.
      tBlock2 = 'Objects to download'.
      tBlock3 = 'Additional downloads for programs, function modules and classes'.
      tBlock4 = 'Download parameters'.
      tAuth   = 'Author name'.
      tPmod   = 'Include programs modified by author'.
      tCust   = 'Only customer objects'.
      tNRange = 'Alt customer name range'.
      tRtable = 'Tables / Structures'.
      tPtable = 'Table name'.
      tTnote  = 'Please note: tables are stored under the username of the'.
      tTnote1 = 'last person who modified them.'.
      tRfunc  = 'Function modules'.
      tPfname = 'Function name'.
      tFgroup = 'Function group'.
      tRClass  = 'Classes'.
      tPcname = 'Class name'.
      tMess   = 'Message class'.
      tMName  = 'Class name'.
      tMLang  = 'Language'.
      tProg   = 'Programs'.
      tRpname = 'Program name'.
      tPack   = 'Package'.
      tPtxt   = 'Text document'.
      tPhtml  = 'HTML document'.
      tComm   = 'Highlight comments'.
      tBack   = 'Include background colour'.
      tPtext  = 'Text elements'.
      tPinc   = 'Include programs'.
      tRecc   = 'Recursive search'.
      tPpath  = 'File path'.
      tPmes   = 'Message classes'.
      tPfunc  = 'Function modules'.
      tDoc    = 'Function module documentation'.
      tRecf   = 'Recursive search'.
      tPscr   = 'Screens'.
      tPdict  = 'Dictionary structures'.
      tSortT  = 'Sort table fields alphabetically'.
    Determine the frontend operating system type.
      perform determineFrontendOPSystem using slashSeparator.
    start-of-selection.
    start-of-selection.
      perform checkComboBoxes.
      perform fillSelectionRanges.
      downloadFolder = pFolder.
      startTime = sy-uzeit.
    Fool the HTML routines to stop them hyperlinking anything with a space in them
      if pCName is initial.
        customerNameSpace  = '^'.
      else.
        customerNameSpace = pCName.
      endif.
    Main program flow.
      case 'X'.
      Select tables
        when rTable.
          perform retrieveTables using iDictionary[]
                                       soTable[]
                                       soAuthor[].
      Select message classes tables
        when rMess.
          perform retrieveMessageClass using iMessages[]
                                             soAuthor[]      "Author
                                             pMname          "Message class name
                                             pMLang          "Message class language
                                             pMod.           "Modified by author
      Select function modules
        when rFunc.
          if pFName+0(1) ca ASTERIX.
          Restrict the search to customer objects only.
            pCust = 'X'.
          endif.
          if pFGroup+0(1) ca ASTERIX.
          Restrict the search to customer objects only.
            pCust = 'X'.
          endif.
          perform retrieveFunctions using soFunctionName[]   "Function name
                                          soFunctionGroup[]  "Function group
                                          iFunctions[]       "Found functions
                                          pAuth              "Author
                                          pText              "Get text elements
                                          pScr               "Get screens
                                          pCust              "Customer data only
                                          customerNameSpace. "Customer name range
          loop at iFunctions.
          Find Dict structures, messages, functions, includes etc.
            perform scanForAdditionalFuncStuff using iFunctions[]
                                                     pRecI                   "Search for includes recursively
                                                     pRecF                   "Search for functions recursively
                                                     pInc                    "Search for includes
                                                     pFunc                   "Search for functions
                                                     pDict                   "search for dictionary objects
                                                     pMess                   "Search for messages
                                                     pCust                   "Customer data only
                                                     customerNameSpace.      "Customer name range
          endloop.
      Select Classes
        when rClass.
          if pClName+0(1) ca ASTERIX.
          Restrict the search to customer objects only.
            pCust = 'X'.
          endif.
          perform retrieveClasses using iClasses[]
                                        iFunctions[]
                                        soClassName[]       "Class name
                                        soAuthor[]          "Author
                                        customerNameSpace   "Customer name range
                                        pMod                "Also modified by author
                                        pCust               "Customer object only
                                        pMess               "Find messages
                                        pText               "Text Elements
                                        pDict               "Dictionary structures
                                        pFunc               "Get functions
                                        pInc                "Get includes
                                        pRecF               "Search recursively for functions
                                        pRecI               "Search recursively for includes
                                        'X'                 "Search recursively for classes
                                        pMLang.             "Language
          loop at iFunctions.
          Find Dict structures, messages, functions, includes etc.
            perform scanForAdditionalFuncStuff using iFunctions[]
                                                     pRecI                   "Search for includes recursively
                                                     pRecF                   "Search for functions recursively
                                                     pInc                    "Search for includes
                                                     pFunc                   "Search for functions
                                                     pDict                   "search for dictionary objects
                                                     pMess                   "Search for messages
                                                     pCust                   "Customer data only
                                                     customerNameSpace.      "Customer name range
          endloop.
      Select programs
        when rProg.
          if pProg+0(1) ca ASTERIX.
          Restrict the search to customer objects only.
            pCust = 'X'.
          endif.
          perform retrievePrograms using iPrograms[]
                                         iFunctions[]
                                         soProgramName[]    "Program name
                                         soAuthor[]         "Author
                                         customerNamespace  "Customer name range
                                         pMod               "Also modified by author
                                         pCust              "Customer object only
                                         pMess              "Find messages
                                         pText              "Text Elements
                                         pDict              "Dictionay structures
                                         pFunc              "Get functions
                                         pInc               "Get includes
                                         pScr               "Get screens
                                         pRecF              "Search recursively for functions
                                         pRecI              "Search recursively for includes
                                         p$Tmp              "local objects
                                         pPack.             "Package
      endcase.
    end-of-selection
    end-of-selection.
      if forcedExit = 0.
      Set the file extension and output type of the file
        if pTxt is initial.
          downloadFileExtension = HTMLEXTENSION.
        else.
          downloadFileExtension = TEXTEXTENSION.
        endif.
      Decide what to download
        case 'X'.
        Download tables
          when rTable.
            if not ( iDictionary[] is initial ).
              perform downloadDDStructures using iDictionary[]
                                                 pFolder
                                                 HTMLEXtension
                                                 space
                                                 pSortT.
            Free up any memory used for caching HTML versions of tables
              loop at iDictionary.
                free memory id iDictionary-tablename.
              endloop.
              get time.
              runTime = sy-uzeit - startTime.
              perform fillTreeNodeTables using iDictionary[]
                                               iTreeDisplay[]
                                               runTime.
              clear iDictionary[].
            endif.
        Download message class
          when rMess.
            if not ( iMessages[] is initial ).
              sort iMessages ascending by arbgb msgnr.
              loop at iMessages.
                append iMessages to iSingleMessageClass.
                at end of arbgb.
                  perform downloadMessageClass using iSingleMessageClass[]
                                                     iMessages-arbgb
                                                     pFolder
                                                     downloadFileExtension
                                                     pHtml
                                                     space
                                                     pComm
                                                     customerNameSpace
                                                     pInc
                                                     pDict
                                                     pMess.
                   clear iSingleMessageClass[].
                 endat.
               endloop.
               get time.
               runTime = sy-uzeit - startTime.
               perform fillTreeNodeMessages using iMessages[]
                                                  iTreeDisplay[]
                                                  runTime.
               clear iMessages[].
           endif.
        Download functions
          when rFunc.
            if not ( iFunctions[] is initial ).
               perform downloadFunctions using iFunctions[]
                                               pFolder
                                               downloadFileExtension
                                               space
                                               pDoc
                                               pHtml
                                               pComm
                                               customerNameSpace
                                               pInc
                                               pDict
                                               TEXTEXTENSION
                                               HTMLEXTENSION
                                               pSortT.
            Free up any memory used for caching HTML versions of tables
              loop at iFunctions.
                loop at iFunctions-iDictStruct assigning <waDictStruct>.
                  free memory id <waDictStruct>-tablename.
                endloop.
              endloop.
              get time.
              runTime = sy-uzeit - startTime.
              perform fillTreeNodeFunctions using iFunctions[]
                                                  iTreeDisplay[]
                                                  runTime.
              clear iFunctions[].
            endif.
        Download Classes
          when rClass.
            if not ( iClasses[] is initial ).
              perform downloadClasses using iClasses[]
                                            iFunctions[]
                                            pFolder
                                            downloadFileExtension
                                            HTMLEXTENSION
                                            TEXTEXTENSION
                                            pHtml
                                            pComm
                                            customerNameSpace
                                            pInc
                                            pDict
                                            pDoc
                                            pSortT.
            Free up any memory used for caching HTML versions of tables
              loop at iFunctions.
                loop at iFunctions-iDictStruct assigning <waDictStruct>..
                  free memory id <waDictStruct>-tablename.
                endloop.
              endloop.
            Free up any memory used for caching HTML versions of tables
              loop at iPrograms.
                loop at iPrograms-iDictStruct assigning <waDictStruct>..
                  free memory id <waDictStruct>-tablename.
                endloop.
              endloop.
               get time.
               runTime = sy-uzeit - startTime.
               perform fillTreeNodeClasses using iClasses[]
                                                 iFunctions[]
                                                 iTreeDisplay[]
                                                 runTime.
               clear iClasses[].
               clear iFunctions[].
            endif.
        Download programs
          when rProg.
            if not ( iPrograms[] is initial ).
              perform downloadPrograms using iPrograms[]
                                             iFunctions[]
                                             pFolder
                                             downloadFileExtension
                                             HTMLEXTENSION
                                             TEXTEXTENSION
                                             pHtml
                                             pComm
                                             customerNameSpace
                                             pInc
                                             pDict
                                             pDoc
                                             pSortT.
            Free up any memory used for caching HTML versions of tables
              loop at iFunctions.
                loop at iFunctions-iDictStruct assigning <waDictStruct>..
                  free memory id <waDictStruct>-tablename.
                endloop.
              endloop.
            Free up any memory used for caching HTML versions of tables
              loop at iPrograms.
                loop at iPrograms-iDictStruct assigning <waDictStruct>..
                  free memory id <waDictStruct>-tablename.
                endloop.
              endloop.
               get time.
               runTime = sy-uzeit - startTime.
               perform fillTreeNodePrograms using iPrograms[]
                                                  iFunctions[]
                                                  iTreeDisplay[]
                                                  runTime.
               clear iPrograms[].
               clear iFunctions[].
            endif.
        endcase.
        if not ( iTreeDisplay[] is initial ).
          perform displayTree using iTreeDisplay[].
        else.
          statusBarMessage = 'No items found matching selection criteria'.
          perform displayStatus using statusBarMessage 1.
        endif.
      endif.
    *--- Memory IDs
    User name
      set parameter id 'MAUTH' field pAuth.
    Table name
      set parameter id 'MTABLE' field pTable.
    Message class
      set parameter id 'MMNAME' field pMname.
    Function
      set parameter id 'MFNAME' field pFName.
    Function group
      set parameter id 'MFGROUP' field pFgroup.
    Class
      set parameter id 'MCNAME' field pClName.
    Program
      set parameter id 'MPROG' field pProg.
    Customer namespace
      set parameter id 'MNAMESPACE' field pCName.
    Folder
      set parameter id 'MFOLDER' field pFolder.
    Package
      set parameter id 'MPACK' field pPack.
    Text element checkbox
      set parameter id 'MTEXT' field pText.
    Messages checkbox
      set parameter id 'MMESS' field pMess.
    Includes checkbox
      set parameter id 'MINC' field pInc.
    Recursive includes checkbox.
      set parameter id 'MRECI' field pReci.
    Functions checkbox
      set parameter id 'MFUNC' field pFunc.
    Recursive functions checkbox
      set parameter id 'MRECF' field pRecf.
    Function module documntation checkbox
      set parameter id 'MDOC' field pDoc.
    Screens checkbox
      set parameter id 'MSCR' field pScr.
    Dictionary checkbox
      set parameter id 'MDICT' field pDict.
    Sort table ascending checkBox
      set parameter id 'MSORTT' field pSortT.
    ****************************************SUBROUTINES***************************************************
    checkComboBoxes...  Check input parameters
    form checkComboBoxes.
      if pAuth is initial.
        case 'X'.
          when rTable.
            if pTable is initial.
              statusBarMessage = 'You must enter either a table name or author.'.
            endif.
          when rFunc.
            if ( pFName is initial ) and ( pFGroup is initial ).
              if pFName is initial.
                statusBarMessage = 'You must enter either a function name or author.'.
              else.
                if pFGroup is initial.
                  statusBarMessage = 'You must enter either a function group, or an author name.'.
                endif.
              endif.
            endif.
          when rProg.
            if pProg is initial.
                statusBarMessage = 'You must enter either a program name or author name.'.
            endif.
        endcase.
    Check the user name of the person objects are to be downloaded for
      else.
        if pAuth = 'SAP*' or pauth = 'SAP'.
          statusBarMessage = 'Sorry cannot download all objects for SAP standard user'.
        endif.
      endif.
      if not statusBarMessage is initial.
        perform displayStatus using statusBarMessage 3.
        forcedExit = 1.
        stop.
      endif.
    endform.                                                                                "checkComboBoxes
    fillSelectionRanges...      for selection routines
    form fillSelectionRanges.
    data: valueToFind type string.
      if not pAuth is initial.
        soAuthor-sign = 'I'.
        soAuthor-option = 'EQ'.
        soAuthor-low = pAuth.
        append soAuthor.
      endif.
      if not pTable is initial.
        if not pcName is initial and not pTable+0(1) = '/'.
          concatenate pcName pTable into valueToFind.
        else.
          valueTofind = pTable.
        endif.
        soTable-sign = 'I'.
        soTable-option = 'EQ'.
        soTable-low = valueToFind.
        append soTable.
      endif.
      if not pFName is initial.
        if not pcName is initial and not pFName+0(1) = '/'.
          concatenate pcName pFName into valueToFind.
        else.
          valueTofind = pFName.
        endif.
        soFunctionName-sign = 'I'.
        perform addOption using valueToFind soFunctionName-option.
        soFunctionName-low = valueToFind.
        append soFunctionName.
      endif.
      if not pFGroup is initial.
        if not pcName is initial and not pFGroup+0(1) = '/'.
          concatenate pcName pFGroup into valueToFind.
        else.
          valueTofind = pFGroup.
        endif.
        soFunctionGroup-sign = 'I'.
        perform addOption using valueToFind sofunctionGroup-option.
        soFunctionGroup-low = valueToFind.
        append soFunctionGroup.
      endif.
      if not pClName is initial.
        if not pcName is initial and not pClname+0(1) = '/'.
          concatenate pcName pClname into valueToFind.
        else.
          valueTofind = pClname.
        endif.
        soClassName-sign = 'I'.
        perform addOption using valueToFind soClassName-option.
        soClassName-low = valueToFind.
        append soClassName.
      endif.
      if not pProg is initial.
        if not pcName is initial and not pProg+0(1) = '/'.
          concatenate pcName pProg into valueToFind.
        else.
          valueTofind = pProg.
        endif.
        soProgramName-sign = 'I'.
        perform addOption using valueToFind soProgramName-option.
        soProgramName-low = valueTofind.
        append soProgramName.
      endif.
    endfo

  • Problem relocating Windows and highlghting text

    I have had this ongoing problem for some time,  I was asked to  reissue it to learn more about the next step in my troubleshooting isolation and maybe get some fresh ideas.  I have an Apple G3 B/W PPC desktop ( my RAM is woefully low and I know I need to add more) with an Upgraded G4 Processor.  My problem is two-fold; 1) I am unable to highlight text for the purpose of copy/paste/delete. This occurs when I am in a internet browser, Mail or an Application, such as Microsoft Office. 2) I am also unable to move windows on my desktop.
    I have had a number of troubleshooting recommendations ,among the ones I have executed:
    I have done items  1 - 4
    1) Safe Boot>Use Disk Utility > repair Permissions>Repair Hard Drive >Retest problems( tested both in Safe/Normal Mode)
    2) Used Applejack to  assure my hardware was in good working order >Safe Boot >Disk Utilities >Repair Permissions > Retest Problems ( tested in both Modes)
    3) Create New Account to verify if problem is Account Specific
    4) Disconnect all Peripherals and non Apple Hardware (USB Hub and HIGH SPEED PCI USB Adapter
    RECOMMENDATIONS MADE  BY APPLE DISCUSSION GROUP MEMBERS
    5) Performed OS X 10.4.11 Combo Update > Retest Problems
    6) Check Ownership & Permission of the following Files
    User/You User Name/Preferences/com.apple.finder,plist
                                                                      .systempreferences.plist
                                                                       desktop.plist
                                                                       .recentitems.plist
    **All files were set to READ & WRITE
    7) Was recommended to execute Archive & Install of OS X 10.4. Tiger >Software Update > Safe Boot >Disk Utility > Repair Permissions > Retest Problem
    8) was recommended to read http://support.apple.com/kb/TA21161?viewlocale=en US  **Stated that Idid not experience symptoms outlined in document. Was informed that /tmp folder was also responsible for Copy/Paste
    9) was provided a program, /tmp to be inputted into my computer*
    * THIS IS THE NEXT STEP.  I have several questions regarding inputing the /tmp program into my computer, since this is my first attempt at entering code
    a) Do I use the Terminal program listed in the Utilities App?
    b) Do I enter the lines of code one at a time or do I copy and paste the whole program?
    c) Is there anything special I need to do to exit the program when I have completed the line by line code input or the copy/paste input?
    PLEASE REVIEW THE STEPS I HAVE TAKEN,  IF YOU HAVE RECOMMENDATIONS OR QUESTIONS FOR ME, PLEASE REPLY

    Please correct me if I am wrong.  I am only asking because of my inexperience
    "Wel, the folder should be at root of the drive"..
    No File named Show Hidden Files1.0 show in root
    "http://www.macupdate.com/app/mac/29096/show-hidden-files"
    showed option to show hidden files
    "http://www.macupdate.com/app/mac/25716/hidden-way" 
    this site just showed where you could find the Hidden File, I think
    "defaults write com.apple.finder AppleShowAllFiles -bool true" Used to show files
    "defaults write com.apple.finder AppleShowAllFiles -bool false" Used to Hide files
    file to be typed in Terminal App.. Should there be< at beginning and > at end end of each line of code?
    *Restart or Force Quit Finder required to take effect.
    When typing the code, I exited Terminal before restarting.  Could this be the reason that there is no Hidden Files listed?
    "http://www.apple.com/downloads/dashboard/developer/hiddenfiles.html"
    Site I think is in Swedish.  I have a tough enough tme being 3rd Genration Chinese .

  • ALV Reporting with drill down capabillities

    I'm creating a abap custom report using the ALV.  I want to drill down to CJ03 which is projects.  I know how to do it in regular custom reporting, but I don't seem to be able to get it to work using the ALV.  Can anyone help?
    Thanks.
    Linda

    Hi Linda,
    Take a look at this sample program. The logic to handle any interaction with the user is in my "PORCESS_USER_COMMANDS" routine.
    This is defined in the "I_CALLBACK_USER_COMMAND" parameter in the ALV FM.
    Hope this helps.
    Cheers,
    Pat.
    [code]
    Modification History
    Date      | Author    | Chg Req #     | Description
    15.08.2001| Pat Yee   | $TMP          | Program Creation
    This program is an example of how the ALV Display works.
    It will display Customer Data.
    This report will also show how to display an ALV report with different
    colored lines and icons
    REPORT zpat.
    Include Programs
    INCLUDE <icon>.
    Database Tables
    TABLES: kna1.                  "Customer Master
    Types
    TYPE-POOLS: kkblo.
    Structures
    Structure to hold the Color Information
    DATA: BEGIN OF st_color,
            color(3) TYPE c,
          END OF st_color.
    Structure to hold the Icon Information
    DATA: BEGIN OF st_icon,
            icon(4) TYPE c,
          END OF st_icon.
    ALV Field Catalog Structure
    DATA: st_fieldcat   TYPE slis_fieldcat_alv.
    ALV Layout Structure
    DATA: st_layout     TYPE slis_layout_alv.
    Internal Tables
    Output Table
    DATA: BEGIN OF tbl_kna1 OCCURS 0.
            INCLUDE STRUCTURE st_icon.   "Icon Structure
            INCLUDE STRUCTURE kna1.      "Customer Master Structure
            INCLUDE STRUCTURE st_color.  "Color Structure
    DATA: END OF tbl_kna1.
    ALV Field Catalog Table
    DATA: tbl_fieldcat  TYPE slis_t_fieldcat_alv.
    Variables
    DATA: fieldname(30) TYPE c,
          g_repid       LIKE sy-repid.
    Start of Selection
    START-OF-SELECTION.
      g_repid = sy-repid.
      PERFORM get_data.
    End of Selection
    END-OF-SELECTION.
      PERFORM do_fancy_stuff.
      PERFORM get_layout.
      PERFORM get_fieldcat.
      PERFORM create_report.
    *&      Form  CREATE_REPORT
          Learn to read the subroutine name!
    FORM create_report.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_interface_check       = ' '
                i_callback_program      = g_repid
                i_callback_user_command = 'PROCESS_USER_COMMANDS'
                it_fieldcat             = tbl_fieldcat
                i_default               = 'X'
                i_save                  = ' '
                is_layout               = st_layout
           TABLES
                t_outtab                = tbl_kna1
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                               " CREATE_REPORT
    *&      Form  GET_FIELDCAT
          Build the Field Catalog
    FORM get_fieldcat.
    Here the field catalog is created. To display more fields simply
    'uncomment' the additional lines and add the field name. Also note
    that the field catalog is much more powerful than this. You can
    intensify fields, change the colour, assign reference fields, etc.
    Look at type slis_fieldcat_alv for more options.
      PERFORM write_fieldcat USING 'ICON'  'TBL_KNA1' '    ' 'X' 1 '2' 'X'
      PERFORM write_fieldcat USING 'KUNNR' 'TBL_KNA1' 'KNA1' 'X' 2 ' ' ' '
      PERFORM write_fieldcat USING 'NAME1' 'TBL_KNA1' 'KNA1' ' ' 3 '10' ' '
                                   'X'.
      PERFORM write_fieldcat USING 'STRAS' 'TBL_KNA1' 'KNA1' ' ' 4 ' ' ' '
      PERFORM write_fieldcat USING 'TELF1' 'TBL_KNA1' 'KNA1' ' ' 5 ' ' ' '
      PERFORM write_fieldcat USING 'ORT01' 'TBL_KNA1' 'KNA1' ' ' 6 ' ' ' '
      PERFORM write_fieldcat USING 'PSTLZ' 'TBL_KNA1' 'KNA1' ' ' 7 ' ' ' '
      PERFORM write_fieldcat USING 'SORTL' 'TBL_KNA1' 'KNA1' ' ' 8 ' ' ' '
      PERFORM write_fieldcat USING 'ERNAM' 'TBL_KNA1' 'KNA1' ' ' 9 ' ' ' '
      PERFORM write_fieldcat USING 'SPRAS' 'TBL_KNA1' 'KNA1' ' ' 10 ' ' ' '
    perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 10 ' '.
    perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 11 ' '.
    perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 12 ' '.
    ENDFORM.                               " GET_FIELDCAT
    *&      Form  WRITE_FIELDCAT
          Write the Field Catalog data to the Field Catalog Table
         -->name   Field name
         -->tab    Table name
         -->st     Structure Name
         -->key    Is this field a Key?
         -->pos    Position Number
         -->length Field Length
         -->icon   Display as Icon
         -->hot    Hotspot
    FORM write_fieldcat USING name tab st key pos length icon hot.
      st_fieldcat-fieldname   = name.
      st_fieldcat-tabname     = tab.
      st_fieldcat-ref_tabname = st.
      st_fieldcat-key         = key.
      st_fieldcat-col_pos     = pos.
      st_fieldcat-outputlen   = length.
      st_fieldcat-icon        = icon.
      st_fieldcat-hotspot     = hot.
      APPEND st_fieldcat TO tbl_fieldcat.
      CLEAR st_fieldcat.
    ENDFORM.                               " WRITE_FIELDCAT
    *&      Form  PROCESS_USER_COMMANDS
          Interactive Reporting Commands
    FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
                                     selfield TYPE slis_selfield.
    This subroutine is called when there is user interaction in the output
    In this case if the user double clicks the Customer Number then the
    program will call transaction XD03 and display the Customer Master
    Data
      CASE syst-ucomm.
        WHEN '&IC1'.
    get cursor field fieldname.
          READ TABLE tbl_kna1 INDEX selfield-tabindex.
          SET PARAMETER ID 'KUN' FIELD tbl_kna1-kunnr.
          CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                               " PROCESS_USER_COMMANDS
    *&      Form  GET_LAYOUT
      set the layout of the ALV.
      add color to the row?
    FORM get_layout.
      st_layout-info_fieldname    = 'COLOR'.
      st_layout-colwidth_optimize = 'X'.
      st_layout-get_selinfos      = 'X'.
    ENDFORM.                    " GET_LAYOUT
    *&      Form  get_data
          Get some data to play with
    FORM get_data.
      SELECT * FROM kna1 INTO CORRESPONDING FIELDS OF TABLE tbl_kna1
             UP TO 30 ROWS.
    ENDFORM.                    " get_data
    *&      Form  do_fancy_stuff
          Do some fancy pants stuff for example changing the color of
          lines and adding icons
    FORM do_fancy_stuff.
    Here we will demonstrate changing the color of ALV Record lines as
    well as displaying Icons
      LOOP AT tbl_kna1.
    All records where NAME1 begins with 'M', will be displayed in Bluish
    Green
        IF tbl_kna1-name1(1) EQ 'M'.
          tbl_kna1-color = 'C41'.  "Bluish Green
          MODIFY tbl_kna1 TRANSPORTING color.
        ENDIF.
    All records with no TELF1 will be displayed in White and have a
    Warning Icon
        IF tbl_kna1-telf1 IS INITIAL.
          tbl_kna1-color = 'C00'.  "White
          tbl_kna1-icon  = '@AH@'. "Warning Icon
          MODIFY tbl_kna1 TRANSPORTING icon color.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " do_fancy_stuff[/code]

  • Get back deleted objects

    Hi colleagues,
    If I delete an object, how can I restore it? I see the object in my transport request (not released). I think that it is possible but I couldn't find out how to do it.
       Thank you very much!
              Regards, Marina

    Hi,
    1.if it is TEMP ($TMP) program then no chance of getting that.
    2.if it is Associated with Request and Not yet Transported at least once also Leave it,
    3. if it is Transported ,after that you deleted then you can Bring it back
    4. if you have Backup in to some notepad(PC file) then upload it again.
    5. final thing re write it from scratch.
    <b>Reward points</b>
    Regards

  • ALV problems

    hey guys
    I am facing a small problem:
    i written a code in to display the output in alv format.
    In that i have two tables in nested format. That is during declaration i have two tables see the sample of field-catalog declaration.
      fieldcat-tabname = 'IITEM'.
      fieldcat-fieldname = 'KUNNR'.
      fieldcat-ref_fieldname ='KUNNR'.
      fieldcat-ref_tabname ='ZVBRKVBRP'.
      fieldcat-col_pos       = '1'.
      fieldcat-seltext_m = 'Billing Doc'.
      fieldcat-seltext_l = 'Billing Doc'.
      fieldcat-seltext_s = 'Billing Doc'.
      APPEND fieldcat TO fieldtab.
      CLEAR fieldcat.
      fieldcat-tabname = 'IVBELN'.
      fieldcat-fieldname = 'POSNR'.
      fieldcat-col_pos       = '2'.
      fieldcat-seltext_m = 'Billing Item'.
      fieldcat-seltext_l = 'Billing Item'.
      fieldcat-seltext_s = 'Billing Item'.
      APPEND fieldcat TO fieldtab.
      CLEAR fieldcat.
    here IITEM is outer internal table and
    IVBELN is inner internal table.
    Although my final output of the program is working fine, but the problem is:
    i cant able to do subtotal (ctlshiftf6) according to inner internal table. is there any problem in settings or it should be hard-coded.
    I am using TYPE-POOLS : SLIS.
    Pls help me.
    Deepak

    Hi Depaak,
    I am going to assume you are using the basic function module REUSE_ALV_LIST_DISPLAY, have you tried to use the function module REUSE_ALV_HIERSEQ_LIST_DISPLAY instead? This FM allows you to define 2 internal tables with a "header" and "item" relationship.
    Here is some code demonstrating how to use this FM. You can sort and do totaling and subtotaling the usual way. Let me know if you get any problems.
    Cheers,
    Pat
    *& Report  ZPAT2                                                       *
    Modification History
    Date      | Author    | Chg Req #     | Description
    15.08.2001| Pat Yee   | $TMP          | Program Creation
    This program is an example of how the ALV Hierarchy Display works.
    It will display a sales order and it's associated line items
    REPORT  zpat2.
    Types
    TYPE-POOLS: kkblo.
    Database Tables
    TABLES: vbak, vbap.
    Structures
    DATA: st_fieldcat TYPE slis_fieldcat_alv.
    DATA: st_keyinfo TYPE slis_keyinfo_alv.
    DATA: st_sort TYPE slis_sortinfo_alv.
    DATA: st_layout TYPE slis_layout_alv.
    Internal tables
    DATA: tbl_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: tbl_sort TYPE slis_t_sortinfo_alv.
    DATA: BEGIN OF tbl_header OCCURS 0.
            INCLUDE STRUCTURE vbak.
    DATA: END OF tbl_header.
    DATA: BEGIN OF tbl_item OCCURS 0.
            INCLUDE STRUCTURE vbap.
    DATA: END OF tbl_item.
    Constants
    CONSTANTS: c_y VALUE 'X'. "Yes
    CONSTANTS: c_n VALUE ' '. "No
    Simple Variables
    DATA: field_name(30) TYPE c,
          g_repid        like sy-repid.
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK sel_options WITH FRAME TITLE text-tt1.
    SELECT-OPTIONS s_vbeln FOR vbak-vbeln.
    SELECTION-SCREEN END OF BLOCK sel_options.
    Start of Selection
    START-OF-SELECTION.
    Get the Report ID
      g_repid = sy-repid.
    Select data from the Sales Document Header Table
      SELECT * FROM vbak INTO TABLE tbl_header
        WHERE vbeln IN s_vbeln.
    Select the relevant Sales Document Item data
      SELECT * FROM vbap INTO TABLE tbl_item
        FOR ALL ENTRIES IN tbl_header
        WHERE vbeln = tbl_header-vbeln.
    End of Selection
    END-OF-SELECTION.
      PERFORM get_keyinfo.
      PERFORM get_layout.
      PERFORM get_sort.
      PERFORM get_fieldcat.
      PERFORM create_report.
    *&      Form  get_fieldcat
          text
    FORM get_fieldcat.
    Here the field catalog is created. To display more fields simply
    'uncomment' the additional lines and add the field name. Also note
    that the field catalog is much more powerful than this. You can
    intensify fields, change the colour, assign reference fields, etc.
    Look at type slis_fieldcat_alv for more options.
    Header
      PERFORM write_fieldcat USING 'VBELN' 'TBL_HEADER' 'VBAK' c_y 1
                                   c_n c_y c_n c_n.
      PERFORM write_fieldcat USING 'ERDAT' 'TBL_HEADER' 'VBAK' c_n 2
                                   c_n c_n c_n c_y.
      PERFORM write_fieldcat USING 'AUDAT' 'TBL_HEADER' 'VBAK' c_n 3
                                   c_n c_n c_n c_n.
      PERFORM write_fieldcat USING 'VBTYP' 'TBL_HEADER' 'VBAK' c_n 4
                                   c_n c_n c_n c_n.
      PERFORM write_fieldcat USING 'WAERK' 'TBL_HEADER' 'VBAK' c_n 5
                                     c_n c_n c_n c_n.
      PERFORM write_fieldcat USING 'VKBUR' 'TBL_HEADER' 'VBAK' c_n 6
                                     c_n c_n c_n c_y.
    perform write_fieldcat using '     ' 'TBL_HEADER' 'VBAK' ' ' 7.
    perform write_fieldcat using '     ' 'TBL_HEADER' 'VBAK' ' ' 8.
    perform write_fieldcat using '     ' 'TBL_HEADER' 'VBAK' ' ' 9.
    perform write_fieldcat using '     ' 'TBL_HEADER' 'VBAK' ' ' 10.
    Item
      PERFORM write_fieldcat USING 'POSNR' 'TBL_ITEM' 'VBAP' c_y 1
                                     c_n c_n c_n c_n.
      PERFORM write_fieldcat USING 'MATNR' 'TBL_ITEM' 'VBAP' c_n 2
                                     'C411' c_n c_n c_n.
      PERFORM write_fieldcat USING 'NETPR' 'TBL_ITEM' 'VBAP' c_n 3
                                     'C300' c_n c_y c_n.
      PERFORM write_fieldcat USING 'PRCTR' 'TBL_ITEM' 'VBAP' c_n 4
                                     c_n c_n c_n 'X'.
      PERFORM write_fieldcat USING 'GSBER' 'TBL_ITEM' 'VBAP' c_n 5
                                     c_n c_n c_n 'X'.
      PERFORM write_fieldcat USING 'WERKS' 'TBL_ITEM' 'VBAP' c_n 6
                                     c_n c_n c_n 'X'.
      PERFORM write_fieldcat USING 'AUFNR' 'TBL_ITEM' 'VBAP' c_n 7
                                     'C611' c_n c_n c_n.
    perform write_fieldcat using '     ' 'TBL_ITEM' 'VBAP' ' ' 8.
    perform write_fieldcat using '     ' 'TBL_ITEM' 'VBAP' ' ' 9.
    perform write_fieldcat using '     ' 'TBL_ITEM' 'VBAP' ' ' 10.
    perform write_fieldcat using '     ' 'TBL_ITEM' 'VBAP' ' ' 11.
    perform write_fieldcat using '     ' 'TBL_ITEM' 'VBAP' ' ' 12.
    ENDFORM.                    " get_fieldcat
    *&      Form  write_fieldcat
          text
         -->name   Field name
         -->tab    Table name
         -->st     Structure Name
         -->key    Is this field a Key?
         -->pos    Position Number
         -->emp    Emphasize
         -->hot    Hotspot
         -->sum    Do_sum
         -->hide   No_out
    FORM write_fieldcat USING    name tab st key pos emp hot sum hide.
      st_fieldcat-fieldname = name.
      st_fieldcat-tabname = tab.
      st_fieldcat-ref_tabname = st.
      st_fieldcat-key = key.
      st_fieldcat-col_pos = pos.
      st_fieldcat-emphasize = emp.
      st_fieldcat-hotspot = hot.
      st_fieldcat-do_sum = sum.
      st_fieldcat-no_out = hide.
      APPEND st_fieldcat TO tbl_fieldcat.
      CLEAR st_fieldcat.
    ENDFORM.                    " write_fieldcat
    *&      Form  create_report
          Hummmm I wonder what this subroutine does?
    FORM create_report.
    Here we call the Function Module to create the Hierarchical
    Sequential List
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
         i_interface_check              = ' '
         i_callback_program             = g_repid
         i_callback_user_command        = 'PROCESS_USER_COMMANDS'
         is_layout                      = st_layout
         it_fieldcat                    = tbl_fieldcat
         it_sort                        = tbl_sort
         i_default                      = 'X'
         i_save                         = 'A'
         is_variant                     = ' '
          i_tabname_header               = 'TBL_HEADER'
          i_tabname_item                 = 'TBL_ITEM'
          is_keyinfo                     = st_keyinfo
        TABLES
          t_outtab_header                = tbl_header
          t_outtab_item                  = tbl_item
       EXCEPTIONS
         program_error                  = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " create_report
    *&      Form  get_keyinfo
          text
    FORM get_keyinfo.
    This defines the "link" between the "header" and "item" tables
      st_keyinfo-header01 = 'VBELN'.
    ENDFORM.                    " get_keyinfo
    *&      Form  get_sort
          text
    FORM get_sort.
    Here we sort the report by the Document Number...why not?
      REFRESH tbl_sort.
      CLEAR st_sort.
      st_sort-spos = 1.
      st_sort-fieldname = 'VBELN'.
      st_sort-up = 'X'.
      APPEND st_sort TO tbl_sort.
    ENDFORM.                    " get_sort
          FORM process_user_commands                                    *
          Interactive Reporting commands
    -->  SYST-UCOMM                                                    *
    -->  SELFIELD                                                      *
    FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
                                     selfield TYPE slis_selfield.
    This subroutine is called when there is user interaction in the output
    In this case if the user double clicks the Document Number then the
    program will call transaction VA03 and display the Sales Document
      CASE syst-ucomm.
        WHEN '&IC1'.
          GET CURSOR FIELD field_name.
          IF field_name = 'TBL_HEADER-VBELN'.
            READ TABLE tbl_header INDEX selfield-tabindex.
            CHECK tbl_header-vbeln NE 0.
            SET PARAMETER ID 'AUN' FIELD tbl_header-vbeln.
            CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                  "process_user_commands
    *&      Form  get_layout
          text
    FORM get_layout.
    Here we manipulate the layout of the list. In this instance we are
    giving the list a 'zebra' format. Once again like the field catalog
    there are many more options available. Look at type slis_layout_alv
    for more options.
      CLEAR st_layout.
      st_layout-zebra = 'X'.
    ENDFORM.                    " get_layout

  • BDC Grid Issue

    Hi All,
    I have created a BDC for transaction F-44. I have 2 problems:
    a) Once I enter the Vendor code on the main screen and select "Document No" as the input option, the next screen presents me with a set of text boxes to enter the document nos. This is not a grid, its just a set of text boxes. The no. of rows of these boxes changes with resolution. How can I tackle this in my BDC? There are no Pageup-PageDn options on the screen either.
    b) Beyond that the next screen shows these document nos. in a table control. I need to scroll to a required record and update the value there. I am not sure how to handle the Table Control in BDC.
    All help is appreciated.
    Regards,
    Madhur

    Hi Madhur ,
    You  mean to say the table control is like a check box entry with no scroll bar .
    Did u check the option of pushbuttons other selection/other account/process open items .    
    in the screen for t-code f-44 
    1.     Enter the first entry as normal , second entry I mean the document number and make a recording , store the code in a $TMP program say PROG1 (same as u r doing).
    2.     Now do the recording for the first item as manual and then for the second item do it with going to ‘OTHER SELECTION’  which is same , u’ll get a subscreen asking for again , amount /document number etc in PROG2 and $tmp.
    3.     select the document number and proceed . do the recording similarly for the third item and save the recording .
    4.     if u look in here carefully  compare the prog1 and prog2 .
    5.     u’ll find a difference in the cursor alignment from both the programs .
    6.     u’ll find the extra coding for a screen(the subscreen where u have entered document number as the radiobutton) in PROG2 for u have explicitly selected Document number , remember this .
    7.     this is the cursor alignment that u need to handle .
    8.     see the case is simple it is giving u a check box screen instead of a scroll page option as there are multilple entries u can make  on amount , document list etc .. I mean to say all the radiobutton in the subscreen.
    9.     so the solution can be the recording as per prog 2 as the cursor is set to that particular item number .
    10.     capture this in ur code , mainly concentrate where the cursor is taking u , clear the item and increment by 10 everytime and check for every hit in the itab .
      just proceed like this ,
    regards,
    vijay.

  • ORA-01017 encountered while executing shell scripts

    Hi,
    While executing backup scripts for one of my databases, the script contains a login section which fails as shown below
    Script login section:
    sqlplus / << END > /tmp/$PROGRAM.tmp
    Error generatedf in logfile:
    SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 10 11:32:06 2013
    Copyright (c) 1982, 2011, Oracle. All rights reserved.
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Couple of points to be noted:
    1) There are two other databases in the same server and they don't have any issue
    2) I am able to login into this database as "/"
    3) I am able to connect to the same databases as sysdba from another server
    4) The script runs successfully when I modify it as: sqlplus / as sysdba << END > /tmp/$PROGRAM.tmp

    if you connect sqlplus as
    $ sqlplus /You're not identifying that's why you got ORA-01017
    instead if you connect as "sqlplus / as sysdba" , check:
    sqlplus / as sysdba--how it works
    ===========================================
    please mark your threads as answered when you got the correct answer:
          866746     
    Handle:      866746 
    Status Level:      Newbie
    Registered:      Jun 18, 2011
    Total Posts:      3
    Total Questions:      3 (3 unresolved)Edited by: Fran on 12-abr-2013 3:47

  • How to change program from own develop class to $tmp

    hi,
    i m creating one program and stored under the development class ZFM.
    how can i change my own development class to $tmp(local object)i don;t want to use development class ZFM changed to $tmp

    1. SE38
    2. Give Program Name
    3. Use menupath: Goto-> Object Directory Entry
    4. Click on Display/Change in popup window
    5. Change the package to $tmp
    Make sure the object is not locked under any request.
    Kind Regards
    Eswar

Maybe you are looking for

  • Firefox-hg not updated in a while

    I have been using firefox-hg for quite a while, and have been happy with it.  Recently, I noticed that it has not updated, even though I update quite frequently. It keeps failing, so I ran the install specifically and recieved the following output: 5

  • How to send a photo by email

    I want to send a photo to Geico Insurance company, Geico. How do I do it?

  • Airplay movie stops and start over again

    I have problem with AirPlay while watching play-channels from my iPad. After a while the program just starts over again. What can I do to fix this?

  • ITunes 7 will only run with date in application name. Why????

    Hi, I upgraded to iTunes 7 and could not get it to run. After the license agreement I would get an error -50 message. Somehow, during some messing around, I noticed that the application name had changed from iTunes to iTunes 06-10-04 I don't know how

  • Unable to install oracle provider for ole db

    clicking on setup.exe shows up busy window for a few sec and then disappears nothing shows up on the screen, no error message of any kind