on ‎2008 May 07 7:39 AM
Hi all,
Can i get a detailed explanation on Node functions..
please not the general links....... I want simple clear examples to explain each of the below listed node functions in detail :
1.createIf,
2.removeContexts,
3.replaceValue,
4.Exists,
5.SplitByValue,
6.collapseContexts,
7.useOneAsMany,
8.sort,
9.sortByKey,
10.mapwithDefault,
11.formatByExample
please hurry up...
thanks in advance
Request clarification before answering.
Hi Deepika,
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.
http://help.sap.com/saphelp_nw04/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/frameset.htm
5. Map with default
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.
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.