Downloading Unix  File

Hi ,
I am downloading file in Unix in application as well as presentation server.
could anybody pleade tell me how should I test these file .
Regards.
Kusum.

Yes , you are right, but if you application server is unix, then AL11 will fetch data from Unix. However, if you wish to see the file on the unix OS and not AL11, you can ask your system administrator for the same.
With respect to presentation server, it doesn't matter what operating system you are on because you will see the file on your local PC whereever you download the file to.
regards,
Advait

Similar Messages

  • DATA TRANSFER - How to get a SINGLE SPACE in downloaded txt file from UNIX?

    Hi Experts,
    Am sending data from SAP to UNIX/ Application server and text file on desk top as well.
    So, I am keeping a single character just SPACE at the END of each record.
    Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.
    Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.
    But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!
    Am doing every thing same in both cases.
    So,
    1 - Why its happening in case of UNIX file?
    2 - How to get a SINGLE SPACE  at the END in the downloaded file from UNIX?
    thanq

    Its there, I am talking abut this -
    OPEN DATASET - linefeed
    Syntax
    ... WITH { NATIVE
             | SMART
             | UNIX
             | WINDOWS } LINEFEED ... .
    Alternatives:
    1. ... WITH NATIVE LINEFEED
    2. ... WITH SMART LINEFEED
    3. ... WITH UNIX LINEFEED
    4. ... WITH WINDOWS LINEFEED
    Effect
    : These additions determine which line end marker is used for text files or legacy text files. If these additions are used, the profile parameter abap/NTfmode is ignored. Simultaneous specification of the values "UNIX" or "NT" in the addition TYPE is not permitted.
    If these additions are not used, the line end marker is determined as follows, depending on the operating system of the current application server:
    The line end marker for Unix is "LF". Under Unix, OS390 and OS400, only "LF" is used for reading and writing.
    The line end marker for MS Windows is "CRLF". Under MS Windows, however, the values of the profile parameter abap/NTfmode can also be used to set whether new files are handled according to Unix conventions or Windows conventions. If the profile parameter has the value "b", the Unix line end marker "LF" is used. If the profile parameter has the value "t" or is initial, the Windows line end marker "CRLF" is used. The setting using the profile parameter can be overridden with the addition TYPE and the value "UNIX" or "NT". If an existing file is opened without the addition TYPE, this is searched for the first line end marker ("LF" or "CRLF"), and this is used for the whole file. If no line end marker is found, the profile parameter is used. This applies particularly if an existing file is completely overwritten with FOR OUTPUT.
    If an addition WITH NATIVE|SMART|UNIX|WINDOWS LINEFEED is used, this setting can be changed for the open file using the statement SET DATASET. If neither of the additions is used, the line end marker also cannot be changed using SET DATASET.
    Notes
    : Without the use of an addition WITH LINEFEED, the line end marker is dependent on diverse implicit factors such as the operating system of the application server, a profile parameter, and line end markings that are already used. For this reason, the explicit use of WITH LINEFEED is recommended, which renders the use of the addition TYPE for setting the line end marker obsolete.
    The line end marker that is currently used can be determined for every open file using GET DATASET.
    Alternative 1
    ... WITH NATIVE LINEFEED
    Effect
    : This addition defines the line end marker independently of the access type according to the operating system of the application server, i.e. "LF" for Unix OS390 or OS400, and "CRLF" for MS Windows.
    The line end marker is interpreted according to the current codepage. If a code page is explicitly specified using the addition CODE PAGE, the characters of the line end marker must exist be available or be written in accordance with this code page.
    Note
    : The addition WITH NATIVE LINEFEED is intended for editing files on an application server that can also be accessed by other means. The addition receives the appropriate line end marker without the program needing to know the operating system.
    Alternative 2
    ... WITH SMART LINEFEED
    Effect
    : This addition depends on the access type:
    In files that are opened for reading using FOR INPUT, both "LF" and "CRLF are interpreted as a line end marker. When opening an EBCDIC file with the addition CODEPAGE, in addition to "LF", "CRLF", and the EBCDIC character strings, the corresponding ASCII character strings are also recognized. In addition, the EBCDIC character "NL" (line separator) is also interpreted as a line end marker.
    In files opened for appending or changing with FOR APPENDING or FOR UPDATE, the program searches for a line end marker that is already used in the file. In this process, first the end of the file is identified. If no line end marker is found there, a certain number of characters at the beginning is analyzed. If a line end marker is found, this is used when writing to the file. This is also affected by the addition CODE PAGE. For example, ASCII line end markers are recognized and used in a file opened with EBCDIC, but not the other way round. If no line end marker is found or no search is possible (for example, if the file is opened with the addition FILTER), the line end marker is determined according to the operating system of the application server, as with the addition WITH NATIVE LINEFEED.
    In files opened for writing using FOR OUTPUT, the line end marker is determined according the operating system of the application server, as with the addition WITH NATIVE LINEFEED.
    Note
    : The addition WITH SMART LINEFEED is intended for the generic editing of files in heterogeneous environments. The line end marker is recognized and set for different formats. The use of this addition is the best solution for most application cases.
    Alternative 3
    ... WITH UNIX LINEFEED
    Effect
    : The line end marker is set to "LF" regardless of the access type and operating system of the application server.
    The line end marker is interpreted according to the current code page. If a code page is specified explicitly using the addition CODE PAGE, the characters of the line end marker must be available or be written according to this code page.
    Note
    : The addition WITH UNIX LINEFEED is intended for editing Unix files in which the specific line end markers are to be retained, even if the operating system of the current application server is MS Windows.
    Alternative 4
    ... WITH WINDOWS LINEFEED
    Effect
    : The line end marker is set to "CRLF" regardless of the access type and operating system of the application server.
    The line end marker is interpreted according to the current code page. If a code page is specified explicitly using the addition CODE PAGE, the characters of the line end marker must be available and be written according to this code page.
    Note
    : The addition WITH WINDOWS LINEFEED is intended for use with MS Windows files in which the specific line end marker is to be retained, even if the operating system of the current application server is Unix, OS390 or OS400.

  • "\n" problem while downloading the file in unix environment

    Hi folks,
    I have some problem in uploading and downloading the file in unix environment..
    This is my sample code i am using.
    File userDataFile = new File("xyz".csv");
    out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(userDataFile),"UNICODE"));
    out.write("Name"+"\t");
    out.write("Age"+"\t");
    out.write("Dob"+"\t");
    out.write("Contact"+"\n");
    for(int i=0;i<retList.size;i++){
    out.write("xyz"+"\t");
    out.write("22"+"\t");
    out.write("300399"+"\t");
    out.write("xyzzz"+"\n");
    as per this i wrote code for generating the reports. Its contains some 7k records.
    Its works in Windows environment.
    Some times in Windows environment if the contents size is 7000 records means
    i got only the headers..
    I am not getting any real records.
    I am not sure.. my client is using may be an unix environment..
    Please give the solutions for this..
    Very thanks in advance.

    Hi Jothi,
    This is not an answer to your question. It is a question for you instead. I have tried to reach you on several forums regarding the HAP_DOCUMENT documentation you have.
    Again, I am really sorry to contact you through a differente forum, but I really need the HAP_DOCUMENT documentation for my project.
    Please send me a message to [email protected]
    Thanks again.
    JULIAN CASTRO

  • Windows to UNIX file download directory location

    Hello all,
    I have a page that displays the contents of a directory and allows the user to click and download a file.
    I developed it on Windows and now I need to temporarily get it running on Solaris 8.
    I deployed the war file and now I need to change the code and create the "data" directory.
    Previously on Win 2k I had the following code:
    private static String PATH = "C:\\data\\"; //PATH to the data directoryI created the data directory on the root of the c drive: C://data
    Now that I am on Solaris I cant seem to point the page at the directory.
    I tried this:
    I created a dir called "data" directly off of root: /data
    and changed the code like so:
    private static String PATH = "\\data\\"; //PATH to the data directoryThis didnt work so I created another directory called "data" just off of the root of my webapp:
    /tomcat/jakarta-tomcat/webapps/myWebAppName/data
    and left the code like this:
    private static String PATH = "\\data\\"; //PATH to the data directoryStill no go.
    So where should I create a "data" directory? and how shall I code the PATH constant?
    TIA!!

    try
    private static String PATH = "/data/" //PATH to the data directoryUsing forward slashes instead of backslashes. This is unix remember?
    If it still doesn't work, post an error message/exception and we can go from there.
    Cheers,
    evnafets

  • Download PDF spool to unix file system

    Does anyone know how to programatically download a PDF document spool to the unix file system?
    I am trying to find a method to send PDF documents that have gone to spool to a unix file system. If anyone had any ideas on how to do this, please let me know.
    Thanks.

    Hi,
    For this define a logical file while using transaction FILE.
    In your code you will get the complete path of the file while using FM FILE_GET_NAME.
    Then download your PDF while using instruction
    OPEN DATASET...
    TRANSFERT ...
    Hope this help you .
    Best regards

  • Downloading unix archive file (.Z extension) from java program

    Hi,
    I am trying to download unix archive files with .Z extension from java program. When I use
    BufferedReader zReader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
    and then read line by line and write it to file, downloaded file can't be decompressed. I tried to open it with winZip which supports .Z files but I get the message : Cannot open file, it does not appear to be a valid archive.
    How can I download file correctly?
    Any help would be appreciated.

    Hi,
    I am trying to download unix archive files with .Z
    extension from java program. When I use
    BufferedReader zReader = new BufferedReader(new
    InputStreamReader(urlConn.getInputStream()));
    and then read line by line and write it to file,How are you writing the file? Since it is binary data you need to be careful about using Reader/Writers, which are meant for character data. Look at using classes from the InputStream/OutputStream hierarchy.
    - N

  • Unix file download

    An ABAP program is downloading a file and how do I see the file..There iis a transaction and a program which we need to exeucte...
    Please help.

    Hi,
    try this.
    report ztest no standard page heading.
    tables: z_mver.
    parameters: test(60) lower case default '/dir/judit.txt'.
    data: begin of unix_intab occurs 100,
    field(53),
    end of unix_intab.
    data: msg(60).
    ***open the unix file
    open dataset test for input in text mode message msg.
    if sy-subrc <> 0.
    write: / msg.
    exit.
    endif.
    ***load the unix file into an internal table
    do.
    read dataset test into unix_intab.
    if sy-subrc ne 0.
    exit.
    else.
    append unix_intab.
    endif.
    enddo.
    close dataset test.
    ***to process the data. load the database table
    loop at unix_intab.
    z_mver-mandt = sy-mandt.
    z_mver-matnr = unix_intab-field(10).
    translate z_mver-matnr to upper case.
    z_mver-werks = unix_intab-field+10(4).
    translate z_mver-werks to upper case.
    z_mver-gjahr = sy-datum(4).
    z_mver-perkz = 'M'.
    z_mver-mgv01 = unix_intab-field+14(13).
    z_mver-mgv02 = unix_intab-field+27(13).
    z_mver-mgv03 = unix_intab-field+40(13).
    to check the data on the screen (this is just for checking purpose)
    write: / z_mver-mandt, z_mver-matnr, z_mver-werks, z_mver-gjahr,
    z_mver-perkz, z_mver-mgv01,
    z_mver-mgv02, z_mver-mgv03.
    insert z_mver client specified.
    *if the data already had been in table z_mver then sy-subrc will not be
    *equal with zero. (this can be *interesting for you - (this list is
    *not necessary but it maybe useful for you)
    if sy-subrc ne 0.
    write:/ z_mver-matnr, z_mver-werks.
    endif.
    endloop.
    - Selvapandian Arunachalam

  • About download file into unix file

    Hi expert,
    i use the openset to write file into unix file server.
    but why there are some space at the end of every line.
    by the way, i works very well in windows server
       DATA: DATA_TRANSFER(70).
        Data: DATA_TRANSFER type string.
        data: fine_riga1(1) TYPE X VALUE '0D0A'.
        DATA: gt_data TYPE STANDARD TABLE OF ty_data.
        Constants: ascii_tab type x value ','.
        field-symbols: <f> type any, <delim> type any.
        "Assign delimiter field such as tab or comma.
        assign ASCII_tab to <delim>.
        CLEAR VN_CNT.
        concatenate DSNU 'employee' PN-BEGDA SY-UZEIT into P_UNIX.
        OPEN DATASET P_UNIX in legacy text MODE FOR OUTPUT. " IN TEXT MODE encoding UTF-8.
        IF SY-SUBRC <> 0.
          WRITE: / 'Error on file open:', P_UNIX.
        ELSE.
          LOOP AT TI_DATA .
            CLEAR DATA_TRANSFER.
            concatenate TI_DATA-TYPE
                              TI_DATA-PERNR
                              TI_DATA-ZAUSW
                              TI_DATA-ENAME
                              TI_DATA-TERID
                              INTO DATA_TRANSFER separated by cl_abap_char_utilities=>HORIZONTAL_TAB.
            CONDENSE DATA_TRANSFER NO-GAPS.
            TRANSFER DATA_TRANSFER TO P_UNIX.
            ADD 1 TO VN_CNT.
            CLEAR DATA_TRANSFER.
          ENDLOOP.
          CLOSE DATASET P_UNIX.
        ENDIF.
        WRITE: / P_UNIX,
               / 'Transfered', VN_CNT, 'records'.
    Best Regards,
    Kevin

    Hi,
    Try this way...
    TRANSFER dobj TO dset [LENGTH len]
                                          [NO END OF LINE].
    Addition 1
    ... LENGTH len
    Effect
    This addition determines how many characters or how many bytes of data object dobj are written to the file. len is expected to be a data object of type i that contains the number of characters or bytes. In text files, the content of len specifies the number of characters that are written from the storage. For binary files, legacy text file, and legacy binary files, len specifies the number of bytes that are written to the file. The first len characters or bytes are transferred and alignment gaps are included in the structures. If the addition LENGTH is not specified, all characters or bytes are transferred.
    If the value of len is less than or equal to 0, no characters or bytes are transferred. If the file is opened as a (legacy) text file, however, a line end marker is inserted into the file by default. If the value of len is greater than the number of characters or bytes in dobj, hexadecimal 0 or blank characters are transferred to the file instead of the missing bytes or characters, depending on whether the file was opened as a (legacy) text file or a (legacy) binary file.

  • Having problems with corrupt downloads of Oracle 9i Release 2 Unix files

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    - Server name download-east.oracle.com
    - Filename server_9201_hpunix64_disk[1,2,3,4].cpio.gz
    - Date/Time 06/19/2002 and 06/20/2002 all day, even tried downloading late at night
    - Browser + Version tried IE 6.0, Netscape 6.2.3, Netscape 4.79
    - O/S + Version Windows 2000 and Windows XP Pro
    - Error Msg unable to read cpio file, it extracts part of the file but fails when it gets close to the end.

    Sorry did I mention that
    Opera on windows crashes when trying to download these files.
    Ie 6, just writes the files but the download obvioulsy errors out as the files are too small.
    Netscape actually raises and error message when the download stops.
    In any case there is no ftp access so that won't work and because of the stupid agree with the licence agreement when you try to reference the files directly you can't simply issue a command like wget -c oracle_cpiofile.gz.

  • UNIX files pc download (AL11, ...)

    Hi,
    I generate a unix file (output as file), for example for EC Sales List, and I want to know how to access such file with a user transaction or something similar. If I access to the file directly in the server the file is absolutely correct, but I want the user to be able to access the file. I am trying to use transaction AL11 to save such file in local pc unconverted, but I have problems because it includes a header and each line of the file end after the last character not blank and it should not do that. The file in the server do not end after the last character not blank, because it has characters '   ' at the end of each line. That is why I would like to know if there is another way to access to unix files.
    Thanks,
    Ariana

    Thank you very much for your answers. Finally, using CG3Y I can obtain my file without problems.
    Message was edited by:
            Ariana Landaluce

  • JSP page download a file from unix box in DOS format

    Hi to all ..
    I have found many example to download a file from the server to the client like this
    <%
    StringBuffer buffer = new StringBuffer();
    try {
         FileInputStream fis = new FileInputStream("c:\\myfile.txt");
         InputStreamReader isr = new InputStreamReader(fis,"UTF8");
         Reader in = new BufferedReader(isr);
         int ch;
         while ((ch = in.read()) > -1)
              buffer.append((char)ch);
    out.print (buffer);
         in.close();
    } catch (IOException e) {
         e.printStackTrace();
    %>
    My problem is that the file is a text file and when i download I have in the file strange character ....
    How can i convert the file in DOS ???
    thank's in advance

    One of the main features of FTP's ascii mode is that it adjusts the line-ending characters based on the server's and client's operating system. It's a reasonable guess that these characters are the source of the OP's problem and that he's a beginner who doesn't know what he's doing. (The use of JSP scriptlets supports that theory.)
    In which case that Java code could be adapted to do the same thing, although it would have to determine the operating system of the client. This is sort of possible, but not for somebody who is just looking for code snippets to get their job done.
    However that's just one guess. There are other possible problems including character encoding: the input file can be read as UTF-8, which is hard-coded into the code, but perhaps the client is interpreting the non-ASCII characters in some other encoding. This would also cause "weird characters" to appear.
    At any rate it would be useful for the OP to do some basic research like finding out what these bad characters are.

  • Function Module - to download the Unix file to frontend

    I need one function module which will dwon load unix file to frontend.
    If anyone knows the Function module plz tell me.

    FORM popup_from_server .
    *           call a function to get the physical name of the directory from the server
    *           using the given logical name FILE_GET_NAME
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
    *              CLIENT                        = SY-MANDT
          logical_filename              = p_logi    "ZHOME
         operating_system              = sy-opsys
         eleminate_blanks              = 'X'
       IMPORTING
         file_name                     = v_file_name.
      v_dirname = v_file_name.
    *          call a function to get the list of the files
    *          into an internal table from the given directory
      CALL FUNCTION 'SUBST_GET_FILE_LIST'
        EXPORTING
          dirname      = v_dirname
          filenm       = '*'
          pattern      = '*.txt'
        TABLES
          file_list    = i_file_list
        EXCEPTIONS
          access_error = 1
          OTHERS       = 2.
      v_unixfield = 'P_UNIX'.
      v_dynpprog = sy-repid.
      v_dynpnr = sy-dynnr.
    *           now call F4 help function, and populate the file list into its value table
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield               = 'NAME'
         dynpprog               = v_dynpprog
         dynpnr                 = v_dynpnr
         dynprofield            = v_unixfield
         value_org              = 'S'
        TABLES
          value_tab              = i_file_list .
    ENDFORM.                    " popup_from_server

  • Downloading a file from App Server to User's Desktop

    Hi All,
    I know that there are many threads on file upload and download :-)
    I have tried to browse through most of them and could not find my solution.
    The requirement is to place a file in the unix app server directory and allow the user to download it using a link, to the user's desktop. In case you think that this has already been answered in an old thread, kindly give me the pointer. Any sample code for doing this, would be great.
    I know how to upload a file from desktop to table/app server. I know how to download a file from a BLOB column in database.
    Thanks,
    Amit

    You would not be able to use file upload or download beans, as they interact with the database and not the filesystem.
    You would need to write a simple file reader routing in plain java.
    Tapash

  • URGENT : Writing to UNIX file problem !

    Hi friends,
    I am stuck at a crucial point while uploading a UNIX file from ABAP program.
    I am using open dataset & then transfer to...the file path.
    But when I go and check the UNIX file it is split into 2 lines (it is supposed to be a
    record with 1 line with 1500 characters) ! It shows a maximum of 255 chars in one line.Moreover,while I download to a text file via Txn CG3Y,some data are missing or truncated etc.
    Please suggest how can I create a record with 1500 characters in UNIX and download it successfully with full data or how can I ensure proper data has been transferred as the record display is truncated.I checked the program its fine,only after transferring I get the problem.
    Thanks,
    Sandip.

    The files would not get truncated. The file actually exists in App. server but you will be able to see only uptil 255 characters. You can check the same by downloading it onto Pres. server by specifying  file type as BIN when you are downloading through CG3Y

  • Special characters in UTF-8 UNIX file

    We have a program which downloads data from certain info-types in to the UNIX file, Fields are written to the specific position in the UNIX file. Some of the fields contains "Special Characters" in them.
    When we download the file in UTF-8 mode (encoding default) then the file display special characters correctly but the all the characters in that record gets shifted to left.
    When we download the file in ANSI mode then the file display doesn't special characters correctly but the all the characters in that record do not get shifted from their place.
    How can i find the special character in the field and accordingly i will shift the field right so that in the final UNIX file field won't shift their positions.

    Hi Ramnivas.
    Have you tried to read the characters with class: CL_ABAP_CHAR_UTILITIES (transaction SE24, label Attributes)
    For example you can see # in ABAP but in the file will be a new line or a carriage return, you can detect that an adapt it with:
    CL_ABAP_CHAR_UTILITIES=>NEWLINE or CL_ABAP_CHAR_UTILITIES=>CR_LF
    Other hand, if you are using OPEN DATASET to download the file, look at the options of encoding
    See F1 of OPEN DATASET and then encoding..
    OPEN DATASET - encoding
    Syntax
    ... ENCODING { DEFAULT
                 | {UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]}
                 | NON-UNICODE } ... .
    Hope it helps
    Regards.
    Alfonso.

Maybe you are looking for

  • Start routine error ....,

    Hi i written start routine in transformations. it showing some error. please suggest correct way. TYPES : begin of fs_pctr,               profit_ctr type /BIC/PZPRFTCTR-/BIC/ZPRFTCTR,              end of fs_pctr. DATA : it_pctr type standard table of

  • Publishing a new calendar in iCal

    No I'm not in the wrong forum My aim is to do that using AS. I have read through the iCal dictionnary, but haven't found an entry that seems to do the trick, but then I might have missed it, since the GUI menu names and dictionnary entries have surpr

  • Lumia 620 whatsapp loading problem

    Hi all, In my Lumia 620,whenever i got notifications for whatsapp chat and i try to open it,,its not able to load it properly and also hanged.. please reply it with some suggestions

  • Ssis flat file to ole db skipping some rows...

    for some reason, I can't seem to figure out why I'm missing some lines when I import a csv file that I exported using sqlplus. The ssis package gives no warnings or errors as well. The reason I know this is because when I loaded the csv file into a s

  • Drag Drop based Report Builder

    Hello to all I want to create a report builder that will create report with drag drop operation. Can any one give me an idea or example that will help me a lot. With Regards Preet Edited by: socmag_Java_developer on Apr 17, 2009 3:27 AM