Mapping Issue- XSD (schema to BAPI)

Hi XI Experts ,
Scenario : XSD (Schema priovided by external partners ->XI-> SAP BAPI) of PO Creation (ZBAPI of :BAPI_PO_CREATE1)
-When the Cost centre data is 100%   ,the GL ACCOUNT , Cost centre , Quantity , PO ITEM , Cost Area should come in one Item Node of : PO_ACCOUNT  of BAPI
-When Cost Centre data is split into 60% , 40% in Source , thE values should occur in 2 item nodeS , 1Item with 60,00 Data
2 item(SECOND ITEM)  with 40,00 data
I have used Remove context , Split by value and target looks fine.
But the Quanity , PO_ITEM value does't  spilt into both the items. The Quanity , PO_ITEM is only in the first item node.
how do I get the values in both item node under :POACCOUNT
Thsi is sample  Quanity xml (Part of Source structure):
<TotalQuantity>
            <Quantity>
              <QuantityValue>1.000</QuantityValue>
              <UnitOfMeasurement>
                <UOMCoded>EA</UOMCoded>
              </UnitOfMeasurement>
            </Quantity>
          </TotalQuantity>
Currently this is how traget looks like
<POACCOUNT>
<item>
<PO_ITEM>00001</PO_ITEM><SERIAL_NO>0001</SERIAL_NO><QUANTITY>1.000</QUANTITY><DISTR_PERC>60.00</DISTR_PERC><GL_ACCOUNT>0005423100</GL_ACCOUNT><COSTCENTER>0000000313</COSTCENTER><CO_AREA>0510</CO_AREA>
</item>
<item>
<SERIAL_NO>0002</SERIAL_NO><DISTR_PERC>40.00</DISTR_PERC><GL_ACCOUNT>0005423100</GL_ACCOUNT><COSTCENTER>0000000318</COSTCENTER><CO_AREA>0510</CO_AREA>
</item>
</POACCOUNT>
Here  PO_ITEM(0001) , Qaunity is missing in second item node and this is needed for me to occur to create PO in SAP.
You input is highly appreciated.
Thank you ,
Vara

Hi Amit ,
I tried  the logic :
If ReferenceCoded Item|  EQUALS | Constant(Percent) |if without else   then  RefNum ( Substring extract 40.00%, 60.00%) | Remove Context | Split by Value(Each Value) | DISTR_PERC (Percentage field of BAPI)
This worked if there are two cost centre purchase data which passed gets split into  2line items
Thank you ,
Best Regards,
Varalakshmi

Similar Messages

  • Mapping Issue(if schema node is not present)

    I have the following map as follows:
    If the node Student_City is not present in the source schema(Student) then the map is not working .
    How can I get the right output if a node is not present in the source schema and we want to proceed that schema ?
    Prakash

    I set the default value as follows in destination schema :
    But I am getting the following error:
    Invoking component...
    C:\Notes\Practicals Document\SSDissamblerPOC\SSDissamblerPOC\ScriptSaveDissamblerProject\SSDissamblerProject\Map1.btm: warning btm1001: The destination node "Employee_Salary" is required but the source node "Student_City" is optional.
    TestMap used the following file: <file:///C:\Notes\Practicals Document\SSDissamblerPOC\Locations\Instance.xml> as input to the map.
    C:\Users\Administrator\AppData\Local\Temp\_MapData\SSDissamblerProject\Map1_output.xml: error btm1046: Output validation error: The element 'Employee' has invalid child element 'Employee_Exp'. List of possible elements expected: 'Employee_Salary'.
    Test Map failure for map file <file:///C:\Notes\Practicals Document\SSDissamblerPOC\ScriptSaveDissamblerPOC\SSDissamblerProject\SSDissamblerProject\Map1.btm>. The output is stored in the following file: <file:///C:\Users\Administrator\AppData\Local\Temp\_MapData\ScriptSaveDissamblerProject\Map1_output.xml>
    Component invocation succeeded.
    The output is as follows:
    In this Employee_Salary is not present.But  I want this.
    Note: Student_City node is not present in the source schema.
    Prakash

  • XSD Schema issue with 11g - Urgent

    All,
    SOA,JDev Version - 11.1.1.1.0
    In my current project(Async BPEL), I'm using a xsd schema(custom one) which I have used in 10g. The import of schema to jdev went thru fine. After import, I've set the custom schema element as the payload for the receive activity. (i.e Structure pane --> MessageTypes --> Process WSDL --> <process>RequestMessage --> payload --> Element --> BrowseElement --> project schema files --> Choose the custom schema and select the root element). After setting it up, I tried to deploy the process. I got the following error.
    *+[2010-01-08T16:17:17.502+05:30] [soa_server4] [ERROR] [SOA-21037] [oracle.integration.platform.blocks.deploy.servlet] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 0000IODYsIR9DgYVLqBT8A1BHgwq00001Q,0] [APP: soa-infra] [arg: Error during composite deployment: oracle.fabric.common.FabricDeploymentException: oracle.fabric.common.FabricException: Update Failed: Unable to register service.: Update Failed: Unable to register service..] Sending back error message: Error during composite deployment: oracle.fabric.common.FabricDeploymentException: oracle.fabric.common.FabricException: Update Failed: Unable to register service.: Update Failed: Unable to register service...+*
    I tried the same scenario with the schema which the BPEL process created, it deployed successfully.
    In 11g, is there any stringent steps to verify the custom schema? If so, please share your thoughts. Its of high importance to me. Kindly help.
    Thanks,
    Sen

    Once I had a similar problem, although I am not sure with the error messge, but I saw that the wsdl file was still reflecting the process as message part and was also using the namespace of default xsd, for xs:client. It might have effects some where else as well, could not recollect, where all I was required to change.
    So I think it is better to create the empty composite first, copy your schema file in it and then when dragging the BPEL component, specify the data types from your schema, instead of 'process' and 'processResponse'.
    HTH,
    SwapSawe.

  • Multiple Root elements in the XSD Schema

    Hi Dear MDM gurus,
    I have manually created an XSD Schema and I can import it in the Syndicator without any problem.
    I have 3 different Root elements in the schema that I want to use and map to the corresponding table of this type.
    In my Syndicator screen in the Rood dropdown box I can see all three of the Root elements that I have in the schema.
    If I select the first Root element - everything goes fine and I can do my mapping, save the map, etc.
    The problem is that if I select the second or third root element to do the mapping for them, the syndicator does not show the structure in the Item Mapping after that.
    I tried moving the Second root element of the schema and make it first and it works with it, but then the other two are not appearing and I have the same issue.
    Does MDM support only one Root element in the Schema? If that's the case, why does it show all three of them in the dropdown?
    Here is an example:
    1. If I have them in this order in my XSD
              <xs:element name="ManufacturerGroupNumber" type="ManufacturerGroupNumbers"/>
              <xs:element name="SupplierGroupNumber" type="SupplierGroupNumbers"/>
              <xs:element name="SupplierLocationNumber" type="Suppliers"/>
    I can only see the structure when I select the "ManufacturerGroupNumber".
    2. If I have them in the Schema in this order
              <xs:element name="SupplierLocationNumber" type="Suppliers"/>
              <xs:element name="SupplierGroupNumber" type="SupplierGroupNumbers"/>
              <xs:element name="ManufacturerGroupNumber" type="ManufacturerGroupNumbers"/>
    I can only see the structure when I select the first one again "SupplierLocationNumber" and I can only do the mapping for it.
    Any help would be appreciated.
    Thanks in advance,
    Boris

    Hello Satish,
    Thank you for your quick response.
    I read some of the architectural approaches and XML specifications and depending on your design, you may have only one Root element or in rare cases Several Root elements. In my case, I was advised by our PI experts to use Multiple Root elements and this gives me the following:
    Advantages:
    u2022 The reusability of the schema definition is available for all types and all elements defined in the global namespace.
    Disadvantages:
    u2022 Since there are many global elements, there are many valid XML documents.
    I initially had the schema as you suggested, but they didn't like it in PI and advised me to change it with having multiple roots.
    What I'm trying to figure out is if there is a bug in MDM that does not allow to use the rest of the root elements, so I can open an OSS message.
    Thanks,
    Boris

  • Recursive structure - complex mapping issue

    I have a recursive structure involved mapping requirement. here is the issue simplified...
    Source is a details about person which has a element called father which itself is of the type person. Target is just a list or person with n father attribute. Target has to have all the persons, father and father's father with no limitation. Below are the XSDs and XML for source and target. I know I can do this in java or abap mapping or even xslt, but is it possible to achieve this in the mapping too? Any help will be appreciated and rewarded.
    No where in the forum or blog I could find a sample mapping.
    <b>Sorry for the long post</b>
    Thanks
    <b>Source XML</b>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:PersonsMT xmlns:ns0="http://xyz.com/scratchpad">
       <Persons>
          <Person>
             <Name>Smith</Name>
             <Height>22</Height>
             <Father>
                <Name>Paul</Name>
                <Height>23</Height>
                <Father>
                       <Name>Sr Paul</Name>
                       <Height>23</Height>
                <Father/>
             </Father>
             </Father>
          </Person>
          <Person>
             <Name>Brad</Name>
             <Height>22</Height>
             <Father>
                <Name>Luke</Name>
                <Height>23</Height>
                <Father/>
             </Father>
          </Person>
       </Persons>
    </ns0:PersonsMT>
    <b>Expected output:</b>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:PersonsListOutputMT xmlns:ns0="http://xyz.com/scratchpad">
    <Persons>
         <Person>
              <Name>Smith</Name>
              <Height>22</Height>
         </Person>
         <Person>
              <Name>Paul</Name>
              <Height>23</Height>
         </Person>
         <Person>
              <Name>Sr Paul</Name>
              <Height>23</Height>
         </Person>
         <Person>
              <Name>Brad</Name>
              <Height>22</Height>
         </Person>
         <Person>
              <Name>Luke</Name>
              <Height>23</Height>
         </Person>
    </Persons>
    </ns0:PersonsListOutputMT>
    <b>Source Schema:</b>
    <i>Message Type: PersonsMT</i>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xyz.com/scratchpad" targetNamespace="http://xyz.com/scratchpad">
         <xsd:element name="PersonsMT" type="PersonsDT" />
         <xsd:complexType name="PersonDT">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   34bfd3107ba111dcc4e600188b447e47
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Name" type="xsd:string">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             56bf53607b7d11dca285000f1ffb32b9
                             </xsd:appinfo>
                        </xsd:annotation>
                   </xsd:element>
                   <xsd:element name="Height" type="xsd:string">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             56bf53617b7d11dcc38a000f1ffb32b9
                             </xsd:appinfo>
                        </xsd:annotation>
                   </xsd:element>
                   <xsd:element name="Father" type="PersonDT">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             56bf53627b7d11dccc3d000f1ffb32b9
                             </xsd:appinfo>
                        </xsd:annotation>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="PersonsDT">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   34bd89227ba111dcc2fa00188b447e47
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Persons" maxOccurs="unbounded">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             9915e6707b7d11dcadc7000f1ffb32b9
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="Person" type="PersonDT">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9915e6717b7d11dc8f84000f1ffb32b9
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                             </xsd:sequence>
                        </xsd:complexType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>
    <b>Target Schema:</b>
    <i>Message Type: PersonsListOutputMT</i>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xyz.com/scratchpad" targetNamespace="http://xyz.com/scratchpad">
         <xsd:element name="PersonsListOutputMT" type="PersonListOutputDT" />
         <xsd:complexType name="PersonListOutputDT">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   380defd37ba511dcb27400188b447e47
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Persons" maxOccurs="unbounded">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             edfc5ae07b9e11dca41b001422795f21
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="Person">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            edfc5ae17b9e11dcb186001422795f21
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                       <xsd:complexType>
                                            <xsd:sequence>
                                                 <xsd:element name="Name">
                                                      <xsd:annotation>
                                                           <xsd:appinfo source="http://sap.com/xi/TextID">
                                                           edfc5ae27b9e11dc9e93001422795f21
                                                           </xsd:appinfo>
                                                      </xsd:annotation>
                                                 </xsd:element>
                                                 <xsd:element name="Height">
                                                      <xsd:annotation>
                                                           <xsd:appinfo source="http://sap.com/xi/TextID">
                                                           edfc5ae37b9e11dcb5e1001422795f21
                                                           </xsd:appinfo>
                                                      </xsd:annotation>
                                                 </xsd:element>
                                            </xsd:sequence>
                                       </xsd:complexType>
                                  </xsd:element>
                             </xsd:sequence>
                        </xsd:complexType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>
    Message was edited by:
            xi_ted
    Message was edited by:
            xi_ted

    Hi,
    Can you please cheack your generated source and target WSDL. According to me, you need some modification in that. You can generate xd using xmlspy.
    context will be the problem in graphical mapping as well as xslt. So best is to go for java mapping for this.
    In graphical mapping you can generate required target provided you know max hirarchy for father. In that case its possible to use graphical mapping.
    -Kavita

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • Problem in mapping with xsd:restriction and xsd:enumeration

    Hello All,
    Our BPEL process is invoked from a .net client and has a JCA adapter as target. We need to map the input schema to JCA schema and the output should look like the following:
    Listing 1:
    <callMethod name='F4211FSBeginDoc' app='XMLInterop'
    runOnError='no'>
    <params>
    <param name='mnCMJobNumber' id='1'></param>
    <param name='cCMDocAction'>A</param>
    <param name='cCMProcessEdits'>1</param>
    <param name='szCMComputerID' idref='2'></param>
    <param name='cCMUpdateWriteToWF'>2</param>
    <param name='szCMProgramID'>XMLInterop</param>
    <param name='szCMVersion'>ZJDE0001</param>
    <param name='szOrderType'>SO</param>
    <param name='szBusinessUnit'> M30</param>
    <param name='mnAddressNumber'>4242</param>
    <param name='jdOrderDate'>2000/03/29</param>
    <param name='szReference'>10261</param>
    <param name='cApplyFreightYN'>Y</param>
    <param name='szCurrencyCode'></param>
    <param name='cWKSourceOfData'></param>
    <param name='cWKProcMode'></param>
    <param name='mnWKSuppressProcess'>0</param>
    </params>
    We have our JCA schema as follows:
    Listing 2:
    <types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:iwaysoftware:jde/services/JDEJAVA_CSALES/B4200310/F4211FSBeginDoc"
    xmlns:ns="urn:iwaysoftware:jde/services/JDEJAVA_CSALES/B4200310/F4211FSBeginDoc" elementFormDefault="qualified">
    <xsd:element name="jdeRequest">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="callMethod">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="params">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="param" minOccurs="0" maxOccurs="112">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:string">
    <xsd:attribute name="name" use="required">
    <xsd:simpleType>
    <xsd:restriction base="xsd:NMTOKEN">
    <xsd:enumeration value="mnCMJobNumber"/>
    <xsd:enumeration value="cCMDocAction"/>
    <xsd:enumeration value="cCMProcessEdits"/>
    <xsd:enumeration value="szCMComputerID"/>
    <xsd:enumeration value="cCMErrorConditions"/>
    <xsd:enumeration value="cCMUpdateWriteToWF"/>
    <xsd:enumeration value="szCMProgramID"/>
    <xsd:enumeration value="szCMVersion"/>
    <xsd:enumeration value="szOrderCo"/>
    <xsd:enumeration value="mnOrderNo"/>
    <xsd:enumeration value="szOrderType"/>
    <xsd:enumeration value="szBusinessUnit"/>
    <xsd:enumeration value="szOriginalOrderCo"/>
    <xsd:enumeration value="szOriginalOrderNo"/>
    <xsd:enumeration value="szOriginalOrderType"/>
    <xsd:enumeration value="mnAddressNumber"/>
    <xsd:enumeration value="mnShipToNo"/>
    <xsd:enumeration value="jdRequestedDate"/>
    <xsd:enumeration value="jdOrderDate"/>
    <xsd:enumeration value="jdPromisedDate"/>
    <xsd:enumeration value="jdCancelDate"/>
    <xsd:enumeration value="szReference"/>
    <xsd:enumeration value="szDeliveryInstructions1"/>
    <xsd:enumeration value="szDeliveryInstructions2"/>
    <xsd:enumeration value="szPrintMesg"/>
    <xsd:enumeration value="szPaymentTerm"/>
    <xsd:enumeration value="cPaymentInstrument"/>
    <xsd:enumeration value="szAdjustmentSchedule"/>
    <xsd:enumeration value="mnTradeDiscount"/>
    <xsd:enumeration value="szTaxExplanationCode"/>
    <xsd:enumeration value="szTaxArea"/>
    <xsd:enumeration value="szCertificate"/>
    <xsd:enumeration value="cAssociatedText"/>
    <xsd:enumeration value="szHoldOrdersCode"/>
    <xsd:enumeration value="cPricePickListYN"/>
    <xsd:enumeration value="mnInvoiceCopies"/>
    <xsd:enumeration value="mnBuyerNumber"/>
    <xsd:enumeration value="mnCarrier"/>
    We are not able to create a valid structure from the above schema. Our output variable looks like
    Listing 3:
    ns5:jdeRequest
         type
         session
         sessionidle
         ns5:callMethod()
              name
              app
              runOnError
              returnNullData
              trans
              ns5:params
                   ns5:param
                        name
    No variables are displayed under the 'name' tag.
    How can we map the input elements to Listing 2 and produce Listing 1? This is a bit urgent requirement for our client and any help will be greatly appreciated.

    Hi,
    With reference to your question.
    Can any operator perform this task..I don't think any single operator will help you.
    I suggest using an intermediate (staging) table by using a PL SQL procedure with output port to store the values of account number provided the number of accounts are limited. Else use an array variable for account of an employee.
    In short no simple solution because of the bad source design else the pivot/unpivot operator would have helped you.
    Cheers
    - Mohammed

  • How to generate an XML file following a XSD schema

    hi, i have a XML Schema (.xsd) and i have to generate automatically the structure of the XML according to the XSD Schema.I have been searching on the internet and found some solutions using XMLBeans and JAXB, but that`s not exactly what i am looking for. I use JDOM to parse XML and i'd wish to use only Jdom to generate XML if it's possible....Thank's

    Dear All,
    Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
    data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
    string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
    string strXmlFile = "testXmlExport.xml";
    myDataSet.WriteXmlSchema(strSchemaFile);
    myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
    but how do I export the .xml file so that is conforms with the .xsd format?
    If any of you have worked this out the answer would be most appreciated.
    All the best,
    Nick
    "Everything should be made as simple as possible, but not simpler" - Einstein

  • XSD schema to xml file generation using C#

    Hi fellow developers,
    I need small help with my current scenario.
    I have 2 xsd schemas one is input and other is output.
    Now my requirement is based on those xsd template or structure, i need to write a C# code that takes the 1 xsd template as input in xml format and then do some mapping and then set that values to 2 xsd template in xml format.
    Can you please guide or assist in this regards ??
    It would be helpful if we have the flexibility of configuring the schema properties.

    Hi
    Venky_Ferrari.
    Based on your description, your case related to XMLXSD, SO I will move your thread to
    Data Platform Development > XML, System.Xml, MSXML and XmlLite      
    forum for better support.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Schema Validation on attributes of an element in XML againt XSD schema

    Hi,
    I had generated artifact java classes from XSD schema file.Now i am validatiing one sample XML document by using these classes in JAXB.The XML document is validated successfully.but only elements are validated ,but not attributes of that elements.for example ,i am giving wrong element which is not defined inside the schema file,it throws validation error as expected ,whereas validation against wrong attributes of elements in XML it is not working anyway,it does not throw any validation errors,but it should throw validation errors.kindly help me to solve this issue.
    Here The sample validation code snippets :
    import javax.xml.bind.ValidationEvent;
    import javax.xml.bind.ValidationEventHandler;
    import javax.xml.bind.ValidationEventLocator;
    public class MyEventHandler implements ValidationEventHandler{
         public boolean handleEvent(ValidationEvent ve) {
              if (ve.getSeverity()==ValidationEvent.FATAL_ERROR ||
                        ve .getSeverity()==ValidationEvent.ERROR){
                   ValidationEventLocator locator = ve.getLocator();
                   //Print message from valdation event
                   System.out.println("Invalid booking document: "
                             + locator.getURL());
                   System.out.println("Error: " + ve.getMessage());
                   //Output line and column number
                   System.out.println("Error at column " +
                             locator.getColumnNumber() +
                             ", line "
                             + locator.getLineNumber());
              return true;
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setEventHandler(new MyEventHandler());

    Here is my analagous 'strange' behavior. I am jaxb processing and then marshalling generated classes to XML ( following the simple Sun 'PurchaseOrder' example )
    1. This works:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'>
    </xsd:complextType>
    </xsd:schema>
    2. This doesn't:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'/>
    <xsd:attribute name='name2'/>
    </xsd:complextType>
    </xsd:schema>
    That is, using more than one attribute line within this simple complex type causes nothing to be marshalled to XML.
    Ideas?

  • Update of XML syndication map when XSD is changed

    All,
    So we recently upgraded to MDM 7.1 SP 06 and found a new feature which we were waiting for quiet some time. Thought i'll share with the community as well.
    Update of XML syndication map when XSD is changed in Console
    In earlier SP's of MDM, if we had to update an XML syndication map, we had to upload the new XSD in Console, go to syndicator and basically re-create the whole map. there was no way for syndicator to preserve the old mapping.
    Well with this new feature, the old mapping is preserved, we only need to re-map the new fields.
    The process is as below:
    1. Upload the new XSD in Console.
    2. Go to syndicator and open the syndication map which you want to update(File->Open).
    3. Click File -> Update XML Schema. (this is the new option)
    4. It will give a pop-up, select the new schema you have uploaded in console and hit OK.
    5. You will get a prompt saying that syndication map is being changed, hit OK.
    6. Now you will see the new XSD in syndicator, the older fields are still mapped, you only need to map the new fields.
    It a nice feature which will definitely save lot of time. Thanks SAP
    Regards
    Aamir

    If this post answered your question or helped, please mark it as such.
    This works.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.events.DataGridEvent;
          import mx.collections.ArrayCollection;
          [Bindable] private var ac:ArrayCollection = new ArrayCollection([
            {bgColor: "0xFF0000", num: 100, name: "Test1"},
            {bgColor: "0xFF0000", num: 200, name: "Test2"},
            {bgColor: "0xFF0000", num: 300, name: "Test3"},
          private function changeBK(evt:DataGridEvent):void{
            var row:uint = evt.rowIndex;
            var data:Object = ac.getItemAt(row);
            data.bgColor = "0x00FF00";
        ]]>
      </mx:Script>
      <mx:DataGrid id="dg" dataProvider="{ac}" itemEditEnd="changeBK(event);"
        editable="true">
        <mx:columns>
          <mx:DataGridColumn dataField="num">
            <mx:itemRenderer>
              <mx:Component>
                <mx:TextArea backgroundColor="{data.bgColor}" text="{data.num}"/>
              </mx:Component>
            </mx:itemRenderer>
          </mx:DataGridColumn>
          <mx:DataGridColumn dataField="name"/>
        </mx:columns>   
      </mx:DataGrid>
    </mx:Application>

  • Loading XSD Schemas as External Definition

    Hi all,
    I am trying to load an XSD Schema into XI. As part of this schema is another external reference. I have also loaded this into XI. Looking at the 'External References' tab of the first message, I can see the reference to the second message. The problem is when I use this definition in my Message Mapping. There is not structure being seen. Has anyone else seen this before.
    The XSD schemas can be loaded into XMLSpy fine.
    Thanks
    Martin

    Hi,
    If you have tried generating this XSD using XMLspy,
    check the radio button "use complex elements" attribute instead of "individual elements". This will solve your problem.
    Regards,
    Siva Maranani

  • SOA Web Service xsd Schema Creation

    Hi,
    I want to create WebService with input Parameter as Dept Id and return data from emp table.
    eg. AFTER passing Input Dept Id = 20 WebService should RETURN below data.
    EMPNO     ENAME     JOB     MGR     HIREDATE     SAL     COMM     DEPTNO
    7369     SMITH     CLERK     7902     17-Dec-80     800          20
    7566     JONES     MANAGER     7839     2-Apr-81     2975          20
    7788     SCOTT     ANALYST     7566     9-Dec-82     3000          20
    7876     ADAMS     CLERK     7788     12-Jan-83     1100          20
    7902     FORD     ANALYST     7566     3-Dec-81     3000          20
    I created DB Adapter. However i could not create xsd schema for mapping.
    Could you please help me out how to create schema for multiple rows data.
    Thanks,
    Jit

    You should be able to use the following XSD for mapping.
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:complexType name="Request">
    <xsd:sequence>
    <xsd:element name="deptID" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Response">
    <xsd:sequence>
    <xsd:element name="empNo" type="xsd:string"/>
    <xsd:element name="eName" type="xsd:string"/>
    <xsd:element name="job" type="xsd:string"/>
    <xsd:element name="Mgr" type="xsd:string"/>
    <xsd:element name="hireDate" type="xsd:string"/>
    <xsd:element name="sal" type="xsd:string"/>
    <xsd:element name="comm" type="xsd:string"/>
    <xsd:element name="deptNo" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>

  • Binding a sequence XSD Schema to repeating subform elements

    Hi, I am creating a form with repeated table rows using an Add button to add rows dynamically. I am binding the row with the xsd schema with [*] at the end in the data binding option with checked repeat row for each data item. While submitting the form as XML data to the java controller I am getting only one table row and not other rows added dynamically by add button functionality.
    I want to know that how to generate the xml of dynamically added rows bonded with XSD schema.
    I have also explore the below link but doesn't resolve the issues:
    http://www.adobe.com/devnet/livecycle/articles/binding-xsd.html
    Thanks in advance

    I have resolved the issues by adding maxOccurs="unbounded" in xsd schema with the binded element name.

  • Need EDIFACT "DESADV" XSD Schema

    Hi,
    I need to map ASN IDOC (DELVRY) from SAP to EDI transaction type "DESADV". I need to import XSD for DESADV for mapping.
    Please help where I can find/download XSD schema for "DESADV".
    Thank you for your help,
    MK

    Hi Mallick,
    What i understand from your requirement is that you are working in IDOC to EDIFACT file scenario. Correct me if i am wrong?
    I am assuming you are using Seeburger to achieve this
    Well when you install seeburger for any EDIFACT scenario it will give you 3 standard files: 2 xml and 1 xsd.
    what you have to do, import the .xsd file in your Integration repository as target (if it is IDOC to EDI file scenario) and also import the IDOC (DELVRY) in your source and do 1:1 Pi mapping.
    After that in BIC mapper you have to import XML files and create a X2E mapping(here X2E means xml to edi mapping) and later on you have to use this mapping name in your file adapter.
    Note: BIC mapper is used to convert XML to EDI and vice versa.
    Hope this information is helpful
    Regards,
    Shradha
    Edited by: Shradha_thapliyal29 on Oct 11, 2010 8:52 AM
    Edited by: Shradha_thapliyal29 on Oct 11, 2010 8:53 AM

Maybe you are looking for