cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC mapping

Former Member
0 Kudos

Hi Experts,

I have a question about Idoc -> Xi -> Idoc mapping. When I map the new IDOC only the first level gets maps. Here is the structure of my segment :

Segment A

Segment 1

Segment 2

Segment B

So I'm able to map segment A & B but Segment 1 & segment 2 doesnt get map. All the mapping is configured but it doesnt go to the sub-leves when I feed Xi an IDOC. Anyone knows why?

Thx

Accepted Solutions (1)

Accepted Solutions (1)

SudhirT
Active Contributor
0 Kudos

Hi,

If source and target IDocs are same and you dont have any transformation changes then no need to use mapping. look at

Thanks!

Answers (2)

Answers (2)

Former Member
0 Kudos

Node functions:

1. Remove context:

You use remove Contexts () 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 collapse Contexts() 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 : Inserts default value specified in the function properties into empty contexts.

That means if the source value not come then it sends the default value to the target.

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 : sort the values in each context.

11. Format by example : Takes values from first queue and inserts them in structure of second queue.

12. Sort by key : Sort values in second queue by keys from first queue

13. Replace value : It replacess the value of the source field to the value specified in the function.

Context : Context of an element is nothing but just the level, where the XML tag appears in the given XML document. Level of any element is set to the immediate parent node by default.

Former Member
0 Kudos

steven,

Yeah ...you have to change the contexts ...for mapping...use node functions...for this ..like split by value and remove contexts...

Regards,