Program to download on Non Unix Server location using SFTP

Hi,
What commands/function modules can use for download the file on Non Unix Server location using SFTP.
Thanks,
Fract

Please check Walters reply in the foloowing thread

Similar Messages

  • Program to download file on local server

    Hi all
    I have already written a program to download the file on local server, the program is running fine but file is not getting saved on local server.  Can anybody provide me program. 
    program shud generate files as the plant code.  ie for each plant code program shud generate one file.
    Rgrds
    Mona.

    data : begin of itab occurs 0,
           matnr like marc-matnr,
           werks like marc-werks,
      end of itab.
    data : fname like ibipparms-path ,
           ename type string.
    parameters: p_werks like marc-werks.
    start-of-selection.
      select matnr
             werks
             from marc
             into table itab
             where werks = p_werks.
        call function 'F4_FILENAME'
    exporting
       program_name        = sy-repid
       dynpro_number       = '1000'
       field_name          = ' '
    importing
       file_name           = fname         .
    if not ( fname is initial ) .
       ename = fname .
    else.
       ename = 'C:\TEST.TXT' .
    endif .
    call function 'GUI_DOWNLOAD'
      exporting
    *   BIN_FILESIZE                    =
        filename                        = ename
       FILETYPE                        = 'ASC'
    *   APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    *   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *   SHOW_TRANSFER_STATUS            = ABAP_TRUE
    * IMPORTING
    *   FILELENGTH                      =
      tables
        data_tab                        = itab
    *   FIELDNAMES                      =
    * EXCEPTIONS
    *   FILE_WRITE_ERROR                = 1
    *   NO_BATCH                        = 2
    *   GUI_REFUSE_FILETRANSFER         = 3
    *   INVALID_TYPE                    = 4
    *   NO_AUTHORITY                    = 5
    *   UNKNOWN_ERROR                   = 6
    *   HEADER_NOT_ALLOWED              = 7
    *   SEPARATOR_NOT_ALLOWED           = 8
    *   FILESIZE_NOT_ALLOWED            = 9
    *   HEADER_TOO_LONG                 = 10
    *   DP_ERROR_CREATE                 = 11
    *   DP_ERROR_SEND                   = 12
    *   DP_ERROR_WRITE                  = 13
    *   UNKNOWN_DP_ERROR                = 14
    *   ACCESS_DENIED                   = 15
    *   DP_OUT_OF_MEMORY                = 16
    *   DISK_FULL                       = 17
    *   DP_TIMEOUT                      = 18
    *   FILE_NOT_FOUND                  = 19
    *   DATAPROVIDER_EXCEPTION          = 20
    *   CONTROL_FLUSH_ERROR             = 21
    *   OTHERS                          = 22
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    loop at itab.
    write:/ itab-matnr , itab-werks.
    endloop.

  • Defining a non local server for use within the IDE - version9.2

    How do I add a server that's running on another machine to one that my
    workshop is running. When I invoke the New Server dialog and modify the
    host from localhost to the one on which the server instance is running, then
    everything is blanked out and I can't do anything. I can't find anything in
    the documentation that tells me how to do this.
    Thanks,
    SB

    While deployment can be done manually, it is possible to run and debug a
    server remotely.
    For an example on how to do things remotely, see Chris Hogue's blog:
    http://dev2dev.bea.com/blog/hogue/archive/2006/09/debugging_remot.html
    Could you send me info on your environment? broth at bea dot com, and I
    will try and get you some answers. This sounds like a requirement we need
    to meet.
    br
    Stanley Beamish wrote:
    How do I add a server that's running on another machine to one that my
    workshop is running. When I invoke the New Server dialog and modify the
    host from localhost to the one on which the server instance is running, then
    everything is blanked out and I can't do anything. I can't find anything in
    the documentation that tells me how to do this.
    Thanks,
    SB

  • Need to upload Cxml file to HTTPS Server- cannot use SFTP

    WE have a need to use SSIS to first watch for the creation of the CXML file ( I'll use File Watcher) then use some web services to upload this to a secure HTTPS Server. What I am reading from these posts is that the built in web services task in SSIS 2012
    only is usable for a HTTP server for upload? IS this Correct? If so what are my options to post to a HTTPS Server?? Do we need to script this entire process?? Any third party components available??
    Thanks  KAM

    I don't see SSIS frankly being here a good fit.
    These tasks are better done via a .net app or PowerShell.
    If you do choose to go with SSIS yes, you need to do some Googling/Bing to find a good example on Script Task that again contains pure .net code to run the HTTPS WebService call (it is an oxymoron IMO).
    Then beware that the built in FileWatcher (into SSIS) requires the package restarted after a file processed, again a minus for using SSIS.
    Arthur My Blog

  • Download file from UNIX to EXCEL problem

    Hi,
    I am trying to download file from UNIX server to excel file, there is one column which is messing up and that is number 100000000000000002 (18 in length) it is writing as 1E+17, funny thing is when I click on that cell it is showing as
    100000000000000000.
    I am using GUI_DOWNLOAD to download to excel, below is the output excel format, I am talking about 4th value from left
    GUID    leg_reg     lic_type     lic_num     ex_lic_num     vali_from     valid_to     created_by
    3E633B85C05E6F28E100     EAR     ENC     1E+17     ENC     20030305     20930305     VANRIJ
    below is the program I am using to download the output from UNIX to excel
    FORM get_data_file.
      OPEN DATASET p_unxfil FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc = 0.
        DO.
          READ DATASET p_unxfil INTO input_file_tab-line_string.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          APPEND input_file_tab.
          CLEAR  input_file_tab.
        ENDDO.
      ELSE.
        PERFORM write_message USING 'ZZ' 'E' '000'
          'Unable to find file' p_unxfil
          '  Press Enter key to exit.' ''.
      ENDIF.
      CLOSE DATASET p_unxfil.
      DESCRIBE TABLE input_file_tab LINES record_cnt.
    ENDFORM.                    " get_data_file
    FORM create_pc_file.
      DATA: l_file TYPE string.
      MOVE p_pcfile TO l_file.
    Save the file
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_file
        TABLES
          data_tab                = input_file_tab
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc NE 0.
        WRITE: / 'Error creating pc file', p_pcfile.
        EXIT.
    endif.
    I will assure of points.
    Thanks for your help
    Sarath

    It is not the problem of your program. This happens becuase of the "nature" of the excel. You need to retain the text property of that column.
    Try like this:
    1. Download the file in .txt
    2. Open Excel .. blank sheet
    3. Now, click on Open. Select your .txt file
    4. One pop up will come ..."Text Import Wizard"
    5. Select the fixed width or Delimited ... Press Next ...
    6. Select appropriate delimitors or fixed length .. press Next
    7. Select your coulumn (which has the problem), Select the "Text" radiobutton on the upper-right corner and finish.
    Regards,
    Naimesh Patel

  • OLE Programe to Download Data to EXECL

    Im using the OLE programe to Download data from Application Server to My EXCEL file.REPORT ZTEST_34331_OLE_EXCEL NO STANDARD PAGE HEADING.
    {Code INCLUDE OLE2INCL.
    DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
    H TYPE I,
    H_MAPL TYPE OLE2_OBJECT, " list of workbooks
    H_MAP TYPE OLE2_OBJECT, " workbook
    H_ZL TYPE OLE2_OBJECT, " cell
    H_F TYPE OLE2_OBJECT. " font
    tables : MSEG.
    DATA : ld_file LIKE rlgrap-filename.
    DATA : wa_string(1000) TYPE c.
    CONSTANTS: con_tab  TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    table of Material number
    TYPES : BEGIN OF int_final,
             employee_sno(12),
             employee_code(13),
             first_name(40),
             last_name(40),
             gender(8),
             work_address(200),
             department(40),
             location(40),
             designation(40),
             employee_level(40),
             supervisor(40),
             mobile(40),
             work_phone(40),
             email(40),
             ice_contact(40),
             bloodgroup(12),
             dob(12),
             doj(12),
             dom(12),
             status(20),
             END OF int_final.
    DATA : wa_final TYPE int_final.
    DATA : wa_final1 TYPE int_final.
    DATA: int_temp TYPE int_final OCCURS 0 WITH HEADER LINE.
    DATA file_in TYPE rlgrap-filename.
    DATA file_out TYPE rlgrap-filename.
    DATA excel TYPE ole2_object.
    DATA workbook TYPE ole2_object.
    DATA SHEET TYPE ole2_object. "changed
    file_in = 'C:\it_results.xls'.
    file_out = 'c:\hr_data.xls'.
    *& Event START-OF-SELECTION
    START-OF-SELECTION.
    read material document Number
    ld_file = '/usr/sap/trans/abap/HR_DATA.xls'.
      OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc = 0.
        DO.
          CLEAR: wa_string, wa_final.
          READ DATASET ld_file INTO wa_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            SPLIT wa_string AT con_tab INTO  wa_final-employee_sno
                                             wa_final-employee_code
                                             wa_final-first_name
                                             wa_final-last_name
                                             wa_final-gender
                                             wa_final-work_address
                                             wa_final-department
                                             wa_final-location
                                             wa_final-designation
                                             wa_final-employee_level
                                             wa_final-supervisor
                                             wa_final-mobile
                                             wa_final-work_phone
                                             wa_final-email
                                             wa_final-ice_contact
                                             wa_final-bloodgroup
                                             wa_final-dob
                                             wa_final-doj
                                             wa_final-dom
                                             wa_final-status.
            MOVE-CORRESPONDING wa_final TO wa_final1.
            APPEND wa_final1 TO int_temp.
          ENDIF.
        ENDDO.
        CLOSE DATASET ld_file.
    ENDIF.
    CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    IF sy-subrc NE 0.
      WRITE: / 'No EXCEL creation possible'.
      STOP.
    ENDIF.
    data:w_filename1 LIKE rlgrap-filename value 'c:\hr1_data.xls'.
    *SET PROPERTY OF H_EXCEL 'Visible' = 1.
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
    GET PROPERTY OF excel 'ActiveSheet' = sheet.  " changed
    *CALL METHOD OF H_MAPL 'Open' EXPORTING #1 = w_filename1.
    *CALL METHOD OF H_MAPL 'Add' = H_MAP.
    LOOP AT int_temp INTO WA_FINAL1.
    H = H + 1.
    PERFORM FILL_CELL USING H 1 0 WA_FINAL1-employee_sno.
    PERFORM FILL_CELL USING H 2 0 WA_FINAL1-employee_code.
    PERFORM FILL_CELL USING H 3 0 WA_FINAL1-first_name.
    PERFORM FILL_CELL USING H 4 0 WA_FINAL1-last_name.
    PERFORM FILL_CELL USING H 5 0 WA_FINAL1-gender.
    PERFORM FILL_CELL USING H 6 0 WA_FINAL1-work_address.
    PERFORM FILL_CELL USING H 7 0 WA_FINAL1-department.
    PERFORM FILL_CELL USING H 8 0 WA_FINAL1-location.
    PERFORM FILL_CELL USING H 9 0 WA_FINAL1-designation.
    PERFORM FILL_CELL USING H 10 0 WA_FINAL1-employee_level.
    PERFORM FILL_CELL USING H 11 0 WA_FINAL1-supervisor.
    PERFORM FILL_CELL USING H 12 0 WA_FINAL1-mobile.
    PERFORM FILL_CELL USING H 13 0 WA_FINAL1-work_phone.
    PERFORM FILL_CELL USING H 14 0 WA_FINAL1-email.
    ENDLOOP.
    CALL METHOD OF H_MAPL 'SaveAs' EXPORTING #1 = w_filename1
    #2 = 6.
    ."'c:\hr1_data.xls'.
    *CALL METHOD OF H_MAPL 'CLOSE'.
    *CALL METHOD OF H_EXCEL 'QUIT'.
    FREE OBJECT H_EXCEL.
    FREE OBJECT H_MAPL.
    disconnect from Excel
    FORM FILL_CELL *
    sets cell at coordinates i,j to value val boldtype bold *
    FORM FILL_CELL USING I J BOLD VAL.
    CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
    SET PROPERTY OF H_ZL 'Value' = VAL .
    GET PROPERTY OF H_ZL 'Font' = H_F.
    SET PROPERTY OF H_F 'Bold' = BOLD .
    ENDFORM.
    code}
    Edited by: Neliea on Nov 2, 2009 5:34 AM

    FORM download_excel.
      CREATE OBJECT w_excel 'EXCEL.APPLICATION'. "Create object for Excel
      SET PROPERTY OF w_excel  'VISIBLE' = 0. "In background Mode
      CALL METHOD OF w_excel 'WORKBOOKS' = w_workbook.
      CALL METHOD OF w_workbook 'ADD'. "Create a new Workbook
      SET PROPERTY OF w_excel 'SheetsInNewWorkbook' = 3. "No of sheets
    PERFORM fill_data. " Fill the internal tables with the req. data
      OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc = 0.
        DO.
          CLEAR: wa_string, wa_final.
          READ DATASET ld_file INTO wa_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            SPLIT wa_string AT con_tab INTO  wa_final-employee_sno
                                             wa_final-employee_code
                                             wa_final-first_name
                                             wa_final-last_name
                                             wa_final-gender
                                             wa_final-work_address
                                             wa_final-department
                                             wa_final-location
                                             wa_final-designation
                                             wa_final-employee_level
                                             wa_final-supervisor
                                             wa_final-mobile
                                             wa_final-work_phone
                                             wa_final-email
                                             wa_final-ice_contact
                                             wa_final-bloodgroup
                                             wa_final-dob
                                             wa_final-doj
                                             wa_final-dom
                                             wa_final-status.
            MOVE-CORRESPONDING wa_final TO wa_final1.
            APPEND wa_final1 TO int_temp.
          ENDIF.
        ENDDO.
        CLOSE DATASET ld_file.
    ENDIF.
      GET PROPERTY OF w_excel 'ActiveSheet' = w_worksheet.
      PERFORM download_sheet TABLES int_temp USING 2 'Book1'.
      GET PROPERTY OF w_excel 'ActiveSheet' = w_worksheet.
      GET PROPERTY OF w_excel 'ActiveWorkbook' = w_workbook.
      CALL METHOD OF w_workbook 'SAVEAS'
        EXPORTING #1 = p_file.
      FREE OBJECT: w_worksheet, w_excel.
    ENDFORM.                    "download_excel
    Edited by: Neliea on Nov 2, 2009 1:41 PM

  • Convert an internal table from ABAP to an xml file on the Unix server

    I'm trying to convert an internal table to an xml file.  This file will be downloaded to a unix server.  Can someone help?

    Hello Linda,
    You can combine the code given by Mahalakshmi with something like this:
    CALL FUNCTION 'FILE_GET_NAME'
          EXPORTING
            logical_filename = 'YOUR_LOGICAL_FILE_NAME
            parameter_1      = l_file_name_xml
          IMPORTING
            file_name        = l_file_server
          EXCEPTIONS
            file_not_found   = 1
            OTHERS           = 2.
        IF sy-subrc = 0.
          TRY.
            OPEN DATASET l_file_server FOR OUTPUT. "<IN TEXT MODE> <ENCODING DEFAULT>.
          ENDTRY.
          IF sy-subrc = 0.
          LOOP AT lt_xml INTO ls_xml.
            TRANSFER ls_xml TO l_file_server.
          ENDLOOP.
          CLOSE DATASET l_file_server.
    ENDIF.
    ENDIF.
    You need to have the server path defined (look at the paths with tcode AL11) and the file logical name with tcode FILE
    Best regards,
    Andri

  • How to download files from Application Server of Unix o.s to local director

    Hi All,
    I am trying to download files from Apllication server of Unix operating Systems to local file in excel sheet format using a z-program.but whenever I am trying to use OPEN dataset ........
    it is showing sy-subrc = 8.
    Can I have any clew please.
    Thanks in advance,
    Regards,
    AMEER.

    Hi Sreekanth,
    Thanks a lot for quick reply.I have to download that files from z-program only. I am giving you my code below.
    *& Report  ZTRAK_DOWNLOAD                                         *
    REPORT  ZTRAK_DOWNLOAD  MESSAGE-ID ZCT                   .
    SELECTION-SCREEN BEGIN OF BLOCK DOWNLOAD WITH FRAME TITLE TEXT1.
      PARAMETERS :
           SERDIR LIKE RLGRAP-FILENAME DEFAULT '/usr/trak',
           LOCDIR LIKE RLGRAP-FILENAME DEFAULT 'C:\Trak'.
    SELECTION-SCREEN END OF BLOCK DOWNLOAD .
    SELECTION-SCREEN BEGIN OF BLOCK INFO2 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT2.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT3.
    SELECTION-SCREEN END OF BLOCK INFO2 .
    SELECTION-SCREEN BEGIN OF BLOCK INFO3 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT4.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT5.
            SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT6.
           SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT7.
           SELECTION-SCREEN SKIP 2.
           SELECTION-SCREEN COMMENT 1(79) TEXT8.
    SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT9.
    SELECTION-SCREEN END OF BLOCK INFO3.
    *- Internal Table to output data in Excel
    DATA: BEGIN OF tab_excel OCCURS 0,
            col1(50),
            col2(132),
            col3(255),
            col4(100),
            col5(100),
            col6(50),
            COL7(60),
            col8(30),
            col9(30),
            col10(30),
            col11(20),
            col12(15),
            col13(15),
          END OF tab_excel.
    DATA: FILE LIKE RLGRAP-FILENAME .
    DATA: W_DATASET(80).
    INITIALIZATION.
      TEXT1  = 'Download Reports'.
      TEXT2 = 'The Program downloads the reports generated by Trak'.
      TEXT3 = 'Utility from Server to Local PC.'.
      TEXT4 = 'Check the following before executing the Program.'.
      TEXT5 = '     1. A valid Server path is provided.'.
      TEXT6 = '     2. A valid Local PC path is provided.'.
      TEXT7 = '     3. Local PC has 10 MB free space.'.
      TEXT8 = 'The report can be executed in the forground.'.
    TEXT9 =
    'The report should be executed after execution of Transaction TRAK'.
    AT SELECTION-SCREEN.
    IF SERDIR EQ ''.
    MESSAGE E001(ZCT).
    ENDIF.
    IF LOCDIR EQ ''.
    MESSAGE E002(ZCT).
    ENDIF.
    START-OF-SELECTION.
    Download ABAP Development Summary Report
    FILE =  '\ABAP_Report_Developments.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAP_Report_Developments.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download BDC Development Report
    FILE =  '\BDC_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/BDC_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Development Summary Report
    FILE = '\Developments_Summary_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Developments_Summary_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Enhancement Development Report
    FILE =  '\Enhancement_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Enhancement_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download field exit Development Report
    FILE =  '\Field_Exit_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Field_Exit_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Frequency & Purpose Report
    FILE =  '\Frequency_And_Purpose_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Frequency_And_Purpose_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Group Developments Report
    FILE =  '\FunctionGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Module Developments Report
    FILE = '\FunctionModule_Developments_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionModule_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    FILE =  '\Include_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Include_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download UserGroup Developments Report
    FILE =  '\UserGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Modified_Standard_SAP_Objects_Report
    FILE = '\Modified_Standard_SAP_Objects_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Modified_Standard_SAP_Objects_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    *FILE =  '\Include_Developments_Report.XLS'.
    *CONCATENATE LOCDIR FILE INTO FILE.
    *W_DATASET = '/Include_Developments_Report.dat'.
    *CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    *PERFORM INIT.
    Download SAP Script Developments Report
    FILE =  '\SAP_Scipt_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/SAP_Scipt_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Transaction Developments Report
    FILE =  '\Transaction_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Transaction_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download User Exits Developments Report
    FILE =  '\UserExits_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserExits_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download ABAP Query Developments Report
    FILE =  '\ABAPQuery_Developments_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAPQuery_Developments_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Functional Area Developments Report
    FILE =  '\FunctionalArea_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionalArea_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    MESSAGE S003(ZCT) WITH LOCDIR.
    END-OF-SELECTION.
    This routine checks whether file exists if yes downloads it to
    the Local PC
    FORM INIT.
    OPEN DATASET W_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    DO.
       IF SY-SUBRC <> 0.
          EXIT.
       ENDIF.
       READ DATASET W_DATASET INTO  tab_excel.
       APPEND tab_excel.
       CLEAR tab_excel.
    ENDDO.
         PERFORM DOWNLOAD_FILE.
    ENDFORM.
    This routine downloads the data in an XL format on local PC
    FORM Download_File .
      CALL FUNCTION 'WS_DOWNLOAD'
                EXPORTING
                     FILENAME                = FILE
                     FILETYPE                = 'DAT'
                TABLES
                     DATA_TAB                = tab_excel
                EXCEPTIONS
                     FILE_OPEN_ERROR         = 1
                     FILE_WRITE_ERROR        = 2
                     INVALID_FILESIZE        = 3
                     INVALID_TYPE            = 4
                     NO_BATCH                = 5
                     UNKNOWN_ERROR           = 6
                     INVALID_TABLE_WIDTH     = 7
                     GUI_REFUSE_FILETRANSFER = 8
                     CUSTOMER_ERROR          = 9
                     OTHERS                  = 10.
        IF sy-subrc <> 0.
         message ''.       " Error in file transfer
        ELSE.
          CLEAR TAB_EXCEL.
          REFRESH TAB_EXCEL.
          FILE = ''.
          W_DATASET = ''.
        ENDIF.
    ENDFORM.
    I have created those files in Application Server running in another z-program in background mode.Then I am trying to download those files using above the program.I am creating those trak/Trak files manually and I can able to see those files in A.S level.But when downloading the same files I am facing the problem.
    regards,
    Ameer

  • How to download the files, that are located in server, from the client?

    Hello folks,
    My program is like that, the files are located in the server and stored in file system.
    I can only know the server name and the directory listing, so that I can show the file names from that directory on the browser.
    The user might downloads those files from the browser and he might deletes those files through the browser.
    That user has valid right to do so and the files can be any type of extension.
    So how can I write this kind of program? Currently the whole system is in struts, so how can I make compatible with struts technology?
    Do u have any ideas?
    Regards,
    Phyo

    Thank you, grigpm. But actually I want the user to select the file that he wants to download rather than setting it in the configuration file. If it is possible, let me see the sample code of FileManager servlet. I've tried with some ways but I can only download from the same server with the application server. I want to download from different server. I hope someone can help me with sample code....
    Best regards,
    Phyo

  • Download file into non-sap server

    Hi all,
    My requirement is to  my program should be able to download the file into Mapped drive , which is Non-sap server .
    is it posible ?
    Thanks,
    Rani

    Have you tried it?  I assume that your talking about something other than desktop target?  If so, construct yourself a small test program, containing open dataset for output in text mode and check the return code.

  • File Download from Server location - JSP

    Hi SDN,
    I have a txt file in a folder created in server location under the path /usr/sap/EPD/JC00/j2ee/cluster/server0. On click of the link correspondin to the file name in JSP, i have to open the file with the pop up to save, open or cancel. I have to achieve this in the JSP. I am currently
    <td> <a href="/usr/sap/EPD/JC00/j2ee/cluster/server0/XXX/yyy.txt"> <%=fileName%></a ></td>
    I am not able to achieve the intended functionality. How to achieve it. Expecting your valuable replies
    Thanks & Regards,
    p188071

    hi,
    I am using the following snippet
    String filePath ="/usr/sap/EPD/JC00/j2ee/cluster/server0/xxx/yyy.txt"; // path of your excel file
         HttpServletResponse resp = componentRequest.getServletResponse(true);
         resp.setContentType("text/html; charset=UTF-8");
           // set the exact content type
         resp.setHeader("Content-Disposition","attachment; filename=\""+ filePath + "\"");
    It is creating downloading a txt file with the name usr_sap_EPD_xxx_yyy.txt without actual contents inside the file. It is just generating a file without writing the contents into that file.
    What should I do?
    p188071

  • How to refer to the xml file located on unix server

    I have a xml file which is located on unix server and have a hard time, reverse engg. it .
    if anyone has any knowledge on this , that will be helpful.

    I have application server where my xml is located.e..g /tmp/xyz.xml
    I have designer on my laptop from where i have created a agent which points to my application server.
    I am able to create a data server which does say test successful.
    In model i tried to create new model and trying to reverse engg. the xml now i get following error .
    java.sql.SQLException: Could not generate the DTD because the file could not be created. Verify that you have write permission in the directory.
    if you can point me to documentation which has some information on this will be helpful or any hint..

  • What is the problem in my account I could not download from the store, whether programs are free or non-free I hope you fix the problem or Chrho me and I repaired the problem

    What is the problem in my account I could not download from the store, whether programs are free or non-free I hope you fix the problem or Chrho me and I repaired the problem
    thank you...

    Nobody here can fix your problem, we do not work for Apple. And I have no idea what "Chrho" means. Neither does Google.
    So - exactly what happens when you try to download a program? And from where are you trying to download it?

  • Using unix 'diff' command to publish iweb to non .mac server

    It is a common problem that you can't upload incremental changes to a website a web server that is not a .mac. Recently I found that the unix (shell) 'diff -qr' works nicely for this.
    However I can't seem to get this to work in automator. That is where I need some help.
    What I did :
    I have an iweb website in my directory
    Documents/website
    I made a second directory where I store my uploaded version of the website:
    Documents/websiteonserver
    Using a shell script I want to compare the differences between these two directories using the diff command in a shell script. When I run 'diff -qr websiteonserver website' in a terminal window, it gives a nice overview of which files are changed and which ones are new. When workin with iWeb this saves me a lot of time uploading my homepage to a non .mac server. I can only upload the changed files, which is usually only a few. Diff does not look at timestamps (which are useless in the iweb case) but it actually looks into a file and with the -q option it stops when it finds a difference. With the -r added (-qr) it also looks through all subdirectories and compares files with the same name.
    I like to automate this process so that my wife can update our family homepage with just one mouseclick (or as few as possible)
    Unfortunately the diff command in automator gives an error, and there's no info on why it does this.
    The commands I gave:
    cd Documents
    diff -qr websiteonserver website
    (using PWD i verified that the path is correct like this). The only stumbling block for automator seems to be the diff command. Anybody any suggestions on this?
    The next challenge is to take the diff output and use that to upload only changed/new files to a ftp server.
    Any help / ideas are welcome
    Greetings,
    Adriaan

    Dear Cyclosaurus,
    I used a single command as us specified. It really helped to add the path to the directories I wanted to compare. So now at least I got it two work partly:
    It seems to work only if I compare two files. Comparing directories still does not work. Maybe diff generates some kind of error code when doing this??? It does not do that in the shell.
    If I compare all files in directories + subdirectories , the workflow does not work. It seems as if it only accepts a single output line or so from the diff function. If there is more output (or maybe some newline character) the workflow halts. Very peculiar.
    mmm.... I will try to make a shell script which I can run in automator. In the script file I will then generate a txt file. Then the automator can run the script and then it can open the resulting file in a text editor. See if that works.
    mmm nope. I made a script like this:
    #!/bin/bash
    diff -qr ~/Documents/websiteon_theserver/ ~/Documents/website/ > ~/Documents/logfile.txt
    I modified the atributes to executable and I could run it from the command line. The logfile.txt was created and has the correct info. I could not run it from automator...
    I did copy the last line from the script into automator. And also there it does create the logfile, but the automator still says there was an error and stops.
    maybe I should try Applescript, were it not that I am totally clueless on that language...

  • I want to write a program to download file from particular location

    I want to write a program to download file from particular location to client side in jsp.
    Need guidance...

    Hi Hello333,
    You have to use a servlet :
    public class SomeServlet extends HttpServlet {
        public void doPost(HttpServletRequest req, HttpServletResponse resp) throws
                                   ServletException, IOException {
            ServletOutputStream out = resp.getOutputStream();
            resp.setContentType("application/pdf"); // here is an example for a PDF file
            resp.setContentLength(fileLength); // length of the file
            out.write(fileBinaries); // the binaries of the file
    }

Maybe you are looking for

  • Can a directory to be created if it does not exist on FTP server?

    Hello SOA experts, We are good with most common usage of all Adapters. But recently, I am facing a challenge when archive files on FTP server. Archive files need to be placed into different folders for each month. For instance, ./archive/201308 for f

  • 997 Acknowledgement Report

    Hi, I'm using BizTalk 2013. It seems like 997s are getting consolidated with the interchanges and those details can be viewed from BizTalk Administration Console. We have used community who does not have access to BizTalk group, is there way to get t

  • How to provide date and time stamp to the extracted file.

    I 'm downloading data from DB to Flat file using GUI_DOWLOAD. whenever it is executed it is creating with a file name. if i rerun the program the file is overwriting with the same name. now based on the requirement how many times i executed, that man

  • Photoshop running painfully slow!

    need some help, I just built a brand new computer, and it should be cap[able of running all the adobe apps. However when it comes to photoshop, it basically dies. I am trying to render out a raw video but won't open the menu settings to get it going.

  • Anyone know of a good unix forum so i dont have to ask unix questions here?

    Anyone know of a good unix forum so i dont have to ask unix questions here? and how bout a good unix tutorial?