How to upload & download abap object ?

Hi all,
Is there any tcode in sap to upload & download any object from sap?
Edited by: nehal patel on Mar 7, 2008 6:02 AM

Hi,
To my knowledge there is no Tcode.
if the object is a report , then u can downlaod to local file.
go to se38, and display ur report . In that u will find a green icon with arrows, Just below ur report name.
With that icon (save locally) , u can dowanlaod to ur file.
I dont know what you asked is regarding this......?
Rvert back...
Regards,
Naveen

Similar Messages

  • Download ABAP Objects to a local directory

    Hi! Just want to ask if there's someone who knows any program that can download a copy of ABAP Objects to a local directory? Thanks a lot!!!

    Hi Jason.
    Find the Below code to download ABAP Source code to your local directory . Before downloading just create " :\source " directory.
    Hope this info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav
    [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(72) 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]

  • Upload/download DDIC Objects, FM, Classes ....

    Hello Experts,
    Is there any possibility to download download DDIC Objects, FM, Classes and other ABAP Structures into a file ? I don't want to use transports. Do you know some FM down/uplowding such thinks ?
    Thanks
    Wojciech.

    Of course the prefer way would be to use transports.  There is a utility that you can use to download/upload ABAP programs and screens.  It will not do ddic objects.  I'm pretty sure that it will not do FM or classes.
    There are a few of these out there, this is just one.
    http://www.sap-img.com/abap/download-and-upload-your-abap-program.htm
    Regards,
    Rich Heilman

  • Download abap object under a tranport request.

    hi experts
                  i have a requirement, a tranport request contain any ABAP Object i don't know how many object actually it contains may be one or more just suppose it will have a report program under a  transport request , in the select-option i will enter transport request number and the path of the directery( whr i have to store the report program). now this report wiil download the report program on this path which i have given in section screen.
    could you please help me where the transport requests are stored in SAP is thr any table pls give me table name or is thr any function module to do this job.
    thanks & regards
    pardeep kumar

    Take a look at the following tables :
    E071
    E071C
    E071E
    E071K
    E071KF
    E071KFINI
    E071S
    They contain the data you are looking for.
    Hope that helps,
    Michael

  • How to identify active ABAP objects in the HR R/3 System?

    Hi
    We are in process of doing assessment on HR 4.6C to ECC 6. I need to identify the active abap objects ( Reports/FM's etc. ) in the sytem.  Appreciate if some one can suggest me how to look into the system.
    Rgds
    Peddi

    Try the Transaction code se95.
    Regards,
    Ravi Kanth Talagana

  • How to upload & Download file in Adf using Jdeveloper 11.1.2 ??

    Hi All,
    I have just started working on Oracle ADF, Thanks a lot guys for solving our queries.
    I'm using Jdeveloper 11.1.2, How to upload and download file in ADF..?
    I have seen couple links on net but none of them worked on jdeveloper 11.1.2......
    Please Help......

    Hi guys,
    I'm able to download file in ADF using af:fileDownloadActionListener.......
    does any one knows how to upload a file using ADF???

  • How to upload/download to blob using ADF-toplink?

    I am using ADF-toplink,i tried upload to blob using some of the code given in the ADFBC upload/download application...IT WORKED... but download is not working...I want to know some better method for both uploading and downloading... IN ADF-TOPLINK only......

    Hi guys,
    I'm able to download file in ADF using af:fileDownloadActionListener.......
    does any one knows how to upload a file using ADF???

  • How to upload/download scanned documents.

    I want to upload and download scanned documents and other documents like .jpeg, .doc etc corresponding to particular track number.
    Here i'm handling some license related details through module pool, so corresponding to each license number user needs to upload/download/view related documents.
    How to do this???

    Hi,
    Go to t-code SE78 and click on F5 button on keyboard and upload the image from your desktop or any other folder, giving appropriate name to the graphic and check radio button ' color bitmap image' for colured docs.
    This way graphics are loaded into SAP system.
    Regards,
    DEP

  • Download abap objects by package

    Hi All
    Any one please suggest any program to download abap programs including ztables / include if any by giving development class
    Thanks
    Sekhar

    Check SAPLink add-on for ABAP. [http://code.google.com/p/saplink/]

  • How to upload / download sapscript forms

    Hi,
    Is it possible to upload / download sapscript forms to pc?
    Thanks in advance

    Hello,
    Across clients we can copy scripts by Tx. SCC1. Please keep in mind that you have to give the task ID and NOT the Transport Request ID if the Script/Std. Txt has to be ported across the clients.
    Regards, Murugesh AS

  • Download ABAP Objects

    Hi,
    Is there a way to download dialog programs together with screen definitions same way one would do for a normal report program.
    I also would like to download table definitions.
    Scenario
    We have written some custom applications that we use for demonstration for our potential clients, all this are loaded on laptop. We need to copy on of our internal clients to the laptop and also re-upload the custom applications on the laptop. For this we need to download all the custom development/ applications to a secondary storage, do client copy then upload the custom development.
    Thank you for all your help.
    Regards,
    Kennedy.

    Don't know if you heard of [SAPLink|http://code.google.com/p/saplink/]. This application gives the possiblity to copy different kinds of objects - a full list of supported objects [here|http://code.google.com/p/saplink/wiki/pluginList].
    As for the screens you can copy them like described [here|http://erpgenie.com/abaptips/content/view/109/35/]. This however is more suitbale for copying singular programs not all custom development as you need to copy screens one by one.
    Another way of moving entire custom objects is like I described [here|http://wiki.sdn.sap.com/wiki/display/ABAP/HowtocopyRepositoryObjectsbetweennon-connectedSAPsystems]
    Regards
    Marcin

  • [Solved]How to upload / download BLOB images ADF - JSF

    Hi everyone. I am a newbe ADF - JSF developer and I need to do a web app. in which I have to upload jpeg images to a table (in an oracle 8 DB) that has a BLOB column, also I need to be able to download images from the same table and show them in the web app. I have seen the examples on how to do this using the intermedia data types but I can't use this because the table already has a lot of records in it and the DB admin won't move a finger to migrate the data because other apps. are using the table.
    I have been looking on the internet but haven't been able to find something that describes this process.
    Thanks.

    Hello Kuba, I am trying to execute your app but I get the following error when I try to run it:
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: oracle.adf.view.faces.webapp.AdfFacesFilterHelper
         Dependent class: oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl
         Loader: current-workspace-app.web.ADFUploadAndDownloadFiles-ViewController-webapp:0.0.0
         Code-Source: /root/jdevhome/mywork/ADFUploadAndDownloadFiles/ViewController/public_html/WEB-INF/lib/adf-faces-impl.jar
         Configuration: WEB-INF/lib/ directory in /root/jdevhome/mywork/ADFUploadAndDownloadFiles/ViewController/public_html/WEB-INF/lib
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2051) [usr/local/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@27634497]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1665) [usr/local/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@27634497]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1621) [usr/local/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@27634497]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1606) [usr/local/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@27634497]
         at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap]
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.<init> (AdfFacesFilterImpl.java:341) [root/jdevhome/mywork/ADFUploadAndDownloadFiles/ViewController/public_html/WEB-INF/lib/adf-faces-impl.jar (from WEB-INF/lib/ directory in /root/jdevhome/mywork/ADFUploadAndDownloadFiles/ViewController/public_html/WEB-INF/lib), by current-workspace-app.web.ADFUploadAndDownloadFiles-ViewController-webapp:0.0.0]
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native method) [unknown, by unknown]
         at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39) [unknown, by unknown]
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27) [unknown, by unknown]
         at java.lang.reflect.Constructor.newInstance (Constructor.java:494) [unknown, by unknown]
         at java.lang.Class.newInstance0 (Class.java:350) [jre bootstrap, by jre.bootstrap]
         at java.lang.Class.newInstance (Class.java:303) [jre bootstrap, by jre.bootstrap]
         at oracle.adf.view.faces.webapp.AdfFacesFilter.init (AdfFacesFilter.java:48) [jre bootstrap, by jre.bootstrap]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.getFilterConfig (HttpApplication.java:7523) [jre bootstrap, by jre.bootstrap]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke (ServletRequestDispatcher.java:548) [jre bootstrap, by jre.bootstrap]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal (ServletRequestDispatcher.java:376) [usr/local/jdevstudio1013/jlib/adf-faces-api.jar (from <classpath> in /root/jdevhome/mywork/ADFUploadAndDownloadFiles/ViewController/public_html), by current-workspace-app.web.ADFUploadAndDownloadFiles-ViewController-webapp:0.0.0]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest (HttpRequestHandler.java:870) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:451) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest (HttpRequestHandler.java:218) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run (HttpRequestHandler.java:119) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run (HttpRequestHandler.java:112) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run (ServerSocketReadHandler.java:260) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket (ServerSocketAcceptHandler.java:230) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800 (ServerSocketAcceptHandler.java:33) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run (ServerSocketAcceptHandler.java:831) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:298) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
         at java.lang.Thread.run (Thread.java:595) [usr/local/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /usr/local/jdevstudio1013/j2ee/home/oc4j.jar), by oc4j:10.1.3]
    I'm sure this is trivial for for you, but I can't figure it what to do.... can you help a little here please?
    Thanks.

  • How To Upload/Download Files in WDP from KM

    Hi folks,
    I'm developing an Web Dynpro application for Portal and using a upload and download component.
    I'd like to use the KM as a file repository. How can I send and get those files to/from KM application in Portal?
    Using: SAP Studio 2.0.9 SP9 (WDP), SAP WebAS 6.40.
    By the way, is it possible to send those files to mobile/pda using MI Client?
    Regards,
    Rogerio

    Hi Rogerio,
    see https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/tutorial on using knowledge management functions in web dynpro.htm
    Hope it helps
    Detlev
    PS: Please consider rewarding points if answers are helpful on SDN. Thanks in advance!

  • How to upload/download Pictures from W3K Server

    I have an Ipad 4 running IOS7, Wi-Fi only and is connected to my Network.
    I have a Windows 2003 Server which has a File Server which holds all my pictures and I would like to know if there is some way I can access the server to upload pictures from my Ipad to the server and download pictures from the server to my Ipad.
    If this is possible, can you please give me some direction on how to get the Ipad connected to do this?
    Thanks

    I have an Ipad 4 running IOS7, Wi-Fi only and is connected to my Network.
    I have a Windows 2003 Server which has a File Server which holds all my pictures and I would like to know if there is some way I can access the server to upload pictures from my Ipad to the server and download pictures from the server to my Ipad.
    If this is possible, can you please give me some direction on how to get the Ipad connected to do this?
    Thanks

  • How to upload/download file to/from server using FiledownloadUI ?

    Hi experts,
    I don't have much experience of WDABAP. I have to upload a file  to server and then download it again. I have implemented  this functionality but I am unable to view contents of .xls/.doc/.docx/.msg file only  txt file contents are properly visible. I have used  following command to upload the file:-
    OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
    I had  also tried this but it is throwing  exception that it can be used only for character type data.
    OPEN DATASET fname FOR OUTPUT IN TEXT MODE  ENCODING UTF-8    WITH SMART LINEFEED.  
    Thanks in advance.
    Problem Solved!
    Regards,
    Vishesh
    Edited by: Vishesh@1986 on Sep 26, 2011 7:37 AM

    I have resolved the issue myself!!!

Maybe you are looking for

  • Tables in a different schema not visible from function

    I'm getting a really weird error in a function that I wrote. I have user "A" who has access to schemas for users "B" and "C". I need to update a table in schema "B" with data from schema "C". So, I created a function that selects information from a t

  • Cut off the top and left sides of iFrame?

    I have a page I'd like to place as an iFrame in another page. Is it possible to move the framed page up and to the left so that the frame cuts off the top and left sides of the framed page?

  • Leopard take off iWeb

    I was installing Leopard to my Mac Mini and iPhoto etc. was ok, but iWeb was off. Why?? My iLife (was coming also, when I by Mini) is 6. Even I doesn't need iWeb very much I'd like it to be in my Mini.

  • Cannot use Java on Firefox in Mac

    I'm Mac user. I have followed all the instruction to set up the java on firefox in my macbook. However, when I browsing those web site which request java, I still unable to open it. If I use Safari to open those web sites, that is absolutely fine. Do

  • Hi all,Help Required fin ALV,Thnx in Advance

    Hi All, Can you please share me some detailed material regarding ALV. All the function Modules used and the purpose of them. Thnk you very much . Regards, Amith