12-28-04 01:46 AM
The easiest way is probably to get your SQL working to return the data you
need, then create a map to translate that into the format you want it in.
This map can either be specified on a send port as for the return message,
or on a receive port. That way, when the document gets to the messagebox, it
will be in the format you want.
matt
"milan" <milan@discussions.microsoft.com> wrote in message
news:620AD3DD-A0D7-4C1F-8EFD-7AE8EF266873@microsoft.com...[vbcol=seagreen]
> Ok, I am including the Schema and the Instance XML document instance. The
> xml
> document should be populated with the data from SQL Server using SQL
> Adapter.
>
> Schema1.xsd
>
>
> <?xml version="1.0" encoding="utf-16"?>
> <xs:schema attributeFormDefault="unqualified"
> elementFormDefault="qualified"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="BatchRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="MaterialRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="MoveTypeRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PlantRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PstngDateRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="SpecStockRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="StgeLocRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="TrEvTypeRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="UsernameRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="VendorRa">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="item">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="SIGN" type="xs:string" />
> <xs:element name="OPTION" type="xs:string" />
> <xs:element name="LOW" type="xs:string" />
> <xs:element name="HIGH" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
>
>
> and the instance xml document :
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <doc:GoodsMovement.GetItems xmlns:doc="urn:sap-com:document:sap:business">
> <!--Display detailed list of material documents-->
> <BatchRa>
> <!--Range for batch-->
> <item>
> <!--BAPI Communication Structure: Range for Batch-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Batch number-->
> <!--CHAR 10-->
> </LOW>
> <HIGH>
> <!--Batch number-->
> <!--CHAR 10-->
> </HIGH>
> </item>
> </BatchRa>
> <MaterialRa>
> <!--Range for material-->
> <item>
> <!--BAPI Communication Structure: Range for Material-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Material number-->
> <!--CHAR 18-->
> </LOW>
> <HIGH>
> <!--Material number-->
> <!--CHAR 18-->
> </HIGH>
> </item>
> </MaterialRa>
> <MoveTypeRa>
> <!--Range for mvt type-->
> <item>
> <!--BAPI Communication Structure: Range for Movement Type-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Movement type (inventory management)-->
> <!--CHAR 3-->
> </LOW>
> <HIGH>
> <!--Movement type (inventory management)-->
> <!--CHAR 3-->
> </HIGH>
> </item>
> </MoveTypeRa>
> <PlantRa>
> <!--Range for plant-->
> <item>
> <!--BAPI Communication Structure: Range for Plant-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Plant-->
> <!--CHAR 4-->
> </LOW>
> <HIGH>
> <!--Plant-->
> <!--CHAR 4-->
> </HIGH>
> </item>
> </PlantRa>
> <PstngDateRa>
> <!--Range for posting date-->
> <item>
> <!--BAPI Communication Structure: Range for Posting Date-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Posting date in the document-->
> <!--DATS-->
> </LOW>
> <HIGH>
> <!--Posting date in the document-->
> <!--DATS-->
> </HIGH>
> </item>
> </PstngDateRa>
> <SpecStockRa>
> <!--Range for special stock indicator-->
> <item>
> <!--BAPI Communication Structure: Range for Spec. Stck Indicator-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Special stock indicator-->
> <!--CHAR 1-->
> </LOW>
> <HIGH>
> <!--Special stock indicator-->
> <!--CHAR 1-->
> </HIGH>
> </item>
> </SpecStockRa>
> <StgeLocRa>
> <!--Range for stor. loc.-->
> <item>
> <!--BAPI Communication Structure: Range for Storage Location-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Storage location-->
> <!--CHAR 4-->
> </LOW>
> <HIGH>
> <!--Storage location-->
> <!--CHAR 4-->
> </HIGH>
> </item>
> </StgeLocRa>
> <TrEvTypeRa>
> <!--Range for trans/event type-->
> <item>
> <!--BAPI Communication Structure: Range for Trans./Event Type-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Transaction/event type-->
> <!--CHAR 2-->
> </LOW>
> <HIGH>
> <!--Transaction/event type-->
> <!--CHAR 2-->
> </HIGH>
> </item>
> </TrEvTypeRa>
> <UsernameRa>
> <!--Range for user name-->
> <item>
> <!--BAPI Communication Structure: Range for User Name-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--User name-->
> <!--CHAR 12-->
> </LOW>
> <HIGH>
> <!--User name-->
> <!--CHAR 12-->
> </HIGH>
> </item>
> </UsernameRa>
> <VendorRa>
> <!--Range for vendor-->
> <item>
> <!--BAPI Communication Structure: Range for Vendor-->
> <SIGN>
> <!--Inclusion/exclusion criterion SIGN for range tables-->
> <!--CHAR 1-->
> </SIGN>
> <OPTION>
> <!--Selection operator OPTION for range tables-->
> <!--CHAR 2-->
> </OPTION>
> <LOW>
> <!--Vendor's account number-->
> <!--CHAR 10-->
> </LOW>
> <HIGH>
> <!--Vendor's account number-->
> <!--CHAR 10-->
> </HIGH>
> </item>
> </VendorRa>
> </doc:GoodsMovement.GetItems>
>
>
>
> "Nabeel Prior" wrote:
>
[ Post a follow-up to this message ]
|