on 04-02-2008 12:48 PM
Hello,
There is one standard node function copyvalue available in XI, what I need now is the counterpart of copyvalue, actually the source structure has more than one elements which should be mapped to one repeated structure.
One example as in help.sap.com documented, just anotherway around.
source
customer (0..unbounded)
name 1
street 1
city 1
zipcode 1
target
partner (0..unbounded)
name 1
addrDate ( 0..unbounded)
street, city, zipcode, should generate in this case 3 addrDate in partner under one partner Element.
Is there some standard way to do it in message mapping or should I write UDF for this ? Thanks for help !
regards,
Hai
Hi,
By right clicking the addrData node in the Target message type and selecting Duplicate option, you can create 3 addrData nodes. For the first node, you map street, and for the second node, map City.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Hai:
I did similar scenario recently, and it is not possible without using UDF.
The problem is there is no standard function that get the number of elments (I mean nodes) under one particular context, if there is one, this scenario can be easily handled.
Regards.
Liang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Liang,
We have a similiar kind of problem.We have to repeat segments in the same context.
We will try using the duplicate subtree but also wanted to know how you solved the same issue using UDF.
If you can provide with the code would be gr8.
If you want me to opena new thread I can.
Many thanks.
regards
ahmed
Hi
Why do you need the function calculating number of nodes? If you want to produce the same number of elements on the target side, you just map the field directly without any function.
With the original problem in the start of this topic - that's another problem. That's grouping addresses based on customer name.
It can be solved by standard functions if the customer segments are sorted by name. Otherwise it can be done only with UDFs
Best regards
Dmitry
Hi,
In the message mapping in the target structure just do duplicate subtree on the field addrDate to get it 3 times.
after that just map
street-->addrdate
city-->addrdate[1]
zipcode-->addrDate[2]
Hope this will help you.
**Reward points if helpful.
--Sankar Choudhury
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can create multiple addrDate (here 3) under partner using duplicate subtree and map the three fields to each subtree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if the length of your elements in the source structure is fix you can use the substring standard function.
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.