Application Server Download, Upgrdation 4.6b to ECC 6.0

Hi Experts,
We are undergoing upgrade from 4.6b to ECC6.0,
OPEN DATASET APPL_FILE FOR OUTPUT IN TEXT MODE.
This statement is written in 4.6b version, the ouput is perfect.
In ECC 6.0 the statement is
OPEN DATASET APPL_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
In database we have charater as # in the address field, but this is making a new line character while downloading file from ECC,
Please adivce...
Thanks in Advance..
Regards,
IFF

Hi,
In Unicode conversion ' # ' representing ' space ' so space  in target Unicode . Unicode is a matrix form of structure u mismatch the target Unicode system.  
Thank you,
Gopi.S

Similar Messages

  • Application Server Download - Tab Delimited Text File

    Hi,
    I am trying to create a tab delimited text file in application server. Is there any option should i use with the Open Dataset / Transfer statements? My requirement is to download the file (Text - Tab Delimited) into Excel for further analysis. Can you please suggest me a suitable solution for this?
    Thanks,
    Kannan.

    Hi,
    You can use transactions CG3Y and CG3Z. Its very simple.
    Refer sample code:
    constants: c_split TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
    c_path TYPE VALUE char100 '/local/data/interface/A28/DM/OUT'.
    *& Form f1001_browse_appl_file
    Pick up the file path for the file in the application server
    FORM f1001_browse_appl_file .
    DATA: lcl_directory TYPE char128.
    lcl_directory = p_direct.
    CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    EXPORTING
    directory = lcl_directory
    filemask = c_mask
    IMPORTING
    serverfile = p_f2
    EXCEPTIONS
    canceled_by_user = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE s000 WITH text-039.
    EXIT.
    ENDIF.
    ENDFORM. " f1001_browse_appl_file
    *& Form f1004_app_file
    upload the file from the application server
    FORM f1004_app_file .
    REFRESH: i_input.
    OPEN DATASET p_f2 IN TEXT MODE ENCODING DEFAULT FOR INPUT.
    IF sy-subrc EQ 0.
    DO.
    READ DATASET p_f2 INTO wa_input_rec.
    IF sy-subrc 0.
    MESSAGE s000 WITH text-030.
    EXIT.
    ENDIF.
    o
    + Split The CSV record into Work Area
    PERFORM f0025_record_split.
    o
    + Populate internal table.
    APPEND wa_input TO i_input.
    CLEAR wa_input.
    ENDDO.
    ENDIF.
    ENDFORM. " f1004_app_file
    *& Form f0025_record_split
    Move the assembly layer file into the work area
    FORM f0025_record_split .
    CLEAR wa_input.
    SPLIT wa_input_rec AT c_split INTO
    wa_input-legacykey
    wa_input-profile_role
    wa_input-read_date.
    ENDFORM. " f0025_record_split
    DO your manipulation with the data records here.
    Popualte data into final internal table and write it back to application server at the desired path.
    *& Form f0020_write_application
    Write error log to application Server
    FORM f0020_write_application .
    IF p_f1 IS NOT INITIAL.
    CONCATENATE p_direct p_obj sy-datum text-037 INTO p_f2.
    ELSEIF p_f2 IS NOT INITIAL.
    REPLACE text-036 IN p_f2 WITH text-037.
    ENDIF.
    OPEN DATASET p_f2 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc 0.
    EXIT.
    ENDIF.
    LOOP AT i_error INTO wa_error.
    TRANSFER wa_error TO p_f2.
    IF sy-subrc 0.
    EXIT.
    ENDIF.
    CLEAR wa_error.
    ENDLOOP.
    CLOSE DATASET p_f2.
    ENDFORM. " f0020_write_application
    HTH,
    Regards,
    Dhruv Shah

  • Oracle 9iAS Application Server Download gives me page can't be displayed

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    - Server name: http://download.oracle.com/otn/nt/ias/9iAS/9iAS10222a/disk1_001.zip
    - Filename: Any file name from the page
    - Date/Time: 04/25/02
    - Browser + Version I tried with Internet Explorer 5.0
    - O/S + Version: Windows 2000
    - Error Msg: Page cannot be displayed
    I have been trying to access it for the last 2 days and nothing happen. Please advice
    The page cannot be displayed
    The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
    Please try the following:
    Click the Refresh button, or try again later.
    If you typed the page address in the Address bar, make sure that it is spelled correctly.
    To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP).
    If your Network Administrator has enabled it, Microsoft Windows can examine your network and automatically discover network connection settings.
    If you would like Windows to try and discover them,
    click Detect Network Settings
    Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed.
    If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.
    Click the Back button to try another link.
    Cannot find server or DNS Error
    Internet Explorer

    how is the status of application express in dba_registry?
    Did you do post installation steps like unlocking anonymous user and setting http port?

  • Download to application server File tcode relavance

    Hi
    i need to know the process for application server download and defining the same in file transaction
    also the process further to move the logical path to the TQA etc system
    also pls send me working example of the downloading to application server to refer for ECC 7.0 as there are some issues to be taken care in new version
    regards
    Nishant

    no replies new quesion raised

  • Urgent : Download file from Application Server via Process Chain.

    Hi Experts,
    My requirement is to download the file from Application Server to local work station using an ABAP Program .
    I want including the above ABAP program in a process chain to execute  the program daily,
    I tried to use ARCHIVFILE_SERVER_TO_CLIENT and GUI_DOWNLOAD but unfortunately both the above FM doesn't support to run through Process chain.
    Can any one of you help me to send the code which selects a file from application server, downloads to local system and deletes it.
    Thank you very much for spending your precious time in this regard.

    Hi Sailekha,
    Regarding your case ..
    I suggest you to create the program where it run this function: WS_DOWNLOAD.
    After it, the program is run by your process chain.
    Hopefully it can help you a lot.
    Regards,
    Niel.
    thanks for the points you choose to assign.

  • How to install the new application server

    hello everyone.
    i need help,  to add an application server in an exiting SAP installation (ECC 5. , already 1 application servver is existing due to load we r planning to add 1 more application server )
    Please, need a step by step instruction.
    quick reply is suitable rewareded with points .
    Regards
    Vijay

    Hi,
    I don't know fi you want to install the dialog instance on the same or on a different server. First, please refer to installation guide
    in session "dialog instance installation" for step by step installation.
    Note that if you want to install this dialog instance on an other server some directories in central system should be share such as: profile,global and
    exe directory.
    Best regards,
    Olivier

  • Japanese character problem while downloading file to application server

    Hello All,
    We are facing a strange problem while downloading a file to application server when file contains japanese text.
    We are downloading vendor and customer information in a flat file format on application server. When the login language is EN program show ouput in a properly formatted manner.
    When the login language is JA (japanese) program does download file with customer vendor data. I can see the description is japanese language but the formatting is gone for a toss.
    We are facing similar issue with other programs downloading files on the application server.
    I am using OPEN DATASET........ENCODING DEFAULT. and working on unicode enabaled ECC 6.0 system
    Quick help appriciated.
    Thanks!

    Hi
    Sometimes this also happens because of your desktop setting.Make sure that your OS also supports the JAPANESSE language.
    Ask your technical support team to enable them in your desktop.
    Thanks & Regards
    Jyo

  • While downloading file to application server its overwriting the earlier fi

    hi if i am using below code with date time stamp the file is downloaded to the application server correctly and each time i execut eht program a difference file is generated as date time stamp differs each time but
    whne i remove the date time stamp ie sy-datum and sy-uzeit as we dont need to display the date time stamp with the file each time i execute the program a file is generated but it overwrites the ealier existing file please suggest as each time it shoul generate a new file....
    Concatenate file name sy-datum sy-uzeit '.txt' into v_datetimefile
    file on Appplication Server is selected
      CALL FUNCTION 'FILE_GET_NAME'
         EXPORTING
                CLIENT                        = SY-MANDT
               logical_filename              = 'ZFILE'

    Hi,
    first of all decide you have to overwrite the existing file or you want to create the new, i think the answer is there in your query itself, if you want to create new then concatenate the date and time, else don't do that.
    below are the additions we can use while opening the data set.
    FOR INPUT
    FOR OUTPUT
    FOR APPENDING
    IN BINARY MODE
    IN TEXT MODE
    AT POSITION p
    TYPE ctrl
    MESSAGE mess
    FILTER f
    Reward if useful.
    Thanks,
    Sreeram.

  • Unable to download file to application server

    Hi,
    I am trying to download a file to the application server. I've also attached my code below.After the execution of this program, it is just returning blank values to the application server file. Let me know why it is not populating the values to the files.
    Raj.
    tables: kna1,
            knb1.
    DATA: BEGIN OF itab_ls OCCURS 0,
           kunnr LIKE kna1-kunnr,
           altkn LIKE knb1-altkn,
         END OF itab_ls.
    TYPES : BEGIN OF t_file,
              date(5) TYPE c,   " Date
              time(5) TYPE c,   " Time
            end of t_file.
    DATA : gt_file TYPE TABLE OF t_file, " File Path
           g_spath TYPE fileextern,   " Path
           g_fieldname   TYPE dynfnam. " Field Name
    SELECTION-SCREEN BEGIN OF BLOCK b_01 WITH FRAME TITLE text-b01.
    SELECT-OPTIONS s_erdat FOR kna1-erdat obligatory.
    SELECTION-SCREEN END   OF BLOCK b_01.
    SELECTION-SCREEN BEGIN OF BLOCK b_02 WITH FRAME TITLE text-b02.
    SELECTION-SCREEN BEGIN OF LINE.
    Radio button for Presentation server file
    PARAMETERS    : p_pres RADIOBUTTON GROUP file DEFAULT 'X'
                    USER-COMMAND file.
    SELECTION-SCREEN COMMENT 3(20)  text-s01 FOR FIELD p_pres.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 23(22) text-s02 FOR FIELD p_flnam1
                                                   MODIF ID com.
    Presentation server file Name
    PARAMETERS    : p_flnam1 TYPE localfile MODIF ID com ."MEMORY ID zp1.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    Radio button for Application server file
    PARAMETERS    : p_app RADIOBUTTON GROUP file  .
    SELECTION-SCREEN COMMENT 3(20)  text-s03 FOR FIELD p_app.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 23(22) text-s04 FOR FIELD p_flnam2
                                                   MODIF ID com.
    Application server file Name
    PARAMETERS    : p_flnam2 TYPE localfile MODIF ID com ."MEMORY ID zp2 .
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN END   OF BLOCK b_02.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnam1.
      g_fieldname = 'P_PCFILE'.
      PERFORM call_pres_help USING    g_fieldname
                             CHANGING p_flnam1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnam2.
      PERFORM call_app_help CHANGING p_flnam2.
    AT SELECTION-SCREEN OUTPUT.
    Start-of-selection.
    SELECT kna1kunnr knb1altkn kna1ktokd kna1erdat
    INTO CORRESPONDING FIELDS OF TABLE itab_ls
    FROM kna1 INNER JOIN knb1 ON kna1kunnr = knb1kunnr WHERE kna1~erdat in
    s_erdat AND KNA1KTOKD = 'Z002' order by kna1kunnr.
    OPEN DATASET p_flnam2 for output IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc EQ 0.
      LOOP AT itab_ls.
        TRANSFER itab_ls TO p_flnam2.
      ENDLOOP.
      CLOSE DATASET p_flnam2.
    endif.
    WRITE:/'SAP Ship-toCustID', 18 'LegacyCustID'.
    ULINE.
    Loop at itab_ls.
      write: /3 itab_ls-KUNNR, 18 itab_ls-ALTKN.
    endloop.
    PERFORM download_file.
    *&      Form  call_pres_help
          text
         -->P_FIELDNAME  text
         -->P_PARAMETER  text
    FORM call_pres_help  USING    p_fieldname    TYPE dynfnam
                        CHANGING p_parameter    TYPE localfile.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = sy-repid
          dynpro_number = sy-dynnr
          field_name    = p_fieldname
        IMPORTING
          file_name     = p_parameter.
    ENDFORM.                    "call_pres_help
    *&      Form  call_app_help
          text
         -->P_PARAMETER  text
    FORM call_app_help  CHANGING p_parameter    TYPE localfile.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = g_spath
        IMPORTING
          serverfile       = p_parameter
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "call_app_help

    Hi,
    If the SY-SUBRC is equal to 8, then error is nothing but "The file could not be opened". So pls check the file name again.
    And for write statement,
    If SY-SUBRC = 4 then the Contents of name are invalid, statement could not be executed, and contents of destination remain unchanged. So pls do check this also.
    regs,
    Venkat Ramanan
    Message was edited by: Venkat Ramanan Natarajan

  • Re: How to download an internal table to application server.. Unicode

    Hi..
    i have populated an internal table of a big structure (custom table) which has more than 100 fields.
    i wanted to download it into the application server.. as a tab de-limited file..
    Can anyone guide me how to proceed with
    Thanks In Advance
    Guhapriyan..

    HI
    this program will convert the internal table to the xml document
    Report ZPRUEBA_MML_13 *
    Export an internal table to XML document *
    NO BORRAR ESTE CODIGO *
    REPORT Z_table_xml.
    PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
    TYPES: BEGIN OF TURNOS,
    LU LIKE T552A-TPR01,
    MA LIKE T552A-TPR01,
    MI LIKE T552A-TPR01,
    JU LIKE T552A-TPR01,
    VI LIKE T552A-TPR01,
    SA LIKE T552A-TPR01,
    DO LIKE T552A-TPR01,
    END OF TURNOS.
    TYPE SOCIO *
    TYPES: BEGIN OF SOCIO,
    NUMERO LIKE PERNR-PERNR,
    REPOSICION LIKE PA0050-ZAUVE,
    NOMBRE LIKE PA0002-VORNA,
    TURNOS TYPE TURNOS,
    END OF SOCIO.
    TYPE SOCIO *
    ESTRUCTURA ACCESOS *
    DATA: BEGIN OF ACCESOS OCCURS 0,
    SOCIO TYPE SOCIO,
    END OF ACCESOS.
    ESTRUCTURA ACCESOS *
    START OF SELECTION *
    START-OF-SELECTION.
    PERFORM LLENA_ACCESOS.
    PERFORM DESCARGA_XML.
    END-OF-SELECTION.
    END OF SELECTION *
    FORM LLENA_ACCESOS *
    FORM LLENA_ACCESOS.
    REFRESH ACCESOS.
    CLEAR ACCESOS.
    MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
    'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
    '0' TO ACCESOS-SOCIO-REPOSICION,
    'T1' TO ACCESOS-SOCIO-TURNOS-LU,
    'T2' TO ACCESOS-SOCIO-TURNOS-MA,
    'T3' TO ACCESOS-SOCIO-TURNOS-MI,
    'T4' TO ACCESOS-SOCIO-TURNOS-JU,
    'T5' TO ACCESOS-SOCIO-TURNOS-VI,
    'T6' TO ACCESOS-SOCIO-TURNOS-SA,
    'T7' TO ACCESOS-SOCIO-TURNOS-DO.
    APPEND ACCESOS.
    CLEAR ACCESOS.
    MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
    'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
    '0' TO ACCESOS-SOCIO-REPOSICION,
    'T1' TO ACCESOS-SOCIO-TURNOS-LU,
    'T2' TO ACCESOS-SOCIO-TURNOS-MA,
    'T3' TO ACCESOS-SOCIO-TURNOS-MI,
    'T4' TO ACCESOS-SOCIO-TURNOS-JU,
    'T5' TO ACCESOS-SOCIO-TURNOS-VI,
    'T6' TO ACCESOS-SOCIO-TURNOS-SA,
    'T7' TO ACCESOS-SOCIO-TURNOS-DO.
    APPEND ACCESOS.
    ENDFORM.
    FORM LLENA_ACCESOS *
    FORM DESCARGA_XML *
    FORM DESCARGA_XML.
    DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
    M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
    G_IXML TYPE REF TO IF_IXML,
    W_STRING TYPE XSTRING,
    W_SIZE TYPE I,
    W_RESULT TYPE I,
    W_LINE TYPE STRING,
    IT_XML TYPE DCXMLLINES,
    S_XML LIKE LINE OF IT_XML,
    W_RC LIKE SY-SUBRC.
    DATA: XML TYPE DCXMLLINES.
    DATA: RC TYPE SY-SUBRC,
    BEGIN OF XML_TAB OCCURS 0,
    D LIKE LINE OF XML,
    END OF XML_TAB.
    CLASS CL_IXML DEFINITION LOAD.
    G_IXML = CL_IXML=>CREATE( ).
    CHECK NOT G_IXML IS INITIAL.
    M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
    CHECK NOT M_DOCUMENT IS INITIAL.
    WRITE: / 'Converting DATA TO DOM 1:'.
    CALL FUNCTION 'SDIXML_DATA_TO_DOM'
    EXPORTING
    NAME = 'ACCESOS'
    DATAOBJECT = ACCESOS[]
    IMPORTING
    DATA_AS_DOM = L_DOM
    CHANGING
    DOCUMENT = M_DOCUMENT
    EXCEPTIONS
    ILLEGAL_NAME = 1
    OTHERS = 2.
    IF SY-SUBRC = 0.
    WRITE 'Ok'.
    ELSE.
    WRITE: 'Err =',
    SY-SUBRC.
    ENDIF.
    CHECK NOT L_DOM IS INITIAL.
    W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
    IF W_RC IS INITIAL.
    WRITE 'Ok'.
    ELSE.
    WRITE: 'Err =',
    W_RC.
    ENDIF.
    CALL FUNCTION 'SDIXML_DOM_TO_XML'
    EXPORTING
    DOCUMENT = M_DOCUMENT
    IMPORTING
    XML_AS_STRING = W_STRING
    SIZE = W_SIZE
    TABLES
    XML_AS_TABLE = IT_XML
    EXCEPTIONS
    NO_DOCUMENT = 1
    OTHERS = 2.
    IF SY-SUBRC = 0.
    WRITE 'Ok'.
    ELSE.
    WRITE: 'Err =',
    SY-SUBRC.
    ENDIF.
    LOOP AT IT_XML INTO XML_TAB-D.
    APPEND XML_TAB.
    ENDLOOP.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_SIZE
    FILENAME = GK_RUTA
    FILETYPE = 'BIN'
    TABLES
    DATA_TAB = XML_TAB
    EXCEPTIONS
    OTHERS = 10.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    FORM DESCARGA_XML *
    u can check the link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-samples/conversion  of abap data to xml.doc
    Regards,
    Naveen

  • Downloading to Application server

    Hi gurus,
    My requirement is to download a file to application server in background mode by DYNAMICALLY SELECTING THE DIRECTORIES AVAILABLE in application server.
    i.e. i must display all the directories available in application server in the selection screen than the user will select which directory and folder he wants to download.
    I used both F4_DXFILENAME_TOPRECURSION and SAPDMC/LSM_F4_SERVER_FILE but the problem is:-
    F4_DXFILENAME_TOPRECURSION :-
    When we use the above FM than by default it displays all the files in 'H:' directory only , we cannot access any other directory.
    So we need to assign the I_PATH = J:(one of the other directory available)  in the FM(I_PATH is one of the parameter in FM) and than we can easily store the output inside 'J:'
    But this does not serve the purpose since we can see only 'J:' directory now but the user wants to see all the directories and depending on requirement they will choose the path..........
    SAPDMC/LSM_F4_SERVER_FILE :-
    even this FM has the same problem and we need to pass the particular directory path inside this.
    Waiting for ur replies..its urgent
    points will be definitely awarded

    Hi janak dolia,
    to download this the procedure:
    you can use the FM 'EXCEL_OLE_STANDARD_DAT ' for this purpose.
    this FM 'EXCEL_OLE_STANDARD_DAT' can be used to start Excel with a new sheet and transfer data from an internal table to the sheet.
    Here are some of the parameters:
    file_name: Name and path of the Excel worksheet file e.g. ?C:TEMPZTEST?
    data_tab: Name of the internal table that should be uploaded to Exvcel
    fieldnames: Internal tabel with column headers
    How to build the field names table:
    data: begin of i_fieldnames occurs 20,
    field(60), end of i_fieldnames.
    i_fieldnames-field = ?This is column 1?. append i_fieldnames-field.
    i_fieldnames-field = ?This is column 2?. append i_fieldnames-field.
    to upload follow this:
    OPEN DATASET dsn FOR INPUT IN BINARY MODE.
    DO.
    READ DATASET dsn INTO itab-field.
    IF sy-subrc = 0.
    APPEND itab.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    [/code]Rob
    or Try this function module.
    FILE_READ_AND_CONVERT_SAP_DATA
    pass 'XLS' to I_FILEFORMAT..
    Regards,
    Sreenivasa sarma K.
    Edited by: sharmashree kashi on Mar 27, 2008 9:08 AM

  • Download file from FTP Server to Application Server

    Hi Friends,
    Using the standard SAP Program RSFTP002, I was able to download the file to my local PC. But my requirement is to download the file from FTP to application server.
    For RSFTP002, I am passing the username, password, host and in command 1 I am passing lcd :\temp, command 2 get filename. The file gets downloaded into c:\temp. If I do the same passing the app server path in command 1 as /usr/sap/tmp I get an error that pass cannot be found.
    Anyone please help me how to donload the file from ftp to app server.
    Thanks,
    Deepthi

    If I remember correctly the activation type on the technical settings tab must be set to "start on application server" in transaction SM59 for the RFC destination for the FTP server.  This should allow the files to be transferred to/from the application server.
    Regards,
    Steve.

  • Problem in Downloading File from Application Server

    Hi All,
    We have an Requirement that, iam putting the Flat File
    ( Output Of a Report ) in to the
    Application Server(AL11) By using the OpendataSet, Transer , Close DataSet.
    When iam trying to Downloading the Flat File through the FM, GUI_DOWNLOAD, the Data is coming Correctly.
    But the Problem is , when trying to Downloading through AL11 i.e System -> List -> Local File  it is not coming Correctly.
    ( Java People is going to Connect with the Application Server for the Flat File )
    Kindly Clarify the Problem.
    Points will be Rewarded.
    Regards,
    Kiran.I

    Hi nl,
    1. this program will display
       selection screen
      and ask two things :
    a) application server filename
    b) local file name
    2. then it will download the file
    (the file name is CASE Sensitivie)
    3.  just try it (just copy paste )
    *& Report  YBCR_FILEDOWNLOAD                                           *
    REPORT  ybcr_filedownload                       .
    DATA
    DATA : file_name TYPE string.
    DATA : BEGIN OF itab OCCURS 0,
           ln(255) TYPE c,
           END OF itab.
    SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : appfn(150) TYPE c LOWER CASE OBLIGATORY.
    PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CLEAR p_file.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p_file.
      file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
      OPEN DATASET appfn FOR INPUT IN TEXT MODE  ENCODING DEFAULT .
      IF sy-subrc <> 0.
        MESSAGE s999(yhr) WITH 'COULD NOT OPEN FILE ON APP SERVER'.
        LEAVE LIST-PROCESSING.
      ENDIF.
      DO.
        READ DATASET appfn INTO itab.
        IF sy-subrc = 0.
          APPEND itab.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      file_name = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                    =
          filename                        = file_name
      FILETYPE                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      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                      = ' '
    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.
    regards,
    amit m.

  • Downloading a text file from application server

    Hi Freinds,
    I am genarating a text file in our application server (Folder /usr/sap/dbi/) I need to download this text file in my destop pc or some other windows server.
    What do I have to do? What is the procedure, Pls help.
    If someone have sample code, pls send.
    We are running SAP ECC5.0 on an iSeries (AS/400) Database DB2/400.
    Regards
    Thanura

    Hi,
    try this:
    REPORT ZGRO_TEST.
    DATA: DATEI_A(30) TYPE C VALUE '/tmp/matnr.txt'.
    DATA: DATEI_PC TYPE STRING VALUE 'C:\MATNR.TXT'.
    DATA: ITAB        TYPE TABLE OF MARA WITH HEADER LINE.
    START-OF-SELECTION.
      PERFORM DATEI_EINLESEN.
      PERFORM DATEI_DOWNLOAD.
    FORM DATEI_EINLESEN.
      OPEN DATASET DATEI_A FOR INPUT IN TEXT MODE.
      IF SY-SUBRC NE 0. STOP. ENDIF.
      DO.
        READ DATASET DATEI_A INTO ITAB.
        IF SY-SUBRC <> 0. EXIT. ENDIF.
        APPEND ITAB.
      ENDDO.
      CLOSE DATASET DATEI_A.
      IF SY-SUBRC NE 0. STOP. ENDIF.
    ENDFORM.                    "DATEI_EINLESEN
    FORM DATEI_DOWNLOAD.
    Datei downloaden
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
          FILENAME                = DATEI_PC
          FILETYPE                = 'ASC'
        CHANGING
          DATA_TAB                = ITAB[]
        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
          NOT_SUPPORTED_BY_GUI    = 22
          ERROR_NO_GUI            = 23
          OTHERS                  = 24.
      IF SY-SUBRC NE 0. STOP. ENDIF.
    ENDFORM.                    "DATEI_DOWNLOAD
    Regards, Dieter

  • How to download pdf from application server

    hi all,
    anybody has code to download pdf from application server to presentation server.
    right now i get the pdf file on to the desktop but i get error on opening.
    gui_download gives error if i use xstring.
    pl advice.
    thanks.
    sap fan.

    Hi,
    use the below code to download file from app server to presentation server
    PARAMETERS: S_file TYPE SAPB-SAPPFAD
    default '\folder1\abc,pdf'.
    PARAMETERS: t_lfile TYPE SAPB-SAPPFAD
    default 'c:\temp\xyx.pdf'.
    START-OF-SELECTION.
      CALL FUNCTION 'ARCHIVFILE_SERVER_TO_CLIENT'
        EXPORTING
          path             = source_file
         TARGETPATH        = target_lfile
    EXCEPTIONS
       ERROR_FILE       = 1
       OTHERS           = 2
      IF sy-subrc eq  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

Maybe you are looking for

  • How to put correct name for sheet in loop

    Hi I posted you my code , I need you to correct one line .  I want to read A1 to A137 into   sheets().activate  by counting i . But when I type  sheet(A & i ).Activate  it errors me "Subscript out of Range" and A is empty . Thanks  Sub CopymMonthlyda

  • Back reference for regular expressions on "Search & Replace".

    Can't I reference a result from my Regular Expression used on "Search Clause" into my "Replace Clause"? What I'm doing is: Using JDev 10.1.3 DP, Search Menu -> Replace in Files... Select "Regular Expressions" Text: (A[0-9]*?_)(.) Replace with: $2 (re

  • Async. Gateway log question ...

    My Async. GateWay log files show; ***** Performing Daily Maintenance *** Maintenance: Checking Account Status --- PostOfficeName.UserName01 Maintenance: Checking Account Status --- PostOfficeName.UserName02 Maintenance: Checking Account Status --- Po

  • Premiere Pro CS5.5 to CS6 and save back to CS5.5

    I was given project in Premiere Pro CS5.5 to work on in CS6, but have to save it back again in CS5.5. Is this possible? If so. how does one do it?

  • ORA-24373

    Hello. I have a lot of SQL statements (like 2-3 Mio) - plain inserts, deletes and updates. In a previous post, I asked how to embed exceptions for the statements: Re: exceptions for a small SQL script (now with optimization question) Here is the solu