Unable to read file from application server

Hi guys,
I am reading file(could be any extension) from application server,but some time i am successfuly able to read file and sometime unable to read,why its happening .
my code is here
OPEN DATASET E_FILE FOR INPUT IN  BINARY MODE . "
  IF SY-SUBRC = 0.
    DO .
      READ DATASET E_FILE INTO GS_PDF_TAB.
      IF SY-SUBRC = 0.
        APPEND GS_PDF_TAB TO GT_PDF_TAB.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    CLOSE DATASET E_FILE.
  ENDIF.
Thanks
Ankur Sharma

Hi,
What actually happens?  Do you get a short dump?  Do you get a return code ne 0?  Does it run fine but you get no data in your table?
We aren't mind-readers and can't help much without more information.
Try using transaction AL11 to see if you access the files you are trying to open.
Gareth.

Similar Messages

  • Uploading and reading file from application server

    Hi
    My problem is when am uploading a file to application server it is getting stored in
    usr/sap/transyp1/prod/in   directory
    after that i want to read that file from application server to update database
    when  using below code it is showing some other directory in f4 help
    DATA: lv_hostname TYPE msxxlist-name.
    DATA: lv_server TYPE bank_dte_jc_servername.
    PARAMETERS: p_file TYPE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'BANK_API_SYS_GET_CURR_SERVER'
    IMPORTING
    e_server = lv_server.
    lv_hostname = lv_server.
    CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
    EXPORTING
    dynpfield_filename = 'P_FILE'
    dyname = sy-cprog
    dynumb = '1000'
    filetype = 'P'
    location = 'A'
    server = lv_hostname.
    experts could you please help me out
    Thanks & Regards
    Nagesh.Paruchuri

    User Transaction file. You will get all logical file path names.
    used following fucntion module to read file name and use command open dataset to read the file.
    CALL FUNCTION 'FILE_GET_NAME'
           EXPORTING
                CLIENT           = SY-MANDT
                LOGICAL_FILENAME = C_LOGICAL_FILENAME
                OPERATING_SYSTEM = SY-OPSYS
                PARAMETER_1      = P_IN_FILENAME
           IMPORTING
                FILE_NAME        = P_OUT_FILENAME
           EXCEPTIONS
                FILE_NOT_FOUND   = 1
                OTHERS           = 2.
    OPEN DATASET P_OPEN_FILE ENCODING UTF-8 IN TEXT MODE FOR OUTPUT.
      IF SY-SUBRC <> 0.
        MESSAGE E000(38) WITH 'Error in Opening file: ' V_PHY_FILENAME.
      ENDIF.

  • Problem  in reading file from application server

    while reading the file from application server i am succesful in reading from dataset but the program gets terminated giving a runtime error "CONVT_CODEPAGE".
    the code written is as below :
    open dataset d1 for input in text mode encoding default.
    IF sy-subrc NE 0.
    EXIT.
    ENDIF.
    do.
                    Read dataset d1 into btab.
         if sy-subrc <> 0.
         exit.
                   else.
                   condense btab NO-GAPS.
                   wtt_text-text1 = btab-wa+0(10).
                   wtt_text-text2 = btab-wa+10(1).
                   wtt_text-text3 = btab-wa+11(3).
                  append wtt_text.
                  clear wtt_text.
                  wt_counter = wt_counter + 1.
                  ENDIF.
    enddo.
    write : /10 ' number of records :'.
    write :  wt_counter.
    kindly help me asap.
    regards,
    rachu.

    If I am not wrong you are working on a Unicode enabled system. That is why this error is coming.
    Look at the link below, where the solution is provided.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554dcb3dc11d5993800508b6b8b11/content.htm
    open dataset DSN in text mode for output encoding utf-8.
    Regards,
    Ravi
    Note - Please close the thread by selecting PROBLEM SOLVED against the answer which helped your most, if the issue is resolved.

  • Reading File from Application Server using Read Dataset

    Hi,
    i am trying to read excel file from Application Server and has multiple records in that based on structure below. but when i execute its giving me error message.here is the code, can sumone suggest me on this please ??
    FORM f_data_upload .
      DATA:
         l_filename TYPE string,   "file name
         l_wa_string TYPE string.  "file record
        l_filename = p_inp_as. "File path from Application Server
        OPEN DATASET l_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        DO.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
    Read the data from the file in Application server.
          READ DATASET l_filename INTO l_wa_string.
          IF sy-subrc = 0.
            SPLIT l_wa_string AT cl_abap_char_utilities=>horizontal_tab
                  INTO w_data-tcode
                       w_data-matnr
                       w_data-mtart
                       w_data-werks
                       w_data-vkorg
                       w_data-vtweg
                       w_data-lgort
                       w_data-meins
                       w_data-maktx
                       w_data-spart
                       w_data-kosch
                       w_data-mstae
                       w_data-brgew
                       w_data-ntgew
                       w_data-groes
                       w_data-matkl
                       w_data-prdha
                       w_data-mstde
                       w_data-mtpos_mara
                       w_data-gewei
                       w_data-spart
                       w_data-mstav
                       w_data-mstdv
                       w_data-dwerk
                       w_data-taxkm
                       w_data-versg
                       w_data-kondm
                       w_data-ktgrm
                       w_data-mtpos
                       w_data-mtvfp
                       w_data-tragr
                       w_data-ladgr
                       w_data-herkl
                       w_data-ekgrp
                       w_data-webaz
                       w_data-dismm
                       w_data-beskz
                       w_data-prctr
                       w_data-bklas
                       w_data-bwtty
                       w_data-vprsv
                       w_data-verpr
                   IN CHARACTER MODE.
            APPEND w_data TO i_data.
            CLEAR w_data.
           ENDIF.
        ENDDO.
        CLOSE DATASET l_filename.
    Error Message while executing
    What happened?
        At the conversion of a text from codepage '4110' to codepage '4102':
        - a character was found that cannot be displayed in one of the two
        codepages;
        - or it was detected that this conversion is not supported
        The running ABAP program 'ZHDI_LOMM_VEHI_MAT_MASS_CREATE' had to be terminated
         as the conversion
        would have produced incorrect data.
        The number of characters that could not be displayed (and therefore not
        be converted), is 449. If this number is 0, the second error case, as
        mentioned above, has occurred.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
         caught in
        procedure "F_DATA_UPLOAD" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        Characters are always displayed in only a certain codepage. Many
        codepages only define a limited set of characters. If a text from a
        codepage should be converted into another codepage, and if this text
        contains characters that are not defined in one of the two codepages, a
        conversion error occurs.
        Moreover, a conversion error can occur if one of the needed codepages
        '4110' or '4102' is not known to the system.
        If the conversion error occurred at read or write of  screen, the file
        name was '/usr/sap/interfaces/conversion/pioneer/ddm/data/test_data1.xls'.
         (further information about the file: "X 549
         24064rw-rw----200812232135082008122307293120081223072931")
    Please help me
    Thank You

    Woah ... perfect guru
    but data looks like all junk characters ? its filling with special characters, hashes # and other characters but not with Excel data.. any idea ??
    Temesh
    Edited by: New2Sap Abap on Dec 24, 2008 6:42 AM

  • Dynamically Reading Files From Application Server

    Hi Experts,
    Presently I have to write a program which reads files from the application server dynamically. This program will be scheduled in the background with the frequency of half an hour.
    I am Using the function module
    CALL FUNCTION 'SUBST_GET_FILE_LIST'
    EXPORTING
    DIRNAME = '/usr/sap/xxx/xxx/'
    FILENM = 'DATASET'
    PATTERN = '.txt'
    TABLES
    FILE_LIST = IT_FILELIST
    I am facing problem in specifying the parameter FILENM in the function module,
    As I have to read many files from the apps server. How to assign the parameter of function module so it can take the many files generated in the apps server.
    Thanks in Advance,
    Regards,
    Irfan Hussain

    Hi,
    Instead of the above FM, you can use the following code :
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR po_ifile.
    PERFORM get_current_directory  USING 'PO_IFILE'   po_ifile
                                              rov-home_dir rov-curr_dir.
        PERFORM get_filename-of-server TABLES itab_filename
                                           USING  rov-curr_dir rov-gen_name.
        PERFORM help_values_get_with_table_ext TABLES itab_filename
                                           USING  rov-curr_dir
                                                       po_ifile.
    *&      Form  get_current_directory
          text
         -->P_0023   text
         -->P_PO_IFILE  text
         -->P_ROV_HOME_DIR  text
         -->P_ROV_CURR_DI  text
         -->P_CALL  text
         -->P_FUNCTION  text
         -->P_0029   text
         -->P_IMPORTING  text
         -->P_FILE_NAME  text
         -->P_=  text
         -->P_PO_IFILE  text
      FORM get_current_directory  USING _fieldname
                                        _filename
                                        homedir
                                        currdir.
        IF _fieldname <> space.
          PERFORM dunp_value_read USING _fieldname _filename.
        ENDIF.
        IF _filename = space.
          currdir = homedir.
        ELSE.
          rov-work_dir = _filename.
          rov-fdpos = STRLEN( rov-work_dir ).
          DO.
            IF rov-fdpos = 0.
              EXIT.
            ENDIF.
            rov-fdpos = rov-fdpos - 1.
            ASSIGN rov-work_dir+rov-fdpos(1) TO <rov_p>.
            IF <rov_p> = rov-delchar.
              <rov_p> = space.
              EXIT.
            ELSE.
              <rov_p> = space.
            ENDIF.
          ENDDO.
          currdir = rov-work_dir.
        ENDIF.
      ENDFORM.                    " get_current_directory
    *&      Form  get_filename-of-server
          text
         -->P_ITAB_FILENAME  text
         -->P_ROV_CURR_DIR  text
         -->P_ROV_GEN_NAME  text
      FORM get_filename-of-server TABLES nametab STRUCTURE itabfilename
                                  USING  _dirname _genname.
        CALL 'C_DIR_READ_FINISH'             " just to be sure
                               ID 'ERRNO'  FIELD rov-errno
                               ID 'ERRMSG' FIELD rov-errmsg.
        CALL 'C_DIR_READ_START' ID 'DIR'    FIELD _dirname
                                ID 'FILE'   FIELD _genname
                                ID 'ERRNO'  FIELD rov-errno
                                ID 'ERRMSG' FIELD rov-errmsg.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        REFRESH _nametab.
        DO.
          CLEAR _nametab.
          CALL 'C_DIR_READ_NEXT'  ID 'TYPE'   FIELD _nametab-type
                                  ID 'NAME'   FIELD _nametab-name
                                  ID 'LEN'    FIELD _nametab-len
                                  ID 'OWNER'  FIELD _nametab-owner
                                  ID 'MTIME'  FIELD _nametab-mtime
                                  ID 'MODE'   FIELD _nametab-mode
                                  ID 'ERRNO'  FIELD _nametab-errno
                                  ID 'ERRMSG' FIELD _nametab-errmsg.
          _nametab-dirname = _dirname.
          MOVE sy-subrc TO _nametab-subrc.
          CASE sy-subrc.
            WHEN 0.
              IF _nametab-name+0(1) = '.'.
              ELSE.
                APPEND _nametab.
              ENDIF.
            WHEN 1.
              EXIT.
            WHEN OTHERS.                     " SY-SUBRC >= 2
              EXIT.
          ENDCASE.
        ENDDO.
        CALL 'C_DIR_READ_FINISH'             " just to be sure
                               ID 'ERRNO'  FIELD rov-errno
                               ID 'ERRMSG' FIELD rov-errmsg.
      ENDFORM.                    " get_filename-of-server
    *&      Form  help_values_get_with_table_ext
          text
         -->P_ITAB_FILENAME  text
         -->P_ROV_CURR_DIR  text
         -->P_PO_IFILE  text
      FORM help_values_get_with_table_ext  TABLES _filename
                                                 STRUCTURE itab_filename
                                          USING  _currdir
                                                _selfile.
        TYPES: BEGIN OF f4typ_head_struc,
                 tabname LIKE help_info-tabname,
                 fieldname LIKE help_info-fieldname,
                 head_text LIKE shstruc-keyword,
               END OF f4typ_head_struc.
       DATA itab_fields    LIKE TABLE OF help_value        WITH HEADER LINE.
       DATA itab_selvals   LIKE TABLE OF help_vtab         WITH HEADER LINE.
       DATA itab_values    LIKE TABLE OF rlgrap-filename   WITH HEADER LINE.
       DATA itab_header    TYPE TABLE OF f4typ_head_struc  WITH HEADER LINE.
        REFRESH itab_fields.
        REFRESH itab_selvals.
        REFRESH itab_values.
        REFRESH itab_header.
        itab_fields-tabname    = 'PS0192'.
        itab_fields-fieldname  = 'BAA01'.
        itab_fields-selectflag = ' '.
        APPEND itab_fields.
        itab_fields-tabname    = 'RLGRAP'.
        itab_fields-fieldname  = 'FILENAME'.
        itab_fields-selectflag = 'X'.
        APPEND itab_fields.
        LOOP AT _filename.
          itab_values = itab_filename-type.
          APPEND itab_values.
          itab_values = itab_filename-name.
          APPEND itab_values.
        ENDLOOP.
        CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE_EXT'
           EXPORTING
            CUCOL                         = 0
            CUROW                         = 0
            DISPLAY                       = ' '
            FIELDNAME                     = ' '
            TABNAME                       = ' '
            TITLE_IN_VALUES_LIST          = ' '
            SHOW_ALL_VALUES_AT_FIRST_TIME = ' '
            USE_USER_SHRINKING            = ' '
                titel                         = _currdir
            NO_SCROLL                     = ' '
            NO_CONVERSION                 = ' '
            NO_MARKING_OF_CHECKVALUE      = ' '
           IMPORTING
                index                         = rov-index
                select_value                  = rov-selvalue
             TABLES
                  fields                        = itab_fields
                  select_values                 = itab_selvals
                  valuetab                      = itab_values
            HEADING_TABLE                 =
             EXCEPTIONS
                  field_not_in_ddic             = 1
                  more_then_one_selectfield     = 2
                  no_selectfield                = 3
                  OTHERS                        = 4.
        IF sy-subrc = 0.
          CLEAR itab_filename.
          READ TABLE itab_filename INDEX rov-index.
          IF itab_filename-type+0(3) = 'dir'.
            CONCATENATE _currdir rov-delchar rov-selvalue  rov-delchar
                                                          INTO _selfile.
          ELSE.
            CONCATENATE _currdir rov-delchar rov-selvalue INTO _selfile.
          ENDIF.
        ENDIF.
      ENDFORM.                    " help_values_get_with_table_ext
    Best regards,
    Prashant

  • Read Tab delimited File from Application server

    Hi Experts,
    I am facing problem while reading file from Application server.
    File in Application server is stored as follows, The below file is a tab delimited file.
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    i have downloaded this file from Application server using Transaction CG3Y. the Downloaded file is a tab delimited file and i could not see "#' in the file,
    The code is as Below.
    c_split  TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab.
    here i am using IGNORING CONVERSION ERRORS in order to avoid Conversion Error Short Dump.
    OPEN DATASET wa_filename-file FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
          IF sy-subrc = 0.
            WRITE : /,'...Processing file - ', wa_filename-file.   
           DO.
          Read the contents of file
              READ DATASET wa_filename-file INTO wa_file-data.
              IF sy-subrc = 0.
                SPLIT wa_file-data AT c_split INTO wa_adrc_2-kunnr
                                                   wa_adrc_2-title
                                                   wa_adrc_2-name1
                                                   wa_adrc_2-name2
                                                   wa_adrc_2-name3
                                                   wa_adrc_2-name4
                                                   wa_adrc_2-name_co
                                                   wa_adrc_2-city1
                                                   wa_adrc_2-city2
                                                   wa_adrc_2-regiogroup
                                                   wa_adrc_2-post_code1
                                                   wa_adrc_2-post_code2
                                                   wa_adrc_2-po_box
                                                   wa_adrc_2-po_box_loc
                                                   wa_adrc_2-transpzone
                                                   wa_adrc_2-street
                                                   wa_adrc_2-house_num1
                                                   wa_adrc_2-house_num2
                                                   wa_adrc_2-str_suppl1
                                                   wa_adrc_2-str_suppl2
                                                   wa_adrc_2-country
                                                   wa_adrc_2-langu
                                                   wa_adrc_2-region
                                                   wa_adrc_2-sort1
                                                   wa_adrc_2-sort2
                                                   wa_adrc_2-deflt_comm
                                                   wa_adrc_2-tel_number
                                                   wa_adrc_2-tel_extens
                                                   wa_adrc_2-fax_number
                                                   wa_adrc_2-fax_extens
                                                   wa_adrc_2-taxjurcode.
    WA_FILE-DATA is having below values
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    And this is split by tab delimited and moved to other variables as shown above.
    Please guide me how to read the contents without "#' from the file.
    I have tried all possible ways and unable to get solution.
    Thanks,
    Shrikanth

    Hi ,
    In ECC 6 if all the unicode patches are applied then UTF 16 will defintly work..
    More over i would suggest you to ist replace # with some other  * or , and then try to see in debugging if any further  # appears..
    and no # appears then try to split now.
    if even now the # appears after replace statement then try to find out what exactly is it... wheather it is a horizantal tab etc....
    and then again try to replace it and then split..
    Please follow the process untill all the # are replaced...
    This should work for you..
    Let me know if you further face any issue...
    Regards
    Satish Boguda

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • How to display a file from Application server without downloading it to local drive

    I want to dispaly a file from Application server without downloading it to my local system.
    i tried the below method but it didn't work.
         CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
          EXPORTING
            APPLICATION            = L_FILE
            DEFAULT_DIRECTORY      = L_DIR

    Hi,
    Use open dataset to read file from application server.
    try like this sample code:
    data : p_file like ibipparms-path.
    data : rec(350) type c.
    data:  g_delimiter(1) type c value ','.
    maintain the file path in p_file. then
    open dataset p_file for input in text mode encoding default.
       IF SY-SUBRC = 0.
    do n times.
    READ dataset p_file into rec.
    split rec at g_delimiter into your internal table fields like it-id it-name it-age.
    append it.
    clear it.
    enddo.
    close dataset p_file.
    Now you have the data in internal table it.

  • How to Read file from Application in DMZ Server (page on DMZ)

    Hi All,
    i am trying open a file from application server from OAF page on DMZ server .
    i am getting the error 'either not supported file type or file is damaged '.
    i am taking the path of production server to read the file from DMZ server .
    Please let me know what is the issue .
    Thanks
    Raju

    Please post the details of the application release, database version and OS.
    i am trying open a file from application server from OAF page on DMZ server .Is the issue with all OAF pages or with specific ones only?
    i am getting the error 'either not supported file type or file is damaged '.Please check Apache log files for details about the error (error_log* and access_log*).
    i am taking the path of production server to read the file from DMZ server .What type of DMZ configuration you have?
    Thanks,
    Hussein

  • File from application server -Read and process and delete the file .

    Hi All,
             I writing a ZEE program which will read the file from application server(file will be in text delimat format) and moving the data to internal table and uploadind data base.The part which iam facing problem is -
    > I hve read the file from application server like below ,
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    EXIT.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
    Spliting part i having problem .i need to seperate each field which is seperate from tab delimite and pass it into respective fields of internal table .
    Second if another file come to the appicaltion server , wether my first file will be there ? or should i need to delete the first file after redaing how should i proceed further ?.
    Regards
    SRIRAM...
    THANKS In ADVANCE

    HI,
    1.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    EXIT.
    ELSE.
    DO.
    CLEAR: wa_string, wa_uploadtxt.
    READ DATASET ld_file INTO wa_string.
    IF sy-subrc NE 0.
    EXIT.
    ELSE.
    SPLIT wa_string AT cl_abap_char_utilities=>horizontal_tab INTO wa_uploadtxt-name1
    wa_uploadtxt-name2
    wa_uploadtxt-age.
    APPEND  wa_uploadtxt TO itab.
    ENDDO.
    CLOSE DATASET ld_file.
    ENDIF.
    2. If the another file get's generated in the application server with same file name then the data in old file get's over written with the new data. You are not required to delete the file.

  • Regarding Reading the file from Application Server

    Hi,
    I am trying to read data from Application Server but due to special characters it is getting dumped out.
    US24,Q,Acero (Carbon),AA,0010,0001,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),AA,0010,0002,01,Area rectificada sin da#os ra
    US24,Q,Acero (Carbon),AA,0010,0003,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),CD,0010,0001,01,ITPE Soken para verificacion
    US24,Q,Acero (Carbon),CD,0010,0010,01,No se permite desprendimiento
    US24,Q,Acero (Carbon),CD,0010,0002,01,"Vernier, cinta metrica"#
    In the last line it is going into dump due to special character ".
    Please suggest.
    Thanks
    Priyanka.

    Hi,
    You can check the mode in which you are reading the file
    from application server that is
    Open Dataset in Binary or Text Mode.
    Hope it helps
    Regards
    Mansi

  • Reading tab delimited file from application server

    Hi All,
    I do know that we need to use Open data set to read a file from application server, but my question is when you use  read DATASET v_file into wa_final -  this wa_final is an work area and also i have mentione an internal table. so do we need to Split the record at tab into the corresponding fields. Append the records into an internal table i_input.????
    Please let me know on this....
    thanks in advance....
    Poonam....

    Hi,
    first see the file contents in application server, how the contents whether the contents seperated by any symbol or not, if the contents seperated by any symbol then you have to split the data before appending to internal table.
    check this code.
    DATA: l_data_string TYPE string.
      filename = p_file.
      OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc EQ 0.
        DO.
          READ DATASET filename INTO l_data_string.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          CLEAR k_input.
          SPLIT l_data_string AT '#' INTO k_input-agreement k_input-suffix k_input-status
                k_input-first_name k_input-last_name k_input-job_title k_input-tel k_input-fax k_input-email_address k_input-mob_number.
          APPEND k_input TO i_input.
        ENDDO.
      ENDIF.
    Regards,
    Venu

  • Read Tilda separated file from Application Server

    I have a requirement to read a tilda separated file from application server and write a tilda separeted output to application server. Please suggest how to to get data from tilda separated file to internal table ? and also How to create a tilda separated file from internal table to application server.

    Hi again,
    This some sample code for outputing data on application server with tilda separator.
      OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. " MESSAGE msg.
      IF sy-subrc <> 0.
         message i812(LQ).
         LEAVE LIST-PROCESSING.
      ENDIF.
      LOOP AT gs_input INTO wa_input.
        CONCATENATE wa_input-wadat_ist
                    wa_input-sort2
                    wa_input-name1
                    wa_input-street
                    wa_input-region
                    wa_input-post_code1
                    wa_input-zzchep
                    wa_input-vbeln
                    wa_input-bstkd
                    wa_input-zfrom
                    wa_input-zland
                    wa_input-zccode
                    wa_input-zrcvd
                    wa_input-zfref
                    wa_input-znorc
                    wa_input-zsepr
                    wa_input-zvers
                    wa_input-zlout
                    wa_input-zinfo
                    wa_input-zinco
                    wa_input-zsqal
                    wa_input-zscod
                    wa_input-zrqal
                    wa_input-zeqal
                    wa_input-zecod
                    wa_input-zcust
                    wa_input-ztran INTO g_path SEPARATED BY '~'.
        TRANSFER g_path TO p_file.
        CLEAR : g_path, wa_input.
      ENDLOOP.
      CLOSE DATASET p_file.
    Hope this will be helpful for you.
    Regards,
    Vijay

  • FM to read XML files from Application server in ECC5.0

    Hi All,
    We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files.
    Now we need to read the XML file contents of MM01 and upload into SAP Data Base through BAPI
    I need to know about the Function modules to read XML files from Application Server and also about the FM's that will update the Date base tables with the data obtained form XML files.
    Regards
    Prathima

    Parsing XML data:
    http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
    or alternatively check out ABAP online help for "CALL TRANSFORMATION".
    For creating the material master look at BAPI_STANDARDMATERIAL_CREATE.
    Thomas

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

Maybe you are looking for

  • Safari load times slower under Snow Leopard?

    Has something recently changed? Safari used to be very snappy- suddenly pages are taking forever to load. The first days I ran SL- all seemed fine. The last few days- major hang-ups. I have three machines and it happening across the board.

  • Oracle 9i: Help with loadjava jar files to call out web service from pl/sql

    I'm trying to build a web service client using dbws_callout_utility.zip (version used for prio 10g database). I followed the articles in oracle site to loadjava jar files (soap.jar, dms.jar, ejb.jar, jssl-1_1.jar, mail.jar, servlet.jar) into Oracle D

  • Screen "jumps" when using DropDown box

    Hi All, When I use Drop Down box in the portal, the screen "jumps" until the selection is completed. How do I prevent this? Attached 2 pictures which show the problem (note the red border which shows the space that causes the jump). Pic 1:http://img2

  • Using yepnope, getting error in event handler.

    Recently discover yepnope and started to implement it into my project to keep common functions in one file. The first set of functions worked fine when I moved them over, but with the last one I'm unable to control a symbol.  It's calling the functio

  • Parallel synchronous calls from BPM

    Hi, how many parallel synchronous calls can XI perform at once? Reason why I ask, for me it looks like parallel calls are handled sequentially in XI. My scenario: I have a ccBPM that should ask three different synchronous WebServices to collect data.