Reading uploaded file from app. server

Hi All,
I am trying to upload a .csv format file to app. server thru txn CG3Z....
When i try to open the file in my code thru open dataset and read dataset ...it is giving it in the form of 
30002058,1000#50055501,2000#
Now i want it to be in
30002058,1000
           50055501,2000
format...
pleas suggest..
thnx
Rk

Hi Rahul,
have you tried reading it in BINary format?
Kind regards,
Alvaro

Similar Messages

  • Problem reading .xls file from App Server

    Hi Everyone......
    I hope this might be a common problem but i searched for similar problem......i did'nt find the solution my problem is
    I'm trying to download .xls(excel file data into an internal table using OPEN DATASET FOR INPUT IN TEXT MODE ENCODING DEFUALT and read dataset for reading it).But in the read dataset syntax all stange values like **$#@&&& are getting uploaded???? I dont now why......
    Is it happing because i'm trying to upload .XLS file ???
    My coding is as follows...........
      OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc NE 0.
          IF sy-batch IS INITIAL.
            MESSAGE i001(zz) WITH 'Error opening file for upload'.
            EXIT.
          ELSE.
            MESSAGE s001(zz) WITH 'Error opening file for upload'.
            EXIT.
          ENDIF.
        ENDIF.
    *First Uploading the data into structure
        DO.
          READ DATASET p_file INTO l_wa_tab.   "My internal table work area
          IF sy-subrc = 0.
            APPEND l_wa_tab TO  l_tab.
          ELSE.
            EXIT.
          ENDIF.
          ADD 1 TO count.
        ENDDO.
        CLOSE DATASET p_file.
    Any solution for above problem.........

    Hi,
    Check whether path ur providing to the open data set stmt is correct or not in debugging mode.
    * File upload to internal table from UNIX Directory
        IF NOT p_i1file IS INITIAL AND NOT p_path IS INITIAL.
          CONCATENATE p_path p_i1file INTO v_file.
          CONDENSE v_file.
          OPEN DATASET v_file FOR INPUT IN TEXT MODE MESSAGE v_msg.
          IF sy-subrc EQ 0.
            WRITE:  / 'INPUT FILE CONTAINS NO RECORD :'(010), v_file.
            DO.
              CLEAR tbl_input.
              READ DATASET v_file INTO tbl_input.
              IF sy-subrc NE 0.
                EXIT.
              ELSE.
                APPEND tbl_input.
              ENDIF.
            ENDDO.
    * Close Input File
            CLOSE DATASET v_file.
          ELSE.
            WRITE:/'Error uploading file: '(008),v_file.
            STOP.
          ENDIF.
        ENDIF.
    It should work.check the sy-subrc value and file value in debug mode.
    Thanks
    Parvathi

  • 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

  • Problem in downloading file from app server using CG3Y in to .XLS fomat

    hi All,
    I have uploaded file in to application server through a program using open data set with the separater as "|" ( pipe ) . Now the user should be able to download the file from apps server to presenataion server in .XLS format using txn CG3Y. but when we download, the format appears wierd and the data is not consistent across columns in excel. i.e the data which is supposed to be in one column in the excel is in the other column. what precautaions should i take  before moving data to apps server so that it will be downloaded in a good format.
    Appreciate your help...
    Regards,
    Sreekanth.

    Separate each values with TAB space present in the application server .
    Currently u r using | pipe character. Instead of that use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as delimiter.
    Each value will displayed in separate cells in excel sheet when u download it frm app.server
    Regards,
    Lakshman.

  • Download PDF file from APP server!

    Hi!
    Has anyone tried uplaoding and downloding a PDF table from app server as I tried from a normal method by Open dataset, Transfer but it wont work.
    Please provide any inputs.
    Thanks.

    Hi park,
    1. Using open data set, transfer , close etc,
       also it will work.
       ( it will download / upload any kind of file from app server)
    2. Just make sure the
       FULL PATHNAME and the FILENAME
       are mentioned in EXACT CASE
      (small/CAPITAL).
    3. U can check thru transaction AL11, to see the file and path.
    regards,
    amit m.

  • How to upload file from Application Server?

    Dear Friends,
    How to upload file from Application Server?
    Plz. with example...
    Regards,
    Dharmesh

    hi,
    check the code for upload from application server.
    tables: kna1.
    types: begin of s_file,
             customer type kna1-kunnr,
             country  type kna1-land1,
             name     type kna1-name1,
             region   type kna1-regio,
           end of s_file.
    *--Internal tables
    data: it_file type s_file occurs 0 with header line.
    *-- Selection screen
    selection-screen: begin of block b1 with frame title text-001.
    parameter: p_file type rlgrap-filename default 'C:/customer.txt'
    obligatory.
    selection-screen: end of block b1.
    *-- At selection screen
    at selection-screen on value-request for p_file.
    perform file_help using p_file.
    *-- Process File
    start-of-selection.
      perform upload_file using p_file.
    *-- write File data to o/p
    end-of-selection.
      perform write_data.
    *&      Form  file_help
    form file_help  using    p_p_file.
      data: l_filepath type ibipparms-path.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       importing
         file_name           = l_filepath
      p_p_file = l_filepath.
    endform.                    " file_help
    *&      Form  upload_file
    form upload_file  using    p_p_file.
      call function 'WS_UPLOAD'
       exporting
         filename                      = p_p_file
         filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = it_file
       exceptions
         conversion_error              = 1
         file_open_error               = 2
         file_read_error               = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         no_authority                  = 10
         others                        = 11
      if sy-subrc <> 0.
        message i001.
      endif.
    endform.                    " upload_file
    *&      Form  write_data
    form write_data .
      loop at it_file.
        write:/ it_file-customer, it_file-country, it_file-name,
                it_file-region.
      endloop.
      endform.
    regards,
    keerthi.

  • 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

  • Function module to read xml files from application server

    Hi experts,
            I need to read  xml files from application server to sap. Is the any siutable function moldule for that?

    Hi Cenosure,
    Donno about FM which will upload data directly to SAP, I think you have to do some mapping for it so that it will suit the SAP format. Again it depends on your requirement..
    Please elaborate more about your requirement.
    Please have a look on below FM
    TEXT_CONVERT_XML_TO_SAP
    Also search on SCN there are many threads on the same topic available.
    http://abapreports.blogspot.com/2008/09/upload-xml-file-from-application-server.html
    This is the link which will give you the Code
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
    Use this XML file to Upload the same, this Program will work for your XML file also,
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/input_xml.xml
    See the below thread also
    Upload XML to internal table and vice versa in SAP 4.6C
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • System exception while deleting the file from app server in background job

    Hi All,
    I have a issue while the deleting the file from application server.
    I am using the statement DELETE DATASET in my program to delete the file from app server.
    I am able to delete the file from the app server when i run the program from app server.
    When i run the same report from background job i am getting the message called System exception.
    Is there any secuirity which i need to get the issue.
    Thank You,
    Taragini

    Hi All,
    I get all the authorization sto delete the file from application serever.
    Thing is i am able to run the program sucessfully in foreground but not in the background .
    It i snot giving any short dump also just JOB is cancelled with the exception 'Job cancelled after system exception ERROR_MESSAGE'.
    Can anybody please give me suggestion
    Thanks,
    Taragini

  • How to read .xls file from FTP server t oInternal table

    Hi
    am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
    but the data i get in LT_TEXT is special characters.
    CALL FUNCTION 'FTP_SERVER_TO_R3'
    EXPORTING
    handle = hdl
    fname = f_name "ProdDataFromCRM.xls.
    * CHARACTER_MODE = 'X'
    * IMPORTING
    * BLOB_LENGTH =
    TABLES
    BLOB = lt_text
    * TEXT = lt_text
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4
    can any one help me out to get the exact data..
    Really appreciate your quick response..
    Thank You

    Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
    CALL METHOD document->open_document_from_table
    of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
    Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
    But, who knows, perhaps you want "And Now For Something Completely Different".
    Regards
    Clemens

  • Transfer a file from App Server to a FTP site.

    Hi, Abapers.
    I need your help. Probably, this topic has already been posted in a similar way, but we need an answer to solve our problem.
    We have to sent a PDF file from a directory of our app server (AIX) to a FTP directory... which would the FM sequence we should use to goal it?
    Best Regards.

    Hi Santiago,
    create fm to send file from APP server to FTP site.
    if you want to Post file from desktop to Appl use Transaction - CG3Y
    if you want to Post file from Appl to Desktop use Transaction - CG3Z
    copy the code below....
    *  Author: Prabhudas                            Date:  02/21/2006  *
    *  Name: Z_FTP_FILE_TO_SERVER                                          *
    *  Title: FTP File on R/3 Application Server to External Server        *
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(DEST_HOST) TYPE  C
    *"     REFERENCE(DEST_USER) TYPE  C
    *"     REFERENCE(DEST_PASSWORD) TYPE  C
    *"     REFERENCE(DEST_PATH) TYPE  C
    *"     REFERENCE(SOURCE_PATH) TYPE  C
    *"     REFERENCE(FILE) TYPE  C
    *"     REFERENCE(BINARY) TYPE  CHAR1 OPTIONAL
    *"     REFERENCE(REMOVE_FILE) TYPE  CHAR1 OPTIONAL
    *"  TABLES
    *"      FTP_SESSION STRUCTURE  ZMSG_TEXT OPTIONAL
    *"  EXCEPTIONS
    *"      CANNOT_CONNECT
    *"      SOURCE_PATH_UNKNOWN
    *"      DEST_PATH_UNKNOWN
    *"      TRANSFER_FAILED
    *"      COMMAND_FAILED
      DATA: w_password     TYPE zftppassword,
            w_length       TYPE i,
            w_key          TYPE i                  VALUE 26101957,
            w_handle       TYPE i,
            w_command(500) TYPE c.
      REFRESH ftp_session.
    * Scramble password (new Unicode-compliant routine)
      w_length = STRLEN( dest_password ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = dest_password
          sourcelen   = w_length
          key         = w_key
        IMPORTING
          destination = w_password.
    * Connect to FTP destination (DEST_HOST)
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = dest_user
          password        = w_password
          host            = dest_host
          rfc_destination = 'SAPFTPA'
        IMPORTING
          handle          = w_handle
        EXCEPTIONS
          not_connected   = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          RAISING cannot_connect.
      ENDIF.
    * Optionally, specify binary file transfer
      IF binary = 'X'.
        w_command = 'bin'.
        CALL FUNCTION 'FTP_COMMAND'
          EXPORTING
            handle        = w_handle
            command       = w_command
          TABLES
            data          = ftp_session
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        IF sy-subrc <> 0.
          CONCATENATE 'FTP command failed:' w_command
            INTO w_command SEPARATED BY space.
          MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
              WITH w_command
              RAISING command_failed.
        ENDIF.
      ENDIF.
    * Navigate to source directory
      CONCATENATE 'lcd' source_path INTO w_command SEPARATED BY space.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = w_handle
          command       = w_command
        TABLES
          data          = ftp_session
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      IF sy-subrc <> 0.
        CONCATENATE 'FTP command failed:' w_command
          INTO w_command SEPARATED BY space.
        MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
            WITH w_command
            RAISING source_path_unknown.
      ENDIF.
    * Navigate to destination directory
      CONCATENATE 'cd' dest_path INTO w_command SEPARATED BY space.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = w_handle
          command       = w_command
        TABLES
          data          = ftp_session
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      IF sy-subrc <> 0.
        CONCATENATE 'FTP command failed:' w_command
          INTO w_command SEPARATED BY space.
        MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
            WITH w_command
            RAISING dest_path_unknown.
      ENDIF.
    * Transfer file
      CONCATENATE 'put' file INTO w_command SEPARATED BY space.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = w_handle
          command       = w_command
        TABLES
          data          = ftp_session
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      IF sy-subrc <> 0.
        CONCATENATE 'FTP command failed:' w_command
          INTO w_command SEPARATED BY space.
        MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
            WITH w_command
            RAISING transfer_failed.
      ENDIF.
    * Disconnect from destination host
      CALL FUNCTION 'FTP_DISCONNECT'
        EXPORTING
          handle = w_handle.
    * Optionally, remove file from source directory
      IF remove_file = 'X'.
       CONCATENATE source_path '/' file INTO w_command.
      CONCATENATE 'rm' w_command INTO w_command SEPARATED BY space.
       OPEN DATASET '/dev/null' FOR OUTPUT FILTER w_command.
       CLOSE DATASET '/dev/null'.
    ENDIF.
    Regards,
    Prabhudas

  • 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

  • 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>

  • 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

  • Read XML file from presentation server

    Hi All,
    I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
    DATA : BEGIN OF upl OCCURS 0,
              f(255) TYPE c,
           END OF upl.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = D:\XX.XML'
          filetype = 'BIN'
        TABLES
          data_tab = upl.
    is there any other alternative.
    Thanks
    Swarup,

    Hi Swarup,
    Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
    A sample code snippet :-
    PARAMETERS: p_filnam TYPE localfile OBLIGATORY
    DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
    DATA: l_v_fieldname TYPE dynfnam.
    l_v_fieldname = p_filnam.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    field_name = l_v_fieldname
    IMPORTING
    file_name = p_filnam.
    START-OF-SELECTION.
    TYPES:
    BEGIN OF ty_tab,
    name TYPE string,
    value TYPE string,
    END OF ty_tab.
    DATA:
    lcl_xml_doc TYPE REF TO cl_xml_document,
    v_subrc TYPE sysubrc,
    v_node TYPE REF TO if_ixml_node,
    v_child_node TYPE REF TO if_ixml_node,
    v_root TYPE REF TO if_ixml_node,
    v_iterator TYPE REF TO if_ixml_node_iterator,
    v_nodemap TYPE REF TO if_ixml_named_node_map,
    v_count TYPE i,
    v_index TYPE i,
    v_attr TYPE REF TO if_ixml_node,
    v_name TYPE string,
    v_prefix TYPE string,
    v_value TYPE string,
    v_char TYPE char2.
    DATA:
    itab TYPE STANDARD TABLE OF ty_tab,
    wa TYPE ty_tab.
    CREATE OBJECT lcl_xml_doc.
    CALL METHOD lcl_xml_doc->import_from_file
    EXPORTING
    filename = p_filnam
    RECEIVING
    retcode = v_subrc.
    CHECK v_subrc = 0.
    v_node = lcl_xml_doc->m_document.
    CHECK NOT v_node IS INITIAL.
    v_iterator = v_node->create_iterator( ).
    v_node = v_iterator->get_next( ).
    WHILE NOT v_node IS INITIAL.
    CASE v_node->get_type( ).
    WHEN if_ixml_node=>co_node_element.
    v_name = v_node->get_name( ).
    v_nodemap = v_node->get_attributes( ).
    IF NOT v_nodemap IS INITIAL
    * attributes
    v_count = v_nodemap->get_length( ).
    DO v_count TIMES.
    v_index = sy-index - 1.
    v_attr = v_nodemap->get_item( v_index ).
    v_name = v_attr->get_name( ).
    v_prefix = v_attr->get_namespace_prefix( ).
    v_value = v_attr->get_value( ).
    ENDDO.
    ENDIF.
    WHEN if_ixml_node=>co_node_text OR
    if_ixml_node=>co_node_cdata_section.
    * text node
    v_value = v_node->get_value( ).
    MOVE v_value TO v_char.
    IF v_char <> cl_abap_char_utilities=>cr_lf.
    wa-name = v_name.
    wa-value = v_value.
    APPEND wa TO itab.
    CLEAR wa.
    ENDIF.
    ENDCASE.
    * advance to next node
    v_node = v_iterator->get_next( ).
    ENDWHILE.
    LOOP AT itab INTO wa.
    ENDLOOP.
    Regards
    Abhii

Maybe you are looking for