Backup all Z reports

HI Experts,
                my DEV server will undergo updation. so I need to take backup of all my Z reports. Should I save them to my local hard disk with all functionalities. How do I do. Is it possible. So that when DEV server is ready I can again send them back.
Thanks.
Khan

[code]*  Download and Upload your ABAP program from/to your local harddisk.
Allows individual or mass transfering of ABAP program.
Before using, create a folder c:\Source
REPORT ZDOWN_UP_LOAD
        NO STANDARD PAGE HEADING
        LINE-SIZE  255.
Declare Database Objects
tables:
   DOKIL,
   TRDIR.
Constants
CONSTANTS:
   MC_TRDIR_IDENTIFIER(72)  TYPE C VALUE '%&%& RDIR',
   MC_REPORT_IDENTIFIER(72) TYPE C VALUE '%&%& REPO',
   MC_TEXT_IDENTIFIER(72)   TYPE C VALUE '%&%& TEXP',
   MC_THEAD_IDENTIFIER(72)  TYPE C VALUE '%&%& HEAD',
   MC_DOC_IDENTIFIER(72)    TYPE C VALUE '%&%& DOKL',
   MC_TRDIR_SHORT(4)        TYPE C VALUE 'RDIR',
   MC_REPORT_SHORT(4)       TYPE C VALUE 'REPO',
   MC_TEXT_SHORT(4)         TYPE C VALUE 'TEXP',
   MC_THEAD_SHORT(4)        TYPE C VALUE 'HEAD',
   MC_DOC_SHORT(4)          TYPE C VALUE 'DOKP'.
Declare Module level data structures
DATA: BEGIN OF MTAB_PROGRAM_SOURCE OCCURS 0,
         LINE(256) TYPE C,
       END OF MTAB_PROGRAM_SOURCE.
DATA: MTAB_PROGRAM_TRDIR LIKE TRDIR OCCURS 0 WITH HEADER LINE.
DATA: MTAB_PROGRAM_TEXTS LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
DATA: MSTR_THEAD LIKE THEAD.
DATA: BEGIN OF MTAB_PROGRAM_FILE OCCURS 0,
         LINE(275) TYPE C,
       END OF MTAB_PROGRAM_FILE.
DATA: BEGIN OF MTAB_DIRECTORY OCCURS 0,
         NAME LIKE TRDIR-NAME,
         DESC(72) TYPE C,
         SAVENAME LIKE RLGRAP-FILENAME,
       END OF MTAB_DIRECTORY.
DATA: BEGIN OF MTAB_PROGRAM_DOCUMENTATION OCCURS 0,
         LINE(255) TYPE C,
       END OF MTAB_PROGRAM_DOCUMENTATION.
Selection Screen
*-- Options for upload/download of programs
SELECTION-SCREEN BEGIN OF BLOCK FRM_OPTIONS WITH FRAME TITLE TEXT-UDL.
PARAMETERS:
   RB_DOWN RADIOBUTTON GROUP UDL DEFAULT 'X'.       " Download reports
SELECTION-SCREEN BEGIN OF BLOCK FRM_TRDIR WITH FRAME TITLE TEXT-DIR.
SELECT-OPTIONS:
   S_NAME  FOR TRDIR-NAME,              " Program Name
   S_SUBC  FOR TRDIR-SUBC               " Program Type
           DEFAULT 'F' OPTION EQ SIGN E," Exclude Functions by default
   S_CNAM  FOR TRDIR-CNAM               " Created by
           DEFAULT SY-UNAME,
   S_UNAM  FOR TRDIR-UNAM,              " Last Changed by
   S_CDAT  FOR TRDIR-CDAT,              " Creation date
   S_UDAT  FOR TRDIR-UDAT.              " Last update date
SELECTION-SCREEN END OF BLOCK FRM_TRDIR.
*-- Options for uploading programs
PARAMETERS:
   RB_UP   RADIOBUTTON GROUP UDL.       " Upload reports
SELECTION-SCREEN BEGIN OF BLOCK FRM_UPLOAD WITH FRAME TITLE TEXT-UPL.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(29) TEXT-SNG.
PARAMETERS:
   RB_FILE RADIOBUTTON GROUP HOW DEFAULT 'X'.
SELECTION-SCREEN COMMENT 33(42) TEXT-FNA.
SELECTION-SCREEN END OF LINE.
PARAMETERS:
   RB_LIST RADIOBUTTON GROUP HOW.
SELECTION-SCREEN END OF BLOCK FRM_UPLOAD.
SELECTION-SCREEN END OF BLOCK FRM_OPTIONS.
*-- Options for up/downloading programs
SELECTION-SCREEN BEGIN OF BLOCK FRM_FILEN WITH FRAME TITLE TEXT-FIL.
PARAMETERS:
   RB_DOS  RADIOBUTTON GROUP FIL DEFAULT 'X', " Save to local
   RB_UNIX RADIOBUTTON GROUP FIL,       " Save to UNIX
   P_PATH  LIKE RLGRAP-FILENAME         " Path to save files to
         DEFAULT 'c:\Source\'.
SELECTION-SCREEN END OF BLOCK FRM_FILEN.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-LOW.
   CALL FUNCTION 'F4_PROGRAM'
        EXPORTING
             OBJECT             = S_NAME-LOW
             SUPPRESS_SELECTION = 'X'
        IMPORTING
             RESULT             = S_NAME-LOW
        EXCEPTIONS
             OTHERS             = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-HIGH.
   CALL FUNCTION 'F4_PROGRAM'
        EXPORTING
             OBJECT             = S_NAME-HIGH
             SUPPRESS_SELECTION = 'X'
        IMPORTING
             RESULT             = S_NAME-HIGH
        EXCEPTIONS
             OTHERS             = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-LOW.
   PERFORM GET_NAME USING 'S_UNAM-LOW'
                 CHANGING S_UNAM-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-HIGH.
   PERFORM GET_NAME USING 'S_UNAM-HIGH'
                 CHANGING S_UNAM-HIGH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-LOW.
   PERFORM GET_NAME USING 'S_CNAM-LOW'
                 CHANGING S_CNAM-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-HIGH.
   PERFORM GET_NAME USING 'S_CNAM-HIGH'
                 CHANGING S_CNAM-HIGH.
TOP-OF-PAGE.
   IF RB_LIST = 'X'.
     FORMAT COLOR COL_HEADING.
     NEW-LINE.
     WRITE: AT 3 TEXT-H01,
            AT 15 TEXT-H03.
     FORMAT COLOR OFF.
   ENDIF.
AT LINE-SELECTION.
   CHECK RB_LIST = 'X'.                 " only do in list mode
   READ LINE SY-CUROW FIELD VALUE MTAB_DIRECTORY-SAVENAME.
*-- Read file into an internal table
   PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
                                 USING  MTAB_DIRECTORY-SAVENAME.
*-- Split table into TADIR entry, report lines, and report text
   PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
                                      MTAB_PROGRAM_SOURCE
                                      MTAB_PROGRAM_TEXTS
                                      MTAB_PROGRAM_DOCUMENTATION
                             CHANGING TRDIR
                                      MSTR_THEAD.
*-- Save all of the data
   PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
                                    MTAB_PROGRAM_TEXTS
                                    MTAB_PROGRAM_DOCUMENTATION
                             USING  TRDIR
                                    MSTR_THEAD.
Start of processing
START-OF-SELECTION.
   FORMAT COLOR COL_NORMAL.
   IF RB_DOWN = 'X'.
     PERFORM DOWNLOAD_REPORTS.
   ELSEIF RB_UP = 'X'.
     PERFORM UPLOAD_REPORTS.
   ENDIF.
END-OF-SELECTION.
   IF RB_DOWN = 'X'.
     CONCATENATE P_PATH
                 'directory.txt'
       INTO P_PATH.
     PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_DIRECTORY
                                USING  P_PATH.
   ENDIF.
      FORM UPLOAD_REPORTS                                           *
FORM UPLOAD_REPORTS.
*-- Can upload a reports entered in selection criteria or
*-- select from a list.  List can be from index.txt in same directory
*-- (created by the download) or by reading the first line of each file
*-- in the directory.
   IF RB_FILE = 'X'. " Upload single program from a file
*-- Read file into an internal table
     PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
                                   USING  P_PATH.
*-- Split table into TADIR entry, report lines, and report text
     PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
                                        MTAB_PROGRAM_SOURCE
                                        MTAB_PROGRAM_TEXTS
                                        MTAB_PROGRAM_DOCUMENTATION
                               CHANGING TRDIR
                                        MSTR_THEAD.
*-- Save all of the data
     PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
                                      MTAB_PROGRAM_TEXTS
                                      MTAB_PROGRAM_DOCUMENTATION
                               USING  TRDIR
                                      MSTR_THEAD.
   ELSEIF RB_LIST = 'X'. " Show list for user to choose from
*-- get list of report names/descriptions from directory text
     CONCATENATE P_PATH
                 'directory.txt'
     INTO P_PATH.
     PERFORM READ_REPORT_FROM_DISK TABLES MTAB_DIRECTORY
                                   USING  P_PATH.
     SORT MTAB_DIRECTORY.
*-- Write out list of report names/descriptions
     LOOP AT MTAB_DIRECTORY.
       WRITE:
         / MTAB_DIRECTORY-NAME UNDER TEXT-H01,
           MTAB_DIRECTORY-DESC UNDER TEXT-H03,
           MTAB_DIRECTORY-SAVENAME.
     ENDLOOP.
*-- Process user selections for reports to upload.
   ENDIF.
ENDFORM.                               " upload_reports
      FORM DOWNLOAD_REPORTS                                         *
      From the user selections, get all programs that meet the      *
      criteria, and save them in ftab_program_directory.            *
      Also save the report to disk.                                 *
FORM DOWNLOAD_REPORTS.
   DATA:
     LC_FULL_FILENAME LIKE RLGRAP-FILENAME.
*-- The table is put into an internal table because the program will
*-- abend if multiple transfers to a dataset occur within a SELECT/
*-- ENDSELCT (tested on 3.1H)
   SELECT * FROM  TRDIR
          INTO TABLE MTAB_PROGRAM_TRDIR
          WHERE  NAME  IN S_NAME
          AND    SUBC  IN S_SUBC
          AND    CNAM  IN S_CNAM
          AND    UNAM  IN S_UNAM
          AND    CDAT  IN S_CDAT
          AND    UDAT  IN S_UDAT.
   LOOP AT MTAB_PROGRAM_TRDIR.
*-- Clear out text and source code tables
     CLEAR:
       MTAB_PROGRAM_FILE,
       MTAB_PROGRAM_SOURCE,
       MTAB_PROGRAM_TEXTS,
       MTAB_PROGRAM_DOCUMENTATION.
     REFRESH:
       MTAB_PROGRAM_FILE,
       MTAB_PROGRAM_SOURCE,
       MTAB_PROGRAM_TEXTS,
       MTAB_PROGRAM_DOCUMENTATION.
*-- Get the report
     READ REPORT MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_SOURCE.
*-- Get the text for the report
     READ TEXTPOOL MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_TEXTS.
*-- Get the documentation for the report
     CLEAR DOKIL.
     SELECT * UP TO 1 ROWS FROM DOKIL
            WHERE  ID          = 'RE'
            AND    OBJECT      = MTAB_PROGRAM_TRDIR-NAME
            AND    LANGU       = SY-LANGU
            AND    TYP         = 'E'
            ORDER BY VERSION DESCENDING.
     ENDSELECT.
*-- Documentation exists for this object
     IF SY-SUBRC = 0.
       CALL FUNCTION 'DOCU_READ'
            EXPORTING
                 ID      = DOKIL-ID
                 LANGU   = DOKIL-LANGU
                 OBJECT  = DOKIL-OBJECT
                 TYP     = DOKIL-TYP
                 VERSION = DOKIL-VERSION
            IMPORTING
                 HEAD    = MSTR_THEAD
            TABLES
                 LINE    = MTAB_PROGRAM_DOCUMENTATION
            EXCEPTIONS
                 OTHERS  = 1.
     ENDIF.
*-- Put the report code and texts into a single file
*-- Put the identifier line in so that the start of the TRDIR line
*-- is marked
     CONCATENATE MC_TRDIR_IDENTIFIER
     MTAB_PROGRAM_TRDIR-NAME
     INTO MTAB_PROGRAM_FILE-LINE.
     APPEND MTAB_PROGRAM_FILE.
*-- Add the TRDIR line
     MTAB_PROGRAM_FILE-LINE = MTAB_PROGRAM_TRDIR.
     APPEND MTAB_PROGRAM_FILE.
*-- Put the identifier line in so that the start of the report code
*-- is marked
     CONCATENATE MC_REPORT_IDENTIFIER
                 MTAB_PROGRAM_TRDIR-NAME
       INTO MTAB_PROGRAM_FILE-LINE.
     APPEND MTAB_PROGRAM_FILE.
*-- Add the report code
     LOOP AT MTAB_PROGRAM_SOURCE.
       MTAB_PROGRAM_FILE = MTAB_PROGRAM_SOURCE.
       APPEND MTAB_PROGRAM_FILE.
     ENDLOOP.
*-- Put the identifier line in so that the start of the report text
*-- is marked
     CONCATENATE MC_TEXT_IDENTIFIER
                 MTAB_PROGRAM_TRDIR-NAME
       INTO MTAB_PROGRAM_FILE-LINE.
     APPEND MTAB_PROGRAM_FILE.
*-- Add the report texts
     LOOP AT MTAB_PROGRAM_TEXTS.
       MTAB_PROGRAM_FILE-LINE = MTAB_PROGRAM_TEXTS-ENTRY .
       APPEND MTAB_PROGRAM_FILE.
     ENDLOOP.
*-- Put the identifier line in so that the start of the THEAD record
*-- is marked
     CONCATENATE MC_THEAD_IDENTIFIER
                 MTAB_PROGRAM_TRDIR-NAME
       INTO MTAB_PROGRAM_FILE-LINE.
     APPEND MTAB_PROGRAM_FILE.
     MTAB_PROGRAM_FILE = MSTR_THEAD.
     APPEND MTAB_PROGRAM_FILE.
*-- Put the identifier line in so that the start of the report
*-- documentation is marked
     CONCATENATE MC_DOC_IDENTIFIER
                 MTAB_PROGRAM_TRDIR-NAME
       INTO MTAB_PROGRAM_FILE-LINE.
     APPEND MTAB_PROGRAM_FILE.
*-- Add the report documentation
     LOOP AT MTAB_PROGRAM_DOCUMENTATION.
       MTAB_PROGRAM_FILE = MTAB_PROGRAM_DOCUMENTATION.
       APPEND MTAB_PROGRAM_FILE.
     ENDLOOP.
*-- Make the fully pathed filename that report will be saved to
     CONCATENATE P_PATH
                 MTAB_PROGRAM_TRDIR-NAME
                 '.txt'
       INTO LC_FULL_FILENAME.
     PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_PROGRAM_FILE
                                USING  LC_FULL_FILENAME.
*-- Write out message with Program Name/Description
     READ TABLE MTAB_PROGRAM_TEXTS WITH KEY ID = 'R'.
     IF SY-SUBRC = 0.
       MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
       MTAB_DIRECTORY-DESC = MTAB_PROGRAM_TEXTS-ENTRY.
       MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
       APPEND MTAB_DIRECTORY.
       WRITE: / MTAB_PROGRAM_TRDIR-NAME,
                MTAB_PROGRAM_TEXTS-ENTRY(65) COLOR COL_HEADING.
     ELSE.
       MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
       MTAB_DIRECTORY-DESC = 'No description available'.
       MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
       APPEND MTAB_DIRECTORY.
       WRITE: / MTAB_PROGRAM_TRDIR-NAME.
     ENDIF.
   ENDLOOP.
ENDFORM.                               " BUILD_PROGRAM_DIRECTORY
      FORM SAVE_TABLE_TO_FILE                                       *
-->  FTAB_TABLE                                                    *
-->  F_FILENAME                                                    *
FORM SAVE_TABLE_TO_FILE TABLES FTAB_TABLE
                         USING  F_FILENAME.
   IF RB_DOS = 'X'.                  " Save file to presentation server
     CALL FUNCTION 'WS_DOWNLOAD'
          EXPORTING
               FILENAME = F_FILENAME
               FILETYPE = 'ASC'
          TABLES
               DATA_TAB = FTAB_TABLE
          EXCEPTIONS
               OTHERS   = 4.
     IF SY-SUBRC NE 0.
       WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
                F_FILENAME COLOR COL_NEGATIVE.
     ENDIF.
   ELSE.                                " Save file to application serve
     OPEN DATASET F_FILENAME FOR OUTPUT IN TEXT MODE encoding default.
     IF SY-SUBRC = 0.
       LOOP AT FTAB_TABLE.
         TRANSFER FTAB_TABLE TO F_FILENAME.
         IF SY-SUBRC NE 0.
           WRITE: / 'Error writing record to file;' COLOR COL_NEGATIVE,
                    F_FILENAME COLOR COL_NEGATIVE.
         ENDIF.
       ENDLOOP.
     ELSE.
       WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
                F_FILENAME COLOR COL_NEGATIVE.
     ENDIF.
   ENDIF.                               " End RB_DOS
ENDFORM.                               " SAVE_PROGRAM
      FORM READ_REPORT_FROM_DISK                                    *
      Read report into internal table.  Can read from local or      *
      remote computer                                               *
FORM READ_REPORT_FROM_DISK TABLES FTAB_TABLE
                            USING  F_FILENAME.
   DATA:
      LC_MESSAGE(128) TYPE C.
   CLEAR   FTAB_TABLE.
   REFRESH FTAB_TABLE.
   IF RB_DOS = 'X'.
     TRANSLATE F_FILENAME USING '/\'.   " correct slash for Dos PC file
     CALL FUNCTION 'WS_UPLOAD'
          EXPORTING
               FILENAME            = F_FILENAME
               FILETYPE            = 'ASC'
          TABLES
               DATA_TAB            = FTAB_TABLE
          EXCEPTIONS
               CONVERSION_ERROR    = 1
               FILE_OPEN_ERROR     = 2
               FILE_READ_ERROR     = 3
               INVALID_TABLE_WIDTH = 4
               INVALID_TYPE        = 5
               NO_BATCH            = 6
               UNKNOWN_ERROR       = 7
               OTHERS              = 8.
     IF SY-SUBRC >< 0.
       WRITE: / 'Error reading file from local PC' COLOR COL_NEGATIVE.
     ENDIF.
   ELSEIF RB_UNIX = 'X'.
     TRANSLATE F_FILENAME USING '\/'.   " correct slash for unix
     OPEN DATASET F_FILENAME FOR INPUT MESSAGE LC_MESSAGE IN TEXT MODE encoding default.
     IF SY-SUBRC = 0.
       DO.
         READ DATASET F_FILENAME INTO FTAB_TABLE.
         IF SY-SUBRC = 0.
           APPEND FTAB_TABLE.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
       CLOSE DATASET F_FILENAME.
     ELSE.
       WRITE: / 'Error reading file from remote computer'
                       COLOR COL_NEGATIVE,
              / LC_MESSAGE,
              / F_FILENAME.
       SY-SUBRC = 4.
     ENDIF.
   ENDIF.
ENDFORM.                               " READ_REPORT_FROM_DISK
      FORM SPLIT_INCOMING_FILE                                      *
-->  FTAB_PROGRAM_FILE                                             *
-->  FTAB_PROGRAM_SOURCE                                           *
-->  `                                                             *
-->  FTAB_PROGRAM_TEXTS                                            *
FORM SPLIT_INCOMING_FILE TABLES FTAB_PROGRAM_FILE
                                      STRUCTURE MTAB_PROGRAM_FILE
                                 FTAB_PROGRAM_SOURCE
                                      STRUCTURE MTAB_PROGRAM_SOURCE
                                 FTAB_PROGRAM_TEXTS
                                      STRUCTURE MTAB_PROGRAM_TEXTS
                                 FTAB_PROGRAM_DOCUMENTATION
                                   STRUCTURE MTAB_PROGRAM_DOCUMENTATION
                        CHANGING FSTR_TRDIR
                                 FSTR_THEAD.
   DATA:
     LC_DATATYPE(4) TYPE C,             " Type of data, REPO, TEXP, RDIR
     LC_PROGRAM_FILE LIKE MTAB_PROGRAM_FILE.
   LOOP AT FTAB_PROGRAM_FILE.
     LC_PROGRAM_FILE = FTAB_PROGRAM_FILE.
     CASE LC_PROGRAM_FILE(9).
       WHEN MC_TRDIR_IDENTIFIER.
         LC_DATATYPE = MC_TRDIR_SHORT.
       WHEN MC_REPORT_IDENTIFIER.
         LC_DATATYPE = MC_REPORT_SHORT.
       WHEN MC_TEXT_IDENTIFIER.
         LC_DATATYPE = MC_TEXT_SHORT.
       WHEN MC_DOC_IDENTIFIER.
         LC_DATATYPE = MC_DOC_SHORT.
       WHEN MC_THEAD_IDENTIFIER.
         LC_DATATYPE = MC_THEAD_SHORT.
       WHEN OTHERS. " Actual contents of report, trdir, or text
         CASE LC_DATATYPE.
           WHEN MC_TRDIR_SHORT.
             FSTR_TRDIR = FTAB_PROGRAM_FILE.
           WHEN MC_REPORT_SHORT.
             FTAB_PROGRAM_SOURCE = FTAB_PROGRAM_FILE.
             APPEND FTAB_PROGRAM_SOURCE.
           WHEN MC_TEXT_SHORT.
             FTAB_PROGRAM_TEXTS-key = FTAB_PROGRAM_FILE-line.
             APPEND FTAB_PROGRAM_TEXTS.
           WHEN MC_THEAD_SHORT.
             FSTR_THEAD = FTAB_PROGRAM_FILE.
           WHEN MC_DOC_SHORT.
             FTAB_PROGRAM_DOCUMENTATION = FTAB_PROGRAM_FILE.
             APPEND FTAB_PROGRAM_DOCUMENTATION.
         ENDCASE.
     ENDCASE.
   ENDLOOP.
ENDFORM.                               " SPLIT_INCOMING_FILE
      FORM INSERT_NEW_REPORT                                        *
-->  FTAB_PROGRAM_SOURCE                                           *
-->  FTAB_PROGRAM_TEXTS                                            *
-->  F_TRDIR                                                       *
FORM INSERT_NEW_REPORT TABLES FTAB_PROGRAM_SOURCE
                                   STRUCTURE MTAB_PROGRAM_SOURCE
                               FTAB_PROGRAM_TEXTS
                                    STRUCTURE MTAB_PROGRAM_TEXTS
                               FTAB_PROGRAM_DOCUMENTATION
                                    STRUCTURE MTAB_PROGRAM_DOCUMENTATION
                        USING  FSTR_TRDIR LIKE TRDIR
                               FSTR_THEAD LIKE MSTR_THEAD.
   DATA:
     LC_OBJ_NAME LIKE E071-OBJ_NAME,
     LC_LINE2(40)     TYPE C,
     LC_ANSWER(1)     TYPE C.
*-- read trdir to see if the report already exists, if it does, prompt
*-- user to overwrite or abort.
   SELECT SINGLE * FROM TRDIR WHERE NAME = FSTR_TRDIR-NAME.
   IF SY-SUBRC = 0.                     " Already exists
     CONCATENATE 'want to overwrite report'
                 FSTR_TRDIR-NAME
       INTO LC_LINE2 SEPARATED BY SPACE.
     CONCATENATE LC_LINE2
       INTO LC_LINE2.
     CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
          EXPORTING
              DEFAULTOPTION  = 'N'
              TEXTLINE1   = 'The selected report already exists, do you'
              TEXTLINE2      = LC_LINE2
              TITEL          = 'Report already exists'
              CANCEL_DISPLAY = SPACE
          IMPORTING
               ANSWER         = LC_ANSWER
          EXCEPTIONS
               OTHERS         = 1.
   ELSE.
     LC_ANSWER = 'J'.
   ENDIF.
   IF LC_ANSWER = 'J'.
*-- Create the TADIR entry.  (TRDIR entry created by INSERT REPORT)
     LC_OBJ_NAME = TRDIR-NAME.
     CALL FUNCTION 'TR_TADIR_POPUP_ENTRY_E071'
          EXPORTING
               WI_E071_PGMID     = 'R3TR'
               WI_E071_OBJECT    = 'PROG'
               WI_E071_OBJ_NAME  = LC_OBJ_NAME
               WI_TADIR_DEVCLASS = '$TMP'
          EXCEPTIONS
               EXIT              = 3
               OTHERS            = 4.
     IF SY-SUBRC = 0.
*-- Create Report
       INSERT REPORT FSTR_TRDIR-NAME FROM FTAB_PROGRAM_SOURCE.
*-- Create Texts
       INSERT TEXTPOOL FSTR_TRDIR-NAME FROM FTAB_PROGRAM_TEXTS
              LANGUAGE SY-LANGU.
*-- Save Documentation
       CALL FUNCTION 'DOCU_UPDATE'
            EXPORTING
                 HEAD    = FSTR_THEAD
                 STATE   = 'A'
                 TYP     = 'E'
                 VERSION = '1'
            TABLES
                 LINE    = FTAB_PROGRAM_DOCUMENTATION
            EXCEPTIONS
                 OTHERS  = 1.
     ELSE.
       WRITE: / 'Error updating the TADIR entry' COLOR COL_NEGATIVE,
                'Program' COLOR COL_NEGATIVE INTENSIFIED OFF,
                FSTR_TRDIR-NAME, 'was not loaded into SAP.'
                   COLOR COL_NEGATIVE INTENSIFIED OFF.
     ENDIF.
   ELSE.
     WRITE: / FSTR_TRDIR-NAME COLOR COL_NEGATIVE,
              'was not uploaded into SAP.  Action cancelled by user'
                  COLOR COL_NEGATIVE INTENSIFIED OFF.
   ENDIF.
ENDFORM.                               " INSERT_NEW_REPORT
      FORM GET_NAME                                                 *
-->  VALUE(F_FIELD)                                                *
-->  F_NAME                                                        *
FORM GET_NAME USING VALUE(F_FIELD)
            CHANGING F_NAME.
   DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
         LC_PROG LIKE D020S-PROG,
         LC_DNUM LIKE D020S-DNUM.
   TRANSLATE F_FIELD TO UPPER CASE.
   refresh ltab_fields.
   LTAB_FIELDS-FIELDNAME = F_FIELD.
   append ltab_fields.
   LC_PROG =  SY-REPID .
   LC_DNUM =  SY-DYNNR .
   CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
             DYNAME     = LC_PROG
             DYNUMB     = LC_DNUM
        TABLES
             dynpfields = ltab_fields
        EXCEPTIONS
             OTHERS     = 01.
   read table ltab_fields index 1.
   IF SY-SUBRC EQ 0.
     F_NAME = LTAB_FIELDS-FIELDVALUE.
     refresh ltab_fields.
   ENDIF.
   CALL FUNCTION 'F4_USER'
        EXPORTING
             OBJECT = F_NAME
        IMPORTING
             RESULT = F_NAME.
ENDFORM.                               " GET_NAME
*TEXPZKBPROGS
IDIR     File Download Options (File Selection)
IFIL     File Options
IFNA     Enter filename below (under File Options)
IH01     Prog Name
IH03     Program Description
ISNG     Upload a single file
IUDL     Upload to SAP/Download from SAP
IUPL     File Upload Options
R        Backup/Restore program source code with texts
P_PATH          Path to save programs to
RB_DOS          Files on local computer
RB_DOWN         Download Programs
RB_FILE         Upload a single file
RB_LIST         Select program(s) from a list
RB_UNIX         Files on remote computer
RB_UP           Upload Programs to SAP
S_CDAT           Date Created
S_CNAM          Created by UserID
S_NAME          Program Name
S_SUBC          Program Type
S_UDAT          Date Changed
S_UNAM          Last Changed by UserID
*HEADZKBPROGS
DOKU      ZHRBDC54
*DOKLZKBPROGS
*--- End of Program[/code]

Similar Messages

  • Export all the reports currently stored in CMC

    Our company's internal security policy prohibits us from connecting anyone's copy of Crystal XI to our production report repository (in CMC). We have to work on reports locally and republish them fresh in the CMC every time a report is changed.
    We're trying to get all of our report files into a source control system to help with versioning, etc. Unfortunately the only place that we know has all the most current reports is the CMC itself. I'm trying to find a way to export all the reports from within the CMC to some folder or directory so that I can be sure I've got a copy of everything in production. Is there an easy way to accomplish this?

    Hi,
    If I understand your query then you want to create a backup of the reports present in the CMC.
    The reports present in the CMC is already backed up in the
    <Installed directory>\Enterprise 11.5\filestore.
    so if you keep the backup of the filestore folder you can get a copy of all the reports present in the CMC.
    I hope it answers your query.

  • How backup all calendars (from my pc and iphone) on computer

    I need backup all calendar (gmail, iphone, from my pc) on my computer or icloud. Same way to all contacts (iphone, and from my computer).

    http://support.apple.com/kb/ht1386
    more hits from the search
    https://www.google.dk/search?client=opera&q=sync+music+to+ipad&sourceid=opera&ie =utf-8&oe=utf-8&channel=suggest

  • I need to backup all of the music on my iPhone however I no longer have a computer. Please help!

    Hey, this is my first post on Apple Support Communities because I'm usually able to solve any iPhone problem by doing extensive googling... However this time it seems that I've hit a roadblock. To get a decent idea of my situation, here's some basic info and a breakdown of what's been going on:
    -I have an iPhone 4S
    -Approximately 1 month ago I tried downloading a Gmail app and it got stuck on "Waiting" mode.
    -When this first happened I tried to exit out of it during wiggle mode but there was no "X", so I just left it alone.
    -Recently I've been noticing my battery has been draining terribly since the app got stuck on waiting, so I've made it a point to try just about every possible solution I could find online (hard reset of the phone, signing in and out of the apple store, checking purchases, resetting all settings, etc.)
    -None of these proposed solutions worked, so I made an appointment with the Apple Store. I brought it in yesterday hoping they would be able to do a quick fix, only to find out they could not fix it, and that the only way to get rid of the waiting app battery drain issue would be to completely wipe the phone.
    -The main problem I'm having here, however, is that I used to have a computer but it died a little while ago... so I've just been using the iPhone without syncing it to a computer (all of the music I got from CD's is still on my iPhone and I don't want to lose it).
    -Since I can't back up my phone with a computer, I backed it up to iCloud last night for the first time. This took about 2 hours, and supposedly was successful, however I then remembered iCloud does not backup the music on your device that came from CD's. The Apple Store employee had told me I could use iTunes Match if I needed to backup all of my music and I no longer had a computer... However I looked into it only to find that you DO need a computer for iTunes Match.
    So my question is, how can I backup all of my music without a computer? Is there an app that has been known to do this well? I just want to be able to backup all of my songs right on my iPhone, wipe the phone, and then be able to restore all the music back onto the phone somehow.
    Any help or insight into this matter would be greatly appreciated. Thank you.

    Since it has always been very basic to backup your computer and all it's data, Apple provides no way for you to transfer music from your iPhone back to your computer.  As you know, you can re-download all iTunes purchases, but music that you ripped yourself you'll have to just re-rip again.
    You can try and find 3rd party applications that might help you.  I'm sure you'll pay, however.
    Let this be a very important lesson learned.
    Best.

  • How to show all view tab (Main Report and all Sub Report) in Visual FoxPro 9

    I use ActiveX from Crystal Report Developer XI for viewer in Visual FoxPro 9 and I already know how to show Main Report by using command:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Inside the MyReport.rpt there is two subreport name :
    1. MySubReport1
    2. MySubReport2
    My Question is :
    How to show all view tab (Main Report and all Sub Report) at the 1st time we call ViewReport?
    I try to using command :
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptSub=oRptOpen.OpenSubreport("MySubReport1")
    oRptSub=oRptOpen.OpenSubreport("MySubReport2")
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    but only show Main Report (view tab name : Preview)?
    Did I miss any command before I call oRptView.ViewReport?

    Your right, there is only one tab to view the report.
    To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
    http://diamond.businessobjects.com/robhorne</a>

  • Discoverer viewer displaying all the reports instead of one report

    Hi Team,
    I have created one menu and attached 4 reports to that.after that that menu is attached to the main menu.This menu is attached to the one xyz responsibility.
    Now i am facing the problem is : After logging to the responsibility,i clicked on individual report ,but it is not displaying only one report.It is showing all the reports in the discoverer viewer.
    Can you please help me in this issue..

    Please post the details of the application release, database version and OS.
    I have created one menu and attached 4 reports to that.after that that menu is attached to the main menu.This menu is attached to the one xyz responsibility.
    Now i am facing the problem is : After logging to the responsibility,i clicked on individual report ,but it is not displaying only one report.It is showing all the reports in the discoverer viewer.Please review these docs and verify that you have completed all the steps.
    How to Create a Link to a Discoverer Workbook in Apps R12 [ID 471303.1]
    How to Create a Link to a Discoverer Workbook in Apps11i [ID 278095.1]
    Thanks,
    Hussein

  • 10.5 Mail: Hide unread message counts of folders? (or, how backup all mail)

    Ok, this is a very confusing topic. I have connected Apple Care, and they understand what I'm trying to do, but say there is "no way" that it can be done. But I know there is a way so hopefully someone can help.
    First, this is what I'm asking for...then I'll explain why. I am looking for a way to "hide" the unread mail counts of a SPECIFIC FOLDER. (not the in box, not all messages, ONLY messages in ONE folder.)
    Here is why.... I finally got my mother using email with her Verizon DSL address in Mail.app. The problem is, she is one of those people that "deletes" just about every message she gets because she "doesn't need it anymore" But, there has been many times where she has deleted something that down the road might be needed - and therefore, it is lost. Sure, Time Machine is set up and could recover it, and there are other ways of getting things back, but is just too difficult, and those methods don't last forever.
    So here is what I did to solve this and make it easy - I set up a RULE in mail.app that takes every message and COPIES it to a folder called "BACKUP." Now, she can delete things from her in box when she is done with them (which will make her happy) but down the road if the message is ever needed again, it is just a search or even a SPOTLIGHT search away! Or, you could just open the "backup" folder and see an index of ALL the messages. So I had this setup for a while and it was great....but there was one problem.... The folder "backup" would count un-read messages. So after a while, she would go to check her mail and see that she has 50 unread messages! (only 1 of which was really un-read in her in box, but the other 49 where old copies in the backup folder.) So I then edited the rule and found an action to mark the message as read. Time goes by and then I realize that NOTHING in being marked read. So even real unread messages in the in box would immediately be marked as read and would not come up as bolded or with the blue dot. So that became annoying as it was hard to see what was new and what wasn't. So then I came up with this idea of setting a rule that all of her Verizon email would be forwarded to another account (I set up a gmail account for her) so that all I messages would be forwarded there. Then, I setup gmail to forwarded them back thinking it would be easy to setup a rule that says any message coming from "gmail account" would be moved to folder and marked as read. I then get a panic phone call saying..."my inbox keeps getting hundreds of unread messages...there all the same thing! I then log in to see that one new message was being pushed back and forth between Mail.app and gmail in an endless loop! so I had to shut the forwarding to stop that!
    So as you can see....this is very difficult, but yet the problem is so simple and should have an easy fix. All I want is a way to backup all incoming messages, and keep them stored in a folder that marks them as read.
    Could anyone PLEASE help me out with this? _Apple says there is no way to do this because of the limitations in the Rules that mail.app provides_....but it does give me the option to run an Apple Script. _AppleCare said that it could easily be done via an Apple Script_, but I have NO CLUE on how to even start that! Even the easy tutorials I tried left me confused.
    So - ANY ideas????
    Thank you SO much in advance for anyone that could help out!
    -Scott

    Sorry I am marking this solved, but it never was.
    The best thing that could be done is to rely on Time Machine, or forward all of your incoming email to another address.
    Apparently, there is no way to do what I asked. But there should be. So Apple, please fix this.
    Again, sorry I am marking it as solved.

  • Is it possible to backup all purchased media in iTunes to an external hard?

    I have a large media content that I purchased through iTunes that is only stored on my Mac Book Pro. I have not backed-up any of it yet because of the number of CDs/DVDs it takes. Is it possible to backup all of this purchased media onto an existing external hard drive or even a thumb/flash drive that I have instead of using a ton of CDs/DVDs that I will probably lose or misplace?

    nue2this wrote:
    I have a large media content that I purchased through iTunes that is only stored on my Mac Book Pro. I have not backed-up any of it yet because of the number of CDs/DVDs it takes. Is it possible to backup all of this purchased media onto an existing external hard drive or even a thumb/flash drive that I have instead of using a ton of CDs/DVDs that I will probably lose or misplace?
    Absolutely. Just drag the files themselves from your home folder (usually Users/yourname/Music/iTunes/iTunes Music - at work at the moment, I believe that is the specific path) onto your external drive.
    I have a smart playlist created which lists all files containing "Purchased" or "Protected" to help me isolate the files I need to back up periodically. This might also assist you as well.
    Steve

  • Hi, im not able to backup all ma contact to my icloud using my iphone 3gs. only 290 out of 600 contact gets backup in icloud, though i hav enough memory. How to fix it ?? I want to transfer my contacts from 3gs to 5s

    Hi, im not able to backup all ma contact to my icloud using my iphone 3gs. only 290 out of 600 contact gets backup in icloud, though i hav enough memory. How to fix it ??

    I have had similar issues backing up to iCloud. Thy only thing I have found to work every time is backing up to iTunes and then doing a restore to my new device. That includes iPhone 6.

  • Using Time Machine, is it possible to backup all of my old emails. If so, please describe the process.

    I would like to be able to backup all of my old emails and remove them from the MacBook Pro HDD. I am using Time Machine and a Promise Pegasus RAID display. I can't seem to find any information about how this might be accomplished.  If any one  knows how to do this, please post the process in as much detail as possible. Thanks to all who respond.

    You cannot use a Time Machine backup as a substitute for storage on your computer's hard drive. For that you need a separate storage-only hard drive. If you haven't space on your hard drive, then you should think about getting a larger hard drive and/or moving files to a permanent storage drive.
    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • "The document 'Backup of Backup of Oral Report' could not be saved as 'Oral Report'. Bad file descriptor"

    Hello,
    Whenever I try to save my Keynote file, I receive an error message saying: "The document 'Backup of Backup of Oral Report' could not be saved as 'Oral Report'. Bad file descriptor".
    I've tried using other name to save my file, saving the file as a backup, saving it within my documents, and on a USB, but the file won't save. I'm using Keynote '09, Version 5.1.1 (1034) on my Mac Desktop running Mac OS X Version 10.6.8
    How can I fix this problem and save my file?

    change icloud backup to local backup on this compuet. this worked for me.

  • Export all sql reports in a region to csv or pdf

    Hello there,
    I have a region on a particular page in apex and that region has about 12 different sql query reports.
    I have enabled csv option for each of them so there are 12 links to export each report. However
    I would like to have only 1 link which will save the contents of all the reports to csv or pdf. The
    column headings are different for some of these reports but wanted to know if something like this
    is possible.
    Thanks in advance for reading this.

    You might try wrapping the regions in html regions that essentially give you the ability to specify a valign=top for the report regions.
    So, your regions look like this:
    30 Report Start - contains region source = (div)<table width="100%" cellspacing="0" cellpadding="0"><tr><td valign="top">
    40 Approved Tests Report (Column 2) Conditional
    45 Report 2 Start - contains </td><td valign="top">
    60 Unapproved Tests Report (Column 2) Conditional
    65 Report 3 Start - contains </td><td valign="top">
    80 Approved Count by Build Report (Column 2) Conditional
    85 Report End - contains "</td></tr></table>(/div)"
    Replace () with the angle brackets
    Maybe there is a more elegant solution with templates or page level CSS or something..
    But that should work.
    Edited by: Bob37 on Sep 17, 2010 3:33 PM
    Edited by: Bob37 on Sep 17, 2010 3:33 PM

  • Web part created on a subsite for a sharepoint list in another site using sharepoint designer, to show only the subsite's reports. Connection dropping off and showing all the reports

    I crated web parts in the sub-sites (we have about 10 subsites) using sharepoint designer from a main list in another site.  Then used web part to show only the  ubsite's reports - using connection to the main list.  Problem is, the connection
    is dropping off and showing all the reports on the main list that are confidential.  this has happened 3 time lately.  Could someone explain why it happens some times?  I had to fix it by adding the web part again and connecting it
    Thanks, Subathy.

    Hi George,
    If you want to use a top level site "department" list column in all sub-sites, you can go to top level site and create a
    lookup type "Site column" to look up the value from the department list, then all sub-sites can use this lookup type site column created in top level site.
    Thanks 
    Daniel Yang
    TechNet Community Support

  • Option to download all the reports in a page

    Hi All,
    I have a requirement like this.I have a page on my dashboard.In that page i have 4 reports.Is there any option to download all the reports in the page at a time or any workaroungd for this.
    Thanks,
    chandra

    Hi,
    You can download all the reports in the same dashboard at a time.
    1.Add a text to the dashboard at the end of the dashboard.
    If you want download in a PDF format then Add this code to Text
    open(<) a href="give ur dashboard path here"&Action=Download&Format=pdf"(>)DownloadPDF(close tag</a>)
    If you want download in a Excel format then Add this code to Text
    open(<)a href="give ur dashboard path here&Action=print&Format=excel2000">Excel 2000(close tag</a>)
    HTML code will be like this
    open A tag href="path&Action=download&Format=pdf/excel2000">
    Assign text(Download PDF/Excel)
    close A tag
    Note:Remove the "(" and")" in the HTML code
    mark if helpful/correct...
    thanks,
    prassu

  • I have a Airport Time Capsule 2T, I would like to know if it is possible to backup all my apple divides (iMac, iPhone and iPad)?

    I have a Airport Time Capsule 2T, I would like to know if it is possible to backup all my apple divides (iMac, iPhone and iPad)?

    The iMac can back up to the Time Capsule, but iOS devices like the iPhone and iPad back up to either iTunes on your Mac....or....to iCloud.
    If the iPhone and iPad back up to iTunes on your Mac, then when the iMac backs up the iOS backups are sent to the Time Capsule as well.  So, the iPhone and iPad back up indirectly to the Time Capsule.
    The iPhone and iPad cannot back up directly to the Time Capsule.
    For more information on iOS backups, see this Apple support document:
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support

Maybe you are looking for

  • Parent Child Hierarchy

    I am new learner for using OBIEE 11g, when I try to create the Parent_Child_Hierarchy in the repository, BI answer in the web shows the errors: "State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [n

  • RFC dest . parameter Problem

    Hi Friends, I am getting a problem when i restore the Source system. No RFC dest.parameters maintained for the Warehouse in source system BQACLNT100 When i am asking my basis team to checck for the connection in the source system they are telling tha

  • Profile for ODI

    are the profile defined in the ODI security manager the default one or you can define your own parameters. can some one send me some link or some document which can show me how to define profile and user authorization. Thanks to you all .

  • Unable to access application set in admin console after upgrade to 7.0 M

    Hi Experts I am unable to access the Application Set through BPC Administration after upgrading our development server to version 7.0 SP3. I followed the instructions as per the Upgrade guide, and there was no issues during the installation. But when

  • What has happened to the "save as" option in the file menu

    I have just tried to "save as" one of my documents and the option in the file menu bar has disapeared. i use the save as option often. Please help