Putting Flat file on Application Server

Hi,
I am using following report to transfer a flat file to application server.
REPORT  Z_DOWNLOAD.
PARAMETERS: P_FILE       LIKE IBIPPARMS-PATH,
           P_FILE1(100) default '/usr/sap/put' lower case.
DATA: WS_FILE TYPE STRING.
DATA: BEGIN OF T_DATA OCCURS 0,
       RECORD(200),
     END OF T_DATA.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
  PROGRAM_NAME        = SYST-CPROG
  DYNPRO_NUMBER       = SYST-DYNNR
  FIELD_NAME          = ' '
IMPORTING
  FILE_NAME           = P_FILE
START-OF-SELECTION.
WS_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
   FILENAME                      = WS_FILE
  FILETYPE                      = 'ASC'
  HAS_FIELD_SEPARATOR           = ' '
  HEADER_LENGTH                 = 0
  READ_BY_LINE                  = 'X'
  DAT_MODE                      = ' '
  CODEPAGE                      = ' '
  IGNORE_CERR                   = ABAP_TRUE
  REPLACEMENT                   = '#'
  CHECK_BOM                     = ' '
IMPORTING
  FILELENGTH                    =
  HEADER                        =
TABLES
   DATA_TAB                      = T_DATA
EXCEPTIONS
  FILE_OPEN_ERROR               = 1
  FILE_READ_ERROR               = 2
  NO_BATCH                      = 3
  GUI_REFUSE_FILETRANSFER       = 4
  INVALID_TYPE                  = 5
  NO_AUTHORITY                  = 6
  UNKNOWN_ERROR                 = 7
  BAD_DATA_FORMAT               = 8
  HEADER_NOT_ALLOWED            = 9
  SEPARATOR_NOT_ALLOWED         = 10
  HEADER_TOO_LONG               = 11
  UNKNOWN_DP_ERROR              = 12
  ACCESS_DENIED                 = 13
  DP_OUT_OF_MEMORY              = 14
  DISK_FULL                     = 15
  DP_TIMEOUT                    = 16
  OTHERS                        = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Creating the file at Appl ...........
OPEN DATASET P_FILE1 FOR OUTPUT IN TEXT MODE encoding utf-8.
if sy-subrc ne 0.
message e000(--) with 'Error in opening file'.
endif.
Trasfer the records to file.............
loop at t_data.
transfer t_data to p_file1.
endloop.
close dataset p_file1.
if sy-subrc eq 0.
write: / 'Written the files at ', p_file1.
Now when I am uploading Flat file1 with following data it gets updated but when I use Flat file2, it does not work.
Please help me out..
I am posting the data of both flat files.
Flat file1:(File getting transferred successfully to application server)
1,NPOBL,ABC
1,NPOBL,CDE
1,NPOBL,FGH
Flat file2: (Getting error when trying to transfer this file on application server)
DS04,1,NPOBL,200,CREATE1,NEW YORK,X
DS04,1,NPOBL,200,CREATE2,NEW YORK,X
DS04,1,NPOBL,200,CREATE3,NEW YORK,X
<b>Please help me out...</b>
-Tushar

hi Rajesh,
I guess your in ternal table is not able to hold the data as is of 200 characters ... try increasing the length ..
DATA: BEGIN OF T_DATA OCCURS 0,
RECORD(2000),
END OF T_DATA.
Regards,
Santosh

Similar Messages

  • Function Module for putting Flat File into Application Server

    Hi Pals,
         what is the   Function module for putting my flatfile into application server..
    because i dont have  authorizations to  put my flatfile  into application server directly..
    I know one function mudule is there for that ...so,  can you suggest me.. what is the function module... for that..
    thanks.. and points will be assigned..
    chitti

    Hi,
    well normally you use the method GUI_UPLOAD of class CL_GUI_FRONTEND_SERVICES to upload a file from your client pc. Then you use the abap statements open dataset, transfer and close dataset to put the file to the app-server.
    kind regards
    Siggi

  • Creation of Flat file in Application Server

    Hi,
    Can you please clarify what is Logical file path and Physical file pathe.
    Also how to create a flat file in Application Server with Logical and Physical file paths.
    Thanks

    Hi Yasaswini,
    Physical file is what you see from the OS level.
    Logical file is what ABAP code can call certain functions to read/write.
    Transaction FILE would link them together. Typically the logical path ends with "<FILENAME>", and the logical file refers to the logical path. You can check the help for more info.
    http://help.sap.com//saphelp_erp2004/helpdata/EN/8d/3e4edc462a11d189000000e8323d3a/frameset.htm
    Good luck,
    Victor

  • Logical path for getting a Flat file from application server

    Hi All,
    We have loaded some .csv files to application server, what is the logical path we have to mention in the infopackage scheduler screen? please guide me how to give the path for getting a flat file from application server.
    Thanks,
    Sairam.

    Hi Sairam,
    I hope you know which location you have saved in the Application server.
    Now if you go to the Infopackage and click on the "External Data" tab, there you will see Radio Buttons for
    1) Client Workstation
    2) Application Server
    Choose the second radio button, then in the Field "Name of the File" you will be able to use the F4 help and browse AL11 transaction through this option. You can then choose the File.
    Hope this helps
    Regards,
    Praveen.

  • How to create a inbound IDOC from flat file in Application server

    HI All
    Our requirement is to create the Inbound idocs from a flat file from application server with in R/3
    Could any body please let me know the steps required for this.
    Thanks
    Malli

    1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
    and then call function
    CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  i_edidc
          IDOC_DATA          =  i_edid4.

  • How to Post a file(Flat File ) into Application server of the XI(AL11)?

    How to Post a file(Flat File ) into Application server of the XI(AL11)?
    Best Regards,
    Jose

    Hi,
    1) goto SXDA_TOOLS Transaction code
    2) Provide the Following details
    Object Type : DXPROJECT
    Program Type: BAPI
    Program/Method: CREATE
    3) Click on Copy Button
    4) Select the Source as Presentation Server
         a) Select  the File where you saved in your Local machine
    5) Select the Target as Application server
         a) Check the check box Remote Server
         b) Select the File type as Physical
         c) In File name give /usr/sap/SSD/DVEBMGS00/work\Your file name (This the Server path                                                                               
    Where the file is going to save)
    6) Click on Continue
    Go to AL11 and check whether the File has been create in the following path  /usr/sap/SSD/DVEBMGS00/work
    Provide this path in the Communication channel path when you select the Transport Protocol as NFS and you place the file in AL11 directory.
    Regards
    Seshagiri

  • Error when loading a flat file from Application server.

    Hi,
    I am trying to load a flatfile from the application server, and I am getting the message
    Error while accessing the application server file
    Message no. RSDS_ACCESS002
    I checked for notes and found only one:
    Note 1033978 - Correction: Loading Unicode files from application server
    but we have 19 SP level, and the note says it needs 13 SP level, so I think it would not be of any help.
    does anybodie know what to do??
    thanks for the help.
    Mauricio

    Error in accessing while application server file..
    when i am trying load the data to psa
    when i am taking the file name: text-type file from app server
    plz reslove me for this problem??
    another question
    when i am saving the file with using * in the  filename in .CSV file its not saving,
    whats the reason????
    ASHOK

  • Problem Reading Flat File from Application server

    Hi All,
    I want to upload a Flat File which is having a Line Length of 3000.
    While uploading it to Application server , only upto 555 length it is getting uploaded .
    i am using the code :
    DATA: BEGIN OF TB_DATA OCCURS 0,
            LINE(3000),
          END OF TB_DATA.
    *----Uploading the flat file from the Local drive using FM "UPLOAD".
    OPEN DATASET TB_FILENAM-DATA FOR OUTPUT IN TEXT MODE." ENCODING DEFAULT.
    IF SY-SUBRC NE 0.
      WRITE:/ 'Unable to open file:', TB_FILENAM-DATA.
    ELSE.
      LOOP AT TB_DATA.
        TRANSFER TB_DATA TO TB_FILENAM-DATA.
      ENDLOOP.
    ENDIF.
    CLOSE DATASET TB_FILENAM-DATA.
    What could be the problem?
    Could it be due to any Configuration Problem?
    Waiting for your replies.
    Thanks and Regards.
    Suki

    Your code looks OK, but you may have touble displaying the full width. Try:
    WRITE: /001 TB_FILENAM-DATA+555.
    (And don't forget to append your ITAB after each read.)
    Rob

  • How to edit flat file in application server

    Hi all,
    I have requirment of flat file load. User will update flat file and I need to upload data in cube. I am done with loading data from application server flat file to cube Now I want to know where this file will be stored so user can update the data .
    Do i need to store it some where in application sever only ? I checked my current file data but it's not in editable form.
    Please let me know your expert suggestion.
    Thanks.
    P.S. - Point will be provided as required.

    Neither user or you can not upload or edit the CSV files directly from the AL11(Application level directories).
    Using this Functional Module: ARCHIVFILE_CLIENT_TO_SERVER you can upload the file from your machine to AL11
    Note: you must have an authorization to execute this FM in PRD! otherwise you can follow the below procedure.
    (Or)
    As you data flow is from a flat file, you can ask your basis team to run a FTP program, so that when ever user give a new file every day, using the FTP program the latest file will upload into the AL11 directories. you can execute data using the Info package as usual  from AL11.
    Edited by: YJV on May 23, 2011 12:10 PM

  • Field Values being changed in the flat file on Application Server

    Hi All,
    I am loading a flat file(.CSV) from Application server. The file has some characteristic fields, for ex: CNUM of type Char, length 20. But it has got the value which is of 10 char length, say XYZ1234XAB. When I load the same fiel from client workstation, the load was successful but when I load it from Application server, the load has failed and the error is Invalid/Hex. characteristics for this record and many such records.
    When I checked the file on the application server the value 'XYZ1234XAB' is being displayed as 'XYZ1234XAB   #' and it is also being loaded with '#'. This is the cause of the error.
    Why is the value being changed on the application server? What can I do to overcome this?
    Thanks,
    RPK.
    Message was edited by:
            RPK

    Hi Ganesh,
    I have already loaded data to my ODS and when activating it is giving error "Value 'XYZ123XABC   #' (hex. '123456....') of characteristic CNUM contains invalid chara".
    I also have some lower case char in some of the records for the same field. The file is huge and cannot change the file, infact I have many such files. Is there any other way to overcome this?
    Thanks,
    RPK

  • Flat file in application.

    hi sapgurus,
    Can any body teach how to put the flat file in application server.
    I know the tcode AL11 to view the flat files,but i want to insert the flat file.
    thanks in advance.

    Hi Stalin,
    You need to have access to your various unix directories. You must have user ids and passwd (FTP accounts) to access these directories. Check with your basis team for the required access.
    There are various softwares used to upload the file into the application serevr. Filezella etc. is one of them. Check with your team what software they are using to upload the files into the application serevr.
    Hope it helps.
    Thanks,
    Soumya

  • Program for uploading file on application server...

    Hi,
    I have created a program to upload a file from presentation server (local desktop) to application server. But in this program I have to specify the file length. What should I do in given program so that I can upload file of any length on application server ?
    *& Report  Z_FILE_DOWNLOAD_TO_APP_SERVER                               *
    * This Program can be used to move flat files to application server from presentation server.
    REPORT  Z_FILE_DOWNLOAD_TO_APP_SERVER.
    PARAMETERS: P_FILE       LIKE IBIPPARMS-PATH,
               P_FILE1(20000) default 'E:CONVERSIONFLAT' lower case.
    DATA: WS_FILE TYPE STRING.
    DATA: BEGIN OF T_DATA OCCURS 0,
           RECORD(20000),
         END OF T_DATA.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
      FILE_NAME           = P_FILE
    START-OF-SELECTION.
    WS_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
       FILENAME                      = WS_FILE
      FILETYPE                      = 'ASC'
    TABLES
       DATA_TAB                      = T_DATA
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    * Creating the file at Appl server............................
    OPEN DATASET P_FILE1 FOR OUTPUT IN TEXT MODE encoding utf-8.
    if sy-subrc ne 0.
    message e000(--) with 'Error in opening file'.
    endif.
    * Trasfer the records to file.............
    loop at t_data.
    transfer t_data to p_file1.
    endloop.
    close dataset p_file1.
    if sy-subrc eq 0.
    write: / 'Written the files at ', p_file1.
    write:/ 'Goto AL11 Transaction and then click on SAP Directory DIR_SAPUSERS to look for the file'.
    endif.
    Please advice.
    Regards,
    Rajesh

    Try declaring it as TYPE STRING. Not sure though.
    There are two predefined types in ABAP with variable length:
    STRING for character strings
    XSTRING for byte strings
    Thanks,
    SKJ

  • I want to put header while stroing file in application server

    Hi Guru,
       Can anybody tell how to put header while stroing file in application server.
    in the below pgm data is coming i want to put heading .if we see in al11 transaction the header should come .plese give on eg in the code itself.its urgent
    eg:
    material number
    100
    200
    declarations...................................................
    tables: bkpf.                          " Accounting Document Header
    *"Selection screen elements............................................
    parameters:
      p_burks like bkpf-bukrs.             " Company Code
    select-options:
      s_gjahr for bkpf-gjahr.              " Fiscal year
    Type declaration of the structure to hold Accounting Document Header*
    data:
      begin of fs_bkpf,
        bukrs type bkpf-bukrs,             " Company Code
        belnr type bkpf-belnr,             " Accounting Document Number
        gjahr type bkpf-gjahr,             " Fiscal year
        blart type bkpf-blart,             "        Document type
        bldat type bkpf-bldat,             " Document date in document
      end of fs_bkpf.
    Internal table to hold Accounting Document Header                   *
    data:
      t_bkpf like standard table
               of fs_bkpf.
    Type declaration of the structure to hold file data                 *
    data:
      begin of fs_table,
        str type string,
      end of fs_table.
    Internal table to hold file data                                    *
    data:
      t_table like standard table
                of fs_table.
    field-symbols: <fs>.
    *" Data declarations...................................................
    Work variables                                                      *
    data:
      w_char(50)      type c,
      w_file_name(50) type c value 'YH645_050103'.
    select bukrs                           " Company Code
           belnr                           " Accounting Document Number
           gjahr                           " Fiscal year
           blart                           "        Document type
           bldat                           " Document date in document
      from bkpf
      into table t_bkpf
    where bukrs eq p_burks
       and gjahr in s_gjahr.
    if sy-subrc eq 0.
      loop at t_bkpf into fs_bkpf.
        do.
          assign component sy-index of structure fs_bkpf to <fs>.
          if sy-subrc ne 0.
            exit.
          else.
            move <fs> to w_char.
            if sy-index eq 1.
              fs_table-str = <fs>.
            else.
              concatenate fs_table-str ',' w_char into fs_table-str.
            endif.                         " IF SY-INDEX...
          endif.                           " IF SY-SUBRC...
        enddo.                             " DO...
        append fs_table to t_table.
      endloop.                             " LOOP AT T_KNA1...
    endif.                                 " IF SY-SUBRC...
    open dataset w_file_name for output in text mode encoding default.
    loop at t_table into fs_table.
      transfer fs_table-str to w_file_name.
    endloop.                               " LOOP AT T_TABLE...

    Hi,
    may i know what kind of heading you want to display?
    like date, filename, time etc
    then modify the below code:
    *&      Form  send_statistic
         Create the status Report on application Server
       --->  pv_rlines  - Total No of Records in Internal table          *
       --->  pv_slines  - Total No of Successful records                 *
       --->  pv_elines  - Total No of Errornous  records                 *
       --->  pv_path    - File Path  where the file to be created        *
       --->  pv_flag    - Flag to check for A/c group                    *
    FORM sub_send_statistic USING  pv_rlines  TYPE int4
                                   pv_slines  TYPE int4
                                   pv_elines  TYPE int4
                                   pv_path    TYPE salfile-longname
                                   pv_name    TYPE rlgrap-filename
                                   pv_flag    TYPE char1.
      CLEAR : i_tab,
              wa_tab.
    Convert date to MM/DD/YYYY format
      PERFORM date_convert.
    Convert Time to HH:MM:SS format
      CONCATENATE sy-uzeit+0(2)
                  c_colon
                  sy-uzeit+2(2)
                  c_colon
                  sy-uzeit+4(2)
             INTO v_time1.
    Build the Output File name
      IF   p_sold  = c_x
      AND  pv_flag = c_x.
        CONCATENATE c_objid
                    c_us
                    c_z001
                    c_us
                    sy-datum
                    c_us
                    sy-uzeit
               INTO v_file.
      ENDIF.  " IF   p_sold = c_x
      IF p_cons = c_x.
        CONCATENATE c_objid
                    c_us
                    c_z008
                    c_us
                    sy-datum
                    c_us
                    sy-uzeit
               INTO v_file.
      ELSEIF p_sold = c_x
      AND    pv_flag <> c_x.
        CONCATENATE c_objid
                    c_us
                    sy-datum
                    c_us
                    sy-uzeit
               INTO v_file.
      ENDIF.  " IF p_cons = c_x
    Build the Complete Output File Path
      CONCATENATE pv_path
                  c_slash
                  v_file
             INTO v_outfile.
    Populate the data required for output into an internal table and
    then transfer the table contents to file on application server
    DATA UPLOAD STATISTICS
      wa_tab-rec = text-001.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    TITLE
      IF   p_sold  = c_x
      AND  pv_flag <> c_x.
        sy-title = text-t17.
      ENDIF.  " IF   p_sold = c_x
      IF  p_sold  = c_x
      AND pv_flag = c_x.
        sy-title  = text-t16.
      ENDIF.  " IF  p_sold = c_x
      IF  p_cons  = c_x
      AND pv_flag = c_x.
        sy-title  = text-t19.
      ENDIF.  " IF  p_cons = c_x
      wa_tab-rec+0(7)   = text-002.
      wa_tab-rec+7(60)  = sy-title.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    Date & Time
      wa_tab-rec+0(5)   = text-012.
      CONDENSE v_date NO-GAPS.
      wa_tab-rec+6(10)  = v_date.
      wa_tab-rec+60(10) = text-003.
      wa_tab-rec+70(15) = v_time1.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    Folder Name
      wa_tab-rec+0(18)  = text-005.
      wa_tab-rec+19(72) = pv_path.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    File Name
      wa_tab-rec+0(18)  = text-006.
    ---Begin of addition -Shivakumar - 09-05-2007--
      wa_tab-rec+19(72) = pv_name.
    ---Begin of addition -Shivakumar - 09-05-2007--
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    Records Read
      CLEAR v_count.
      v_data   = pv_rlines.
      v_count  = STRLEN( v_data ).
      CONDENSE v_data NO-GAPS.
      wa_tab-rec+0(46)  = text-007.
      wa_tab-rec+47(4)  = v_data.
      APPEND wa_tab TO i_tab.
      CLEAR : wa_tab,
              v_data.
    Successfull Records
      CLEAR v_count.
      v_data   = pv_slines.
      v_count  = STRLEN( v_data ).
      CONDENSE v_data NO-GAPS.
      wa_tab-rec+0(46)  = text-008.
      wa_tab-rec+47(4)  = v_data.
      APPEND wa_tab TO i_tab.
      CLEAR : wa_tab,
            v_data.
    Error Records
      CLEAR v_count.
      v_data   = pv_elines.
      v_count  = STRLEN( v_data ).
      CONDENSE v_data NO-GAPS.
      wa_tab-rec+0(46)  = text-009.
      wa_tab-rec+47(4)  = v_data.
      APPEND wa_tab TO i_tab.
      CLEAR : wa_tab,
              v_data.
      v_mesg = text-t04.
      IF   p_sold  = c_x
      AND  pv_flag <> c_x.
        MOVE i_tab  TO i_file.
      ENDIF.  " IF   p_sold = c_x
      IF  p_sold  = c_x
      AND pv_flag = c_x.
        MOVE i_tab  TO i_file1.
      ENDIF.  " IF  p_sold = c_x
      IF NOT i_tab IS INITIAL.
    Open the file on Application server to write the report
        OPEN DATASET v_outfile
                 FOR OUTPUT IN TEXT MODE
            ENCODING DEFAULT MESSAGE v_mesg.
        IF sy-subrc <> 0.
          MESSAGE e000(zconversions) WITH v_mesg.
        ELSE.  " IF sy-subrc <> 0
    Transfer details to the file on application server
          CLEAR wa_tab.
          LOOP AT  i_tab INTO wa_tab.
            TRANSFER wa_tab-rec TO v_outfile.
            CLEAR wa_tab.
          ENDLOOP.  " LOOP AT  i_tab INTO wa_tab
    Close the file
          CLOSE DATASET v_outfile.
        ENDIF.  " IF sy-subrc <> 0
      ENDIF.  " IF NOT i_tab IS INITIAL
    ENDFORM.                    " Create_Report

  • Reading XML file from application server and  put into internal table-4.6C

    Dear All,
    Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest.
    Thanks and regards,
    Atanu

    Hi Atanu!
    Simply use the XSLT transformation 'ID'.
    FIELD-SYMBOLS <ls_result> TYPE ANY.
    CREATE DATA lref_data TYPE (your_structure).
    ASSIGN lref_data->* TO <ls_result>.
    CALL TRANSFORMATION id
                        SOURCE XML xmlstr
                        RESULT result = <ls_result>.
    "xmlstr" contains your XML file. Just read it into it via standard I/O operations. "<ls_result>" will contain your DDIC formatted content.
    Best regards
    Torsten

  • What are the commands available to read a file from application server and

    What are the commands available to read a file from application server and store the file into an internal table?

    Hi,
    To read a file from an Application Server to an Object there is a command in ABAP called <b>READ DATASET</b>. After that file is transported to that object you have to do a loop and put that data in an Internal Table.
    This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file.
    For dset, a character-type data object is expected - that is, an object that contains the platform-specific name of the file. The content is read from the file starting from the current file pointer. After the data transfer, the file pointer is positioned after the section that was read. Using the MAXIMUM LENGTH addition, the number of characters or bytes to be read from the file can be limited. Using ACTUAL LENGTH, the number of characters or bytes actually used can be determined.
    In a Unicode program, the file must be opened with an arbitrary access type; otherwise, an exception that cannot be handled will be triggered.
    If the file has not yet been opened in anon-Unicode program, it will be implicitly opened as a binary file for read access using the statement
    OPEN DATASET dset FOR INPUT IN BINARY MODE.
    . If a non-existing file is accessed, an exception that can be handled can be triggered.
    Influence of Access Type
    Files can be read independently of the access type. Whether data can be read or not depends solely on the position of the file pointer. If the latter is at the end of the file or after the file, no data can be read and sy-subrc will be set to 4.
    Influence of the Storage Type
    The import function will take place irrespective of the storage type in which the file was opened with the statement OPEN DATASET.
    If the file was opened as a text file or as a legacy text file, the data is normally read from the current position of the file pointer to the next end-of-line marking, and the file pointer is positioned after the end-of-line marking. If the data object dobj is too short for the number of read characters, the superfluous characters and bytes are cut off. If it is longer, it will be filled with blanks to the right.
    If the file was opened as a binary file or as a legacy-binary file, as much data is read that fits into the data object dobj. If the data object dobj is longer than the number of exported characters, it is filled with hexadecimal 0 on the right.
    If the specified storage type makes conversion necessary, this is executed before the assignment to the data object dobj. Afterwards, the read data is placed, byte by byte, into the data object.
    System Fields
    sy-subrc Meaning
    0 Data was read without reaching end of file.
    4 Data was read and the end of the file was reached or there was an attempt to read after the end of the file.
    Thanks,
    Samantak.
    <b>Rewards points for useful answers.</b>

Maybe you are looking for

  • The iPhone cannot be synced. iTunes crashing.

    There seems to be a whole "bunch of stuff" going on with my iMac 21" i3, and I just wanted to check in to see if anyone had experienced anything similar or had any advice. First, when syncing my iPhone 4 last week I got this message: "The iPhone cann

  • I was just wandering if the new iPad mini is able to connect to the internet if you have wired internet?

    I was just wandering if the new iPad mini is able to connect to the internet if you have wired internet? Thanks Colin.

  • Fillable form with multiple pages

    I have a fillable form with multiple pages. However, when I save it and open it, it tabs to the end of the first page and will go back up to the top of the first page again. It won't tab to the second page. Instead, the user will have to click there

  • Error DATASET_CANT_CLOSE', CX_SY_FILE_CLOSE in BW netweaver 7.0

    Hi, We have different process chains in BW Netweaver 7.0 EHP1 , SP 5,  they  are not working. We are getting error  DATASET_CANT_CLOSE', CX_SY_FILE_CLOSE,  Operating system cannot close file "RSPC_DELETING_JOBS.TRC"  when we  run them or activate the

  • Soundbooth markers into AE

    I am trying to animate some text to spoken words that I have recorded. I have the audio file in Soundbooth and have made the flash cue points marked when each word is said with the (*) key, I would like to get those markers into AE so that I can anim