How to apply XSLT to XML file while importing XML data using XSU plsql API

I need to load XML file with nested repeating elements into Oracle tables and I am using XSU PLSQL API utility package dbms_xmlSave.insertXML. Can use XMLGen package also!!
I found out through documentation that I need to have XML file with ROWSET/ROW tags around the elements. As I have no control of XML file coming from external source, so I wish to apply XSLT to XML. I found setXSLT/setStylesheet procedures but it's not working as expected.
Can you help me with some sample code for the purpose.
Thanks

I'm new at XML and XSL as well, but maybe the following code I built can help:
CREATE OR REPLACE PACKAGE Xml_Pkg AS
/* this record and table type are used for the transformTags procedure */
TYPE TagTransform_t IS RECORD (
old_tag VARCHAR2(255),
new_tag VARCHAR2(255) );
TYPE TagTransformList_t IS TABLE OF TagTransform_t INDEX BY BINARY_INTEGER;
/* use DBMS_OUTPUT to print out a CLOB */
PROCEDURE printClobOut(p_clob IN OUT NOCOPY CLOB);
/* using a list of old/new tags, transform all old into new in XML2 */
PROCEDURE transformTags(
p_List TagTransformList_t,
p_XML1 IN OUT NOCOPY CLOB,
p_XML2 IN OUT NOCOPY CLOB);
END Xml_Pkg;
CREATE OR REPLACE PACKAGE BODY Xml_Pkg AS
/* print a CLOB using newlines */
PROCEDURE printClobOut(p_clob IN OUT NOCOPY CLOB) IS
buffer_overflow EXCEPTION;
PRAGMA EXCEPTION_INIT(buffer_overflow,-20000);
l_offset NUMBER;
l_len NUMBER;
l_o_buf VARCHAR2(255);
l_amount NUMBER; --}
l_f_amt NUMBER := 0; --}To hold the amount of data
l_f_amt2 NUMBER; --}to be read or that has been
l_amt2 NUMBER := -1; --}read
l_offset2 NUMBER;
l_amt3 NUMBER;
l_chk NUMBER := 255;
BEGIN
l_len := DBMS_LOB.GETLENGTH(p_clob);
l_offset := 1;
WHILE l_len > 0 LOOP
l_amount := DBMS_LOB.INSTR(p_clob,CHR(10),l_offset,1);
--Amount returned is the count from the start of the file,
--not from the offset.
IF l_amount = 0 THEN
--No more linefeeds so need to read remaining data.
l_amount := l_len;
l_amt2 := l_amount;
ELSE
l_f_amt2 := l_amount; --Store position of next LF
l_amount := l_amount - l_f_amt; --Calc position from last LF
l_f_amt := l_f_amt2; --Store position for next time
l_amt2 := l_amount - 1; --Read up to but not the LF
END IF;
/* divide the read into 255 character chunks for dbms_output */
IF l_amt2 != 0 THEN
l_amt3 := l_amt2;
l_offset2 := l_offset;
WHILE l_amt3 > l_chk LOOP
DBMS_LOB.READ(p_clob,l_chk,l_offset2,l_o_buf);
DBMS_OUTPUT.PUT_LINE(l_o_buf);
l_amt3 := l_amt3 - l_chk;
l_offset2 := l_offset2 + l_chk;
END LOOP;
IF l_amt3 != 0 THEN
DBMS_LOB.READ(p_clob,l_amt3,l_offset2,l_o_buf);
DBMS_OUTPUT.PUT_LINE(l_o_buf);
END IF;
END IF;
l_len := l_len - l_amount;
l_offset := l_offset+l_amount;
END LOOP;
EXCEPTION
WHEN buffer_overflow THEN
RETURN;
END printClobOut;
/* shortcut "writeline" procedure for CLOB buffer writes */
PROCEDURE wr(p_clob IN OUT NOCOPY CLOB, s VARCHAR2) IS
BEGIN
DBMS_LOB.WRITEAPPEND(p_clob,LENGTH(s)+1,s||CHR(10));
END;
/* the standard XSLT should include the identity template or the output XML will be malformed */
PROCEDURE newXsltHeader(p_xsl IN OUT NOCOPY CLOB, p_identity_template BOOLEAN DEFAULT TRUE) IS
BEGIN
DBMS_LOB.TRIM(p_xsl,0);
/* standard XSL header */
wr(p_xsl,'<?xml version="1.0"?>');
/* note that the namespace for the xsl is restricted to the w3 1999/XSL */
wr(p_xsl,'<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">');
IF p_identity_template THEN
/* create identity template (transfers all "other" nodes) */
wr(p_xsl,' <xsl:template match="node()">');
wr(p_xsl,' <xsl:copy>');
wr(p_xsl,' <xsl:apply-templates/>');
wr(p_xsl,' </xsl:copy>');
wr(p_xsl,' </xsl:template>');
END IF;
END newXsltHeader;
PROCEDURE newXsltFooter(p_xsl IN OUT NOCOPY CLOB) IS
BEGIN
/* standard xsl footer */
wr(p_xsl,'</xsl:stylesheet>');
END newXsltFooter;
/* using the stylesheet in p_xsl, transform p_XML1 into p_XML2 */
PROCEDURE transformXML(p_xsl IN OUT NOCOPY CLOB, p_XML1 IN OUT NOCOPY CLOB, p_XML2 IN OUT NOCOPY CLOB) IS
l_parser XMLPARSER.Parser;
l_doc XMLDOM.DOMDocument;
l_xsl_proc XSLPROCESSOR.Processor;
l_xsl_ss XSLPROCESSOR.Stylesheet;
BEGIN
/* parse XSL CLOB */
l_parser := XMLPARSER.newParser;
BEGIN
XMLPARSER.showWarnings(l_parser,TRUE);
XMLPARSER.parseClob(l_parser,p_xsl);
l_doc := XMLPARSER.getDocument(l_parser);
XMLPARSER.freeParser(l_parser);
EXCEPTION
WHEN OTHERS THEN
XMLPARSER.freeParser(l_parser);
RAISE;
END;
/* get Stylesheet from DOMDOC */
l_xsl_ss := XSLPROCESSOR.newStylesheet(l_doc,NULL);
BEGIN
/* parse XML1 CLOB */
l_parser := XMLPARSER.newParser;
BEGIN
XMLPARSER.showWarnings(l_parser,TRUE);
XMLPARSER.parseClob(l_parser,p_xml1);
l_doc := XMLPARSER.getDocument(l_parser);
XMLPARSER.freeParser(l_parser);
EXCEPTION
WHEN OTHERS THEN
XMLPARSER.freeParser(l_parser);
RAISE;
END;
/* process doc to XML2 */
l_xsl_proc := XSLPROCESSOR.newProcessor;
BEGIN
XSLPROCESSOR.processXSL(l_xsl_proc, l_xsl_ss, l_doc, p_xml2);
XSLPROCESSOR.freeProcessor(l_xsl_proc);
EXCEPTION
WHEN OTHERS THEN
XSLPROCESSOR.freeProcessor(l_xsl_proc);
RAISE;
END;
XSLPROCESSOR.freeStylesheet(l_xsl_ss);
EXCEPTION
WHEN OTHERS THEN
XSLPROCESSOR.freeStylesheet(l_xsl_ss);
RAISE;
END;
END transformXML;
/* transform XML1 into XML2 using list p_List of old/new tags */
PROCEDURE transformTags(p_List TagTransformList_t, p_XML1 IN OUT NOCOPY CLOB, p_XML2 IN OUT NOCOPY CLOB) IS
l_xsl CLOB;
BEGIN
/* create XSL CLOB */
DBMS_LOB.CREATETEMPORARY(l_xsl,TRUE);
/* create standard header with identity template */
newXsltHeader(l_xsl,TRUE);
/* create one template for each node translation */
FOR i IN 1..p_List.COUNT LOOP
wr(l_xsl,' <xsl:template match="'||p_List(i).old_tag||'">');
wr(l_xsl,' <'||p_List(i).new_tag||'><xsl:apply-templates/></'||p_List(i).new_tag||'>');
wr(l_xsl,' </xsl:template>');
END LOOP;
/* create standard footer */
newXsltFooter(l_xsl);
-- dbms_output.put_line('l_xsl:');
-- dbms_output.put_line('--------------------');
-- printClobOut(l_xsl);
-- dbms_output.put_line('--------------------');
transformXML(l_xsl, p_XML1, p_XML2);
DBMS_LOB.FREETEMPORARY(l_xsl);
/* -- unit testing
set serveroutput on size 100000
Declare
queryContext DBMS_XMLQUERY.ctxType;
xList XML_PKG.TagTransformList_t;
xmlCLOB CLOB;
xmlCLOB2 CLOB;
Begin
DBMS_LOB.CREATETEMPORARY(xmlCLOB,true);
DBMS_LOB.CREATETEMPORARY(xmlCLOB2,true);
xList(1).old_tag := 'A';
xList(1).new_tag := 'MyTag1';
xList(2).old_tag := 'B';
xList(2).new_tag := 'MyTag2';
queryContext := DBMS_XMLQUERY.newContext('Select * from t');
xmlCLOB := DBMS_XMLQUERY.getXML(queryContext);
DBMS_XMLQuery.closeContext(queryContext);
dbms_output.put_line('xmlCLOB:');
dbms_output.put_line('--------------------');
XML_PKG.printClobOut(xmlCLOB);
dbms_output.put_line('--------------------');
xml_pkg.transformTags(xList,xmlCLOB,xmlCLOB2);
dbms_output.put_line('xml2CLOB:');
dbms_output.put_line('--------------------');
XML_PKG.printClobOut(xmlCLOB2);
dbms_output.put_line('--------------------');
DBMS_LOB.FREETEMPORARY(xmlCLOB);
DBMS_LOB.FREETEMPORARY(xmlCLOB2);
End;
END transformTags;
END Xml_Pkg;

Similar Messages

  • SSMS 2012:XML File Query: Importing XML data using a CTE-Incorrect syntax near 'BLOB'?

    Hi all,
    From https://www.simple-talk.com/content/print.aspx?article=1756, I mimicked to create the following sql code to do Importing XML data using a CTE:
    ---Importing XML data using a CTE -----Ad-Hoc XML File Query--simple-talk---1020AM 27 Feb 2015
    ---query the XML Blob using a CTE (pulling from the XML file each time
    USE OPENXMLtesting1
    GO
    With XmlFile (Contents) AS (
    SELECT CONVERT (XML, BulkColumn)
    FROM OPENROWSET (BULK 'C:\XML FilesMicrosoft-Samples\books.xml', SINGLE BLOB) AS XmlData
    SELECT
    FROM XmlFile
    GO
    I got the following message:
    Msg 102, Level 15, State 1, Line 4
    Incorrect syntax near 'BLOB'.
    I have no ideas why it is incorrect in that code statment. Please kindly help, advise and respond.
    Thanks in advance,
    Scott Chang
    P. S. The books.xml file was copied from the Microsoft samples:
    <?xml version="1.0"?>
    <catalog>
    <book id="bk101">
    <author>Gambardella, Matthew</author>
    <title>XML Developer's Guide</title>
    <genre>Computer</genre>
    <price>44.95</price>
    <publish_date>2000-10-01</publish_date>
    <description>An in-depth look at creating applications
    with XML.</description>
    </book>
    <book id="bk102">
    <author>Ralls, Kim</author>
    <title>Midnight Rain</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2000-12-16</publish_date>
    <description>A former architect battles corporate zombies,
    an evil sorceress, and her own childhood to become queen
    of the world.</description>
    </book>
    <book id="bk103">
    <author>Corets, Eva</author>
    <title>Maeve Ascendant</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2000-11-17</publish_date>
    <description>After the collapse of a nanotechnology
    society in England, the young survivors lay the
    foundation for a new society.</description>
    </book>
    <book id="bk104">
    <author>Corets, Eva</author>
    <title>Oberon's Legacy</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2001-03-10</publish_date>
    <description>In post-apocalypse England, the mysterious
    agent known only as Oberon helps to create a new life
    for the inhabitants of London. Sequel to Maeve
    Ascendant.</description>
    </book>
    <book id="bk105">
    <author>Corets, Eva</author>
    <title>The Sundered Grail</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2001-09-10</publish_date>
    <description>The two daughters of Maeve, half-sisters,
    battle one another for control of England. Sequel to
    Oberon's Legacy.</description>
    </book>
    <book id="bk106">
    <author>Randall, Cynthia</author>
    <title>Lover Birds</title>
    <genre>Romance</genre>
    <price>4.95</price>
    <publish_date>2000-09-02</publish_date>
    <description>When Carla meets Paul at an ornithology
    conference, tempers fly as feathers get ruffled.</description>
    </book>
    <book id="bk107">
    <author>Thurman, Paula</author>
    <title>Splish Splash</title>
    <genre>Romance</genre>
    <price>4.95</price>
    <publish_date>2000-11-02</publish_date>
    <description>A deep sea diver finds true love twenty
    thousand leagues beneath the sea.</description>
    </book>
    <book id="bk108">
    <author>Knorr, Stefan</author>
    <title>Creepy Crawlies</title>
    <genre>Horror</genre>
    <price>4.95</price>
    <publish_date>2000-12-06</publish_date>
    <description>An anthology of horror stories about roaches,
    centipedes, scorpions and other insects.</description>
    </book>
    <book id="bk109">
    <author>Kress, Peter</author>
    <title>Paradox Lost</title>
    <genre>Science Fiction</genre>
    <price>6.95</price>
    <publish_date>2000-11-02</publish_date>
    <description>After an inadvertant trip through a Heisenberg
    Uncertainty Device, James Salway discovers the problems
    of being quantum.</description>
    </book>
    <book id="bk110">
    <author>O'Brien, Tim</author>
    <title>Microsoft .NET: The Programming Bible</title>
    <genre>Computer</genre>
    <price>36.95</price>
    <publish_date>2000-12-09</publish_date>
    <description>Microsoft's .NET initiative is explored in
    detail in this deep programmer's reference.</description>
    </book>
    <book id="bk111">
    <author>O'Brien, Tim</author>
    <title>MSXML3: A Comprehensive Guide</title>
    <genre>Computer</genre>
    <price>36.95</price>
    <publish_date>2000-12-01</publish_date>
    <description>The Microsoft MSXML3 parser is covered in
    detail, with attention to XML DOM interfaces, XSLT processing,
    SAX and more.</description>
    </book>
    <book id="bk112">
    <author>Galos, Mike</author>
    <title>Visual Studio 7: A Comprehensive Guide</title>
    <genre>Computer</genre>
    <price>49.95</price>
    <publish_date>2001-04-16</publish_date>
    <description>Microsoft Visual Studio 7 is explored in depth,
    looking at how Visual Basic, Visual C++, C#, and ASP+ are
    integrated into a comprehensive development
    environment.</description>
    </book>
    </catalog>

    I found the mistakes I made and I corrected them. The newly revised/corrected code is:
    USE OPENXMLtesting1
    GO
    With XmlFile (Contents) AS (
    SELECT CONVERT (XML, BulkColumn)
    FROM OPENROWSET (BULK 'C:\Temp\books.xml', SINGLE_BLOB) AS XmlData
    SELECT *
    FROM XmlFile
    GO
    It worked: Results
         Contents
    1  <catalog><book.id="bk101"><author>Gambardella.M...
    If I clicked on this, I got a listing of the whole book.xml!!  I don't know what it means.  Please comment and respond.
    Thanks,
    Scott Chang

  • Code to read xml file  and display that data using sax parser

    Hai
    My problem I have to read a xml file and display the contents of the file on console using sax parser.

    here you go

  • Getting error while importing the data using loadercli

    Hello,
    I want to copy the data using export/ import  via (loadercli).
    scenario:
    1) I have 2 server and i want to export data from old server and import in to new MAXDB server using loadercli.
    I have done this once and it went fine , but now I want to do the export import again so i will have te latest data on the new server.
    when i tried to do that it gives error that the table already exist . Can i use loadercli to import hte data again ?
    can any one help me in this ?
    Regards,
    Bhavesh

    > Do you want to add and/or update the data in the already existing tables or do you want to replace the content completely?
    >
    > so in that way :
    > bot the options are fine what ever take less time.
    Sorry mate, but YOU have to know what you want here.
    I gave you an easy to follow set of steps.
    As you don't seam to mind the outcome, just might just use them...
    > I wanted to know weathe i can use the  loadercli for thie export import or not? if yes then is there any new steps to do before i do the export import?
    We had this discussion before...
    >
    > For that the easiest option would be just to drop the tables of SAPR3 and run the import again.
    >
    > For ease of use you could also just do:
    > - logon as superdba
    > - drop user SAPR3
    > - create user SAPR3 password SOMEPW not exclusive dba
    >
    > After these steps you can easily pump the data into the database again.
    >
    > So here in th above given steps , i am creating a new SAPR3 user and why it is not exclusive dba ?
    >  i already have that user SAPR3 can i use the same.
    Yes, you do have the SAPR3 user.
    But you don't seem to like to read documentation or learn about how the tools work or anything like that.
    Therefore I gave you s simple way to reach your goal.
    Of course it's possible to reuse the user.
    But then you would have to deal with already existing tables, already existing data etc.
    You don't seem to be able to do that. So, the easy steps might be better suited for your needs.
    regards,
    Lars

  • Resolve xml namespace while importing xml schema

    Hi All,
    I am using ALSB 2.6 on windows platform. I have created a xml schema resource in a project folder. XML schema resource location is "/ANUP/TEST/SCHEMA". The target namespace for this schema is "http://test/schema/audit/properties.xsd". The XML schema file name is Properties.xsd.
    I want to import this schema structure into an xquery which is the in project folder "/ANUP/TEST". My statement in xquery is:
    xquery version "1.0";
    import schema namespace ns6="http://test/schema/audit/properties.xsd" at "/ANUP/TEST/SCHEMA/Properties.xsd";
    declare function getCustomer() as element(ns6:dummyParent){
    let $anup := "anup"
    return <ns6:dummyParent>
    <ns6:dummy1>anup</ns6:dummy1>
    <ns6:dummy2>tripathi</ns6:dummy2 >
    <ns6:dummy3>anup</ns6:dummy3>
    </ns6:dummyParent>
    getCustomer()
    When I try to save this xquery, I get the error ::
    An error occurred compiling the XQuery resource: line ##, column ##: {err}FODC0002: Error retrieving resource "/ANUP/TEST/SCHEMA/Properties.xsd": {1}.
    I tried to change the values instead of "/ANUP/TEST/SCHEMA/Properties.xsd" in import schema namespace statement and found out that if I put Properties.xsd in "C:\ANUP\TEST\SCHEMA", it works.
    Can somebody tell me how can I change this clause after "at" keyword so that I can browse to the XMl schema which has been imported into ALSB and part of project folder?
    Thanks:
    Anup

    I have the same is issue in Oracle OSB 11g. Does anyone have any idea how to import an xml-schema inside an XQuery, when the schema is present in the OSB-project (and not on filesystem or hosted on some URL).
    import schema namespace ns="http://someNamespace.com" at "/path/to/schema/in/OSB/schema.xsd";
    The above format gives the error "An error occurred compiling the XQuery resource: line ##, column ##: {err}FODC0002: Error retrieving resource"

  • Error while importing .xml file in Datatype

    Hi SDN,
    I am getting this error while importing .xml file in Datatype.
    Error when parsing the XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8
    Actually I have created datatype in my development box..
    but my client doesn't want to develop in development box.
    so i have exported that datatype as xsd from datatype editor.
    and while importing into sandbox datatype editor i am getting this error..
    Any help please......

    Hi Rajeev,
    now i have an .xml file its not importing into datatype...
    error is
    Error when parsing the XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8))
      <?xml version="1.0" encoding="UTF-8" ?>
      <xsd:schema targetNamespace="http://abc.com/xa" xmlns="http://abc.com/xa" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:complexType name="DT_PLANNINGSCHEDULE">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">3c6ae480f2f111dbc7ac0002556ad065</xsd:appinfo>
      </xsd:annotation>
      <xsd:sequence>
      <xsd:element name="PlanningSchedule_Output">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">c65d41c0f15b11dbb29f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PlanningScheduleHeader">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">c65d41c1f15b11dbb6ef00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ScheduleID" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">6c804600f15d11dbc02400123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScheduleIssueDate" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a370c1d0f15d11db8dd800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="SchedulePurpose">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a370c1d1f15d11dbac4100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Purpose">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1b4fd50f15e11db9eb600123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PurposeCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1b4fd51f15e11dbc47a00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ScheduleTypeCoded" type="xsd:string">
    <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a370c1d2f15d11dbbc3900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScheduleTypeCodedOther" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a370c1d3f15d11dba00200123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="QuantityQualifierCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a370c1d4f15d11dbc7e000123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScheduleParty">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a370c1d5f15d11db969a00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="BuyerParty">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">449ec100f16411dba2e900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Party">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">449ec101f16411db997a00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PartyID">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">449ec102f16411dbb75900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Identifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">449ec103f16411db8fa500123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Agency">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">449ec104f16411dba93f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="AgencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">449ec105f16411dba20f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Ident" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0de2f450f16511dbaa4700123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ListOfIdentifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d0f16711dbbdd800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Identifier" maxOccurs="unbounded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d1f16711dbcd2600123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Agency">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d2f16711db82f800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="AgencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d3f16711dbcf6e00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Ident" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d4f16711dbcb6200123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="SellerParty">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">e0422b80f16711dba8c100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Party">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb80f16811db82e800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PartyID">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb81f16811dba6ab00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Identifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb82f16811db8b4e00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Agency">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb83f16811dbc0ff00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="AgencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb84f16811dbb8f700123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Ident" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb85f16811dba46200123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ListOfIdentifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb86f16811db98c000123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Identifier" maxOccurs="unbounded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb87f16811dbb25200123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Agency">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb88f16811dbc7d100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="AgencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">e99ffa30f16811dba27100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Ident" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d30f16a11dbb29f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ShipFromParty">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">e0422b81f16711dbbfce00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Party">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d31f16a11db9adf00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PartyID">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d32f16a11dbbef100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Identifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d33f16a11db9e5600123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Agency">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d34f16a11dbba6d00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="AgencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d35f16a11db855400123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Ident" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d36f16a11db877300123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ShipToParty">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">e0422b82f16711db84ec00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Party">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">275ecac0f16b11dba49600123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PartyID">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">275ecac1f16b11db80c700123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Identifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">275ecac2f16b11db8ea300123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Agency">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">275ecac3f16b11dbb5bb00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="AgencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">275ecac4f16b11dbb7bc00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Ident" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">275ecac5f16b11db92a300123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Language">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a370c1d6f15d11db9f9a00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="LanguageCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">b1b4fd52f15e11dbc06300123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ListOfLocationGroupedPlanningDetail">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">c65d41c2f15b11dba9fd00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="LocationGroupedPlanningDetail" maxOccurs="unbounded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">89515130f17f11db98e400123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Location">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">de832980f17f11db8d4600123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="LocationIdentifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">f95b26d0f18011db8ce800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="LocID">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">f95b26d1f18011db839900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Identifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">f95b26d2f18011dba45300123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Agency">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">f95b26d3f18011db9ac700123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="AgencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">f95b26d4f18011dbc4ab00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Ident" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">f95b26d5f18011dbcd4400123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ListOfLocationPlanningItemDetail">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">de832981f17f11db856100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="LocationPlanningItemDetail">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257410f18111db8b6f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="BasePlanningDetail">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257411f18111db839c00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="LineItemNum">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257412f18111db847f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="BuyerLineItemNum" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257413f18111dbcf7200123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ItemIdentifiers">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257414f18111dba6f100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PartNumbers">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257415f18111db968700123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="BuyerPartNumber">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257416f18111db9f9100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PartNum">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257417f18111dbc32500123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="PartID" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d8257418f18111dbcfa900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="StandardPartNumber">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">50b67960f18211db839c00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ProductIdentifierCoded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">50b67961f18211dbc78900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ProductIdentifierQualifierCoded" type="xsd:integer">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">50b67962f18211dbae6e00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="ProductIdentifier" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">83815570f18411dbb4e800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ItemDescription" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">83815571f18411db876f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ListOfItemReferences">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef0f18711dbbafe00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ListOfReferenceCoded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef1f18711db8a7600123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ReferenceCoded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef2f18711db935200123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ReferenceTypeCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef3f18711dba69c00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="ReferenceTypeCodedOther" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef4f18711db942b00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="PrimaryReference">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef5f18711db93a800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Reference">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef6f18711dbcebc00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="RefNum" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef7f18711dbce6300123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ForecastFrequencyCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef8f18711db937b00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ListOfScheduleDetail">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aef9f18711dba61400123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ScheduleDetail">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aefaf18711db9d4800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="CommitmentLevelCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aefbf18711dba59800123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScheduleDates">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aefcf18711db947900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ListOfDateCoded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aefdf18711dbc43e00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="DateCoded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aefef18711dbaa5000123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="Date">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59aefff18711dbcde600123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="DateQualifier">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59af00f18711db87f100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="DateQualifierCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59af01f18711dbc9cf00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="ScheduleQuantities">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59af02f18711dbc24100123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="ListOfQuantityCoded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59af03f18711db842900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="QuantityCoded">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59af04f18711dbb59400123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="QuantityValue" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">2e59af05f18711dba6d900123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      <xsd:element name="UnitOfMeasurement">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a87e2580f18711dbc66f00123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="UOMCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a87e2581f18711db89a000123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="QuantityQualifierCoded" type="xsd:string">
      <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a87e2582f18711db9a1500123fbbc71c</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>

  • How to transfer multi-input xml file to One xml file using BPM?

    Hi!
    Using BPM, We wana transfer multiful xml file to One xml at Remote FTP Server.
    I don't know how to design BPM.
    ============== samle1: input xml====================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Shipments SYSTEM "DTD/Shipment.dtd">
    <Shipments>
      <sendingPartnerID>XXX</sendingPartnerID>
      <receivingPartnerID>XXX_UPSTMS</receivingPartnerID>
      <receivingMessageType>TPSDLS</receivingMessageType>
      <Shipment ID="0081646547" Type="CREATE">
        <CustomerID>XXX</CustomerID>
      </Shipment>
    </Shipments>
    ============== samle2: output xml====================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Shipments SYSTEM "DTD/Shipment.dtd">
    <Shipments>
      <sendingPartnerID>XXX</sendingPartnerID>
      <receivingPartnerID>XXX_UPSTMS</receivingPartnerID>
      <receivingMessageType>TPSDLS</receivingMessageType>
      <Shipment ID="0081646547" Type="CREATE">
      </Shipment>
      <Shipment ID="0081886548" Type="CREATE">
      </Shipment>
      <Shipment ID="0081646999" Type="CREATE">
      </Shipment>
    </Shipments>
    Message was edited by: ChangSeop Song

    Hi,
    To convert multiple xml files into a single file, you will have to perform a N:1 mapping.
    The following tutorials are available on SAP to help you understand BPM and also to collect multiple XML messages so that they can be mapped into a single message. Check them out,
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Regards,
    Bhavesh

  • How to read XML file and update the data in MS CRM 2011?

    Hi Folks,
    Can anyone please help me finding some references to read XML files and push the data to MS CRM 2011 preferably by using a console application.
    Please let me know if any ways of handling it in simple ways.
    Thanks,
    Sri

    HI,
    How to read XML file:
    https://social.msdn.microsoft.com/Forums/en-US/5dd7261b-86c4-4ca8-ba87-95196ef3ba50/need-to-display-xml-file-in-textboxes-edit-the-data-and-save-the-new-xml-file?forum=csharpgeneral
    How to work with CRM:
    ClientCredentials credentials = new ClientCredentials();
    credentials.Windows.ClientCredential = new System.Net.NetworkCredential("USER", "Password", "Domain");
    Uri uri = new Uri("http://server/Organization/XRMServices/2011/Organization.svc");
    OrganizationServiceProxy proxy = new OrganizationServiceProxy(uri, null, credentials, null);
    proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
    IOrganizationService service = (IOrganizationService)proxy;
    //using "service" you can create, update and retrieve entities.
    More information here about service functions:
    https://msdn.microsoft.com/en-us/library/gg328198.aspx

  • How can I skip the XML file's space & "\n" when using a DOM?

    This is my xml file below:
    <?xml version="1.0" encoding="UTF-8"?>
    <inventory>
      <item>
        <sku>3965</sku>
        <describtion>widget</describtion>
        <quality>108</quality>
      </item>
      <item>
        <sku>5478</sku>
        <describtion>gadget</describtion>
        <quality>101</quality>
      </item>
      <item>
        <sku>4575</sku>
        <describtion>sprocket</describtion>
        <quality>106</quality>
      </item>
    </inventory>between the <inventory> and the<item>,there is one "\n" and tow "space" ,
    then between the <item> and the <sku>,there is ...
    on and on...
    and this is my java code:
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    public class DomDemo {
      DocumentBuilderFactory dbf = null;
      DocumentBuilder df = null;
      Document doc = null;
      public DomDemo() {
        try {
          dbf = DocumentBuilderFactory.newInstance();
          dbf.setIgnoringElementContentWhitespace(true);
        catch(FactoryConfigurationError fce) {
          fce.printStackTrace();
        try { 
          df = dbf.newDocumentBuilder();
        catch(ParserConfigurationException pce) {
          pce.printStackTrace();
      public void printXML(Node node) {
        short nodeTypeValue;
        String nodeType = null;
        Node currentNode = null;
        nodeTypeValue = node.getNodeType();
        nodeType = getNodeType(nodeTypeValue);
        System.out.println("NodeType:" + nodeType);
        System.out.println("NodeName:" + node.getNodeName());
        System.out.println("NodeValue:" + node.getNodeValue());
        for(currentNode = node.getFirstChild(); currentNode != null; currentNode = currentNode.getNextSibling()) { 
          printXML(currentNode);
      public String getNodeType(short nodeTypeValue) {
        String nodeType = null;
        switch(nodeTypeValue) {
          case Node.DOCUMENT_NODE: 
            nodeType = "DocumentNode";
            break;
          case Node.ELEMENT_NODE:
            nodeType = "ElementNode";
            break;
          case Node.ATTRIBUTE_NODE:
            nodeType = "AttributeNode";
            break;
          case Node.TEXT_NODE:
            nodeType = "TextNode";
            break;
          default:
            nodeType = "OtherNode";
        return nodeType;
      public static void main(String[] args) {
        if(args.length == 0) {
         System.out.println("Usage:java DomDemo filename");
         System.exit(1);
        String file = args[0];
        DomDemo dd = new DomDemo();
        Document doc = null;
        try {
          doc = dd.df.parse(file);
        catch(Exception e) {
          e.printStackTrace();
        dd.printXML(doc);
    }when run the class, the result is below:
    NodeType:DocumentNode
    NodeName:#document
    NodeValue:null
    NodeType:ElementNode
    NodeName:inventory
    NodeValue:null
    NodeType:TextNode
    NodeName:#text
    NodeValue:
    NodeType:ElementNode
    NodeName:item
    NodeValue:null
    NodeType:TextNode
    NodeName:#text
    NodeValue:
    It contains a TextNode and its value is " " and a "\n".
    I used setIgnoringElementContentWhitespace feature, but it seems didn't work.
    How can i solve it?

    I used setIgnoringElementContentWhitespace feature, but it seems didn't work.
    Add a DTD to the XML document for setIgnoringElementContentWhitespace feature.

  • How can I read the EXCEL file while Program is running in background.

    Hi all Expert,
    How can I read the EXCEL file while Program is running in background.
    Thanks

    you need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
    loots of information if you can search forum.. thanks

  • How do I modify invoice request xml file by adding posting date?

    Hi,
    We import customer invoice requests via xml files from an external data source. Currently the standard SAP xml file does not include the posting date, and invoices enter SAP with a blank posting date. When the invoice is released, the posting date is taken from the invoice date.
    Due to our month end processes, we have hundreds of invoice requests every month where we do not want posting date to equal the invoice date, and for each of those invoices the posting date is manually entered one invoice at a time during the release process. This is very time consuming.
    We would like to build functionality in our external system to create the posting date at the xml file generation stage. Could anyone let us know the following:
    - what is the name of the posting date field on invoice requests (invoice documents)?
    - where would we place the additional script in the xml file?
    I'm attaching one of our current xml files (which already contains one section that has been customized)
    Your suggestions would be appreciated.
    Thanks,
    Kerstin

    Kerstin,
    The closest i could find in the WSDL of the Manage Invoice Request Web Service that handles this integration is "<ProposedInvoiceDate>" or possibly even "<ProposedDeviatingPostingdate>", both of which sit directly under the <CustomerInvoiceRequest> element.
    For more information, go to the Service Explorer, find the ManageInvoiceRequestsIn Web Service, download the WSDL, and open it in SOAP-UI or something similar. This way you can see all the fields that you can write to, which is where i found these two elements.

  • How to refer an xml file within a xml file?

    Hi
    I would like to refer a xml file within a xml file from where i would like to extracts some elements & attributes.
    Plz, suggest me hot to do.
    Thank you.

    You mean you want to link the file thru some resource pointer and then make the external file availabe for parsing and other processing operations?

  • Problem converting data in XML file to internal table data

    Hi all,
    I have a requirement. I need to convert an XML file to internal table data and based on that data do Goods Receipt in SAP.
    With the help of this blog /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
    I am able to convert the XML file to data in SAP. But this blog will display the output on screen as ELELEMNT = nodename VALUE= value of that node.
    But I donu2019t want in that way, I want to store all the data in XML file in an internal table so that I can make use of those values and do Goods Recipt in SAP.
    Can some one suggest how should I read the data in an internal table.
    Here is my code..what changes should I make?
    *& 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:\temp\orders_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
    Any help would be highly apperciated.
    regards,
    Jessica Sam

    Pavel Vera,
    With your example i tries doing the following .....
    I tried  to convert the data of XML file to internal table data. I am collecting the data in internal table to do goos recipt with that data.
    Please find my XML file, ABAP pgm and XSLT pgm . I donu2019t know what I am missing I am not getting any output. I donu2019t know what is wrong please help me with this
    Below is my XML file, My code and XSLT Program. In the below XML file I need to collect Vendor Number, Order Number, and Date tags which occur only once for one XML file.
    I also need to collect the following tags from <Shipmentdetail>
    <Shipmentdetail> has following child nodes and I need to collect them
    TrackingNumber
    Freight
    Weight
    ShipmentDate
    ShipmentMethod
    Need to collect to collect the following tags from <ProductInformation>
    <ProductInformation> has following child nodes and I need to collect them
        LineNumber
        SKUNumber
        OrderedQuantity
        ShippedQuantity
        UOM
    The <Shipmentdetail> and <ProductInformation> are child nodes of <OrderShipment>
    The <Shipmentdetail> occurs only ones but the <ProductInformation> can occur once or many times and will be dynamic and differs depening on the input file.
    My XML file is as follows
    <?xml version="1.0" encoding="iso-8859-1" ?>
    - <ShipmentHeader>
      <AccountID />
    - <OrderShipment>
          <VendorNumber>1000</VendorNumber>
          <OrderNumber>P00009238</OrderNumber>
          <OrderType>Stock</OrderType>
          <Company />
          <Division />
         <Department />
         <Date>20061120</Date>
         <CartonCount>2</CartonCount>
         <ShipAllProducts>No</ShipAllProducts>
    -             <ShipmentDetail>
                      <TrackingNumber>1ZR3W891PG47477811</TrackingNumber>
                      <Freight>000000010000</Freight>
                      <ShipmentDate>20061120</ShipmentDate>
                      <ShipmentMethod>UPS1PS</ShipmentMethod>
                 </ShipmentDetail>
    -            <ProductInformation>
                     <LineNumber>000000001</LineNumber>
                     <SKUNumber>110FR</SKUNumber>
                     <AdvSKUNumber>003 4518</AdvSKUNumber>
                     <SKUID />
                     <OrderedQuantity>00000001000000</OrderedQuantity>
                     <ShippedQuantity>00000001000000</ShippedQuantity>
                     <UOM>EA</UOM>
                     <Factor>1</Factor>
                </ProductInformation>
    -           <ProductInformation>
                    <LineNumber>000000002</LineNumber>
                    <SKUNumber>938EN</SKUNumber>
                    <AdvSKUNumber>001 7294</AdvSKUNumber>
                    <SKUID />
                    <OrderedQuantity>00000000450000</OrderedQuantity>
                    <ShippedQuantity>00000000450000</ShippedQuantity>
                    <UOM>EA</UOM>
                    <Factor>1</Factor>
                </ProductInformation>
    -           <CaseInformation>
                   <LineNumber>000000001</LineNumber>
                   <SKUNumber>110FR</SKUNumber>
                   <AdvSKUNumber>003 4518</AdvSKUNumber>
                   <SKUID />
                   <SSCCNumber>00000001668000002487</SSCCNumber>
                   <CaseQuantity>00000001000000</CaseQuantity>
                   <UOM>EA</UOM>
                   <Factor>1</Factor>
                 </CaseInformation>
                 <CaseInformation>
                   <LineNumber>000000001</LineNumber>
                   <SKUNumber>110FR</SKUNumber>
                   <AdvSKUNumber>003 4518</AdvSKUNumber>
                   <SKUID />
                   <SSCCNumber>00000001668000002487</SSCCNumber>
                   <CaseQuantity>00000001000000</CaseQuantity>
                   <UOM>EA</UOM>
                   <Factor>1</Factor>
                 </CaseInformation>
    -  </OrderShipment>
      </ShipmentHeader>
    My Program
    TYPE-POOLS abap.
    CONSTANTS gs_file TYPE string VALUE 'C:\temp\test.xml'.
    * This is the structure for the data from the XML file
    TYPES: BEGIN OF ts_shipment,
             VendorNumber(10)     TYPE n,
             OrderNumber(20)      TYPE n,
             OrderType(8)         TYPE c,
             Date(8)              TYPE c,
           END OF ts_shipment.
    TYPES: BEGIN OF ts_shipmentdetail,
             TrackingNumber(30)     TYPE n,
             Freight(12)            TYPE n,
             Weight(14)             TYPE n,
             ShipmentDate(8)        TYPE c,
             ShipmentMethod(8)      TYPE c,
             END OF ts_shipmentdetail.
    TYPES: BEGIN OF ts_productinformation,
             LineNumber(9)          TYPE n,
             SKUNumber(20)          TYPE c,
             OrderedQuantity(14)    TYPE n,
             ShippedQuantity(14)    TYPE n,
             UOM(4)                 TYPE c,
             END OF ts_productinformation.
    * Table for the XML content
    DATA: gt_itab       TYPE STANDARD TABLE OF char2048.
    * Table and work ares for the data from the XML file
    DATA: gt_shipment               TYPE STANDARD TABLE OF ts_shipment,
          gs_shipment               TYPE ts_shipment.
    DATA: gt_shipmentdetail         TYPE STANDARD TABLE OF ts_shipmentdetail,
          gs_shipmentdetail         TYPE ts_shipmentdetail.
    DATA: gt_productinformation     TYPE STANDARD TABLE OF ts_productinformation,
          gs_productinformation     TYPE ts_productinformation.
    * Result table that contains references
    * of the internal tables to be filled
    DATA: gt_result_xml TYPE abap_trans_resbind_tab,
          gs_result_xml TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex     TYPE REF TO cx_root,
          gs_var_text   TYPE string.
    * Get the XML file from your client
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename                = gs_file
      CHANGING
        data_tab                = gt_itab
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        no_authority            = 6
        unknown_error           = 7
        bad_data_format         = 8
        header_not_allowed      = 9
        separator_not_allowed   = 10
        header_too_long         = 11
        unknown_dp_error        = 12
        access_denied           = 13
        dp_out_of_memory        = 14
        disk_full               = 15
        dp_timeout              = 16
        not_supported_by_gui    = 17
        error_no_gui            = 18
        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.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "ISHIPMENT".
    GET REFERENCE OF gt_shipment INTO gs_result_xml-value.
    gs_result_xml-name = 'ISHIPMENT'.
    APPEND gs_result_xml TO gt_result_xml.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "ISHIPDET".
    GET REFERENCE OF gt_shipmentdetail INTO gs_result_xml-value.
    gs_result_xml-name = 'ISHIPDET'.
    APPEND gs_result_xml TO gt_result_xml.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPRODDET".
    GET REFERENCE OF gt_productinformation  INTO gs_result_xml-value.
    gs_result_xml-name = 'IPRODDET'.
    APPEND gs_result_xml TO gt_result_xml.
    * Perform the XSLT stylesheet
    TRY.
        CALL TRANSFORMATION z_xml_to_abap3
        SOURCE XML gt_itab
        RESULT (gt_result_xml).
      CATCH cx_root INTO gs_rif_ex.
        gs_var_text = gs_rif_ex->get_text( ).
        MESSAGE gs_var_text TYPE 'E'.
    ENDTRY.
    * Writing the data from file for gt_shipment
    *Collecting the Shipping Data from the XML file to internal table gt_shipment
    *and writing the data to the screen
    LOOP AT gt_shipment INTO gs_shipment.
      WRITE: / 'VendorNumber:', gs_shipment-VendorNumber.
      WRITE: / 'OrderNumber :', gs_shipment-OrderNumber.
      WRITE: / 'OrderType  :', gs_shipment-OrderType.
      WRITE: / 'Date  :',      gs_shipment-Date.
      WRITE : /.
    ENDLOOP. "gt_shipment.
    LOOP AT gt_shipmentdetail INTO gs_shipmentdetail.
      WRITE: / 'TrackingNumber:',     gs_shipmentdetail-TrackingNumber.
      WRITE: / 'Freight :',           gs_shipmentdetail-Freight.
      WRITE: / 'Weight  :',           gs_shipmentdetail-Weight.
      WRITE: / 'ShipmentDate  :',     gs_shipmentdetail-ShipmentDate.
    * WRITE: / 'ShipmentMethod  :'    gs_shipmentdetail-ShipmentMethod
      WRITE : /.
    ENDLOOP. "gt_shipmentdetail.
    LOOP AT gt_productinformation INTO gs_productinformation.
      WRITE: / 'LineNumber:',         gs_productinformation-LineNumber.
      WRITE: / 'SKUNumber :',         gs_productinformation-SKUNumber.
      WRITE: / 'OrderedQuantity  :',  gs_productinformation-OrderedQuantity.
      WRITE: / 'ShippedQuantity  :',  gs_productinformation-ShippedQuantity.
      WRITE: / 'UOM  :',              gs_productinformation-UOM.
      WRITE : /.
    ENDLOOP. "gt_productinformation.
    XSLT Program
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <ISHIPMENT>
              <xsl:apply-templates select="//OrderShipment"/>
            </ISHIPMENT>
          </asx:values>
        </asx:abap>
      </xsl:template>
      <xsl:template match="OrderShipment">
        <item>
          <VENDORNUMBER>
            <xsl:value-of select="VendorNumber"/>
          </VENDORNUMBER>
          <ORDERNUMBER>
            <xsl:value-of select="OrderNumber"/>
          </ORDERNUMBER>
          <ORDERTYPE>
            <xsl:value-of select="OrderType"/>
          </ORDERTYPE>
          <DATE>
            <xsl:value-of select="Date"/>
          </DATE>
        </item>
      </xsl:template>
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <ISHIPDET>
              <xsl:apply-templates select="//OrderShipment/ShipmentDetail"/>
            </ISHIPDET>
          </asx:values>
        </asx:abap>
      </xsl:template>
      <xsl:template match="ShipmentDetail">
        <item>
          <TRACKINGNUMBER>
            <xsl:value-of select="TrackingNumber"/>
          </TRACKINGNUMBER>
          <FREIGHT>
            <xsl:value-of select="Freight"/>
          </FREIGHT>
          <SHIPMENTDATE>
            <xsl:value-of select="ShipmentDate"/>
          </SHIPMENTDATE>
          <SHIPMENTMETHOD>
            <xsl:value-of select="ShipmentMethod"/>
          </SHIPMENTMETHOD>
        </item>
      </xsl:template>
    </xsl:transform> .
    Any help is highly appreciated. If anyone encountered this situation before please let me know where i am going wrong in my XSLT transformation.
    Any Help will be highly apppreciated. Thanks in advance
    Regards,
    Jessica   Sam

  • How do I save a pdf file to iphoto? I used to be able to do this in the "save as" option

    how do I save a pdf file to iphoto? I used to be able to do this in the "save as" option

    Save as is back again - available - in Mavericks by hitting the Option key while in the app's File menu (duplicate will change to save as).

  • Loading an xml file from an xml file

    I'm trying to load an xml file from an xml file, but I'm
    having problems. My first xml file is really simple - it only
    contains one attribute with the name of another xml file in it
    (eventually I will have multiple xml files in here and run a loop
    on them...this is why I want to load an xml file from an xml file).
    Currently, with the code below, I can get the main xml file
    to load ("main.xml"), but I cannot get the secondary xml files to
    load FROM the main.xml.
    I want to then take childNode values from the secondary xml
    file and use them within my .swf in text boxes and whatnot.
    Any guidance? I think I'm going wrong on the line where I'm
    saying "i.newxml.load(i.attributes.location);"
    - How can I get this to work?

    johnypeter:
    I tried changing the code inside the loop to use just
    "newxml" instead of "i.newxml", and I declared with "var newxml =
    new XML();" - was this what you were thinking?
    kglad:
    The reason I tried to use the loadXML() function in the loop
    was so that for each node in my "main.xml" it would load the new
    xml file listed - this is a no-no? Do you have any ideas as to what
    I could do?
    For the for-loop, what should I change in it? I'm not great
    with loops so I tried to modify some code from another loop I found
    in another forum thread - not the right way to do it here?
    Also, what should I trace? The value of the _root.address, or
    i.attributes.location? I have created dynamic text boxes on my
    stage to see if the correct value from the xml file loads (ie. the
    name of the xml file within the xml file) and it does, but now I
    don't know how to put that information into ANOTHER loadXML()
    function and get the node information from it - does that make
    sense???
    Below are the examples of the xml files I am using. In the
    first one, main.xml, I will have a list of multiple xml files, each
    with the same nodes and elements as in the details.xml file
    (different values, of course).
    This is just to give you an example of what I'm trying to
    accomplish - pulling ALL the addresses and phone numbers from
    multiple xml files. I cannot manually collect this information, as
    it is dynamic, and will be updated in each individual details.xml.
    I was hoping to collect the information by simply adding to and
    updating ONE xml file - main.xml.
    Do you think this can be done? Am I going about it the wrong
    way? I'm quite limited in AS knowledge, which is why I'm piecing
    together code from other posts!

Maybe you are looking for

  • Run XML Publisher Report  via URL (like Oracle Reports)

    Hi All, Is it possible to run xml-publisher report via URL? In Oracle Reports works this fine: http://test:7777/reports/rwservlet?server=test_bihome1&report=test1.rdf&userid=test/testv@db&desformat=pdf&destype=cache We need this for public reports wi

  • How do I set up an html link to open in a new window outside of the PDF?

    I've done a lot of searching and cannot find an answer to this dilemma. I create press releases for my employer's website in InDesign, then export as PDFs. They appear as icons on the "news" page of our site, which the user clicks to open and read. E

  • Pls help me in correcting the error

    In my code i have coded such that if the idoc status is 51 or 68 then the details corresponding to it should be displayed.Now have to add a new part in coding like if the status is not 51 or 68 error message should be diplayed.This is the coding ..Pl

  • CMSS Not Working in Win 7

    I 've heard that this is a common problem. I have an Xtremegamer card and just installed the new Jun-5 driver and still can't get any action out of CMSS on my 64-bit Win 7. Is this ever going to be fixed? Dolby, THX, and all the other surround sound

  • Video loading into iphoto as black screen

    I have loaded videos from two different cameras. One is fine. The other loaded the videos as black screens. I have downloaded a divx converter per the owner of the camera but it still doesn't work. When I go to Macintosh HD from my desktop and go to