on 08-01-2008 7:46 AM
Hi
experts
what are NODE Functions
Hi,
If we have a requirement one node at sender side occurs only once but many times it needs at receiver side then this case we need node functions.
For sorting the data either ascending/decending order, remove the context of particular node.
We have one node at sender side that is not mandatory at sender side but it is mandatory at receiver side then we can use map with default node function.
Below are node function with explanation
Node functions:
Sort : sort the values in each context.
Collapse context : It removes the supress and empty values that are in the same context.
Remove Context : It producess plain stream of values. It removes all level contexts.
Map with default : Inserts default value specified in the function properties into empty contexts.
Split by value : It inserts the context after events specified. events are each value, value changed and empty value.
Exists : It ckecks weather the node exists or not.
Replace value : It replacess the value of the source field to the value specified in the function.
Sort by key : Sort values in second queue by keys from first queue
Create If : It producess the nodes based on the IF condition.
Format by example : Takes values from first queue and inserts them in structure of second queue
for more details
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/1f/ea0fb12403844bbb6c4cbc8a00cda9/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/4b/d11e3e1c3b120ae10000000a114084/content.htm
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
It is standard xi functions in Mapping window, under node function different categories is thre like text, constand etc. If node functions not satisfy current requiremet will choose UDF functions.
I hope clear now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
For understanding node functions this blog will help you
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/a8/bfc6373c8fea43bdb3541535bcbd43/frameset.htm
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
http://help.sap.com/saphelp_nw04/helpdata/en/79/2835b7848c458bb42cf8de0bcc1ace/frameset.htm
Sravaya Talanki- Message Mapping(Node Function) Part-1
Sravaya Talanki- Message Mapping(Node Function) Part-2
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Standard Functions
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
Advanced mapping function(mapwithdefault,formatbyexample,sort,sortbykey)
msg splitting
Number Formatting
Use one as many optimization
mapping- createif, removecontext,splitbyvalue
mapping- createif, removecontext,splitbyvalue
queues in message mapping
Handling mixed content
Simple java code in graphical mapping - XI
Value Mapping
Value Mapping1
cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
NODE FUNCTIONS
1.createIf,
2.removeContexts,
3.replaceValue,
4.Exists,
5.SplitByValue,
6.collapseContexts,
7.useOneAsMany,
8.sort,
9.sortByKey,
10.mapwithDefault,
11.formatByExample
1. remove context:
You use removeContexts () to delete all the top contexts for an element. This removes all top hierarchy levels, so that all elements of the target queue are assigned to a root element of the source queue.
Advanced user-defined functions can import either just one context into the input arrays, or complete queues. Make your selection by selecting or deselecting the Save Entire Queue in Cache checkbox in the function editor.
2. split by value:
The SplitByValue() function is the counterpart to removeContexts(): Instead of deleting a context, you can insert a context change in the source value queue. You then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccurs must be >0. You can insert a context change in the queue after each value, after each change to the value, or after each tag without a value.
3. collapse context:
Using collapseContexts() puts the first values of all contexts into a context. Empty contexts are replaced with an empty string:
This can be useful if an upper-level node is to be created each time a lower-level node exists, for example. The function is useful in combination with the SplitByValue function.
4. Use one as many
You require the function useOneAsMany() if a field that only occurs once needs to be replicated as often as another field occurs in the outbound message so that the fields can be written to the target structure in pairs as a record.
Example:
If Default is the default value and
A|B1,B2| |C| |D
is the inbound queue,
mapWithDefault returns the following outbound queue:
A | B1,B2 | Default | C | Default |D.
http://help.sap.com/saphelp_nw04/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/frameset.htm
5. Map with default
Replaces empty contexts in the inbound queue with a default value, which you specify in the function properties.
6.copyValue
You use CopyValue() for a frequently occurring element to copy the value of a position in the source structure and assign it to a target field. The value is copied each time the target field occurs in the target structure. However, it is copied a maximum of maxOccurs times
7).createIf
You use createIf() to create a tag in the target structure depending on a condition.
8).exists
You use this function to determine whether a particular source field exists in the XML instance to be processed. If it does, exists() returns the value true, otherwise it returns the value false.
9).Use
You use this function if you need to synchronize two queues of equal length with reference to their context change. The mapping runtime takes the values from the first queue, and the context change from the second queue. If the two inbound queues do not have the same number of values, the mapping runtime triggers an exception.
10)sort
Sorts all values of the multiply-occurring inbound field I within the existing or set context. The sorting process is stable (the order of elements that are the same is not switched) and it sorts the values in O(n*log(n)) steps. Using the function properties, you can specify whether values are to be sorted numerically or lexicographically (case-sensitive or non case-sensitive) and in ascending or descending order.
11)sortByKey
Like sort, but with two inbound parameters to sort (key/value) pairs. The sort process can be compared to that of a table with two columns.
● Using the first parameter, you pass key values from the first column, which are used to sort the table. If you have classified the key values as numeric in the function properties, they must not be equal to the constant ResultList.SUPPRESS. See also: The ResultList Object
● Using the second parameter, you pass the values from the second column of the table.
If there is a discrepancy between the number of keys and values, the mapping runtime triggers an exception. The function returns a queue with the values sorted according to the keys.
Nice blogs..
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Hope this info is useful to you..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For clear expalnation abt node functions
Have a look at these links
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii - By sraviya Talanki
Edited by: malini balasubramaniam on Aug 1, 2008 9:32 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Following are the Node Function.
createIf
removeContexts
replaceValue
exists
SplitByValue
collapseContexts
useOneAsMany
sort
sortByKey
mapWithDefault
formatByExample
Also have a look at this help documentation
http://help.sap.com/saphelp_NW04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.