Mapping insight required !

Hello All, Simple mapping q for u.
SOURCE:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:source1a xmlns:ns0="urn://maptest">
   <city>
      <street>
         <person>1a</person>
         <person>1b</person>
         <person>1c</person>
      </street>
      <street>
         <person>2a</person>
         <person>2b</person>
         <person>2c</person>
      </street>
   </city>
   <city>
      <street>
         <person>3a</person>
         <person>3b</person>
         <person>3c</person>
      </street>
      <street>
         <person>4a</person>
         <person>4b</person>
         <person>4c</person>
      </street>
   </city>
</ns0:source1a>
MAPPING:
/ns0:target1a=/ns0:source1a
/ns0:target1a/personList=/ns0:source1a/city/street/person
/ns0:target1a/personList/person=/ns0:source1a/city/street/person
After the map runs, the target produced is as follows:
TARGET:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:target1a xmlns:ns0="urn://maptest">
<personList><person>1a</person></personList>
<personList><person>2a</person></personList>
<personList><person>3a</person></personList>
</ns0:target1a>
The question is why does the map test produce 3 elements; why not 4a also ? Even if I add a 5a,5b,5c in the source, it still produces only 3 elements in the target.
I have looked at the queues, but the queues all match (and contain all the elements). Obviously I'm missing something simple. Could someone point this out for me. Thanks.
Ciao, Bhishma

Hello Prakash, Thanks I did that, but the results are still the same.
The map still only outputs 3 values.
So rather than changing things to get it to map all the entries, I'm trying to understand 'why' it does '3' values.
What is there in the 'queue/other' mapping mechanism that causes it to output only 3 values for this scenario ?
Ciao, Anand

Similar Messages

  • XSLT mapping Help Required.

    XSLT mapping Help Required.
    Hi Experts,
    I am New to XSLT Mapping. I am practising the below Example:
    InputXML File:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    XSL StyleSheet File:
    <?xml version='1.0' encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen"
    Xmlns:ns1=”http://XYZ.com/Test”>
    <xsl:template match="/">
    <ns1:MT_XSLT_Target>
    <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
    <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
    </Name>
    <Street> <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '),
    ns0:Mt_XSLT_Source/Person/Address/Street)"/> </Street>
    <City> <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City"/> </City>
    </ns1:MT_XSLT_Target>
    </xsl:template>
    </xsl:stylesheet>
    The Desired Output shuold be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_XSLT_Target xmlns:ns1="http://XYZ.com/Test">
    <Title>Male</Title>
    <Name>Anshul Chowdhary</Name>
    <Street>83/b 2nd Main</Street>
    <City>Mysore</City>
    </ns1:MT_XSLT_Target>
    I have refered the xsl in xml and i am getting the below Oupt in a Single line like this:
    Anshul Chowdhary Male 2nd Main 83/b Mysore
    I am Unable to display in Target XML Fomrat as shown above. Please check and do the needful.
    Regards,
    GIRIDHAR

    Hi,
    I have used below for testing.
    Input xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    xsl code:
    <?xml version='1.0' encoding="UTF-8"?> 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/gen" 
        xmlns:ns1="http://XYZ.com/Test"> 
        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> 
        <xsl:template match="/"> 
            <ns1:MT_XSLT_Target> 
                <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title> 
                <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/> 
                </Name> 
                <Street> <xsl:value-of select="concat(concat(/ns0:MT_XSLT_Source/Person/Address/Houseno,' '), 
                    /ns0:MT_XSLT_Source/Person/Address/Street)"/> </Street> 
                <City> <xsl:value-of select="/ns0:MT_XSLT_Source/Person/Address/City"/> </City> 
            </ns1:MT_XSLT_Target> 
        </xsl:template> 
    </xsl:stylesheet>
    For testing in PI ,change the extension from .txt to .xsl and zip it and upload into PI as an imported archive .
    Regards
    Venkat

  • Child to Parent Node Creation, Mapping Help required

    Hi Guys,
    I need some suggestions on the following mapping problem, kindly suggest some solution if possible:
    I have a sender structure as:
    ParentNode
    ..........RecordSet  (0 to 1)
    ................ SValue1  (0 to 1)
    ................ SValue2  (0 to 1)
    .................SValue3  (0 to 1)
    For the receiver Structure I have following:
    ParentNode
    ..........RSet  (0 to unbounded)
    ............. RValue  (0 to 1)
    ..............RField    (0 to 1)
    Now my mapping conditions requires for every SValue1, SValue2, SValue3 source fields, I should generate at receiver side a new RSet and the value of SValue1/SValue2/SValue3 field(s) should be Provided into RValue, and RField should have the respective field name.
    I am trying this with PI Graphical mapping, is there any better solution for it?

    Hi,
    As source structure occurence is 0..1 in this case duplicate the target structure and use create if function with source as SValue1 ...so that for each of Svalues...a corresponding target node will get generated...
    With graphical mapping you should be able to do this...else need to go for UDF...
    HTH
    Rajesh

  • XSLT Mapping changes Required

    Hello Experts,
    I got one change requirment, where the name filed in the idoc contains special character (like semi colon) in between the name, I want to put double quotation for that special character at XSLT mapping.
    Eg:
    Input Name:   Ravi ; Kumar
    Out put would be: Ravi  ";" Kumar
    Please help me out with the required mapping changes in XSLT.
    Thanks in Advace.
    Edited by: ItsUrRock on Mar 23, 2011 11:55 AM

    Hi,
    use xpath function translate() and escape the semicolon and the quotes.
    <output><xsl:value-of select="translate(//Name,%3B,%25%3B%25)"/></output>
    If  that escapes do not work google for escape sequences.
    Regards,
    Udo

  • Scenario mapping - help required

    Scenario:
    A Customer sends a material (for e.g., SUGARCANE) to the company (SAP Implementing). It processes it and send back as SUGAR.
    The customer is charged for the services rendered.
    The stock of sugarcane/sugar should be visible in the system.
    Please guide me how to map this scenario.
    I will be very much grateful.
    Regards,
    Anbu

    This sales process is referred as Job Work in SAP.
    Refer following SDN thread that can be helpful to you in understanding / reference:
    - Sales Process of JOB WORK
    If in case you have any concern or doubt about the process, do revert back.
    But don't forget to put a effort search more information on JOB WORK for reference/understanding. So that you can specific to your requirement.
    Regards
    JP

  • Mapping help required

    Dear Experts,
    We are working in PI 7.1 Source and target structure are like:
    Node1
         F1
         F2
         F3
         F4
    Node2
          F1
          F2
          F3
          F4
    Node2
          F1
          F2
          F3
          F4
    The requirement like if F2's value is X then we have to pass only that field of that Node in the target side and if F2 is '0' then all the fields would be passed. Target structure is same as source.
    Please advise how can I achieve this.
    Regards,
    Kami

    Hi Kami,
    refer the mapping concept wiki
    Mapping Concepts in SAP XI - Process Integration - SCN Wiki
    regards,
    Harish

  • Mapping logic required--Counter

    Hi Experts,
    How to increment the counter value by 5 every time, I tried using counter arithmetic function it is now working for my requirement.
    My Source structure
    <Elemica_Order>
        <HItem>1..to unbouded
              <LItem>
                   <Item>1..to unbounded
    Target
              <Order>1..to unbounded
                   <OItem>1 to unbouded
                        <id>
    Order mapped with HItem and OItem mapped with lItem.suppose my source having 2 hitem records then target side I will have 2 orders.
    my Hitem record having 3 LItems then my first order will have 3 order Items , in this case my I want to increment the ID value by each time  by20, initial value is going to be 10.
    Second Hitem having only one Litem then I want to increment value by 20.
    I tried using counter arithmentic function, it is working for only one Hitem, second Hitem it is not reseting value to 20.
    I think UDF required for this, help me
    Regards,
    Jam

    Hi Jam,
    If you looking to get the target like this:
    <Order>
        <OItem>
             <id>10</id>
        <OItem>
             <id>30</id>
        <OItem>
             <id>50</id>
    </Order>
        <OItem>
             <id>10</id>
    </Order>
    You can achieve this by using the "index" function from Static Functions list.
    LItem -> index -> formatByExample (first input)
                                            formatByExample(out put)  -> id    
    Item ->           formatByExample (Second input)
    for the index function parameters set Initial Value = 10; Increment = 20;
    Tick the option of "Reset Index to Initial Value with each new context".
    Regards,
    Aravind

  • Does Map Viewer require Spatial?

    Hi,
    I am new to Map Viewer and Spatial. My customer is interested in simple 'heat mapping' to augment their BI reports. Can I use Map Viewer without requiring Spatial underneath (ie. use relational data as a source similar to MapInfo)?
    I am not a member of this forum, so please cc me in your response: [email protected]
    Thanks!

    Hi,
    Oracle MapViewer can use SDO_GEOMETRY type columns stored in database, also it is possible to draw live features using (X, Y) and load external attribute data.
    However, your customer can use free Oracle 10g Express Edition, XE comes with free Locator option. In fact, all data from external source (MapInfo TAB files, etc.) can be loaded into XE database and used by MapViewer. The benefit of this solution - all spatial/nonspatial data will be stored centrally in the system, using SDO_GEOMETRY type.
    Regards,
    Andrejus

  • ANN: Eclipse EJB 3.0 Object-Relational Mapping Project Requirements posted

    A document that presents an intitial feature and use case list for the early milestones of the Eclipse EJB 3.0 Object/Relational Mapping project has been posted to the project newsgroup (news://news.eclipse.org/eclipse.technology.ejb-orm). It also demonstrates a set of user interface components for editing EJB 3.0 Entities. The document covers the basics and is designed to illustrate the concept. It is in no way comprehensive. For example, it doesn't thoroughly cover the editing of ORM xml descriptors although this is an important requirement for the project. ORM xml support will be detailed in coming revisions, and slated for future milestones.
    The purpose of this document is to invite comment on the approach. If you are interested in EJB 3.0 Entity support in Eclipse please give the doc a look over and post your feedback to the EJB 3.0 Object-Relational Mapping Project newsgroup.
    Newsgroup: news://news.eclipse.org/eclipse.technology.ejb-orm
    Simple Web Interface http://www.eclipse.org/newsportal/thread.php?group=eclipse.technology.ejb-orm
    --Shaun Smith
    Project Overview:
    The goal of this project is to add comprehensive support to the Eclipse Project for the definition and editing of Object-Relational (O/R) mappings for EJB 3.0 Entity Beans. EJB 3.0 O/R mapping support will focus on minimizing the complexity of mapping by providing creation and automated initial mapping wizards, and programming assistance such as dynamic problem identification. The implementation will be extensible so third party vendors can add to its functionality.
    Project Proposal:
    http://www.eclipse.org/proposals/eclipse-ejb30-orm/index.html

    A document that presents an intitial feature and use case list for the early milestones of the Eclipse EJB 3.0 Object/Relational Mapping project has been posted to the project newsgroup (news://news.eclipse.org/eclipse.technology.ejb-orm). It also demonstrates a set of user interface components for editing EJB 3.0 Entities. The document covers the basics and is designed to illustrate the concept. It is in no way comprehensive. For example, it doesn't thoroughly cover the editing of ORM xml descriptors although this is an important requirement for the project. ORM xml support will be detailed in coming revisions, and slated for future milestones.
    The purpose of this document is to invite comment on the approach. If you are interested in EJB 3.0 Entity support in Eclipse please give the doc a look over and post your feedback to the EJB 3.0 Object-Relational Mapping Project newsgroup.
    Newsgroup: news://news.eclipse.org/eclipse.technology.ejb-orm
    Simple Web Interface http://www.eclipse.org/newsportal/thread.php?group=eclipse.technology.ejb-orm
    --Shaun Smith
    Project Overview:
    The goal of this project is to add comprehensive support to the Eclipse Project for the definition and editing of Object-Relational (O/R) mappings for EJB 3.0 Entity Beans. EJB 3.0 O/R mapping support will focus on minimizing the complexity of mapping by providing creation and automated initial mapping wizards, and programming assistance such as dynamic problem identification. The implementation will be extensible so third party vendors can add to its functionality.
    Project Proposal:
    http://www.eclipse.org/proposals/eclipse-ejb30-orm/index.html

  • Seeburger mapping name required for ASN

    Hi
    I am trying to use the Seeburger AS2 adapter to send ASN (Advance shipping notification) to our partners.
    The format of the EDI file is EANCOM2002. I want the standard Seeburger mapping name which will convert from xml to EDI EANCOM2002 format for ASN message.
    Thanks in advance.
    Shantha

    If you are expecting the naming conventions for SEEBURGER Mapping (BIC Mapping designer) here are few .Let me know if they are useful.
    <b>ADOPTED NAMING CONVENTIONS</b>
    1 - For Application Rules:
    DOCUMENT_APLLICATION_DIRECTION_DATA (FILE EXTENSION FOR REFERENCE)
    Length for each:
      Document = 3     Samples of:  PUR, POC, POA, ASN, TXT            
      Application = 4   Samples of:  RECL, SOMS, HRMS, CORP, COMS, CONT  
      Direction = 1       Samples of:  I or  O
      Data = 3              Samples of: DAT, XML, RPT
      NOTE:  Since spaces are not allowed in the names,  ‘S’  will be used as filler .
    Sample Application Naming:
    For 824 for Banking doc   – TXT_CORP_I_RPT
    – <b>General  Rules:</b>
    1- IF mapping is the same with HRMS & COMS
          THEN Use CONT for Application
        ELSE  Use HRMS or COMS (which ever is appropriate)
    2- IF document is the same for the entire corporation
           THEN Use CORP as the Application
    3- IF Generic
          THEN  No Suffix is required
         ELSE Trading Partner Specific maps add the suffix
    For Trading Partner specific rules, add the Name extension to the end of the rule.

  • Mapping logic required

    Hi All,
    A segment E1BLINE in the source IDOC can repeat multiple times(0..999) and at the target that many times the record needs to be generated.
    In the target record strucutre a field say ABC is mapped to a feild in XYZ in segment   E2ES (0..999) .But the test IDOC doesnt have these segment data ,suppose if segmnt E1BLINE repeats 2 times i am getting 2 records in target structure but the field ABC should have blank values in each record as  if there is no data in the source.I am unable to get the logic .
    Thanks in advance

    Hi Priyanka,
    my actual requirement is as follows
    for example:
    There are 2 segments  LINE Segment     E2ES Segment.   I need to generate target file records based on LINE SEgmentIn my input data I am getting 2 LINE SEGMENTS so I am generating 2 records in the output file. But some of the fields in target comes from E2ES Segment.
    LINE  segment 2 times so no of recordsets =2 .(which i am able to generate)
    E2ES  segment has 4 fields.     QUALI1 , FIELD1,QUALI2 , FIELD2
    If QUALI1 = 100 ,  FIELD1--> ABC
    If QUALI2 = 200 ,  FIELD2--> HBY
    If QUALI2 = 200 ,  FIELD2--> HBY
    If QUALI2 is used i can easily get 2 HBY fields at target .But how do i get two  ABC  fields

  • Complex Mapping :-Help Required

    Hi All,
    I have a scenario XI--IDoc.
    Sender structure is having one field as Description which will carry some informatiom.I have to read the Summary Field and if I get XAA1:686,XAA2:767 or XAA3:876 like this  inside this  inside this field than I have substring  and take those value individually than we have to map it accordingly.
    You can consider all these value will come separated by ,(comma) and based of the sbustring we have to map it.
    Thanks,
    Rakhi

    1) Pattern p = Pattern.compile("\\b([X][A-Z]{2}[0-9][:][0-9]{3})\\b");
    we made a regular expression here and compiled it and then we make a object of class Matcher to match this compiled regex with our string
    Matcher m = p.matcher(str);
    //then we traverse through the results given to us my this matcher in an array form that is a array constituted by the different values that match this regex.....we traverse this array (m.find()) until this condition is true.....
    then we add the result into the display queue.
    while (m.find())
        String s = m.group(1);
        result.addValue(s);
    (\\b is actually \b to include this \(escape character) i had used two \\
    this is the real regex
    \b([X][A-Z]{2}[0-9][:][0-9]{3})\b
    \b means a seprator between words it can be anything tab or whitespace or new line
    () we use these brackets to mark a word or a unit here this XAA8:456 is a unit so we put the reg ex for this inside braces
    [X] single value mentioned means that it searches for only the single X character
    the very next [A-Z]{2} means that it searches for any character in range A-Z and this rule searches for combination of two letters that follow this rule it means that it searches for two characters together following this i.e adjacent like DF, GY if you think that you want to further drill down your pattern and you will always have AA you can replace this [A-Z]{2} by [A]{2} so it searches for XAA
    now the next thing should be a digit  so we have 0-9 if you dont specify {3} or any number in curly braces it assumes that you are searching for a single character
    then [0-9]{3} digits in the end.....
    use this site if you want to learn regex you can test your regex here
    http://regexr.com/#
    working on your next req

  • Mapping Help required for ORDER Idoc to EDI file

    Hi
    My source strcture is as follows
    E1EDP01
    E1EDP01
       E1EDPT1 (TDID=0001)
         E1EDPT2
             TDLINE = abcd
       E1EDPT1 (TDID=0001)
         E1EDPT2
             TDLINE = XYZ
    and my target line item is mapped with TDLINE(Context E1EDP01)-exist then createif LineItem(This is working fine but item filed is failing)
    The logic to populate itemFIELD1 is if E1EDT1(TDID==0001) then pass TDLINE to ItemFIELD1, how to map this
    (Sometimes E1EDPT2 populate multiple times for one E1EDPT1)

    >and my target line item is mapped with TDLINE(Context E1EDP01)-exist then createif LineItem(This is working fine but item filed is failing)
    Why don't you create the LineItems only when TDID = 0001 because this will ensure to populate item fields with correct value.
    The mapping logic to produce the LineItems should be like this..
    IF (TDID = 0001) THEN (TDLINE set context to E1EDPT1)---RemoveContext---LineItem.
    >The logic to populate itemFIELD1 is if E1EDT1(TDID==0001) then pass TDLINE to ItemFIELD1, how to map this
    In this mapping make sure the context of TDLINE is set to E1EDPT1 and then use RemoveContext ---SplitByValue to the output of "IF" function. e.g.
    IF (TDID = 0001) THEN (TDLINE set context to E1EDPT1)---RemoveContext---SplitByValue---FIELD1.

  • Mapping Help required in Node count

    Hi Friends,
       i  need to count the number of occurences of source node. i'm able to count the occurences.
       but i have some problem with this node. Source node happens only some times.
      Source node.
       <Event>
           type-                      attribute
           <Date>20092509</Date>
       </Event>
    Sometimes Event tag comes as </Event> without any type value then i need to pass " 0 " value.
      Cases :
      1. if empty Event tag happens then need to Pass  "0"
      2.  <Event>
               type
               <Date></Date> in this case also need to pass 0.
    3.    <Event>
               type "Order"
           <Date>20092509</Date>
       </Event>
          <Event>
           type "Delivery"
           <Date>20092509</Date>
       </Event>
      in this case need to pass node count as "2"
    please suggest me on this;
    Regards,
    Deeps

    Hi sandeep,
    Map like this..
                         Date--\
                               then
    Date---->NotEquals---->if          -----\
    Constant[]/                             \
                              else            \
                Constant[0]/                   \
                                             then
    Date----->Exisists---->if--------        ----->Output
                                            else
                               Constant[0]/
    I tested this...
    Working Fine...
    Thanks.

  • Mapping help required - extension

    Hi,
    I 've done the mapping based on the below conditions
    Let say 3 fields called : a,b,c
    if a = RAM then
    b = b/c
    here b field is in one segment and a & c fields are in child segment of above segment.
    Note : all the above fields occurance : 0 to 1
    But, i need to display the target including with the above condition also i need the value of the field "b" should display at target side where the condition doesn't satisfy ..  ie., a # RAM.
    Here i 've tried with if then else condition...but that doesn't work.
    Please help me out how can i get the output.
    Thanks in advance for your help
    Regards,
    Y.Raj

    Hi Yeshwant,
    IF you have the source structure as:
    segment
    --b
    ---subsegment
    a
    c
    then you may need these changes in Raj's mapping image
    b-----------------------------------|
    c (context changed to parent of c)--| useoneasmany -- divide
    c ----------------------------------|
    b-----------------------------------|
    c (context changed to parent of c)--| useoneasmany -- else
    c ----------------------------------|
    Regards
    Suraj

Maybe you are looking for