Graphical mapping issue

Hi gurus,
we need help for following graphical mapping problem.
Our input message structure and payload is like;
<MT_INPUT>
     <Header>
          <VendorName>GREEN IT</VendorName>
     </Header>
     <Records>
          <MType>T</MType>
          <Unit>KG</Unit>
          <MS>40</MS>
     </Records>
     <Records>
          <MType>S</MType>
          <Unit>STK</Unit>
          <MS>2</MS>
     </Records>
     <Records>
          <MType>S</MType>
          <Unit>STK</Unit>
          <MS>5</MS>
     </Records>
     <Records>
          <MType>T</MType>
          <Unit>KG</Unit>
          <MS>30</MS>
     </Records>
     <Records>
          <MType>S</MType>
          <Unit>STK</Unit>
          <MS>3</MS>
     </Records>
</MT_INPUT>
We need only the values with Mtype = T
needed output message is like;
<MT_OUTPUT>
     <Header>
          <VendorName>GREEN IT</VendorName>
     </Header>
     <Records>
          <Type>Total</Type>
          <Unit>KG</Unit>
          <VALUE>40</VALUE>
     </Records>
     <Records>
          <Type>Total</Type>
     </Records>
     <Records>
          <Type>Total</Type>
     </Records>
     <Records>
          <Type>Total</Type>
          <Unit>KG</Unit>
          <VALUE>30</VALUE>
     </Records>
     <Records>
          <Type>Total</Type>
     </Records>
</MT_OUTPUT>
Kind Regards,
PM

MType---
------      equals-----if withoutelse(Unit----then) ------UNIT
Constant("T")---
MType---
------      equals-----if withoutelse(ms----then) ------VALUE
Constant("T")---

Similar Messages

  • Graphical mapping issue with useOneAsMany if segment does not exist

    Hi all
    I have an issue with graphical mapping in an IDoc to file scenario. I need to have header level fields mapped to line item fields. Whether or not and how many source header segments of the same type exist depends on a qualifier (QUALF). This is generally working if I use the following graphical mapping:
    if QUALF = 001 then <source>  ->  removeContext  ->  useOneAsMany  ->  splitByValue  ->  <target>
    ... with setting QUALF, <source>, and the second input for the useOneAsMany to the highest possible context node.
    Nevertheless, if the segment with the qualifier 001 does not exist in the source then the mapping throws the error "Too few values in first queue in fuction useOneAsMany". Whatever I've tried, the mapping wants to execute the useOneAsMany statement anyway and I haven't found a way to omit this. Whether the target would be created with an empty value or not created at all would be secondary. Would eventually somebody have a solution to this problem?
    Thanks in advance,
    Daniel

    Daniel,
    try using mapWithDefault function before useAsmany
    if QUALF = 001 then <source> -> removeContext -> <b>MapwithDefault</b>->useOneAsMany -> splitByValue -> <target>
    I think it takes care even if the value occur in the contaxt or.
    Babu

  • Graphical Mapping Issue in PI 7.1

    Hi experts
    I am working on a Proxy to SOAP, 
    Business Partner has been defined as Table on the sender side which is maaped to Claims Party, (Unbounded)
    I have Injury Nature Desc, BodyPart Code1, Bodypart Code2, Bodypart Code3, Bodypart Code4,Bodypart Code5 defined on the sender side Outside of the Business Partner under the proxy (sender) which are needs to be mapped to Injury Nature Desc, BodyPart Cd1, Bodypart Cd2, Bodypart Cd3, Bodypart Cd4,Bodypart Cd5 which are defined as part of the Claims Party (Unbounded)
    I have mapped the value by using the graphical method, but I get the values of Injury Nature Desc, BodyPart Code1, Bodypart Code2, Bodypart Code3, Bodypart Code4,Bodypart Code5  only on the first Business Partner,
    actually I need Injury Nature Desc, BodyPart Code1, Bodypart Code2, Bodypart Code3, Bodypart Code4,Bodypart Code5 values also on the 2nd or 3rd Business Partner as well
    I tried by using UseoneAsmany function also, but it did not work, How can I map the values to all business parners on the receiver side,
    Thanks a lot for the inputs
    PR

    Hi
    I did not get
    I have node as Follows on the receiver side,
    Claimsparty   - (0- Unbounded) /  ClaimsInjueredInfo (0- Unbounded) / ClaimsInjury (0- Unbounded) / InjuryNatureDesc
    I mapped as
       (sender)  Ns1:InjuryDescription -
    >RemoveContext----
    >InjuryNatureDesc  (Receiver) 
    (Sender side)BusinessPartner has been Mapped to ClaimsParty(receiver)
      Ns1:InjuryDescription  is Outside of the Business Partner
    Thanks
    PR
    Edited by: PR on Sep 29, 2009 2:45 PM

  • Graphical mapping issue, repeated lines are not populating

    Hello All,
    i have mapping where i need to map source node and its coresponding subelements to target node and its subelemtns based on certains condition, which i did using If condition.
    Now my issue is, when mapped source node with condition , conditional field is not in the same node which i am mapping. It is in the parent node of the node which i am mapping. SO when i mapped to target node, only one occurence only its populating in target side even When lines repeated more than once its not populating all lines corespondingly. Please let me know how to populate all line items when i have validation field in parent node and child node and its subelemnts to be mapped to the target node. ( Both parent node and sub node in source and target node are unbounded) .
    Thanks in advance.
    Regards,
    Kalpana

    Thanks for your reply, My source structre looks like below.
    I have to map rows node and its coresponding fields to target node Lines which is unbounded and to its subelements when collection name = 'MATGRP_COLLN'.  I did it using if condition but , only one row tis getting populated in target LIne node. next repeated row values are not populating in target side.
    - <extensions>
    + <collection name="REGION_COLLN" />
    +  <collection name="DIVISION_COLLN" />
    + <collection name="DTL_PRCNG_COLLN" />
    + <collection name="COUNTRY_COLLN">
    - <collection name="MATGRP_COLLN">
    - <row>
    - <fields>
      <OBJECTID>-2147483540</OBJECTID>
      <UNIQUE_DOC_NAME>-21474835401248121690973</UNIQUE_DOC_NAME>
      <DISPLAY_NAME />
      <MATGRP_ITEM_NO>1</MATGRP_ITEM_NO>
      <MATGRP_NAME>10100000</MATGRP_NAME>
      </fields>
      </row>
    - <row>
    - <fields>
      <OBJECTID>-2147483539</OBJECTID>
      <UNIQUE_DOC_NAME>-21474835391248121706160</UNIQUE_DOC_NAME>
      <DISPLAY_NAME />
      <MATGRP_ITEM_NO>2</MATGRP_ITEM_NO>
      <MATGRP_NAME>10101500</MATGRP_NAME>
      </fields>
      </row>
      </collection>
      </extensions>
      </object>
      </objects>
      </fcidataexport>

  • Graphical mapping issue in PI

    HI ,
    I have a situation like this
    First queue also has some values which are indexed from 1-186. These values are with remove context.second input has a queue like 186 , 2. second queue has this numbers without context change. The out put should have a context change in a first queue based on the second queue
    in more detailed way :- first context change in the output should have after 185 indexed value that means in second queue - first value subtract 2 and from next value onwards in second queue we should subtract 1. so the next context change will be after 186th indexed value.

    Hi,
    Try using formatbyexample function for achiving this. The exact way to use it can be checked on help.sap
    Hope this helps.
    Regards,
    Siddhesh S.Tawate

  • Issue with a graphical mapping -

    Hi folks,
    I have an issue with a graphical mapping.
    We are replicating the Material Master, with an interface of ECC -> PI -> JDBC.
    The idoc we are using is the MATMAS.MATMAS05, and in the database we created 5 tables, simulating the structure of the source idoc. The tables are: MARA, MARC, MARD, MBEW, MAKT.
    The fact is that we need some data of some segments (tables) in another ones.
    In this case we I need to take a value of the segment E1MARCM (MARC) to the MBEW table. The value is: SERNP.
    The condition to copy that value is the centre (WERKS). So, the condition will be:
    If  MBEW-WERKS == MARC-WERKS,
      then  MBEW-SERNP = MARC-SERNP.
    The problem I'm having is that I have to lookup in many different E1MARCM segments, and the relation is not 1...1, nor, E1MBEWM is a child of it (they are in the same level.)
    For example there could come:
    - E1MARCM_1  (WERKS = 0001)
    - E1MARCM_2  (WERKS = 0002)
    - E1MARCM_3  (WERKS = 0003)
    - E1MBEWM_1 (WERKS = 0001)
    - E1MBEWM_2 (WERKS = 0002)
    - E1MBEWM_3 (WERKS = 0002)
    - E1MBEWM_4 (WERKS = 0003)
    - E1MBEWM_5 (WERKS = 0003)
    Am I clear with the requirement?
    Any answer will be greatly appreciated.
    Thanks in advance.
    .Juan.

    Hey folks, any advice or input about this?
    Thanks again.
       Juan

  • Message mapping issue in idoc to jdbc scenario

    We have a scenario of  idoc->XI-JDBC
    the below given segment may get repeated , as shown below ,
    E1EDP19[2]--idoc segment
       QUALF---003
       IDTNR---01000123(Bar Code No)
    E1EDP19[3]--idoc segment
       QUALF---003
       IDTNR---20500000000034(EAN No)
    Reqd mapping
    if QUALF=003
    THEN IDTNR----->Bar_code_Number_EAN
    Now IDTNR has to be mapped with Bar_code_Number_EAN for the segment which comes last
    Pl suggest how to map using graphical mapping for the above scenario.

    Hi Raj ,
    The current mapping works fine if the parent segment E1EDP01 is only one but if that gets repeated then the last value of IDTNR is getting populated in the target side, very clearly i m giving the source and target structure and the mapping done using the UDF
    Source structure
    E1EDP01
           E1EDP19[1]--idoc segment
                  QUALF---002
                  IDTNR---01000123(Bar Code No)
           E1EDP19[2]--idoc segment
                  QUALF---003
                  IDTNR---01000123(Bar Code No)
           E1EDP19[3]--idoc segment
               QUALF---003
               IDTNR---20500000000030(EAN No)
    E1EDP01
         E1EDP19[1]--idoc segment
                    QUALF---002
                    IDTNR---01000123(Bar Code No)
         E1EDP19[2]--idoc segment
                   QUALF---003
                   IDTNR---01000123(Bar Code No)
          E1EDP19[3]--idoc segment
                 QUALF---003
                 IDTNR---20500000000031(EAN No)
    E1EDP01
           E1EDP19[1]--idoc segment
                   QUALF---002
                    IDTNR---01000123(Bar Code No)
          E1EDP19[2]--idoc segment
                  QUALF---003
                  IDTNR---01000123(Bar Code No)
         E1EDP19[3]--idoc segment
              QUALF---003
              IDTNR---20500000000032(EAN No)
    Target mapping
    if QUALF=002
    THEN IDTNR--->Article_No this is the direct mapping so , no issues
    if  QUALF=003
    THEN IDTNR----->Bar_code_Number_EAN, now this IDTNR should get repeated every time  the segment  E1EDP01 gets repeated , currently only the last value form all the  IDTNR is coming to the target side.
    The current mapping works fine if the parent segment E1EDP01 is only one
    Target structure
    Access1
    IDTNR--> Bar_code_Number_EAN( value is 20500000000030)
    Access2
    IDTNR--> Bar_code_Number_EAN( value is 20500000000031)
    Access3
    IDTNR--> Bar_code_Number_EAN( value is 20500000000032)
    Current mapping
    If QUALF = 003
                    Then  QUALF ---->
                                                     mapBarCodeEAN---->Bar_code_Num_EAN
    If QUALF = 003
                    Then  IDTNR ---->
    Context of QUALF is set to E1EDP01
    Context of IDTNR is set to  E1EDP01
    thanks for your personalised help
    rgds
    mojib
    Edited by: mohammad mojib ur rahman on Apr 9, 2010 1:30 PM

  • IDOC mapping issue (calculation using parent and child fields)

    We are mapping an IDOC to a file for output to a third party.  The IDOC has many segments, some of which are embedded.  This is where I'm having the issue.  I am trying to perform a calculation on a field from the parent node (E1EDP01-MENGE) with the field from the child node (E1EDP05-KRATE) to determine the total tax for that line (qty X rate). 
    <b>Issue:</b> The mapping that is in place is using the same MENGE value for all calculations, even where the E1EDP01 segment is not a parent of the E1EDP05 segment. 
    Please review the screen prints and explain how I can correctly group the E1EDP05 child segments rate field (KRATE) with the corresponding parent segment E1EDP01 quantity (MENGE).
    <b>Example:</b>
    Parent segment, E1EDP01 / Child segment E1EDP05 (There are many E1EDP05 segments for 1 E1EDP01 segment)
    E1EDP01 (parent node)
      E1EDP05 (child node)
    <b>Target structure</b>
    ITEM (parent) --->E1EDP01 is mapped at node level
      -->ITEM_DATA --->E1EDP01 is mapped at node level
      -->ITEM_TAX --->E1EDP01 is mapped at node level
           -->(fields for item_tax)
           -->Record type
           -->Invoice number
           -->Line total
           -->etc...
    I am mapping (E1EDP01-MENGE) for calculation with (E1EDP05-KRATE) to determine tax at the line item level. I have the context set at each Node, E1EDP01 for MENGE and E1EDP05 for KRATE.  I was using CopyValue, but this was using the frist occurence of MENGE for all line items.
    <b>mapping example</b>
    <u><b>*I am using MENGE (Copy_Value) then multiplying by KRATE to get the line item total.  This was causing the same MENGE (because of Copy_Value) for all line items.</b></u>
    E1EDP01-MENGE|Copy_Value|MULT--->TAX_ITEM-LINE_TOTAL
    E1EDP05-KRATE|
    I removed the CopyValue and now I'm getting the following error:
    Cannot produce target element /ns0:MT_DTN_INVOICE1/INVOICE/ITEM/ITEM_TAX[3]/LINE_TOTAL. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    How can I map this so the child records (E1EDP05) are grouped with the correct parent records (E1EDP01)?
    Thanks in advance!
    Michael

    Check this blog:
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    Regards
    Stefan

  • Help in graphical mapping needed

    Hi,
    i have a graphical mapping where the scenario is that in input we have the following structure
    header0
    header1----
    occurances 1-unbounded
    header2----
    occurances  1-2
    in the output i have to get the below structure
    header0
    header1----
    occurances 1-unbounded
        |--header2---occurances 1-2
    So i have done a one onone mapping
    if my inp xml is like the one given below it works
    <header0>
    <value1>099</value>
    </header0>
    <header1>
    <value1>09</value>
    </header1>
    <header2>
    <value1>hjjd</value>
    </header2>
    <header2>
    <value1>094f9</value>
    </header2>
    But if the input is like the one given below its not working
    <header0>
    <value1>099</value>
    </header0>
    <header1>
    <value1>09</value>
    </header1>
    <header2>
    <value1>hjjd</value>
    </header2>
    <header2>
    <value1>094f9</value>
    </header2>
    <header1>
    <value1>09769</value>
    </header1>
    <header2>
    <value1>09469</value>
    </header2>
    i.e., if header1 repeats its not working can anyone help me in this issue
    Thanks in advance,
    Bhargav.

    Hey Rajeev,
    i had activated it and i can also see that in my message mapping.but still its not working.
    Hey raj,
    As suggested by you i have used splitbyvalue in between header1 in source and header1 in target than the output that was generated is diferrent from that i wanted.The output it generated is
    <header0>
    <value1>099</value>
    </header0>
    <header1>
    <value1>09</value>
    </header1>
    <header2>
    <value1>hjjd</value>
    </header2>
    <header2>
    <value1>094f9</value>
    </header2>
    <header2>
    <value1>09469</value>
    </header2>
    but the actual output to be generated should be as gievn in the topmost post.here the header2 under the second header1 is coming under the first header1 only and the second ocurance of header1 is not replicating in the output.
    Thanks,
    Bhargav

  • Performance of an UDF v/s standard graphical mapping functions

    Hello Experts,
    I would like to get your opinion/comments on the performance issues with respect to speed of execution when using graphical functions for doing the date conversion requirement given below:
    Requirement is to convert input date u20182008-12-03u2019 from the source side to u201820081203u2019 on the target side.
    We have used the standard graphical mapping functions 'substring' & 'replacestring' for doing this conversion as explained here: The u2018substringu2018 function is used to capture the part of the string from the source. A u2018constantu2019 with value u2018u2013u2018 is replaced by u2018constantu2019 (empty value) by using the standard text function u2018replaceStringu2019 in the target side.
    We did the same using the following UDF too:
    public String convertDate(String dateStringInOriginalFormat) {
                SimpleDateFormat originalFormatter = new SimpleDateFormat("yyyy-MM-dd");
                SimpleDateFormat newFormatter = new SimpleDateFormat("yyyyMMdd");
                ParsePosition pos = new ParsePosition(0);
                Date dateFromString = originalFormatter.parse(
                            dateStringInOriginalFormat, pos);
                String dateStringInNewFormat = newFormatter.format(dateFromString);
                return dateStringInNewFormat;
    From a critical performance point of view, which approach will fare better?
    Thanks in Advance,
    Earnest A Thomas
    Edited by: Earnest Thomas on Dec 4, 2008 6:54 AM

    Hi,
    Not only in this case but in general it is always better to use the functions available in MM and only if your requirement is not satisfied with the standard mapping functions then go for UDF.
    Also for your requirement no need of going for substring....you can directly use the DateTransform function available.
    Source --> DateTransform --> Target
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Dec 4, 2008 11:25 AM

  • Mapping issue with context again

    I again need help with a mapping issue. I don’t know how to handle the contexts to get this working in the xi graphical mapping tool.  I have previously logged a question regarding this structure but the requirements have now changed. 
    I have a source document that has multiple delivery line items and for each delivery line item, there are multiple handling units. Each handling unit contains the line number of the delivery line item it belongs to. This structure has been simplified below.
    <b><u>Source Sample</u></b>
    <DOCUMENT>
    <DELIVERY_LINEITEM>
    <LINENUMBER>10</LINENUMBER>
    <MATERIAL>mat 1</MATERIAL>
    </DELIVERY_LINEITEM >
    <DELIVERY_LINEITEM >
    <LINENUMBER>20</LINENUMBER>
    <MATERIAL>mat 2</MATERIAL>
    </DELIVERY_LINEITEM >
    <HANDLING_UNITS>
    <HU_LABEL>123</HU_LABEL>
    <HU_ITEM>
    <LINENUMBER>10</LINENUMBER>
    </HU_ITEM>
    </HANDLING_UNITS>
    <HANDLING_UNITS>
    <HU_LABEL>456</HU_LABEL>
    <HU_ITEM>
    <LINENUMBER>10</LINENUMBER>
    </HU_ITEM>
    </HANDLING_UNITS>
    <HANDLING_UNITS>
    <HU_LABEL>789</HU_LABEL>
    <HU_ITEM>
    <LINENUMBER>20</LINENUMBER>
    </HU_ITEM>
    </HANDLING_UNITS>
    </DOCUMENT>
    <u><b>Source Structure</b></u>
    DOCUMENT 1..1
    DELIVERY_LINEITEM 1..unbounded
    LINENUMBER 1..1
    MATERIAL 1..1
    HANDLING_UNITS 1..unbounded
    HU_LABEL 1..1
    HU_ITEM 1..1
    LINENUMBER 1..1
    In the target structure, I need to output each handling unit along with the corresponding DELIVERY_LINEITEM material.  Target structure has been simplified below:
    <u><b>Target Sample</b></u>
    <DOCUMENT>
    <ROW>
    <PACKAGING>
    <HU_LABEL>123</HU_LABEL>
    </PACKAGING>
    <PACKAGING_ITEM>
    <LINENUMBER>10</LINENUMBER>
    <MATERIAL>mat 1</MATERIAL>
    </PACKAGING_ITEM>
    </ROW>
    <ROW>
    <PACKAGING>
    <HU_LABEL>456</HU_LABEL>
    </PACKAGING>
    <PACKAGING_ITEM>
    <LINENUMBER>10</LINENUMBER>
    <MATERIAL>mat 1</MATERIAL>
    </PACKAGING_ITEM>
    </ROW>
    <ROW>
    <PACKAGING>
    <HU_LABEL>789</HU_LABEL>
    </PACKAGING>
    <PACKAGING_ITEM>
    <LINENUMBER>20</LINENUMBER>
    <MATERIAL>mat 2</MATERIAL>
    </PACKAGING_ITEM>
    </ROW>
    </DOCUMENT>
    <u><b>Target Structure</b></u>
    DOCUMENT 1..1
    ROW 1..unbounded    
    PACKAGING 1...1
    HU_LABEL 1..1
    PACKAGING_ITEM 1..1
    LINENUMBER 1..1
    MATERIAL 1..1
    Note, 1 ROW in the target structure = 1 HANDLING_UNITS from the source structure.
    Can anyone help me to achieve this? I do not know how to map the relevant DELIVERY_LINEITEM\MATERIAL from the source structure to the target structure.

    JM,
    Please find the solution. Reply back if it helps or not
    http://www.flickr.com/photo_zoom.gne?id=1045178998&size=o
    http://www.flickr.com/photo_zoom.gne?id=1045179010&size=o
    http://www.flickr.com/photo_zoom.gne?id=1045179022&size=o
    Results :http://www.flickr.com/photo_zoom.gne?id=1045179134&size=o
    <b>Code used:</b>
    for(int j=0;j<Handling_Linenum.length;j++)
    for(int k=0;k<Delivery_Linenum.length;k++)
    if(Handling_Linenum[j].equals(Delivery_Linenum[k]))
    result.addValue(""Material[k]"");
    result.addContextChange();
    Best regards,
    raj.

  • My 'IF THEN ELSE' possible with graphical mapping tool ?

    Hello,
    Being new to XI I got into some issues during message mappings.
    I want to say:
    if externrole = 'BY'
       then saprole = 'AG' and sappartner = externpartner.
    else.
    if externrole = 'DP'
       then saprole = 'WE' and sappartner = externpartner.
    endif.
    I try this with the graphical mapping. Is this possible ?
    How do I link two standard 'if' functions together.
    Robert

    Hi Robert,
    This is possible by graphical mapping. Do the mapping in the following way.
    ->Use if with else
      *if--->externrole EqualsS AG
      *then->AG[Constant]
      *Else->o\p of the following IF w\o Else.
      *O\p-->saprole
    ->If without Else
      *if--->externrole EqualsS DP
      *then->WE[Constant]
    ->For sappartner map it to externalpartner.
    Hope this helps.
    Regards,
    Jesse.
    Message was edited by: Jesse George

  • 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

  • UDF or Graphical Mapping

    Hello All
    I have a requirement like below:
    Source fields              
    TXT                                 
    AddTXT
    Target Field
    Node
    I want to create Node as many times as AddTXT comes with value Concatinate(TXT+AddTXT). This I have achieved not a issue.
    Now I want concatinate should happen only for 1st Node other nodes should contain only value of AddTXT.
    e.g.
    TXT = 001
    AddTXT = James
    AddTXT = Dheeraj
    AddTXT = Rajesh
    Result should be
    Node = 001-James
    Node = Dheeraj
    Node = Rajesh
    I believe using Graphical mapping this is not possible so how can I achieve this using UDF.
    Thanks
    Dheeraj Kumar

    Hi Dheeraj
    Please use the below code.
    In the UDF
    TXT = var1
    AddTXT = var2
    Regards
    Osman

  • Graphical Mapping Help

    Hi
    I am trying to sort idoc segments based on values like below. I have written XSLT before which just broken after applying SPs. i need a break fix immediately before SAP look into the SP issue.
    Now i am leaning towards graphical map. Please help with this
    Sample Structure
    <E1EDL37>
    <EX1DV>0000000000101</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000102</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000103</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000104</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000201</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000202</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000203</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000204</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EXIDV>0000000000200</EXIDV>
    <VHILM>RFID_PALL</VHILM>
    <E1EDL44>
    <EXIDV>0000000000201</EXIDV>
    <EXIDV>0000000000202</EXIDV>
    <EXIDV>0000000000203</EXIDV>
    <EXIDV>0000000000204</EXIDV>
    </E1EDL37>
    <E1EDL37>
    <EXIDV>0000000000100</EXIDV>
    <VHILM>RFID_PALL</VHILM>
    <E1EDL44>
    <EXIDV>0000000000101</EXIDV>
    <EXIDV>0000000000102</EXIDV>
    <EXIDV>0000000000103</EXIDV>
    <EXIDV>0000000000104</EXIDV>
    </E1EDL37>
    Here is the output i am looking for
    <E1EDL37>
    <EXIDV>0000000000100</EXIDV>
    <VHILM>RFID_PALL</VHILM>
    <E1EDL44>
    <EXIDV>0000000000101</EXIDV>
    <EXIDV>0000000000102</EXIDV>
    <EXIDV>0000000000103</EXIDV>
    <EXIDV>0000000000104</EXIDV>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000101</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000102</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000103</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000104</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EXIDV>0000000000200</EXIDV>
    <VHILM>RFID_PALL</VHILM>
    <E1EDL44>
    <EXIDV>0000000000201</EXIDV>
    <EXIDV>0000000000202</EXIDV>
    <EXIDV>0000000000203</EXIDV>
    <EXIDV>0000000000204</EXIDV>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000201</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000202</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000203</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>
    <E1EDL37>
    <EX1DV>0000000000204</EX1DV>
    <VHILM>RFID_CASE</VHILM>
    </E1EDL37>

    Hello,
    This can be done using graphical mapping and without udf. See mapping below:
    Legend: rc = removeContext, sBV = splitByValue :EV = eachValue :VC = ValueChanged, mWd = mapWithDefault
    fBe = formatByExample
    For E1EDL37
    E1EDL37 -> E1EDL37
    For EX1DV
    EX1DV -> rC -> sort:ascending -> sBV:EV -> EX1DV
    For VHILM
    EX1DV -> rC -> sortByKey:ascending -> sBV:EV -> VHILM
    VHILM -> rC -> /
    Now for the fun part
    For E1EDL44
                          EX1DV -> UseOneAsMany (2,3) -> rC -> sortByKey:ascending -----> fBE -> equalsS: -> not -> ifWithoutElse (output of fBE is mapped to then) -> E1EDL44
    EXIDV(setContextTo E1EDL37) -> mWd: -> /                                                / Constant: /
                          EX1DV -> UseOneAsMany (2,3) -> rC -> sort:ascending -> sBV:VC -> /
    EXIDV(setContextTo E1EDL37) -> mWd: -> /
    For EXIDV
                              EX1DV -> UseOneAsMany (2,3) -> rC -> sortByKey:ascending -----> fBE -> equalsS: -> not -> ifWithoutElse (output of fBE is mapped to then) -> sBV:EV -> EXIDV
    EXIDV(setContextTo E1EDL37) -> mWd: -> /                                                / Constant: /
                          EX1DV -> UseOneAsMany (2,3) -> rC -> sort:ascending -> sBV:VC -> /
    EXIDV(setContextTo E1EDL37) -> mWd: -> /
    Hope this helps,
    Mark

Maybe you are looking for

  • Which FireWire Cable for Macbook Pro to Macbook Pro Migration Assistant?

    Hi, I've just purchased a new Macbook Pro 15" (standard - not retina display) and am planning to transfer my files via the Migration Assistant. My question is, I currently have a mid 2009 macbook pro (2.8GHz, 4GB) and was wondering which firewire cab

  • Types of users

    hi guys, can you explain me the types of users (power, core, end or biz users) in terms of which i can relate say eg ceo etc and their roles in terms of usage of BW reports, can you also mention the volume of users in  a typical data-consuming MNC. t

  • Using the iphone with Bose headphones

    I had trouble using the phone function on my iPhone with Bose over-the-ear sound cancelling headphones, connecting the two with a Bose connector with a mouthpiece (http://www.bose.com/controller?url=/shoponline/headphones/noise_cancelling_headphones/

  • Cursor problem - intermittent selecting and moving cursor left and up

    Hi there. I have an intermittent problem. It doesn't happen all the time. It seems to happen when my mac has been on for say longer than half an hour. When I use either the trackpad or mighty mouse to select something, say a folder which has 10 files

  • String won't accept a backslash char

    I'm trying to refer to a file on my Cdrive in Windows XP. java.io.File file = new java.io.File("C:\myFile.pdf"); The compiler won't accept this.