Input xml from output xml with reverse transformation

I have the transformation and the output xml file. Is there any way I get the input message using the trasformation and output message with minor manual changes? Is there any tool for that?

Hi Ragavalli,
I understand that you want to archive the incoming message before map is applied. (Assuming map is not to be there on send port as not very clear about restrictions you have)
There are two ways:
1. Use of Custom pipeline component to archive message . You can find one at :http://biztalkarchiving.codeplex.com/
2. The other option is to have
 Recieve port without map
 Two send port one  pointing to Archive folder  and other to temporary folder (intermediate)location
 Add both the send port to Send Port group. Have filter on it as BTS.PortName = ReceivePortName
 Create a receive port with temporary folder as receive location 
 Apply the inbound map on this port
If map can be allowed on send port then
1. Rec port without map
2. Two send port, one without map other with map. 
Thus original message will be saved by Send Port 1 and transformed by Send Port 2
Maheshkumar
S Tiwari|User
Page|Blog|BizTalk
Server : Scheduling Orchestration using Trigger Message

Similar Messages

  • Mapping question - how to remove empty recordsets from output XML?

    Hello everyone!
    I have a mapping problem I hope you can help me out with.
    Here is an example of the source message:
    <IDOC>
    .    <HEAD>
    .    </HEAD>
    .    <DET>
    .    .    <Node>
    .    .    .    <nodeA>001</nodeA>
    .    .    .    <nodeB>OA</nodeB>
    .    .    </Node>
    .    .    <Node>
    .    .    .    <nodeB>OB</nodeB>
    .    .    </Node>
    .    .    <Node>
    .    .    .    <nodeA>002</nodeA>
    .    .    .    <nodeB>OC</nodeB>
    .    .    </Node>
    .    </DET>
    </IDOC>
    After testing the above XML in the message mapping, here's what my target looks like:
    <FILE>
    .    .    <Rec>
    .    .    .    <nA>001</nA>
    .    .    .    <nB>OA</nB>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nB>
    .    .    .    <nA>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nA>002</nA>
    .    .    .    <nB>OC</nB>
    .    .    </Rec>
    </FILE>
    "Node" in the "source" message is mapped to "Rec" in my "target" message.
    "Node=" -
    > "Rec"
    You may notice the the "Rec" in the second entry has empty fields. The reason this is so is because I put an "IF" condition in field "nA" and field "nB" that checks whether "nodeA" in the "source" exists/has a value, and if it doesn't, empty values should be given.
    Here's my problem, I need the XML output to be clean. All empty Recs should be removed from the Output XML so that it resembles the one below:
    <FILE>
    .    .    <Rec>
    .    .    .    <nA>001</nA>
    .    .    .    <nB>OA</nB>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nA>002</nA>
    .    .    .    <nB>OC</nB>
    .    .    </Rec>
    </FILE>
    I've tried several ways to get this done to no avail. Would anyone be able to help me out? I would really, really appreciate it!
    Warm regards,
    Glenn

    Hello,
    Here's how the Display Queue looks like from the "CreateIF"
    Default Context:
    0     [false]     [suppress]
    1     [false]     [suppress]
    2     [false]     [suppress]
    3     [true]     []
    4     [false]     [suppress]
    5     [true]     []
    6     [false]     [suppress]
    7     [false]     [suppress]
    8     [false]     [suppress]
    9     [true]     []
    10     [false]     [suppress]
    11     [false]     [suppress]
    12     [false]     [suppress]
    13     [true]     []
    14     [false]     [suppress]
    15     [false]     [suppress]
    16     [false]     [suppress]
    17     [true]     []
    18     [false]     [suppress]
    19     [false]     [suppress]
    20     [false]     [suppress]
    21     [true]     []
    CreateIF Context up one notch:
    0     [false]     [suppress]
    1     [true]     []
    2     [true]     []
    3     [true]     []
    4     [true]     []
    5     [true]     []
    6      [true]     []     
    7     [true]     []
    8     [false]     [suppress]
    9     [false]     [suppress]
    10     [false]     [suppress]
    11     [false]     [suppress]
    Here's how the Display Queue looks like from the "NodeA"
    SUPPRESS     [false]
    SUPPRESS     [false]
    [0000000292]     [false]
    [0000000292]     [true]
    [0000000252]     [false]
    [0000000252]     [true]
    SUPPRESS     [false]
    [0000000078]     [false]
    [0000000078]     [false]
    SUPPRESS     [true]
    [0000000109]     [false]
    [0000000109]     [false]
    SUPPRESS     [false]
    [0000000292]     [true]
    [0000000292]     [false]
    SUPPRESS     [false]
    [0000000076]     [false]
    [0000000076]     [true]
    SUPPRESS     [false]
    [0000000292]     [false]
    [0000000292]     [false]
    SUPPRESS     [true]
    SUPPRESS     [false]
    NodeA context one notch up:
    SUPPRESS     [false]
    [0000000292]     [true]
    [0000000252]     [true]
    [0000000078]     [true]
    [0000000109]     [true]
    [0000000292]     [true]
    [0000000076]     [true]
    [0000000292]     [true]
    [0000000074]     [true]
    [0000000077]     [true]
    [0000000081]     [true]
    [0000000292]     [true]
    [0000000252]     [true]
    [0000000081]     [true]
    [0000000081]     [false]
    SUPPRESS
    Hope that helps you help me!
    Glenn

  • Generating xml from oracle 10g with BLOB image

    Hello All,
    I have employee table with id(primary key), firstname,lastname
    and I have portrait table with id(secondary key from employee table),image (blob)
    portrait table store images of the employees which are in the employee table.
    I want to generate following xml output
    <rowset>
    <id> </id>
    <firstname> </firstname>
    <lastname> </lastname>
    <portrait>base64formatted string containing image of the employee for the particular id specified in the id tag</portrait>
    </rowset>
    and save this xml as id.xml into a particular folder in the c drive and generate such xmls for each and every row of the emplyee table...
    e.g. if i have 200 emplyees with id as 1 ,2 ,.....,200 and their respective portraits into portrait table; then I want to save these as separate xml files with the names 1.xml , 2.xml , .....200.xml inside a folder say : C:\temp...
    Any help is highly appreciated
    Edited by: user1030398 on Sep 28, 2010 12:01 PM
    Edited by: user1030398 on Sep 28, 2010 12:02 PM

    I was going to write up a longer answer, but then I realized this post contains pretty much all you need
    http://www.liberidu.com/blog/?p=365
    I like using XMLElement/XMLForest to build the XML as it gives you the most control.
    In the first example on Marco's website, you would just use dbms_xslprocessor.clob2file to write each file out to disk with a CURSOR FOR loop instead of doing a single OPEN/FETCH/CLOSE. The cursor would return two columns, employee.id and the generated XML. The filename would be based on the "id" column returned by the CURSOR.
    Assumption: The machine that Oracle resides on has the "C:\temp" directory that you want to write to. You cannot use this method to right files onto a client machine.
    Hope that gets you started.

  • Extract XML from an XML File

    Hi All,
    I have an xml file from which data has to be extracted and inserted into table. XML file looks like this..
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE labels SYSTEM "label.dtd">
    <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017">
    <label>
    <variable name= "ITEM">PM191_JTEST</variable>
    <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
    <variable name= " LOT ">ja28-10</variable>
    <variable name= "QUANTITY">1</variable>
    </label>
    </labels>
    In the above xml, if i remove <!DOCTYPE labels SYSTEM "label.dtd"> and use the below query, I am able to get the details.
    SELECT EXTRACTVALUE(VALUE(x), 'labels/@_FORMAT') format
    ,EXTRACTVALUE(VALUE(x), 'labels/@_QUANTITY') QUANTITY
    ,EXTRACTVALUE(VALUE(x), 'labels/@_PRINTERNAME') PRINTERNAME
    ,EXTRACTVALUE(VALUE(x), 'labels/@_JOBNAME') JOBNAME
    FROM (SELECT XMLTYPE
    ('<?xml version="1.0" encoding="UTF-8" standalone="no"?> <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017"> <label> <variable name= "ITEM">PM191_JTEST</variable> <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable> <variable name= " LOT ">ja28-10</variable> <variable name= "QUANTITY">1</variable> </label> </labels>' ) xml
    FROM DUAL),
    TABLE(XMLSEQUENCE(EXTRACT(xml, 'labels'))) x
    But <!DOCTYPE labels SYSTEM "label.dtd"> tag is there means then i am getting error as
    Invalid resource handle or path name "/label.dtd"
    Please let me know how we can parse the xml and insert into table. OR how can i remove <!DOCTYPE labels SYSTEM "label.dtd"> tag and process it further.
    Thanks and Regards,
    Mahesh
    Edited by: magu on Sep 2, 2009 3:15 PM
    Edited by: magu on Sep 2, 2009 3:16 PM

    I don't understand why the DOCTYPE is in the XML, but it appears that Oracle is trying to resolve label.dtd to a registered resource. As you discovered, it may be easier to remove the DOCTYPE from the XML then try to register the label.dtd resource within Oracle. To do this, some options are
    - Use the REPLACE command
    - treat the data as a CLOB and instr/substr to build a new clob without the DOCTYPE tag in it.
    - Use the REGEXP_REPLACE command
    Also, if your DB version supports XMLTable, here is the way to do it with that.
    SELECT *
      FROM XMLTABLE('/labels'
                    PASSING XMLTYPE('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <labels _FORMAT="Harvest Label for Lot Project" _QUANTITY="1" _PRINTERNAME="PFP3400E006" _JOBNAME="JA272017">
         <label>
              <variable name="ITEM">PM191_JTEST</variable>
              <variable name="ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
              <variable name=" LOT ">ja28-10</variable>
              <variable name="QUANTITY">1</variable>
         </label>
    </labels>
                    COLUMNS
                    format    VARCHAR2(15) PATH '@_FORMAT',
                    quantity  VARCHAR2(15) PATH '@_QUANTITY',
                    printername  VARCHAR2(15) PATH '@_PRINTERNAME',
                    jobname  VARCHAR2(15) PATH '@_JOBNAME');

  • Saving XML from Flash XML.sendAndLoad

    I'm new to XML and haven't a clue how to integrate Flash xml
    and Coldfusion 7. There is a Flash app ( I didn't develop it) that
    is sending xml.sendAndLoad formatted data like this to a cf page
    setSummaryQuiz.cfm
    <?xml version="1.0" encoding="UTF-8"?>
    <result lessonID="19" userID="56">
    <word id="281" value="1" />
    <word id="282" value="1" />
    <word id="283" value="5" />
    <word id="284" value="5" />
    <word id="285" value="3" />
    <word id="286" value="7" />
    <word id="287" value="3" />
    <word id="288" value="8" />
    <word id="289" value="7" />
    <word id="290" value="4" />
    <word id="291" value="8" />
    <word id="292" value="2" />
    <word id="293" value="5" />
    <word id="294" value="4" />
    <word id="295" value="1" />
    <word id="296" value="4" />
    <word id="297" value="8" />
    <word id="298" value="1" />
    <word id="299" value="7" />
    <word id="300" value="1" />
    </result>
    My page is supposed to return saved = true or false like
    this:
    <? xml version = " 1.0" encoding = "UTF-8"?>
    <result saved = "true"/>
    Can someone help me or point me to a tutorial or code snippet
    where I can see how CF reads and parses the XML data from
    Flash?

    In ASP setting the response type to "text/xml" you can do a
    response.write command to send back XML to Flash if you were
    performing an XMLSendAndLoad command ie. send XML from Flash,
    processed by ASP and receive an XML response from the ASP - good
    for Flash to know if something worked or an error resulted in
    processing the info.

  • How to compare input sound (from mic.) with sound on my database

    i want to campare sound (from mic.) with sound on my database
    ex:
    if i say "hello" it show message "hello"
    but if i say other word it will show message "try again"
    forgive for my english
    eak_

    Speech recognition is a whole area in its own right
    Lots of info and other references and the Java Speech APIs can be found here
    http://java.sun.com/products/java-media/speech/index.jsp

  • Input XML - DB - Output XML

    I have been able to get Liquid Data up and running.
    I have set my Output XSD as the target schema
    I have included my DB and mapped it to the Output XSD
    I am having problems getting the Input XML into my project. When I include in my XML source (input xsd) it does not show all the elements....
    My bigger question is, can I through Liquid Data, map an input XML file to a DB (run sql to match up XML element value and DB table values) and export the SQL recordset to my defind XML file?
    I started down this road based on a 'yes' answer from a
    peer.
    Spending a little more time than I had hoped on this one...
    I need to do this below..
    <Membership_ID>000001</Membership_ID> //Input XML
    ...db....
    Select * from Member_Table where XML.Membership_ID = Member_Table.Memb_ID
    ...db....
    Insert Into Pre-Defined XML.....
    <Memb_F_Name>Elvis</Memb_F_Name>
    <Memb_L_Name>Costello</Memb_L_Name>
    <Memb_City>Miami</Memb_City>
    <Memb_Age>50</Memb_Age>
    <Memb_ID>000001</Memb_ID> //Makes Hit On This
    Making progress but, any examples would be great...
    TIA
    Jay

    to use an xml file as a datasource, create an XML File Datasource in the LD Console (you need to specify a schema there). Go to the DataView Builder, reconnect to the server, it will show the XML File source with all the elements defined in the schema.
    To compare values with a db against values in a file, you need to defined an LD rdbms source for the db and an LD XML file source for the file.
    Then write your xquery - it will look something like...
    for $file_rec in document("MyFileSource")
    for $db_rec in document("MyDBSource")
    where $db_rec/Member_id eq $file_rec/Member_id
    return
    $db_rec

  • How to remove xmls from output?

    Hello All,
    I have created a BPEL process that takes a flat file and converts to an XML file. I get an output of the following (see below). Is there a way that I can remove xmlns="" from the output?
    Incorrect Output
    <?xml version="1.0" encoding="UTF-8" ?>
    <WhseShipNotice xmlns="">
    Correct Output
    <?xml version="1.0" encoding="UTF-8" ?>
    <WhseShipNotice>
    Any suggestions?
    Regards,
    Kathy

    I can remember if this xsd removes namespaces correctly, I think it may still have the initial xmlns at the top but give it a try. Typically what needs to be done is some embedded java to do this.
    <schema targetNamespace="http://www.oracle.com/Gateway"
            xmlns="http://www.w3.org/2001/XMLSchema">
      <element name="Message">
      <complexType>
        <sequence>     
          <element name="Header">
            <complexType>
            <sequence>
               <element name="UniqueID"             type="string"/>
               <element name="RoutingRule"          type="string"/>
               <element name="FileName"             type="string"/>
               <element name="Destination"          type="string"/>
               <element name="TransportType"        type="string"/>
               <element name="Attachment"           type="string"/>
               <element name="MQMessageID"          type="string"/>
               <element name="MQCorrelationID"      type="string"/>
            </sequence>
            </complexType>
            </element>
          <element name="Payload"            type="base64Binary"/>
        </sequence>
      </complexType>
      </element>
    </schema>cheers
    James

  • Extracting XML from webservice result with Namespaces using E4X

    Hi,
    I need to extract some data from proprietary Web Service (to be fed to HierarchicalData for dataProvider of ADG).
    So I made service.returnType=’e4x’;
    In that case it returns data as XML.
    I need to get useful data from it after Snapshot:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header xmlns:msdwHdr="http://xml.msdw.com/ns/appmw/soap/1.0/header">
    <msdw:RequestID xmlns:msdw="http://xml.msdw.com/ns/appmw/soap/1.0/header">restsoap#1390182244050#197728273958044232</msdw:RequestID>
    <msdwHdr:FinalMessage>true</msdwHdr:FinalMessage>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <ADSSnapshotResponse xmlns="http://xml.ms.com/ns/appmw/dataserver/1.0">
    <Snapshot seqNo="0">
    <BASE_ELEMENT_NAME BASE_ELEMENT_NAME="4.11.2.0">
    Using E4X, like:
    var root:XML = event.result as XML; //good!
    var xmlRoot1:XMLList = root['SOAP-ENV:Body'].ADSSnapshotResponse.Snapshot.BASE_ELEMENT_NAME;
    it does return XMLList (tried different variants), but debugger shows nothing at all inside that XMLList.
    var root1:XMLList = root.children();  // that returns valid XMLList with 2 XML elements inside
    But all other data I could not get if I use any E4X:
    Can I skip Envelope, going to Body as one of its children?  suppose I can...
    a) root.SOAP-ENV:Body would give compilation errors because of ‘-‘, ‘:’
    b) root.Body gives blank XMLList
    c) root.Body[0] returns NULL  
    Any idea how to extract the load from ADS Response (envelope)?
    What can I do regarding XML Namespaces in E4X ?
    If I set service.returnType="xml" it returns data as XMLNode's.
    But I prefer to use E4X if possible.
    Please help!
    TIA,
    Oleg.
    P.S.: using Flex 4.5.1 with Flex3 ADG.

    not an implementable option for us and cost prohibitive.

  • Parse XML from std::wstring with XmlLite error: 0xc00cee04

    Hello,
    I am trying to parse the following XML (std::wstring) <message locale="en" log="true" data="'كيف حالك الآن؟">How do you do today?</message> but I get an 0xc00cee04 while reading the node type. Most probably I am not
    passing the string content to the stream properly. Here s the code snippet:
    CComPtr<IStream> stream;
    std::shared_ptr<IXmlReader> reader;
    HRESULT hr = S_OK;
    COM_VERIFY(CreateStreamOnHGlobal(nullptr, false, (LPSTREAM*)&stream), L"CreateStream"); 
    // Write message content into the stream
    SIZE_T cbWrite;
    COM_VERIFY(stream->Write(message.data(), message.size(), &cbWrite), L"WriteBuffer");
    // Move to the beginning of the stream
    LARGE_INTEGER position;
    position.QuadPart = 0;
    COM_VERIFY(stream->Seek(position, STREAM_SEEK_SET, nullptr), L"SeekPosition");
    COM_VERIFY(CreateXmlReader(__uuidof(IXmlReader), (void**)&reader, nullptr), L"CreateXmlReader");
    COM_VERIFY(reader->SetInput(stream), L"SetInputStream");
    XmlNodeType nodeType;
    while (!reader->IsEOF())
     hr = reader->Read(&nodeType);
     if (hr != S_OK) break; // <<< Here the error 0xc00cee04
    What is the proper way to pass a wstring to IStream?
    Thanks,
    Pedro

    On 4/18/2015 4:02 PM, MsdnDev wrote:
    CComPtr<IStream> stream;
    std::shared_ptr<IXmlReader> reader;
    This makes no sense. shared_ptr will try to delete the pointer, but the COM pointer should be Release'd. You know enough to use CComPtr for IStream - how come you didn't do the same with IXmlReader?
    // Write message content into the stream
    SIZE_T cbWrite;
    COM_VERIFY(stream->Write(message.data(), message.size(), &cbWrite), L"WriteBuffer");
    What type is "message"? Is it wstring? If so, message.size() is the size in characters, but IStream::Write expects the size in bytes. You are only writing half the string.
    Igor Tandetnik

  • How can I pass the values to the variable by using INPUT ON from output

    HI,
        In this code I printed  s_number by using INPUT ON .
    In the out put I want to give the some new values to that field s_number.
    That new value I  pass to the another prgroam ZMAT_LABEL_FIRST .
          How could I pass this new  content to this program.  I wrote like this but I am not getting new content what I entered in the output.
    REPORT  ZMAT_LABEL_SCREEN_V1    NO STANDARD PAGE HEADING                    .
    PARAMETERS S_MBLNR TYPE MSEG-MBLNR.
    DATA C .
    DATA CNT TYPE I.
    DATA   S_NUMBER(3) TYPE C.
    DATA : BEGIN OF IT_MBELN OCCURS 0,
            MBLNR TYPE  MSEG-MBLNR,
            END OF IT_MBELN.
    DATA :  BEGIN OF IT_MSEG OCCURS 0,
            ZEILE TYPE MSEG-ZEILE,
            MBLNR TYPE MSEG-MBLNR,
            MEINS TYPE MSEG-MEINS,
            BPMNG TYPE MSEG-BPMNG,
            MAKTX TYPE MAKT-MAKTX,
            END OF IT_MSEG.
    DATA IT_FINAL LIKE IT_MSEG .
    data: it_ret like ddshretval occurs 0 with header line.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MBLNR.
    SELECT MBLNR
           FROM MSEG
           INTO TABLE IT_MBELN.
           CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
             DDIC_STRUCTURE         = ' '
               retfield               =  'MBLNR'
              PVALKEY                = ' '
             DYNPPROG               = ' '
             DYNPNR                 = ' '
             DYNPROFIELD            = ' '
             STEPL                  = 0
             WINDOW_TITLE           =
             VALUE                  = ' '
              VALUE_ORG              = 'S'
             MULTIPLE_CHOICE        = ' '
             DISPLAY                = ' '
              CALLBACK_PROGRAM       = 'ZMAT_LABEL_SCREEN '
             CALLBACK_FORM          = ' '
             MARK_TAB               =
           IMPORTING
             USER_RESET             =
             tables
               value_tab              =  IT_MBELN
             FIELD_TAB              =
              RETURN_TAB             =  IT_RET
             DYNPFLD_MAPPING        =
           EXCEPTIONS
             PARAMETER_ERROR        = 1
             NO_VALUES_FOUND        = 2
             OTHERS                 = 3
           IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_MBLNR.
    ENDIF.
    START-OF-SELECTION.
    SELECT A~ZEILE
           A~MBLNR
           A~MEINS
           A~BPMNG
           B~MAKTX
           INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
           FROM MSEG AS A INNER JOIN MAKT AS B
           ON AMATNR = BMATNR
           WHERE MBLNR = S_MBLNR.
    ****FINDING THE NUMBER OF RECORDS IN THE TABLE
    DESCRIBE TABLE IT_MSEG LINES CNT.
    at line-selection.
    DO CNT TIMES.
    READ LINE SY-INDEX FIELD VALUE C.
    IF C = 'X'.
    READ TABLE IT_MSEG INDEX SY-INDEX .
    ***HERE READ THE S_NUMBER(WHAT I ENTERED IN THE OUTPUT)  AND PASS TO THIS PROGRAM
    submit   ZMAT_LABEL_FIRST with p_mblnr = IT_MSEG-mblnr
                              with number =  S_NUMBER
                              WITH S_ZEILE =  IT_MSEG-ZEILE and return.
    CLEAR IT_MSEG.
    ENDIF.
    ENDDO.
    **********ALL ITEMS CORRESPODNING TO THE DOCUMENT NUMBER DISPLAY
    END-OF-SELECTION.
    LOOP AT IT_MSEG.
    WRITE : /10 C as  CHECKBOX,IT_MSEG-ZEILE,IT_MSEG-MAKTX,IT_MSEG-BPMNG,IT_MSEG-MEINS, S_NUMBER COLOR 5 INPUT ON.
    ENDLOOP.
    Regards,
    Surya

    Hi Surya..
    Change it like this ...
    START-OF-SELECTION.
    SELECT A~ZEILE
    A~MBLNR
    A~MEINS
    A~BPMNG
    B~MAKTX
    INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
    FROM MSEG AS A INNER JOIN MAKT AS B
    ON AMATNR = BMATNR
    WHERE MBLNR = S_MBLNR.
    ****FINDING THE NUMBER OF RECORDS IN THE TABLE
    DESCRIBE TABLE IT_MSEG LINES CNT.
    at line-selection.
    <b>DO. </b>
    READ LINE SY-INDEX FIELD VALUE C
                                      <b>FIELD VALUE IT_MSEG-ZEILE.</b>
    <b>if sy-subrc ne 0.
      EXIT.
    ENDIF.</b>
    IF C = 'X'.
    ***HERE READ THE S_NUMBER(WHAT I ENTERED IN THE OUTPUT) AND **PASS TO THIS PROGRAM
    <b>CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      exporting
        INPUT = IT_MSEG-ZEILE
      IMPORTING
        OUTPUT = IT_MSEG-ZEILE .</b>
    submit ZMAT_LABEL_FIRST with p_mblnr = IT_MSEG-mblnr
    with number = S_NUMBER
    WITH S_ZEILE = IT_MSEG-ZEILE and return.
    CLEAR IT_MSEG.
    ENDIF.
    ENDDO.
    **********ALL ITEMS CORRESPODNING TO THE DOCUMENT NUMBER DISPLAY
    END-OF-SELECTION.
    LOOP AT IT_MSEG.
    WRITE : /10 C as CHECKBOX,IT_MSEG-ZEILE,IT_MSEG-MAKTX,IT_MSEG-BPMNG,IT_MSEG-MEINS, S_NUMBER COLOR 5 INPUT ON.
    ENDLOOP.
    <b>Reward if Helpful.</b>

  • Can ant call a target from my build.xml from another xml file?

    can ant have a target something like this:
    <target mytarget>
    <antcall file="C:\app\build2.xml" targetname="blah">
    </target>
    Is it possible to call a target in my build.xml that will then look in a file called build2.xml and call a target in that xml file?
    Thanks,
    Tad

    I looked at the manual and the site and couldn't find anything, you don't have to tell me the exact xml if
    it bugs you, all I want to know is if it is possible and if it is what task should I use, I will look up
    the attributes and how to do it.Now this really takes the biscuit.
    I gave you a very specific link to the document that tells you which task to use and which arguments to set. Did you check that link? If so, what else do you want? If not, why not?

  • Parse and output XML document while preserving attribute order

    QUESTION: How can I take in an element with attributes from an XML and output the same element and attributes while preserving the order of those attributes?
    The following code will parse and XML document and generate (practically) unchanged output. However, all attributes are ordered a-z
    Example: The following element
    <work_item_type work_item_db_site="0000000000000000" work_item_db_id="0" work_item_type_code="3" user_tag_ident="Step" name="Work Step" gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_site="0000000000000000" last_upd_db_id="0" rstat_type_code="1">
    </work_item_type>is output as:
    <work_item_type gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_id="0" last_upd_db_site="0000000000000000" name="Work Step" rstat_type_code="1" user_tag_ident="Step" work_item_db_id="0" work_item_db_site="0000000000000000" work_item_type_code="3">
    </work_item_type>As you may notice, there is no difference in these besides order of the attributes!
    I am convened that the problem is not in the stylesheet.xslt but if you are not then it is posted bellow.
    Please, someone help me out with this! I have a feeling the solution is simple
    The following take the XML from source.xml and outputs it to DEST_filename with attributes in a-z order
    Code:
    private void OutputFile(String DEST_filename, String style_filename){
         //StreamSource stylesheet = new StreamSource(style_filename);
         try{
              File dest_file = new File(DEST_filename);
              if(!dest_file.exists())
                  dest_file.createNewFile();
              TransformerFactory tranFactory = TransformerFactory.newInstance();
              Transformer aTransformer = tranFactory.newTransformer();
              aTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
              Source src = new DOMSource("source.xml");
              Result dest = new StreamResult(dest_file);
              aTransformer.transform(src, dest);
              System.out.println("Finished");
         catch(Exception e){
              System.err.print(e);
              System.exit(-1);
        }

    You can't. The reason is, the XML Recommendation explicitly says the order of attributes is not significant. Therefore conforming XML serializers won't treat it as if it were significant.
    If you have an environment where you think that the order of attributes is significant, your first step should be to reconsider. Possibly it isn't really significant and you are over-reaching in some way. Or possibly someone writing requirements is ignorant of this fact and the requirement can be discarded.
    Or possibly your output is being given to somebody else who has a defective parser which expects the attributes to be in a particular order. You could quote the XML Recommendation to those people but often XML bozos are resistant to change. If you're stuck writing for that parser then you'll have to apply some non-XML processing to your output to fix it up on their behalf.

  • How to extract a set of XML elements from an XML element

    My XML, stored in a variable called v_XML_input, is as follows:
    <Root>
      <PackageName>MY_PKG</PackageName>
      <ProcedureName>SAVE_ADJ_VALUES</ProcedureName>
        <Parameters> 
          <Parameter>
              <Name>p_xml_string</Name>
              <Value><DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>
              </Value>
          </Parameter>
        </Parameters>
    </Root>I want to extract only whatever is between <Value> and </Value>. In this case just this:
                    <DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>The actual values between the <Value> and </Value> may not always be these same elements; they may be strings, numerical values, or other XML values.
    I've tried the following in a LOOP, and it works for other strings and numerical values, but I get a ORA-30625: method dispatch on NULL SELF argument is disallowed when trying to extract an XML value as a string.
    v_sql_str := v_XML_input .extract('//Parameters/Parameter[position() = '||i||']/Value/text()') .getstringVal()||'''';Any help is appreciated...TIA!

    Not sure what you are actually trying to accomplish.
    What's wrong with
    SQL> SELECT xmlserialize(content XMLTYPE
              ('<Root>
      <PackageName>MY_PKG</PackageName>
      <ProcedureName>SAVE_ADJ_VALUES</ProcedureName>
        <Parameters> 
          <Parameter>
              <Name>p_xml_string</Name>
              <Value><DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>
              </Value>
          </Parameter>
        </Parameters>
    </Root>'
              ).extract('//Value/*') indent)xml
      FROM DUAL
    XML                                                                                                                                                                                                                                                                                                        
    <DocumentElement>                                                                                                                                                                                                                                                                                          
      <tblAdjustments>                                                                                                                                                                                                                                                                                         
        <EmpID>41439</EmpID>                                                                                                                                                                                                                                                                                   
        <UserNTID>APPUSER</UserNTID>                                                                                                                                                                                                                                                                           
        <Comment>TEST RECORD</Comment>                                                                                                                                                                                                                                                                         
        <Amount>2000</Amount>                                                                                                                                                                                                                                                                                  
        <RecordType>R</RecordType>                                                                                                                                                                                                                                                                             
      </tblAdjustments>                                                                                                                                                                                                                                                                                        
    </DocumentElement> ?
    Note: xmlserialize is not necessary and is there just for pretty printing the result.

  • ABAP Mapping  is it Possiable to validate my XML from the payload.

    Is it possiable to validate my XML from the Payload with the given standard XSD, and one more is that can i verify the files in Archieve , this is due to , i must check whether my file already exist and if exist i should add prefix 1 to that file and store in my arichive , all this using only ABAP mapping
    Please help me
    thanking you
    Sridhar

    Workflow Business Events help creating Generate Function to generate an XML payload that in turn is made available to the Subscription's Rule Function. Also, at the time of Raising the Business Event, you could pass the XML payload (in the form of a CLOB) to the Raise API that will be passed along to the Business Event's Subscription Rule Function.
    Hope this helps.
    Vijay

Maybe you are looking for