on 12-10-2008 12:34 PM
Hi friends,
Im working with the node function useOneAsMany for the first time using help.sap.com
I think you people had gone through the example below:
http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
Field Name Occurrence Field Name Occurrence
OrdersByType 1..1 OrdersByRecords 1..1
order 0..unbounded record 0..unbounded
type 1..1 orderType 1..1
itemGroup 1..unbounded itemCategory 1..1
category 1..1 itemName 1..1
name 1..unbounded
Target-Field Mapping (and Explanation)
/OrdersByRecords/record=
/OrdersByType/order/itemGroup/name[context=/OrdersByType]
(a record is to be created in the target structure for each occurrence of name)
/OrdersByRecords/record/orderType=
SplitByValue([type=Each value]
useOneAsMany(
/OrdersByType/order/type ,
/OrdersByType/order/itemGroup/name[context=order] ,
/OrdersByType/order/itemGroup/name))
(see below)
/OrdersByRecords/record/itemCategory=
SplitByValue([type=Each value]
useOneAsMany(
/OrdersByType/order/itemGroup/category ,
/OrdersByType/order/itemGroup/name ,
/OrdersByType/order/itemGroup/name))
My doubt is while mapping the name, what is the meaning of [context:OrdersByType] and [context:Orders].
We have only one name under itemgroup, should we map the same "name" with the target field?
Thanks in Advance
Divya
Edited by: Divya Nancherla on Dec 10, 2008 1:34 PM
Edited by: Divya Nancherla on Dec 10, 2008 1:35 PM
Hi Divya,
Note that this is the context we can set by right clicking on the field and selecting Context, there will be a list of all upper level nodes in that Hierarchy (Orders,OrderByType in this case) You just need to select them to change the context of Name field
check the source structure in which OrderByType is on the Top and then comes the Orders .
Hope I am clear.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:OrdersByType xmlns:ns0="http://com.sap/b">
<order>
<type>external</type>
<itemGroup>
<category>Guitars</category>
<name>Fender Strat V1</name>
<name>Ovation Light</name>
</itemGroup>
<itemGroup>
<category>Percussion</category>
<name>Sticks (Standard)</name>
</itemGroup>
</order>
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all for the help.
-Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My doubt is while mapping the name, what is the meaning of context:OrdersByType and context:Orders.
It means to keep the context of the field in the context specified. i.e when you right click a field, you can change the context to higher nodes. So as per the help doc, they are asking you to keep/change the context to the specified
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 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.