Erroneous row-lines in application server file

Hello,
There are some erroneous row-lines in application server file. Some part of data is repeating on a single line. I could not able to figure out if this is new record or part of same line. I have checked the code. Internal table is correctly written on application server using TRANSFER statement.
This problem is occurring only in Production environment as per description. So, I am not able to simulate the case in development environment.
When I downloaded file into notepad I get following text on single line:-
7411NC00101 GASNW 49223004 ESSENT NETWERK NOORD (GAS) GASNW 49223004 ESSENT NETWERK NOORD (GAS)  871694840014102760
Correct record should be:-
7411NC00101 GASNW 49223004 ESSENT NETWERK NOORD (GAS) 871694840014102760
Can anyone please suggest me possible causes of the problem?
Thanks in advance,
Minal

Hi,
Just check the code in debugging  where the "GASNW 49223004 ESSENT NETWERK NOORD (GAS)" portion is generated and written to text area. This is happening because of the loop or not refreshing the variables.
With regards,
Sunil

Similar Messages

  • Blank line in Application server file

    Hi,
    I am uploading datas from 2 internal tables to Application server file(same file).
    I want a blank like after i finish uploading the first internal table.
    Need a blank line between two internal table datas.
    Kindly help me in solving this issue.
    Regards
    Sowmmya VB

    hi Sowmya...
    Do this way.. Sample code....
    Data : Blank(100).
    OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT ITAB1.
      TRANSFER ITAB1 TO P_FILE.
    ENDLOOP.
      TRANSFER BLANK TO P_FILE.  "this will transfer a Blank record.
    LOOP AT ITAB2.
      TRANSFER ITAB2 TO P_FILE.
    ENDLOOP.
    CLOSE DATASET P_FILE.

  • New Line in application server  file

    Hi
    I am facing rather a unique problem. I have a report that generates a file and posts it on the application server. When i open the file at the application server it shows me line split ( I mean a new line is introduced in the middle of a row).
    On further investigation I observed that the field after which it split contains a # symbol. Now many files posted on the server contains # but this problem is not observed in any of those files.
    I tried replicating this on quality and dev by adding # at run time in debug mode but the file posted is perfectly fine. I figure it must be some other symbol entirely that we can view as #.
    Please share your thoughts on this.
    Preethi
    Edited by: Preethi B on Feb 8, 2010 2:02 PM

    Hi,
    Am facing similar issue in production environment.
    But in quality am not getting this issue.In debug mode I copied the same line as in the production and its printing as expected (data getting displayed on a single line).
    Can anyone please help me with this??
    Thanks in advance!
    Regards,
    Shaheen.

  • Application Server : File writes only 255 characters

    Hi Friends,
    I am trying to writes data to application server file .
    My line size is 1100 charqacters.
    When I use open dataset for output in text mode encoding default
    and transfer contents to file.
    I am only able to write contents upto 255 characters.
    Whatever is beyond that I do not see it in AL11.
    Is there a way to write more than 255 characters.
    I tried CG3Y to view files but it also shows only 255 characters.
    Please help.

    Hi,
    Just find the string length.
    In 4.6C version there is a limit of 1500 characters i. e. U can transfer max of 1500 characters in a single transfer. For that we applied below solution. Check this it may help u.
      l_len = strlen( p_data ).
      DO.
        IF l_len LT 1500.
          TRANSFER p_data+l_offset(l_len) TO p_file.
          MOVE 0 TO l_len.
        ELSE.
          TRANSFER p_data+l_offset(1500) TO p_file.
          SUBTRACT 1500 FROM l_len.
          ADD 1500 TO l_offset.
        ENDIF.
        CHECK l_len EQ 0.
        EXIT.
      ENDDO.
    p_data has the content to be trasfered of around 6000 characters and the length is dynamic.
    Also download the data using CG3Y with BIN to .txt file and see.
    If problem is still there then paste ur code of OPEN DATASET, TRANSFER statements.
    Try to open the file in TEXT MODE.
    eg: OPEN DATASET l_file IN TEXT MODE.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Jul 25, 2008 12:34 PM

  • Application server file formats.

    Hi,
    I have one query regarding the application server file formats, when we are creating a file we give some extension (.txt, .dat),what is the use of different extensions.
    When we are downloading the file from appl server using CG3Y we have two options(ASC and BIN ) what is the use of these options.
    Thanks in advance.

    Hi,
    A text file is a kind of computer file that is structured as a sequence of lines.
    A .dat  file is a computer file which stores data for use by a computer application or system.
    A character encoding consists of a code that pairs a sequence of characters from a given character set (sometimes referred to as code page) with something else, such as a sequence of natural numbers, octets or electrical pulses, in order to facilitate the storage of text in computers and the transmission of text through telecommunication networks.
    ASCII and BINARY codes are used for internal representation of data.
    The major difference between ASCII and BINARY is that when ASCII mode is used then the READ DATASET stmt starts at new line each time and in case of BINARY it reads character by character ( or some characters).
    Thanks and regards.

  • Application Server file to internal table

    Hi,
      How can i read the application server file into the internal table??  Which FM should i use??
    Regards,
    Kit

    Hi,
    Open Dataset is used to read or write on to application server ... other than that i am not sure that there exists any way to do the same ... here is a short description for that
    FILE HANDLING IN SAP
    Introduction
    • Files on application server are sequential files.
    • Files on presentation server / workstation are local files.
    • A sequential file is also called a dataset.
    Handling of Sequential file
    Three steps are involved in sequential file handling
    • OPEN
    • PROCESS
    • CLOSE
    Here processing of file can be READING a file or WRITING on to a file.
    OPEN FILE
    Before data can be processed, a file needs to be opened.
    After processing file is closed.
    Syntax:
    OPEN DATASET <file name> FOR {OUTPUT/INPUT/APPENDING}
    IN {TEXT/BINARY} MODE
    This statement returns SY_SUBRC as 0 for successful opening of file or 8, if unsuccessful.
    OUTPUT: Opens the file for writing. If the dataset already exists, this will place the cursor at the start of the dataset, the old contents get deleted at the end of the program or when the CLOSE DATASET is encountered.
    INPUT: Opens a file for READ and places the cursor at the beginning of the file.
    FOR APPENDING: Opens the file for writing and places the cursor at the end of file. If the file does not exist, it is generated.
    BINARY MODE: The READ or TRANSFER will be character wise. Each time ‘n’’ characters are READ or transferred. The next READ or TRANSFER will start from the next character position and not on the next line.
    IN TEXT MODE: The READ or TRANSFER will start at the beginning of a new line each time. If for READ, the destination is shorter than the source, it gets truncated. If destination is longer, then it is padded with spaces.
    Defaults: If nothing is mentioned, then defaults are FOR INPUT and in BINARY MODE.
    PROCESS FILE:
    Processing a file involves READing the file or Writing on to file TRANSFER.
    TRANSFER Statement
    Syntax:
    TRANSFER <field> TO <file name>.
    <Field> can also be a field string / work area / DDIC structure.
    Each transfer statement writes a statement to the dataset. In binary mode, it writes the length of the field to the dataset. In text mode, it writes one line to the dataset.
    If the file is not already open, TRANSFER tries to OPEN file FOR OUTPUT (IN BINARY MODE) or using the last OPEN DATASET statement for this file.
    IF FILE HANDLING, TRANSFER IS THE ONLY STATEMENT WHICH DOES NOT RETURN SY-SUBRC
    READ Statement
    Syntax:
    READ DATASET <file name> INTO <field>.
    <Field> can also be a field string / work area / DDIC structure.
    Each READ will get one record from the dataset. In binary mode it reads the length of the field and in text mode it reads each line.
    CLOSE FILE:
    The program will close all sequential files, which are open at the end of the program. However, it is a good programming practice to explicitly close all the datasets that were opened.
    Syntax:
    CLOSE DATASET <file name>.
    SY-SUBRC will be set to 0 or 8 depending on whether the CLOSE is successful or not.
    DELETE FILE:
    A dataset can be deleted.
    Syntax:
    DELETE DATASET <file name>.
    SY-SUBRC will be set to 0 or 8 depending on whether the DELETE is successful or not.
    Pseudo logic for processing the sequential files:
    For reading:
    Open dataset for input in a particular mode.
    Start DO loop.
    Read dataset into a field.
    If READ is not successful.
    Exit the loop.
    Endif.
    Do relevant processing for that record.
    End the do loop.
    Close the dataset.
    For writing:
    Open dataset for output / Appending in a particular mode.
    Populate the field that is to be transferred.
    TRANSFER the filed to a dataset.
    Close the dataset.
    chk a sampel
    parameters: p_file like rlgrap-filename obligatory
    default '/usr/sap/upload.xls'.
    types: begin of t_data,
    vbeln like vbap-vbeln,
    posnr like vbap-posnr,
    matnr like vbap-matnr,
    werks like vbap-werks,
    megne like vbap-zmeng,
    end of t_data.
    data: it_data type standard table of t_data,
    wa_data type t_data.
    open dataset p_file for output in text mode encoding default.
    if sy-subrc ne 0.
    write:/ 'Unable to open file:', p_file.
    else.
    do.
    read dataset p_file into wa_data.
    if sy-subrc ne 0.
    exit.
    else.
    append wa_data to it_data.
    endif.
    enddo.
    close dataset p_file.
    endif.
    And if you want to write on the file.
    *--- open UNIX file
    open dataset unixfile for output in text mode message w_msg.
    if sy-subrc ne 0.
    write: / 'Cannot open for writing:', unixfile, w_msg.
    exit.
    endif.
    *--- write UNIX file
    loop at it_file.
    transfer it_file to unixfile.
    endloop.
    *--- close UNIX file
    close dataset unixfile.

  • How do I add a selection screen parameter to get a application server file

    Hi All..
    Can you please suggest how can we add a selection screen parameter to get a application server file ?
    Thanx in Advance...
    Regards,
    Deepak

    <b>Parameter def :</b>
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 02(30) text-005 FOR FIELD p_xlfil.
    PARAMETERS: p_xlfil LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    <b>Browse</b>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xlfil.
      PERFORM ws_get_filename USING p_xlfil.
    FORM ws_get_filename USING p_xlfil.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_path         = 'C:'
                mask             = ',Excel,*.xls,All,*.*.'(100)
                mode             = 'O'
                title            = 'Title'(101)
           IMPORTING
                filename         = p_xlfil
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
      IF sy-subrc NE 0.
        CLEAR p_xlfil.
      ENDIF.
    ENDFORM. " WS_GET_FILENAME
    Regards
    <b>Oops i did not read "application server"</b>
    Use FM F4_FILENAME_SERVER and not F4_FILENAME/WS_GET_FILENAME.
    Message was edited by:
            Raymond Giuseppi

  • How to check whether the Application Server file has already been opened?

    Hi Experts,
    I have a query related to Application Server file. I am using multithreading concept to process the data and write it in to a single file.
    For example, I have 4 workprocesses. Each workprocess will process the data and whenever it has a record available it will access the file and write it directly.
    Problem is the statements that are written in the workprocess is same and I want to check the status whether the file has been opened or not ?
    Thanks in advance!!!
    Thanks,
    Babu Kilari

    Depends on the structure, and whether the data needs to be sorted in some way in the final file.
    In any case, I don't think there will be a significant performance difference between using OPEN DATASET again and getting funny with Unix commands.
    If you don't need to sort the final file, you can use strings to read, concatenate and write the data even without line-based DO ENDDO loops, this works pretty fast.
    I hope we are not talking about GBytes of data
    Thomas

  • Datas in Application Server file is not aligned

    Dear all,
               I have created a program in SE38 and transfer the data to the Application server file using Transfer statement.
               The datas are transferd to Application Server file , but datas are not aligned.
               In out Application server file thd datas are displaied one after another..
               But i want to display the datas in single row.
              I have include program for your reference.
    With Regards,
    Baskaran.
    report  zsutest34 message-id ztcpo.
                    DATA AND VARIABLES DECLARATION
    data: begin of leban occurs 0.
            include structure eban.
    data end of leban.
    data new(1).
                    SELECTION-SCREEN
    selection-screen begin of block 001 with frame title text-001.
    selection-screen skip 1.
    parameters filename(128) default '
    192.168.100.33\SAPMNT\IDS\dvebmgs00\data\santhosh.dat'. "\SYS\GLOBAL\testfile1.txt' LOWER CASE.
    select-options ldat for sy-datum.
    parameters lwerks type eban-werks.
    selection-screen skip 1.
    selection-screen end of block 001.
    START-OF-SELECTION
    select * from eban into leban where erdat in ldat and werks = lwerks.
      append leban.
    endselect.
    sort leban by banfn bnfpo.
    clear leban.
                    REGARDING DATASET
    perform value1.
    form value1.
    open dataset filename for output in text mode encoding default. " MESSAGE D_MSG_TEXT.
    data: l_msg(255) type c.
        if sy-subrc ne 0.
          message i001.
          exit.
        endif.
    concatenate 'The following file was opened:'(002) filename into l_msg separated by space.
            write: l_msg.
    uline.
                    TRANSFORMING TO APPLICATION SERVER FILE
    loop at leban.
          transfer leban-banfn to filename.
          transfer leban-bnfpo to filename.
          transfer leban-ekgrp to filename.
          transfer leban-matnr to filename.
          transfer leban-werks to filename.
    AT FIRST.
       WRITE: /10 TEXT-001, 30 TEXT-002, 45 TEXT-003, 50 TEXT-004, 65 TEXT-005.
       '            ITEMNO GRP MATERIAL           PLANT           QTY ' COLOR = 2.
    ENDAT.
      at new banfn.
        uline.
        write:/1 'PRNO-',leban-banfn.
        new = 'x'.
        uline.
        skip.
      endat.
      if new = 'x'.
        WRITE:/ '            ITEMNO GRP MATERIAL           PLANT           QTY ' color = 2.
        write:/14 leban-bnfpo,  leban-ekgrp, leban-matnr, leban-werks, leban-menge.
        clear new.
      else.
        write:/14 leban-bnfpo,  leban-ekgrp, leban-matnr, leban-werks, leban-menge.
      endif.
    endloop.
                    DATASET CLOSING
    close dataset filename.
    endform.

    wa_string type string
    loop at leban.
    concatenate leban-banfn
              leban-bnfpo
              leban-ekgrp
                 leban-matnr
                 leban-werks into wa_string
                 separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    transfer wa_string to filename.
    endloop.

  • Application server file path vaidation

    I have written the code for application server file path validation.
      DATA : l_fname TYPE filename-fileintern." type c.
      DATA : l_filpath TYPE filename-fileintern,
             l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
    l_fname = p_sucfil.
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      CLIENT                        = SY-MANDT
        logical_filename              = l_fname
       OPERATING_SYSTEM              = SY-OPSYS
      PARAMETER_1                   = ' '
      PARAMETER_2                   = ' '
      PARAMETER_3                   = ' '
      USE_PRESENTATION_SERVER       = ' '
       WITH_FILE_EXTENSION           = 'X'
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
    IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
       FILE_NAME                     = l_filpath
    EXCEPTIONS
       FILE_NOT_FOUND                = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
      message 'Invalid file name' type 'E'.
    ENDIF.
    But always i will get Invalid file name.
    Y is it so.
    pls help me.

    Praveen,
    I have checked ur code and I found that if i give a logical file name from
    tran. FILE under folder 'Logical file name definition, cross client' then ur code works. Pl. check.
    Regards,
    Joy.
    DATA : l_fname TYPE filename-fileintern." type c.
    DATA : l_filpath TYPE filename-fileintern,
    l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
      l_fname = p_sucfil.
      CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      logical_filename = l_fname
    operating_system = sy-opsys
      with_file_extension = 'X'
      IMPORTING
      file_name = l_filpath
      EXCEPTIONS
      file_not_found = 1
      OTHERS = 2
      IF sy-subrc <> 0.
        MESSAGE 'Invalid file name' TYPE 'E'.
      ENDIF.

  • Validate  application server file

    Hi,
      I have to validate the application server file path on selection screen.
    I am using following code :
    form VALID_APP_FILEPATH   using    p_filpath TYPE FILENAME-FILEINTERN.
      data : l_fname(60).
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          LOGICAL_FILENAME = p_filpath
          OPERATING_SYSTEM = SY-OPSYS
        IMPORTING
          FILE_NAME        = L_FNAME
        EXCEPTIONS
          FILE_NOT_FOUND   = 1
          OTHERS           = 2.
      IF SY-SUBRC ne 0.
          MESSAGE 'Enter the valid file path'(e01) TYPE 'E'.
      ENDIF.
    endform.                    " VALID_APP_FILEPATH
    but if i choose correct file path from F4 help also.
    It displays error message.
    Sy-subrc always equals 1.
    Help me out

    Hi,
    I have implemented the code mentioned by you and am not having any problems even when I use F4 to get the fle name.
    Pls recheck and get back if the error persists.
    Reward if found helpful.
    Warm Regards,
    R Adarsh

  • Error  while accessing the application server file

    Hello,
    When I try to load the data from CSV file to PSA , I am getting following error message
    "Error  while accessing the application server file"
    "Errors in source system"
    I gave the right file path
    I am not sure about this error message.
    Thanks,

    Hi ram,
    if you have more than one application server running in your BI system (see at transaction SM51) be aware that your infopackage will be executed on the right one. Each application server has its own file system and your job need to run on the server your file is stored on.
    Also check if the os user of the SAP system itself (<sid>adm on Unix) has rights to read that file.
    Bye
    Frank

  • Application Server File

    Hi,
    Could any one please answer my question.
    How to archive application server file?.. What is the function module used for that?.
    And my second question..
    How to scan application directory.. after scanning I must be able to know how many files the source directory contians, and the file properties
    Thank you..

    1 . use CG3Z transaction or use OPEN dATASET statement
    2 . use FM EPS_GET_dIRECTORy_LISTING

  • Application server file lentgh

    Hi,
    I am trying to read an application server file using open dataset in Binary Mode..
    I want to find the file length of the file read.(number of bytes transferred as in the GUI_Download FM parameter Filelength)
    How can i achieve it.
    Appreciate ur ideas.
    Rgds.
    stck

    Hello,
    Use the FM EPS_GET_FILE_ATTRIBUTES passing the file name and the directory name and get the file_size.
    Vikranth

  • Application Server file into EXCEL SHEET

    Hi ,
    i want down load the Application Server FILE into EXCEL SHEET directly..
    how to do this one.
    regards,
    venu.

    Hi Srinivas
    I tried using CG3Z to upload excel onto application server but failed to do the same,
    Any pointers regarding the same would be of great help.
    Regards
    Sukumari
    Edited by: Manjeera Chinigiri on Mar 31, 2008 3:08 PM

Maybe you are looking for