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.

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

  • Mapping Issue with UDF

    I am in the middle of doing a webservice call from within a UDF.
    The problem is that when I am declaring my message part of the definition is a url. So I am trying to declare a string like the following:
    String m = "<?xml version="1.0" encoding="UTF-8"?><msgType xmlns:ns0=http://www.webservice.com ......
    Now my problem is with the
    xmlns:ns0=http://www.webservice.com
    // is a comment in java so everything after this is being seen as a comment how do I solve this issue?
    I had the same issue with "
    "<?xml version="1.0" encoding="UTF-8"?>
    but I solved it using \ like the following:
    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    The problem is this is working for the //

    Hi Alex,
    I had a scenario like this in the past.
    In most cases you call Services for Lookups.
    In such a Case use the
    Com.sap.aii.mapping.lookup.api and use the accessor and the lookup services for the same.
    In such a case the Communication Channel can store the web addresses and XML,
    you just need to
    1. Create a Channel object  based on the channel
    2. Derive a accessor out of it
    3. Use the accessor to Bulid your payload
    4. parse your payload.
    [https://help.sap.com/javadocs/pi/SP3/xpi/index.html]
    let me know if this was helpful and do reward points
    regards,
    Abhishek

  • Mapping issue with if else

    Src. Structure:
    A (0-unbounded)
       within A-> p
    B (0-unbounded)
      within B-> p
    NOTE: at a given instant either A/B can occur, # of K(Target)should b same as # of A/B
    Target structure
    K(0-unbounded)
        within K---> z(1)
    now i have done A/B -> K mapping,
    question comes when i try to map the p to Z field within K,
    depending on weather A/ B exists i need to map the P in A/B to the Z field in K,
    here is what i have done so far:A/B->K mapping
    A --> exists -->OR createif --> SplitByValue -->K
    B --> exists -->
    for mapping p-> Z (i used if then else function)
    A --> exists -->if then  --> A.p --> K.z
    else-> B.p-> K.z
    Here is the test scenario i am doing:
    I send a test without A's only 3 Bs
    I get 1 K element with 1 z in it.
    the remainder of the elements of B in other contexts don't show up.
    When i do a display queue: for my p->z mapping  at the if-then-else function i can see only 1 output from it though there are 3 p fields, this is because in my K structure z field can occur max only once,
    HOW CAN I HAVE  seperate Z elements, each within different K elements?
    Your help is very much appreciated,  this sounds so complicated i hope not, i m sure im not doing something correct, can some1 help me understand this?
    Thanks,
    Hank

    If you have not got the solution, then consider this logic:
    K is 0..unbounded so in the MM duplicate the subtree for K (so now you will have 2 K nodes)
    A -
    > exists -
    > createIf ---> K  ........K will occur when A node exists in the source...to one of the two K nodes
    To map A.p to K.p
    A.p -
    > K.p  ....... you may need to increase the Context of the A.p node....K.p should be the first K node to which the above exists logic (A exists) is applied.
    B ---> exists ---> createIf ---> K   .........K will occur when B node exists in the source...to second K node
    To map B.p to K.p
    B.p ---> K.p....... you may need to increase the Context of the B.p node....K.p should be the second K node to which the above exists logic (B exists) is applied.
    Regards,
    Abhishek.

  • Message Mapping Issue with data without namespace

    Hi,
    I have a common xsd imported which has its own target namespace into my SWC namespace. Based on this xsd I have generated a Message Interface and webservice and given the wsdl to third party system for invoking my webservice.
    The problem is I have done the message mapping based on xsd which has namespace but whereas the third party system which is consuming my webservice is sending the xml data without any namespace and because of which my mapping is failing (target structure is not getting generated as expected). I have tested the mapping with namespace and without namespace from IR already. I have explained this below with example.
    I cannot change the xsd as it is a common and even cannot ask the end system to change the data format they are sending as they are sending the same data to some other systems also, which are not complaining.
    How to resolve this issue in XI?
    Actual xml data generated from my imported xsd (with namespace)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Root xmlns:ns0="http://employee/types">
       <ns0:EmployeeDetails>
          <ns0:EmployeeId>12</ns0:EmployeeId>
            <ns0:EmployeeName>XYZ</ns0:EmployeeName>
    </ns0:EmployeeDetails>
    </ns0:Root>
    Actual Data coming from third party system (without namespace)
    <?xml version="1.0" encoding="UTF-8"?>
    <Root>
       <EmployeeDetails>
          <EmployeeId>12</EmployeeId>
            <EmployeeName>XYZ</EmployeeName>
    </EmployeeDetails>
    </Root>
    Thanks
    Amit

    Just  wild guess:)
    I am not 100% sure but i guess XSLT mapping does not checks the incoming payload against the sender message type.Within XSLT mapping you can add/remove namespace as you would like,use this XSLT mapping before your actual message mapping in interface mapping.
    I am saying this coz recently i was able to generate XSLT mapping(in altova Map Transform) without even specifying any sender or receiver Message type and it worked just fine.
    Thanx
    Aamir

  • Mapping Issue with useOneAsMany Function

    Hi Experts,
    1) The target node DATA must be repeat as many times as YT3M in source side, if YT3M not exist it must fill with empty node.
    2) the target field "P" must reapeat as many times as YT3M in source side and P value from source side repeat same value for all YT3M occurance under M1M node, if M1M node not exist fill with empty.
    Can anyone help me about this.
    Sorce structure is look like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt1 xmlns:ns0="urn:sap.shoprite.co.za:ecc:md">
       <a1m>
          <m1m>
             <po>100</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>2</m>
             </yt3m>
          </m1m>
       </a1m>
       <a1m>
          <m1m>
             <po>101</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>2</m>
             </yt3m>
          </m1m>
       </a1m>
       <a1m/>
       <a1m>
          <m1m>
             <po>100</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>1</m>
             </yt3m>
          </m1m>
          <m1m>
             <po>103</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>1</m>
             </yt3m>
          </m1m>
       </a1m>
       <a1m>
          <m1m>
             <po>101</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>2</m>
             </yt3m>
          </m1m>
       </a1m>
    </ns0:mt1>
    Target Structure is look like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt2 xmlns:ns0="urn:sap.shoprite.co.za:ecc:md">
       <data>
          <po>100</po>
          <m>1</m>
       </data>
       <data>
          <po>100</po>
          <m>2</m>
       </data>
       <data>
          <po>101</po>
          <m>1</m>
       </data>
       <data>
          <po>101</po>
          <m>1</m>
       </data>
       <data>
          <po>101</po>
          <m>2</m>
       </data>
       <data>
          <po/>
          <m>1</m>
       </data>
       <data>
          <po>100</po>
          <m>1</m>
       </data>
       <data>
          <po>100</po>
          <m>1</m>
       </data>
        <data>
          <po>103</po>
          <m>1</m>
       </data>
       <data>
          <po>103</po>
          <m>1</m>
       </data>
       <data>
          <po>101</po>
          <m>2</m>
       </data>
       <data>
          <po>101</po>
       </data>
    </ns0:mt2>

    Hi,
    I tested your mapping with below structure.
    Source Structure
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:test xmlns:ns0="http://PurchaseRequest_Info">
       <M1M>
          <PO>100</PO>
          <YT3M>
             <M>1</M>
          </YT3M>
          <YT3M>
             <M>2</M>
          </YT3M>
       </M1M>
       <M1M>
          <PO>101</PO>
          <YT3M>
             <M>1</M>
          </YT3M>
          <YT3M>
             <M>1</M>
          </YT3M>
          <YT3M>
             <M>2</M>
          </YT3M>
       </M1M>
    </ns0:test>
    Output:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:target xmlns:ns0="http://PurchaseRequest_Info">
    <Data>
    <PO>100</PO>
    <M>1</M>
    </Data>
    <Data>
    <PO>100</PO>
    <M>2</M>
    </Data>
    <Data>
    <PO>101</PO>
    <M>1</M>
    </Data>
    <Data>
    <PO>101</PO>
    <M>1</M>
    </Data>
    <Data>
    <PO>101</PO>
    <M>2</M>
    </Data>
    </ns0:target>
    Mapping Used:
    Data Node: Y3TM- Context on Test Node.
    PO Node: Pass output of One as many to PO. first input to one as many will be Source PO field and other two inputs will be Node Y3TM.
    Map source M field as it is to Target M field.
    -Gouri

  • Mapping issue with Qualifier table

    Hi,
    1. I have an issue after mapping all 3  non-qual flds of a qualifier table in main table getting the compound fld enabled but selecting it , not mapping automatically to the appropiate compound field in the destination side, but giving an error message
    "unable to retrieve source record".
    2. The second issue is that after mapping some of the fields and qualified table and loading the maintable data, saving the map but subsequently when trying to open the saved map , it is coming out with the usual main error window
    SAP MDM Import Manager
    SAP Import manager has encountered a problem and needs to close.
    We are sorry for the inconvenience.
    Debug                                          Close
    Appreciate your help/suggestion on this issues.
    regards
    -reo

    Answer for Qn2:
    First you have to map all the display fields to individual Source Fields..
    Once you have mapped all the dispaly fields of the Qualified Table, you have to do value mapping for the Fields that require Value Mapping.
    Ex: Source Field A -> Destination Display Field 1
    Source Field B -> Destination Display Field 2
    Source Field C -> Destination Display Field 3
    Now Value Mapping where required should be done.
    Once the value mapping is done, then you can create a Compound Field.
    If you have done the previous steps correclty, then the compound field name is enabled for you to create Compound Field.
    Now map the newly created Compound Field to the Qualified Lookup field of the main table.
    Now you have to click on the Automap for value mapping.
    Hope this helps.
    Please reward if you find this helpful

  • Issue with context specific authorization object P_ORGINCON.

    Hello Experts,
    The context specific authorization object doesn't evaluate the
    structural profile it is assigned to when more than one structural
    authorization is assigned to a user.
    Please read the below scenario for issue description as follows:
    User ZHR_ACT13 is assigned two roles namely ZHR_HRD and ZHR_DEPT_HEAD.
    He is the manager for employee ID 167 and is not the manager of employee ID 17.
    Role ZHR_HRD has no read/write authorization for Infotype 6. ZHR_HRD is also assigned to structural authorization ALL which is meant for viewing all the objects with no restriction of any relationship.
    Role ZHR_DEPT_HEAD has read authorization for infotypes 6 for only the subordinates i.e. the structural authorization ZDEPT_HEAD of viewing only the subordinates data is assigned to this role. Also this structural authorization ZDEPT_HEAD is assigned to infotype 6 using
    authorization object P_ORGINCON.
    But now the manager ZHR_ACT13 is able to read infotype 6 data for employee ID 17 who is not his subordinate even though only structural authorization ZDEPT_HEAD is assigned to infotype 6 using P_ORGINCON. We
    expect that user ZHR_ACT13 must be able to read infotype 6 data only for employee ID 167 and not for employee ID 17.
    Please kindly help resolve this issue.
    Thanks & Regards,
    Roshan.

    This has been resolved.

  • Bluetooth keyboard mapping issues with iPad (3rd gen) after iOS 6.1.2 upgrade

    Others may have figured this out more readily than I did, but since I did not find a post on this topic, I decided I would provide this information.
    After upgrading my iPad "3" to iOS 6.1.2, my bluetooth keyboard mapping was a bit off.  Hitting most keys provided the desired result but not all.
    Typing \ would result in ] for example.  Typing shift + 2 would result in " rather than the expected (and marked) @. 
    To fix this I tried turning Bluetooth off and on, etc.  No joy.
    FinaIly, I went into "Settings," selected "Bluetooth," selected "Apple Wireless Keyboard," clicked on "Forget this Device."  
    I then powered off the iPad and the bluetooth keyboard.  Next, I powered on the iPad and keyboard and went back into "Settings" where I paired the keyboard with the iPad again.  Everything then worked as desired. 
    It's possible, that you may not need to go to the trouble of powering off and on the iPad and the keyboard.  Simply "forgetting" the device and then pairing the keyboard with the iPad again may suffice.  

    Using the battery level meter in this manner is comparable to using your car's fuel gauge to calculate miles per gallon.  The only thing that matters is the total amount of operating time from full charge to auto-shutdown.
    Use the wall-mount charger that came with the iPad and charge overnight.  Admittedly the labeling is hard to read but, if you use a magnifier and squint your eyes, you'll see "Output 5.1V, 2.1A."  The symbol between volts and amps is the symbol for DC.  Do NOT use an iPhone charger.  Do NOT use an iPod charger.  Do NOT use a computer's USB port.  Then, operate it normally until auto shut-down (ignore any low level alerts that may appear).  An irony is that doing that test to determine the total operating time is also the exact procedure necessary to calibrate the battery level meter.
    I'm not claiming that you do not have a problem.  I am stating, however, that we don't yet know whether or not a battery problem exists.
    According to Apple:
    Use Your iPad Regularly
    For proper reporting of the battery’s state of charge, be sure to go through at least one charge cycle per month (charging the battery to 100% and then completely running it down).
    Elsewhere, Apple elaborates and explains that two half-discharges (or four quarter-discharges, etc.) equals one full discharge.

  • User Mapping issue with custom system

    Hello,
    We have an iView that allows user's to store credentials to a back end system. We have created a sytem for this, that stores custom values (not the default user / mappedpassword). The code snippet below is used:
    mappingData = UMFactory.getUserMapping().getUserMappingData(systeme, user);
    Map map = new HashMap();
    map.put(BUSINESS_UNIT, bu);
    map.put(RACF_USERNAME, username);
    map.put(RACF_PASSWORD, passwd);
    mappingData.storeLogonData(map);
    This code has worked fine in both EP6 SP2, and with our migration to NW04 (now up to SPS17). However, when we upgraded to NW04s SPS12, I get the following error:
    Exception: Doug Test - setCredentials: java.io.IOException: com.sap.security.api.UMException: Mapped backend user ID not specified.
    If I add the following line to my code above, it works again:
    map.put("user", username);
    Any ideas on why I need to specify the user field in NW04s when I did not need to previously?
    Thanks in advance for any help.

    Doug,
    the following link might be helpful for working with NW04s UserMappingData object.
    <a href="https://help.sap.com/javadocs/NW04S/current/se/com/sap/security/api/umap/IUserMappingData.html">IUserMappingData - NW04S</a>
    Regards,
    Shubhadip

  • Font Mapping issue with Arial Unicode MS font

    Hi All,
    I was able to do font mapping for Arial Unicode MS font (.ttf) in BIP version 10.1.3.4.
    But after applying the patch 10256764 I am not able to see the Arial Unicode MS font in the Font Selection drop down box in BIP .
    I have copied some other .ttf fonts to the .\ jre\lib\fonts folder and they are appearing in the BIP
    Does BIP patch 10256764 not support Arial Unicode MS font ?
    Please help me...
    its resolved .Font name extention should be in lower case (.ttf)
    Edited by: deepz on May 5, 2011 10:15 PM

    There is no BOLD font TTF files for Arial Unicode MS.  No resolution at this point of time. Closing the issue.
    Edited by: vamsee m on Apr 27, 2011 9:29 AM
    Closing this issue

  • Sling mapping issue with Query String

    For a button component, URL behaves differently with query string. Please let me know the sling mapping example for query string.
    Button component behavior across env:-
    Working Scenario:-
    - In Author edit mode, URL pointing to "/content/<websitelink>"
    - In Author preview mode shows URL "<host>:<port>/content/<websitelink>.html"
    - In Publisher mode shows URL, "<host>:<port>/<websitelink>", we do not want "/content" before website link so it is fine.
    Failure Scenario with query string:-
    - In Author edit mode URL pointing to "/content/<websitelink>?username=han"
    - In Author preview mode with URL "<host>:<port>/content/<websitelink>?username=han"
    - In Publisher mode, <host>:<port>/content/<websitelink>?username=han - Here we see the content, which is not acceptable in our scenario.
    Please let me know the mapping changes when we have a URL with query string.

    1) I assume you configure as per the rules mentioned in http://sling.apache.org/site/mappings-for-resource-resolution.html --> 'Mapping Entry Specification' under /etc/map. Based on the configuration in /etc/map and the website that we publish, it translates and shows all the applicable combination in the Felix console http://<host>:<port>/system/console/jcrresolver.
    2) How does Adobe CQ 5.4 resolve the right mapping, if we have multiple map folder like below in /etc directory with the same website with different rules.
    etc/map --> http --> <website> with property sling:match, sling:internalRedirect
    etc/map.publish --> http --> <website> with property sling:match, sling:internalRedirect
    etc/map.publish-stag --> http --> <website> with property sling:match, sling:internalRedirect
    Kindly clarify.

  • Workbench Mapping Issue with Bi-directionals

    I have a bi-directional one-to-one mapping (with relationship partners and all that...)
    Object A has an ivar that has a private one-to-one with the primary key of object B. Accordingly, A's ivar has a foreign key to B.
    Object B has a ivar that is a backpointer to the primary key of A. This is the one-to-one relationship partner in the bi-directional relationship. I made this relationship a TARGET foreign key.
    The mapping tool generates the target foreign key entry in the descriptor for object B incorrectly:
    OneToOneMapping scenarioMapping = new OneToOneMapping();
         scenarioMapping.setAttributeName("myBackPointerToA");
         scenarioMapping.setReferenceClass(A.class);
         scenarioMapping.setRelationshipPartnerAttributeName("ObjectAForeignKeyVariableToB");
         scenarioMapping.useBasicIndirection();
    --> next statement is incorrect and causes the runtime
    --> execution of this to fail
    scenarioMapping.addTargetForeignKeyFieldName("ObjectB.OID", "ObjectA.ObjectAForeignKeyVariableToB");
    --> changing the above to the following (reversing the parameters) works as we
    --> want it to work:
         scenarioMapping.addTargetForeignKeyFieldName("ObjectA.ObjectAForeignKeyVariableToB", "ObjectB.OID");
         descriptor.addMapping(scenarioMapping);
    The corrected way does use TopLink so that it manages the backpointer.
    Is this a bug, or am I not using the mapping tool correctly?
    All I'm trying to do is to get TopLink manage the backpointer in this one-to-one relationship and is there a better way to do this?
    Thanks,
    Steve

    Hello Steve,
    Yes, this is a bug (internal #2662409) that has been fixed in version 9.0.4.
    Cheers,
    Paul

  • Mapping issue with repeating segments

    Hi,
    Our system creates EDI messages and have a date part which looks like below:
    <DTM>
    <DTM01>
    <DTM0101>2</DTM0101>
    <DTM0102>201409241200</DTM0102>
    <DTM0103>203</DTM0103>
    </DTM01>
    <DTM01>
    <DTM0101>137</DTM0101>
    <DTM0102>201409221200</DTM0102>
    <DTM0103>203</DTM0103>
    </DTM01>
    </DTM>
    So we have the DTM segment and under the DTM segment we have several DTM01 segments for every date.
    Now we want to change it to show a DTM segment for every date, so it should be like below:
    <DTM>
    <DTM01>
    <DTM0101>2</DTM0101>
    <DTM0102>201409241200</DTM0102>
    <DTM0103>203</DTM0103>
    </DTM01>
    </DTM>
    <DTM>
    <DTM01>
    <DTM0101>137</DTM0101>
    <DTM0102>201409221200</DTM0102>
    <DTM0103>203</DTM0103>
    </DTM01>
    </DTM>
    How can i achieve this in this mapping?

    Hi Ronald,
    Use Looping functiod to achieve this. Connect <DTM01> in your source schema with looping functiod and then connect <DTM> of you destination schema with Looping functiod. Basically you are telling the mapper to create an
    instance of <DTM> for each <DTM01> record.
    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question
    Regards,
    Rahul Madaan
    biztalkvillage.blogspot.com

  • Mapping issue with mapWithDefault

    Well i am a liitle confused: i have following mapping for target field:
    /MT_NC_ART_edit/ARTRecordSet/ARTDetailsStruct/sAfoBez=replaceString(oneToMany(concat([delimeter=]/ZBC14_ARTIKEL/IDOC/ZBC14_ARTIKEL/ZBC14_ARTIKEL_VORNR/SAFOBEZ=, const([value=:]))), const([value=null]), const([value=]))
    Actually i need the case now that when getting no value for sAfoBez there should be a ":" in target field. Therefore i tried with mapWithDefault giving a default-value. But funny thing is XI does not take it!
    i tired this:
    /MT_NC_ART_edit/ARTRecordSet/ARTDetailsStruct/sAfoBez=replaceString(oneToMany(concat([delimeter=]mapWithDefault([default_value=:]/ZBC14_ARTIKEL/IDOC/ZBC14_ARTIKEL/ZBC14_ARTIKEL_VORNR/SAFOBEZ=), const([value=:]))), const([value=null]), const([value=]))
    The UDF inside the mapping is:
    String[] store = new String[1];
    for(int i=0;i<SAFONR.length;i++)
    store[0] = store[0]+SAFONR<i>;
    result.addValue(store[0]);
    Can somebody give a hand?!
    br

    Hi Fritz,
           I couldn't understand your mapping. At what point are you using the 'mapwithdefault' function and whr does the UDF come into picture?
    Idealy it should take whatever constant you specify when the desired field is not present. Its a simple mapping.
    Can you elaborate it a little it?
    Regards,
    Akshay

Maybe you are looking for

  • Database connection not closed in Destroy()  method of servlet

    Hi, I have a problem with my deployed web application. At first, I thought Glassfish was messing up on me, and after checking the log I could see plenty of null pointer exceptions being thrown at lines in my code where I generate prepared statements

  • Waiting for printer to become available

    I'm on OS X 10.8.5, and have a USB printer: HP p4015dn.   It used to work fine to print.  All of a sudden, it shows "Waiting for printer to become available", forever, and will not print. I can successfully print to networked HP printers, but even th

  • Getting Username to pass into LOV select statement

    Hello! I'm wondering if its possible to get the username of the current user logged in and pass it as a variable into a select statement used in a dynamic LOV in Oracle AS Portal? What I'm attempting to do is pull all the values from a table that equ

  • Move files between computers

    I have a new macbook air and a 5 year old iMac. I want to move some files from the iMac to the air. What's the easiest way to do it? I thought I could network the two together with my modem/router. They can see each other but file sharing doesn't see

  • Payload with Additional data

    Hi, I want to define a structure, where in I want to pass additional information or metadata apart from the actual pay load. Additional information is Message Id and File Name. How should I define the structure. Regards, varun