Mapping of complex structure in XI

Hi friends,
I have a RFC to SOAP scenario in XI. As a response message they have given a structure with single field in it. But when it is coming over, it has a complex structure, I need to break it to different fields in my internal table. The response I have is given below.
<Result><Response><FileID _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">1992143</FileID><AuthID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="i4">195894</AuthID><MessageList _Inserted="1"><Message _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">Domain value is invalid for field FilePriority (Client Name), Priority Type (Cartus Name) . The value received was SFNR.</Message><Message _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">The Destination Location State/Province is invalid. The State/Province was deleted and appended to City/Town. The value was Chennai.</Message><Message _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">Received Authorized Initiator (Nambissan, Rajesh) is not an active contact for client/division, Default Initiator was used.</Message></MessageList></Response></Result>
From this I need to seperate the fileid, authid, messages seperately. Can anyone please suggest how I can do that.
Thanks in advance for your help.
Anjana.

Hi,
I created a .xsl file using Altova MapForce with the result xml I got from the other system and xml created from my RFC.
I created a zip file using that .xsl and imported it in archives, and used it in Interface mapping. Now, it is not giving me any error but the mapping is not happening as I expected. I m getting some weird result.
The .xsl file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://tempuri.org/message/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="urn:sap-com:document:sap:rfc:functions" xmlns:dt="urn:schemas-microsoft-com:datatypes" exclude-result-prefixes="dt n2 xs xsi xsl" xmlns="urn:sap-com:document:sap:rfc:functions">
     <xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>
     <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
     <xsl:template match="/">
          <ns1:Z_PA_SAP_TO_CENDANT.Response>
               <xsl:attribute name="xsi:schemaLocation">
                    <xsl:value-of select="'urn:sap-com:document:sap:rfc:functions C:/DOCUME~1/asankara/Desktop/Z_PA_SAP_TO_CENDANT.xsd'"/>
               </xsl:attribute>
               <xsl:variable name="var1_instance" select="."/>
               <IT_ERROR>
                    <item><xsl:for-each select="$var1_instance/n2:AuthorizationResponse/Result/Response/MessageList/Message">
                              <ERROR_DESC>
                                   <xsl:value-of select="string(.)"/>
                              </ERROR_DESC>
                         </xsl:for-each>                      </item>
               </IT_ERROR>
               <IT_RESPONSE>
                    <item>
                         <xsl:for-each select="$var1_instance/n2:AuthorizationResponse">
                              <FILEID>
                                   <xsl:value-of select="number(string(Result/Response/FileID))"/>
                              </FILEID>
                         </xsl:for-each>
                         <xsl:for-each select="$var1_instance/n2:AuthorizationResponse">
                              <AUTHID>
                                   <xsl:value-of select="number(string(Result/Response/AuthID))"/>
                              </AUTHID>
                         </xsl:for-each>
                    </item>
               </IT_RESPONSE>
          </ns1:Z_PA_SAP_TO_CENDANT.Response>
     </xsl:template>
</xsl:stylesheet>
Should I make any changes in the file that is created in Mapforce?Please help.
Thanks,
Anjana.

Similar Messages

  • Java user-defined function for mapping a complex structure

    All,
    Hope one of you can help me with this. I have a structure with over 15 fields and would like to concatenate all the fields into one target field and while I do this, I need to ensure that each field is padded with blanks as defined the data type. Can one of tell me if this is possible with a java user-defined function and if so, what type of logic is needed.
    Input_MT
    Field_1  string len=10 "need"
    Field_2  string len=6 "java"
    Field_3  string len=7 "help"
    Field_4  string len=8  "asap"
    etc,
    Output_MT 
    DataOut string  "need      java  help   asap    "
    (for some reason the exact spaces in between the words disappear in my Preview message)
    I have several fields in the input mt and therefore I find graphical mapping using concatenate and my own user defined function padWithSpace too messy.
    Thank you for you help.

    Hi,
    If your final req is to write all these fields next each other in a file, you can configure this in receiver file adapter by specifying the fixed length for each field.
    If you want the padded string as your MM o/p, you can create a simple user defined funtion with 15 fields as input and 15 constants for their lengths, and find out the length of the each string and pad it with required no of spaces.
    int max_len = 10;
    int actual_len;
    actual_len = a.lengh();
    for(int i=0; i < (max_len-actual_len; i++)
    a = a.append(" ");
    return a;
    praveen

  • Complex structure SPLITING

    HI,
    We are working inbond scenario(FILE to proxy) with split.and sender structure as complex structure.like
    both sender and receiver structure as
    MT_DATATYPE(message type)
    HEADER(H01)----
    This is Header record .It should be come only one for entire record structure.
    RECORD_1(R1)------In each record have some nodes like R11,R12,R13....
    RECORD_2(R2)------In each record have some nodes like R21,R22,R23....
    RECORD_3(R3)
    RECORD_4 (R4)  etc..total 12 records.
    but while we are using multiuple records for testing purpose like as below
    H01,R1,R2,R4,R2,R3,R1,R4............,H01,R2,R4,R3.R4.R1.R3...........H01,R1,R3,R4.....
    so i want record target record structure as 3 set of structure becuase the test file has 3 HO1 nodes.The required target structure should be like this
    MT_DATATYPE1(Message type1)------H01,R1,R2,R4,R2,R3,R1,R4.(REQUIRED STRUCTURE)
    MT_DATATYPE2(Message type2).......H01,R2,R4,R3.R4.R1.R3.(REQUIRED STRUCTURE)
    MT_DATATYPE2(Message type3)............H01,R1,R3,R4.(REQUIRED STRUCTURE)
    Here we have to do some validation in the mapping.so atleast one mappping should be using for validation.while trying to do this validation this mapping it was showing the target structure as
    MT_DATATYPE1(Message type1)------H01,R1,R1,R2,R2,R3,R4,R4.(AS OF NOW WE ARE GETTING error OUTPUT)
    MT_DATATYPE2(Message type2).......H01,R1,R2,R3.R3,R4.R4.(AS OF NOW WE ARE GETTING error OUTPUT)
    MT_DATATYPE2(Message type3)............H01,R1,R3,R4.(AS OF NOW WE ARE GETTING error OUTPUT).
    STEP TO TRIED THIS SOLUTION:
    1.DOM parser(javamapping) also added in this structure but still getting same problem.
    2.In first mapping structure have only using  java mapiing so that  total record divided into 3 different structure like..
    MT_DATATYPE.......
    TOTALRECORD..H01,R1,R2,R4,R2,R3,R1,R4
    ToTALRECORD..,H01,R2,R4,R3.R4.R1.R3
    TOTALRECORD...H01,R1,R3,R4.....
    then the toal strucre send to receiver communication channel for receving entire strcture.Then the same structure will pick sender communication channel using FCC and i am using record strsucture per message as 1.for picking sthe single structure in the entier structuree . but still we are getting some problem.it didnt take entier single structure .It was taking like below structure.
    TOTALRECORD..H01,R1,R2,R4.
    TOTALRECORD..,R2,R3,
    TOTALRECORD..,R1,R4........still problem.
    PLease help me .may be this is high complex issue.
    Thanks
    kumar

    Hi ,
            Is there any condition for mapping the record and header .
    - Muru

  • Complex structures in Sender File adapter

    Hi Experts
    I am working on XI 3.0 SP 22. How do we handle the complex structures in sender file adapter in file content conversion.
    Please help me out.
    Regards
    Hari

    Hi,
    FCC can support upto max 3 levels, find below link for more help
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Content Conversion ( The Key Field Problem )

  • Error while creating Complex Structure

    Hi Friends,
         When I am creating a complex structure with KOMG,KONH,KONP,which are related to pricing conditions data.
    But I am getting the error as "<b>Field name 'ZZEMPL1' can already exist in a subsequent system</b>" for some of the customer fields in the KOMG structure.I am unable to understand what is the subsequent system?
    So please help me to solve this issue.
    Regards,
    Anil

    hi guru,
    just component name as --- your field name.
    where as component type as give just data element k.
    no need to give tablenme-fieldname k.
    component         component type .
    f1                        matnr----
    data element
    thanks anji.
    Moderator message: please do not use SMS speak, what does that "k" mean, short for "OK"? please get your act together, these are professional forums.
    Edited by: Thomas Zloch on Nov 15, 2010 9:10 AM

  • Problem in work flow of PE while mapping 2 source structure into 1 target

    We have scenario in BPM where in we have to mapp 2 source structure's into target.
    To be more specific one structure occurance is 0 to unbounded and other one is of single occurance.
    We have done the mapping with target structure and tested it manually in mapping . its working fine..
    While testing it in Configuration scenario, In the workflow process i.e PE process flow, we were not able to get one of the source message structure as the input Message. Instead of two source messages, it is seen only one. Please guide us in this issue.

    actually we are receiving only one message, henece we do not need a correleation. But once we receive this message we are splitting into multiple messages in the transformation step. and we use these split messages in different transformation steps. but in one of the transformation steps we are unable see one of the split messages in the transformation step(though we have used the proper container element.). Please let me know if any ideas on this.

  • How to map multiple source structures to single target structure

    Hi all,
    I have the scenario of 2 input files so i am using BPM for it. I have created the message types of the 3 input files. I have to finally generate an XML file which will contain the data of all the 2 files. That is i have to do 3:1 mapping.
    Source Structure of File 1:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>CUSTOMER</u>
       <i><b>REF_NO</b></i>
       <i><b>CUSTOMER_NO</b></i>
    Source Structure of File 2:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>METER</u>
       <i><b>REF_NO
       METER_NO</b></i>
    Target Structure of Final Output File:
    <b>DT_PWC_CustomerMeterData</b>
    <i>RECORDSET</i>
      <u>CUSTOMER_METER</u>
       <i><b>REF_NO
       CUSTOMER_NO
       METER_NO</b></i>
    Above nodes i have shown in a heirarchical order..nodes with same indentation are at same level.
    Can anybody tell me how to do this mapping in IR in graphical editor.
    RAJEEV GUPTA

    Hi,
    To elaborate my requirement, I want to tell that since i will be having 2 input files- one for Customer & one for Meter. I want to finally generate one XML file which will have data from both these 2 input files. That is, if Customer file has 3 records(3 REF_NO, 3 CUSTOMER_NO) and Meter file has 4 records(4 REF_NO, 4 METER_NO), the final output XML file  will   have 7 records(7 REF_NO, 3 CUSTOMER_NO,4 METER_NO).
    Thanks,
    Rajeev Gupta

  • Mapping List Complex Types in BPM (unbounded)

    Hello,
      I need help in how can I map a list of complex types in BPM.
      I have a list of products that brings a web service that I have to map to the process context. Both types have the same elements, but the process context BPM shows me an error because it is different of the web service.
      Please, any documentation or advice.
    Regards
    SU

    Hi,
    For mapping the complex types, you need to follow the below:
    Start by mapping the outermost node first and then mapping the attributes inside the node. Intially it will show the (types do not match) error and when you are done with all the mapping the error would vanish.
    Cheers,
    Arafat

  • Message mapping---1 source structure and n target structures

    I would like to know how many message mappings we need if we are mapping one source structure to 3 different target structures of a single receiver. I am assuming its just one message mapping.
    Depending on the above answer how many interface mappings do we need.

    Kalyan,
    you need multi-mapping that maps one source structure to multiple target structures. Just search multi mapping in SDN and you will find many good posts.
    Basically, in MM editor, go to signature tab and in the target messages add additional message types. Simple.  --> Only one MM and one IM
    Jayson

  • How to use content conversion for Complex structure

    Hi All,
    I want to know how to use content conversion for the following complex structure:
    Data               
    ...Details            1 to Unbound
    .....Header           1 to 1
    .......HF1
    .......HF2
    .......HF3
    .......ITEM           1 to unbound
    .........ITF1
    .........ITF2
    all are of type string.
    Thanks & Regards,
    Viswanath
    Message was edited by: Viswanath Mente

    Hi,
    In the content conversion,
    give ur
    1.document name as message type
    2.give ur recordstructure as Details,,Header,1,ITEM,
    3.mention ur keyfield.
    conversion parameter
    Header.fieldFixedLength - give the field lengths
    Header.fieldNames=mention all the field name
    Header.keyField=enter the value of keyfield
    Header.endSeparator='nl'
    repeat the same  for Item
    regards
    jithesh

  • How to enhance the length of standard UI element which maps to DDIC structure?

    Dear Webdynpro Expert,
    I got a requirement to enhance the length of UI element which maps to DDIC structure attribute. I have tried by using
    View Enhancement by hiding the standard UI element,
    Adding the required field in the standard structure through append structure,
    mapping the appended structure field to the UI element.
    But it shows error as data compatibility.
    Can you please share some light on it.
    Thanks.

    Hi Mohsin,
    When and where are you getting this data compatibility error???
    Try to create a new context attribute and add your new DE.
    BR,
    RAM.

  • Webinvoke put complex structure

    Hi,
    I have the following declaration:
    [OperationContract]
    [WebInvoke(Method = "PUT", UriTemplate = "svcrVCIPutBellImages? images_in={images_in}")]
    String svcrVCIPutBellImages(VCI_Bell_Images[] images_in);
    Where the array is defined as:
    #region VCI_Bell_Images
    [DataContract]
    public class VCI_Bell_Images
    public VCI_Bell_Images()
    this.acsAlarmType = " ";
    this.sImage = null;
    this.acsFileExtension = " ";
    this.acsFileName = " ";
    public VCI_Bell_Images(String acAlarmType, byte[] Image, String FileExtension)
    this.acsAlarmType = acAlarmType;
    this.sImage = Image;
    this.acsFileExtension = FileExtension;
    this.acsFileName = "none";
    public VCI_Bell_Images(String acAlarmType, byte[] Image, String FileName, String FileExtension)
    this.acsAlarmType = acAlarmType;
    this.sImage = Image;
    this.acsFileExtension = FileExtension;
    this.acsFileName = FileName;
    [DataMember]
    public String acAlarmType
    get { return this.acsAlarmType; }
    set { this.acsAlarmType = value; }
    [DataMember]
    public byte[] Image
    get { return this.sImage; }
    set { this.sImage = value; }
    [DataMember]
    public String FileExtension
    get { return this.acsFileExtension; }
    set { this.acsFileExtension = value; }
    [DataMember]
    public String FileName
    get { return this.acsFileName; }
    set { this.acsFileName = value; }
    private String acsAlarmType;
    private byte[] sImage;
    private String acsFileExtension;
    private String acsFileName;
    #endregion
    Everything about this structure is string and byte arrays.
    QueryStringConverter is supposed to handle strings and byte arrays natively.
    But I get the errors:
    Server Error in '/' Application.
    Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.InvalidOperationException: Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [InvalidOperationException: Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.]
    System.ServiceModel.Dispatcher.UriTemplateClientFormatter.Populate(Dictionary`2& pathMapping, Dictionary`2& queryMapping, Int32& totalNumUTVars, UriTemplate& uriTemplate, OperationDescription operationDescription, QueryStringConverter qsc, String contractName) +1070
    System.ServiceModel.Web.WebServiceHost.IsRawContentMapperCompatibleDispatchOperation(OperationDescription operation, Int32& numStreamOperations) +184
    System.ServiceModel.Web.WebServiceHost.SetRawContentTypeMapperIfNecessary(ServiceEndpoint endpoint, Boolean isDispatch) +244
    System.ServiceModel.Web.WebServiceHost.OnOpening() +434
    System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +265
    System.ServiceModel.Channels.CommunicationObject.Open() +36
    System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +90
    System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +598
    [ServiceActivationException: The service '/VCIWCFRServices' cannot be activated due to an exception during compilation. The exception message is: Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'..]
    System.Runtime.AsyncResult.End(IAsyncResult result) +485948
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +174
    System.ServiceModel.Activation.AspNetRouteServiceHttpHandler.EndProcessRequest(IAsyncResult result) +6
    System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +129
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212
    Ok, what do I have to do?
    Please advise
    Boyd
    But the inverse works fine:
    [OperationContract]
    [WebGet(UriTemplate = "svcrVCIGetBellImages")]
    VCI_Bell_Images[] svcrVCIGetBellImages();
    So I can GET a list of complex structures, but I cannot PUT the same structure!!!
    BDM

    Hi Boyd1,
    In my mind WCF UriTemplate does not support complex objects. So in this case you may need to stick with primary types from .NET. If you still want to use a complex object as parameter to your method, then maybe you need to drop the
    UriTemplate and pass your object using JSON.
    Best Regards,
    Amy Peng
    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.

  • Mapping of enterprise structure

    Dear Experts,
                 Right now i am doing implementation project in aluminium metal plant.Now we are in the 2nd phase of the project.So i have to map the enterprise structure of the plant.
               There are main 5 departments in the plant GAP,BAKE OVEN,RODDING,POTROOM,CASTING.Here all the departments finished products are interrelated,like GAP finished goods will go to BAKE OVEN. BAKE OVEN finished goods will go to RODDING.RODDING finihed goods will move to POTROOM.POTROOM molten metal will move to CASTHOUSE,and finally metal from CASTHOUSE will go to customers.
             So here how can i map this scenario, like i have to create 5 plants for 5 departments or 5 sections?
    Regards,
    Prashantha

    Greetings Prashantha,
    You need to approach this from a functional perspective. Define what is the Plant in SAP. A Plant is a location, which has an address, a language, time zone etc. and for this Plant the maintenance is planned as a whole on some level. Many configurations in PM are done on Plant level. Also, note that the Material Master data is maintained on Plant level.
    So taking this all into account, consider whether those elements are different for the 5 Departments you mention? I would venture a guess "no". Your departments will have distinct Functional Location hierarchy branches, distinct Planner Groups, their own Work Centres, perhaps their own Storage Locations, but I assume they will have the same processes, the same Company Code, the same high-level Maintenance Planning Plant, the same Order Types. So it is probably reasonable to use Plant Sections, Planner Groups etc. to differentiate below the Plant level.
    But of course, this is dependent on your business and how it is organised.

  • Display a complex structure for edit - BUS_EI_EXTERN

    Good day Everyone
    I need to display a complex structure (BUS_EI_EXTERN) to a user in a BSP and allow the user to change one or more required fields of this structure. I thought about using a recersive algorithm to iterate through the structure and display the table names in a tree. When the user clicks on a node (table) they will get a list of all the attributes of the table which they can edit.
    Would this be the 'easiest' route to go?
    I tried to use LVC_FIELDCATALOG_MERGE to get the attributes of the structure, unfortunantly it flattens the structure, any other way i can try and go through the structure?
    I dont suppose there is a nice function module that already does what i want?
    Thank you for all your help.
    Sincerely,
    Marc

    Hi,
    use function DDIF_FIELDINFO_GET to get the information about any structure/table and in its parameter DFIES_TAB you get the data that you need.
    Later you can build your tree with that data.
    Regards

  • Complex mapping with deep structure

    Hi all,
    I need to create a complex mapping as follows:
    Source message:
    CreateOrder (0..1)
    -sell-order (0..1)
    --items-sell-order (0..1)
    ---items-sell-request (0..unbounded)
    sell-discount (0..1)
    sell-discount (0..unbounded)
    discount-id (0..1)
    discount-quantity (0..1)
    description (0..1)
    Target message:
    MT_xxxx
    -ORDER_V3 (0..1)
    --TDESC (0..1)
    ---item (0..unbounded)
    ITEM_NUMBER (0..1)
    discount (0..unbounded)
    REASON (0..1)
    VALUE (0..1)
    DESCRIPTION (0..1)
    --TPLUGIN (0..1)
    ---item (0..unbounded)
    ITEM_NUMBER (0..1)
    discount (0..unbounded)
    ID (0..1)
    QUANTITY (0..1)
    The mapping has some rules:
    If sell-order - items-sell-order - items-sell-request - sell-discount - sell-discount - discount-id .length > 0 then the structure TPLUGIN must be filled
    else
      the structure TDESC must be filled
    The problem is: the field ITEM_NUMBER is an index that is unique and must increment each record of node items-sell-request, and it is not mandatory an item to have discounts.
    When I test with n items and all items with discount node, it works perfect. However, if I put for example 10 items in the source array, and for example the records 5 and 6 doesn't have discounts, the association item x discount makes the mapping get lost and mess all the target nodes.
    Could anyone help me?
    Thanks in advance.
    Ricardo.

    Hi Luis,
    An example for source message could be something like:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:CreateOrder>
       <ns0:sell-order>
          <ns1:items-sell-order>
             <ns1:items-sell-request>
                <ns1:sell-discount>
                   <ns1:sell-discount>
                      <ns1:discount-id>1</ns1:discount-id>
                      <ns1:discount-quantity>10</ns1:discount-quantity>
                      <ns1:description>Description1</ns1:description>
                   </ns1:sell-discount>
                <ns1:sell-discount>
                      <ns1:discount-id>2</ns1:discount-id>
                      <ns1:discount-quantity>20</ns1:discount-quantity>
                      <ns1:description>Description2</ns1:description>
                   </ns1:sell-discount>
                </ns1:sell-discount>
             </ns1:items-sell-request>
          <ns1:items-sell-request>
                    *other fields not mentioned here, without sell-discount node*
             </ns1:items-sell-request>
               <ns1:items-sell-request>
                <ns1:sell-discount>
                   <ns1:sell-discount>
                      <ns1:discount-id>A</ns1:discount-id>
                      <ns1:discount-quantity>50</ns1:discount-quantity>
                      <ns1:description>DescriptionA</ns1:description>
                   </ns1:sell-discount>
                   <ns1:sell-discount>
                      <ns1:discount-id>B</ns1:discount-id>
                      <ns1:discount-quantity>100</ns1:discount-quantity>
                      <ns1:description>DescriptionB</ns1:description>
                   </ns1:sell-discount>
                   <ns1:sell-discount>
                      <ns1:discount-id>C</ns1:discount-id>
                      <ns1:discount-quantity>200</ns1:discount-quantity>
                      <ns1:description>DescriptionC</ns1:description>
                   </ns1:sell-discount>
                </ns1:sell-discount>
             </ns1:items-sell-request>
               <ns1:items-sell-request>
                <ns1:sell-discount>
                   <ns1:sell-discount>
                      <ns1:discount-id>I</ns1:discount-id>
                      <ns1:discount-quantity>400</ns1:discount-quantity>
                      <ns1:description>DescriptionI</ns1:description>
                   </ns1:sell-discount>
                   <ns1:sell-discount>
                      <ns1:discount-id>II</ns1:discount-id>
                      <ns1:discount-quantity>500</ns1:discount-quantity>
                      <ns1:description>DescriptionII</ns1:description>
                   </ns1:sell-discount>
                </ns1:sell-discount>
             </ns1:items-sell-request>
          </ns1:items-sell-order>
       </ns0:sell-order>
    </ns0:CreateOrder>
    And an example for target message related to this source is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns2:MT_xxxx">
    <ORDER_V3>
         <TDESC>
              <item>
                   <ITEM_NUMBER>4</ITEM_NUMBER>
                   <discount>
                        <REASON>I</REASON>
                        <VALUE>400</VALUE>
                        <DESCRIPTION>DescriptionI</DESCRIPTION>
                   </discount>
              </item>
         </TDESC>
         <TPLUGIN>
              <item>
                   <ITEM_NUMBER>1</ITEM_NUMBER>
                   <discount>
                        <ID>1</ID>
                        <QUANTITY>10</QUANTITY>
                   </discount>
                   <discount>
                        <ID>2</ID>
                        <QUANTITY>20</QUANTITY>
                   </discount>
              </item>
              <item>
                   <ITEM_NUMBER>3</ITEM_NUMBER>
                   <discount>
                        <ID>A</ID>
                        <QUANTITY>50</QUANTITY>
                   </discount>
                   <discount>
                        <ID>B</ID>
                        <QUANTITY>100</QUANTITY>
                   </discount>
                   <discount>
                        <ID>C</ID>
                        <QUANTITY>200</QUANTITY>
                   </discount>
              </item>
         </TPLUGIN>
    </ORDER_V3>
    </ns2:MT_GerarOrdVd_req>
    Edited by: Ricardo Guedes on Oct 20, 2011 3:03 AM

Maybe you are looking for