Skip to Content
author's profile photo Former Member
Former Member

question of UseOneAsMany

hi, guru

I have a source as below

<source>

<record typeA="xx" typeB="yy">

<name>name1</name>

</record>

<record typeA="xx" >

<name>name2</name>

</record>

</source>

I'd like to create output as

<target>

<record>

<type>typeA</type>

<value>xx</value>

<name>name1</name>

</record>

<record>

<type>typeB</type>

<value>yy</value>

<name>name1</name>

</record>

<record>

<type>typeA</type>

<value>xx</value>

<name>name2</name>

</record>

</target>

How do I write this mapping? UseOneAsMany? please help , thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2010 at 02:52 PM

    Its usually used when we want a field value from source(occurence 0..1 or 1..1) to be repeated multiple times in target structure.

    Following link would give you more on useOneAsMany : http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm

    Regards

    Soumen...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member abhishek salvi

      >

      >

      have 2 attributes typeA and typeB, they may or may not appear, I'm not sure how to use them as the parameters to 
      > UseOneAsMany.

      > you cant use both of them, only one needs to be used.....and they need to be present if you want the source node (parameter1) to be repeated in the target some number of times.

      sorry for again.

      I think I'm not smart enough to understand ti.

      Can you write down the detailed mapping for my case? I'm a newbie of PI, you answer will be really help.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2010 at 03:01 PM

    Hi,

    here you need to use the count of the attributes and pass it to the function of useone as many second and third values and use name1 as the first field...

    HTH

    Rajesh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      here you need to use the count of the attributes and pass it to the function of useone as many second and third values and use name1 as the first field...

      HTH

      Rajesh

      thanks, but how can count the attribtues for there are two different attributes. Can you show me the details

  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2010 at 02:50 AM

    anybody can help?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.