File to SAP (IDoc) using XI

Hi,
I am trying to create an IDoc (Order) in SAP R/3 system based the file I receive. I am getting the following error
<b><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!--  Call Adapter
  -->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
  <SAP:Category>XIAdapter</SAP:Category>
  <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
  <SAP:P1>Transaction IDX1: Port XI_00_800, client , RFC destination contain errors</SAP:P1>
  <SAP:P2 />
  <SAP:P3 />
  <SAP:P4 />
  <SAP:AdditionalText />
  <SAP:ApplicationFaultMessage namespace="" />
  <SAP:Stack>Error: Transaction IDX1: Port XI_00_800, client , RFC destination contain errors</SAP:Stack>
  <SAP:Retry>M</SAP:Retry>
  </SAP:Error></b>
Could someone help me in resolving this error. Also Why IDX1 is showing up here for receiver IDoc Adapter? Other info: In my SAPE15 (SAP R/3) communication channel the receiver IDoc adapter has the following info. RFC Destination: T90XLNT090 (defined in XI-SM59-R/3 Connections, pointing to R/3 server), Port: XI_00_800 defined in R/3-WE21-Transactional RFC-XI_00_800 points to XI server. No identifiers nor modules, selected Apply control record values from payload. Everthing else seems to be OK. If required I can provide more information.
Looking forward for response,
Thanks and Regards,
Jagadish.

hI,
  There might be a port issue as the error is attached to "Port XI_00_800".
Try this link :
IDX1
(reply from Christine)
And use this link from sap
http://help.sap.com/saphelp_nw04/helpdata/en/3b/beb13b00ae793be10000000a11402f/content.htm
Regards,
Anirban.

Similar Messages

  • How to upload the data from XML file to SAP database using IDOC

    Hi,
    I need some steps  to upload  data from XML format file from other directory to SAP database using IDOC.
    how to approch this please if any one knows give me ans
    it will be a great help ful to me
    Thanks in Advance
    Mallik

    Thank you vijay,
    But i heard that by using this Fun modules, when we are passing IDOC in back ground schedule,  so some other depended FM not supporting, so how to approach this and how to avoid this problem. 
    Have you worked on this before if any one worked on this please help me out
    And thank you once again for your valuable information
    Best Regards
    Mallik

  • Uploading File into SAP Transaction using BSP

    Hi Everybody,
    I would like to know how to save the file into SAP Transaction thro BSP. I have one requirement,For example,the captured file from the web should be attached into the Equipment master (Transaction Code IE02).Its possible via SAP GUI.But i would like to know how it can be done from BSP.The same example applicable to sales order also..
    Also i wondering where these files get stored.
    Anybody could help me out of this issue please?...
    Naga Bokkisam

    You can do that using BDS..But you need to find the Business object to store it under Equipment Master or Sales order.
    Here is the example where i stored the document under Warranty process, ie sub set of Equipment master:
    Here BUS2222 is business object for Warranty Process:
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER                = STR_FILE_CONTENT
        TABLES
          BINARY_TAB            = I_FILE_CONTENT.
      CALL FUNCTION 'BDS_BUSINESSDOCUMENT_CREA_TAB'
        EXPORTING
          CLASSNAME             = 'BUS2222' "classname_select
          CLASSTYPE             = 'BO'" classtype_select
        CLIENT                = SY-MANDT
          OBJECT_KEY            = OBJECT_KEY
        BINARY_FLAG           = 'X'
        TABLES
          SIGNATURE             = I_SIGNATURE
          COMPONENTS            = I_COMPONENTS
        CONTENT               = I_FILE_CONTENT
    EXCEPTIONS
       NOTHING_FOUND         = 1
       PARAMETER_ERROR       = 2
       NOT_ALLOWED           = 3
       ERROR_KPRO            = 4
       INTERNAL_ERROR        = 5
       NOT_AUTHORIZED        = 6
       OTHERS                = 7     .
    Let me know if you need any detail..
    <i>*Reward each useful answer</i>
    Raja T

  • Converting ISO20022 XML Payment file to PAYEXT iDoc using PI 7.1

    Hi All,
    As per my requirement :  R/3 generates ISO20022 XML Payment file . PI will pick the file and converts into PAYEXT  Idoc and send back to the same R/3.
    I have some doubts regarding this...
    1)Is ISO20022 XML Payment file also like normal xml file in R/3  OR  different.
    2) Can we use file adapter to pick the file.
    3)Any modules required in CC.
    4)Can I go with normal file to Idoc scenario.
    Thanks
    Drumi

    solved

  • I want to upload files in  sap-directories using  webdynpro abap.

    My requirement is i need to read the filess from the local system in a  folder and save those files in the sap directories(AL11).Need help .
    Thanks.

    Hi Dear,
    U have to use File upload UI element , then read the file then  follow the code for transfering into SAP directories:
    check this 
    *Declare T_UPLOAD , W_UPLOAD  itab  and  wa with your file heading structure
    DATA:L_LINE TYPE STRING.
      P_FLNAME = 'Test123'. " file name
    OPEN DATASET P_FLNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    CHECK SY-SUBRC = 0.
    LOOP AT T_UPLOAD INTO W_UPLOAD.
      CONCATENATE W_UPLOAD-Field1
                  W_UPLOAD-Field2
                  W_UPLOAD-Field3
                  W_UPLOAD-Field4
                  W_UPLOAD-Field5
                  INTO L_LINE
                  SEPARATED BY ','.
    TRANSFER L_LINE TO P_FLNAME.
    ENDLOOP.
    CLOSE DATASET P_FLNAME.
    I think it may help u a lot..
    Regards
    Aisurya

  • Upload data from multiple worksheets of excel file into SAP by using MIME?

    Hi all,
    I'm trying to getting the data from a multiple worksheet excel file by usin the MIME Repository.
    First of all i realizied it like [here|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in a normal ABAP Report.
    By trying to transfer the code to a WebDynpro Component, i get problems.
    With this part of code, because ActiveX is not allowed in our Webbrowser. So i have to find another solution to get the data from the excel file.
    CALL METHOD c_oi_container_control_creator=>get_container_control
    IMPORTING
    control = iref_control
    error   = iref_error
    I tried to rebuild this solution in webdynpro. But it dont works.
    So my next step was trying to Read the Excel sheet directly from MIME by getting the Content (XString).
    But there is no useful information Just a mix out of '######' and other symbols.
    By converting it into String the same problem.
    Maybe someone has an idea how to rebuild [this code|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in Webdynpro that it works correctly.
    Currently Im Using the Fileupload UI Element. All Works fine. I can Upload the Excel file to MIME Repository and i can open it from there.
    But i cant get the same clear informationen from the file, to write it later in a Database, like before without webdynpro.
    i hope someone can help me.
    Edited by: Sascha Baumann on Apr 20, 2009 4:28 PM

    You can't read the native binary Excel Format in server side ABAP.  The functions and classes that did this in Classic Dynpro used OLE Automation via the SAPGUI Control Framework to remotely control Excel to read the data.  Because in the browser you have no connection to the SAPGUI or are sandboxed inside the browser; the same functionality is not possible. 
    I would suggest that you look into saving the Excel file as a open, text format.  You might be able to use XML (although the Excel XML format can be complex) to support multiple sheets. You would have to build the logic yourself (using XSLT or the iXML parser) to process the XML format back into ABAP data.

  • File to multiple Idocs using external definitions.

    Hi all,
    I have to create multiple idocs based on one field from source side.
    Inorder to do this..I have decided to change the occurance of Idoc from 1 to 1..unbounded , in the xsd i have downloaded from standard Idoc.
    which i have a plan to map to the filed , based on that i need to create new Idoc.
    I have tried importing the modified xsd into external definition. but how i should relate it to standard idoc which I have mapped earlier?.
    Thanks,
    venu.

    HI Venu,
    <i>
    I have tried importing the modified xsd into external definition. but how i should relate it to standard idoc which I have mapped earlier?.</i>
    After changing the Idoc occurence , you have imported the xsd into external definition. So this will act as as new message type for you in the mapping.
    You can not use old mapping here.
    Regards,
    Moorthy

  • File to SAP Database using XI

    Hi,
    I am new to XI and doing a sample scenario.
    The data from file is sent to RFC in SAP and RFC is updating Z tables.
    I am facing the problem.
    The file is read and I am monitoring the details in SXMB_MONI.
    I could see the data content here. The data to be transferred.
    The RFC is getting invoked but blank values are updated in my Z table.
    There is no problem with the RFC or the insert query. I have checked it with manual execution.
    Also if I hard code values in RFC, they are inserted successfully.
    But values coming from file are not getting updated.
    I think the values are not coming in the RFC.
    However the success flag is seen in SXMB_MONI.
    Can anyone help me out?
    I cannot debug the RFC to check if the values are actually coming or not.
    Would appretiate with points.
    reagrds,

    Hi,
    if you changed the RFC many times (and imported again into repository)
    restart XI (j2ee part at least)
    you can also debug the RFC from XI - create an endless loop
    inside your RFC and when XI will call it go inside via SM50
    Regards,
    michal

  • Sample files for inbound IDOC's( EDI)

    Hi All,
    I am trying to get idoc's into system using EDI , wanted sample files for inbound idocs using EDI.
    If someone could send the files please.
    rgds
    Ajay Sharma

    HI,
    Here one sample file.U need to change the sender/receiver ID's accordingly to the setup at ur EDI subsystem.This 850 i/b file will create an ORDERS idoc in SAP.
    ISA³00³          ³00³          ³01³006906614GE    ³01³040986076      ³060714³0640³U³00401³000012157³1³P³>~
    GS³PO³006906614GE³040986076³20060714³0640³5008³X³004010~
    ST³850³020700691~
    BEG³00³NE³020700691³³20060714~
    N1³BS³ABC PHOENIX DIVISION³11³RA0290837~
    N1³SU³³11³II7930501~
    PO1³1³12³EA³123.45³³ND³0469520260~
    PO1³2³24³EA³190.23³³ND³0469520211~
    CTT³2~
    SE³8³020700691~
    ST³850³057796284~
    BEG³00³NE³057796284³³20060714~
    N1³BS³ABC RALEIGH DIVISION³11³RA0289036~
    N1³SU³³11³II7930501~
    PO1³1³48³EA³61.72³³ND³0469520230~
    PO1³2³12³EA³123.45³³ND³0469520260~
    PO1³3³6³EA³190.23³³ND³0469520211~
    CTT³3~
    SE³9³057796284~
    GE³2³5008~
    IEA³1³000012157~
    Also u can check in the system and find some ORDERS
    idocs and u can retrigger that from WE19.
    reward if helpfulll
    ram

  • Convert XML file to sap

    Dear friends
                  For converting XML file to SAP, I used TEXT_CONVERT_XML_TO_SAP function module. In this I have some doubt. Pls clarify this.
    1. I am getting run time error with type h.
    2  I_FIELD_SEPERATOR          = ';'
       I_LINE_HEADER              =
       I_TAB_RAW_DATA             =
       I_FILENAME                 =
       I_TOTALSIZE                =
    for the above parameter what are the value has to passed.
    Thanks.

    Hi,
    Take a look in this code:
    *& Report  z_xit_xml_check
      REPORT  z_xit_xml_check.
      TYPE-POOLS: ixml.
      DATA: BEGIN OF t_cabec OCCURS 0.
              INCLUDE STRUCTURE zmmt2010.
      DATA END OF t_cabec.
      DATA: BEGIN OF t_item OCCURS 0.
              INCLUDE STRUCTURE zmmt2011.
      DATA END OF t_item.
      DATA: BEGIN OF t_itemt OCCURS 0.
              INCLUDE STRUCTURE zmmt2012.
      DATA END OF t_itemt.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA check_item(1).
      DATA check_itemt(1).
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\xml.xml'.
      START-OF-SELECTION.
        PERFORM busca_xml.
        PERFORM carrega_tabela.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
      Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
      upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        DATA v_codcat TYPE zmmt2011-codcat.
        DATA v_master_for TYPE zmmt2011-master_for.
        node ?= document.
        CHECK NOT node IS INITIAL.
        IF node IS INITIAL. EXIT. ENDIF.
      create a node iterator
        iterator  = node->create_iterator( ).
      get current node
        node = iterator->get_next( ).
      loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
            element node
              name    = node->get_name( ).
              TRANSLATE name TO LOWER CASE.
              IF name = 'iten'.
                MOVE 'I' TO check_item.
              ENDIF.
              IF name = 'cabec'.
                MOVE 'C' TO check_item.
              ENDIF.
              IF name = 'iten_texto'.
                MOVE 'T' TO check_item.
              ENDIF.
              nodemap = node->get_attributes( ).
              IF NOT nodemap IS INITIAL.
              attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
            text node
              value  = node->get_value( ).
              IF check_item = 'C'.
                TRANSLATE name TO LOWER CASE.
                CASE name.
                  WHEN 'lifnr'.     MOVE value TO t_cabec-lifnr.
                  WHEN 'codcat'.
                    MOVE value TO t_cabec-codcat.
                    MOVE value TO v_codcat.
                  WHEN 'bukrs'.     MOVE value TO t_cabec-bukrs.
                  WHEN 'zterm'.     MOVE value TO t_cabec-zterm.
                  WHEN 'waers'.     MOVE value TO t_cabec-waers.
                  WHEN 'inco1'.     MOVE value TO t_cabec-inco1.
                  WHEN 'inco2'.     MOVE value TO t_cabec-inco2.
                  WHEN 'telf1'.     MOVE value TO t_cabec-telf1.
                  WHEN 'verkf'.     MOVE value TO t_cabec-verkf.
                  WHEN 'datav'.
                    MOVE value TO t_cabec-datav.
                    APPEND t_cabec.
                ENDCASE.
              ENDIF.
              IF check_item = 'I'.
                TRANSLATE name TO LOWER CASE.
                CASE name.
                  WHEN 'master_for'.
                    MOVE value TO t_item-master_for.
                    MOVE value TO v_master_for.
                  WHEN 'werks'.      MOVE value TO t_item-werks.
                  WHEN 'versao'.     MOVE value TO t_item-versao.
                  WHEN 'matkl'.      MOVE value TO t_item-matkl.
                  WHEN 'j_1bindus3'. MOVE value TO t_item-j_1bindus3.
                  WHEN 'j_1bmatuse'. MOVE value TO t_item-j_1bmatuse.
                  WHEN 'j_1bmatorg'. MOVE value TO t_item-j_1bmatorg.
                  WHEN 'j_1bnbmco1'. MOVE value TO t_item-j_1bnbmco1.
                  WHEN 'bsgru'.      MOVE value TO t_item-bsgru.
                  WHEN 'ekgrp'.      MOVE value TO t_item-ekgrp.
                  WHEN 'txz01'.      MOVE value TO t_item-txz01.
                  WHEN 'epstp'.      MOVE value TO t_item-epstp.
                  WHEN 'netpr'.      MOVE value TO t_item-netpr.
                  WHEN 'peinh'.      MOVE value TO t_item-peinh.
                  WHEN 'meins'.      MOVE value TO t_item-meins.
                  WHEN 'plifz'.      MOVE value TO t_item-plifz.
                  WHEN 'mwskz'.      MOVE value TO t_item-mwskz.
                  WHEN 'steuc'.
                    MOVE value TO t_item-steuc.
                    MOVE v_codcat TO t_item-codcat.
                    APPEND t_item.
                ENDCASE.
              ENDIF.
              IF check_item = 'T'.
                TRANSLATE name TO LOWER CASE.
                CASE name.
                  WHEN 'linha'.     MOVE value TO t_itemt-linha.
                  WHEN 'txlng'.     MOVE value TO t_itemt-txlng.
                    MOVE v_master_for TO t_itemt-master_for.
                    MOVE v_codcat     TO t_itemt-codcat.
                    append t_itemt.
                ENDCASE.
              ENDIF.
          ENDCASE.
        advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    *&      Form  Busca_XML
          text
    -->  p1        text
    <--  p2        text
      FORM busca_xml .
        DATA: lc_mess(70) TYPE c,lv_tab.
        TYPES: BEGIN OF ty_zvmsgorgtr.
                INCLUDE STRUCTURE zmmt2011.
        TYPES   END OF ty_zvmsgorgtr.
      Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
      Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
      wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table =
        l_xml_table size  = l_xml_table_size ).
      Creating a document
        l_document = l_ixml->create_document( ).
      Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
      Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
      ENDFORM.                    " Busca_XML
    *&      Form  Carrega_Tabela
          text
    -->  p1        text
    <--  p2        text
      FORM carrega_tabela .
      Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
      ENDFORM.                    " Carrega_Tabela

  • Error messge during data extract from flatfile to sap bw using DataServices

    I am extracting data from flat file to SAP BW using Data Services tool. I am able to load all the data from flat file to SAP BW 3.x datasource successfully, but the request in in RED status with error message
    Error Encountered at RFC Server Please Check Parameter Setting at BW System.
    Can someone please help me how to resolve this issue?

    I would recommend to post your question here
    Data Services and Data Quality
    and close the current thread.
    Regards,
    Stratos

  • Saving in sap database using kpro

    hie gurus, I'm configuring dms for the first time in ECC 6.0. I'm trying to store files in SAP DB using kpro however when I have created and checked  in originals  when i try to save the DIR i get an error that says error when trying to save with kpro. What could be the problem  ? please help.
    regards musi

    Hi Musiyandakarue 
    You have set Indicator Use KPRO in Define Document Types. So remonve this Selection.
    Please Go through these Links for your Problem.
    Storage of Data in Storage Systems Using the Knowledge Provider
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/8a/d31c34044611d3951d00a0c92f024a/content.htm
    Checking an Original Application File into the SAP Database
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/c1/1c27f743c711d1893e0000e8323c4f/content.htm
    This will clear your Problem.
    With Regards
    Mangesh Pande

  • Map EDI messages to SAP iDocs

    Hi all,
    Is is possible to map EDI messages to SAP iDocs using Oracle Integration?
    Thanks

    Yes, OracleAS Integration has several components. One is called Integration B2B, which allow you to send and receive EDI messages. You can then pass this on either using Integration InterConnect or BPEL Process Manager to the SAP adapter which can talk to SAP systems using e.g. iDocs.

  • Flash component in sap widgets using eclipse

    How to use a c.FlashComponent of a eclipse for sap widget development.
    I am not able to open or play  swf file in sap widgets using eclipse as development software.

    I don't understand your explanation.
    Is the SWFLoader loading a full SWF or an embedded symbol?  What is an invisible mode and how do you know it is in that mode?
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • XML generation with SAP data using XML schema - Reg

    Hello experts,
      My requirement is , SAP( ztable data )  data has to be transferred to third party software folder.Third party using XML so they requires output from SAP in XML format.
    For that third party software guys told me that they will give their own XML schema to me.I have to generate XML file with SAP data using their XML schema.
    Generating XML file with their Schema should be underlined.
    I studied that call transformation statement helps for this.
    Even then i don't have clear idea about this topic.
    Please brief me about how to use their XML schema to generate XML with my own sap data.
    Thanks in advance experts.
    Kumar

    please  try this  same program    and see  it ....
    *& Report  z_xit_xml_check
      REPORT  z_xit_xml_check.
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:temporders_dtd.xml'.
    * Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
    *   Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    *   wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
                                                        size  = l_xml_table_size ).
    *   Creating a document
        l_document = l_ixml->create_document( ).
    *   Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
    *   Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
    *   Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
    *   Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
    *   Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
    *   upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *   Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
    *   create a node iterator
        iterator  = node->create_iterator( ).
    *   get current node
        node = iterator->get_next( ).
    *   loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
    *         element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
    *           attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
    *         text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
    *     advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    reward  points  if it is use fulll ....
    Girish

Maybe you are looking for