cancel
Showing results for 
Search instead for 
Did you mean: 

Mutiple child segments for different parent IDoc node

Former Member
0 Kudos

Hi All,

I have a source queue as

<value1>

Context change

<Value1>

Context Change

<Value2>

Context change

Now for my target i need to create two IDoc nodes(one each for Value1 & value2) which I am able to create.

But now for each IDoc, there is one segment, which needs to be repeated two times for first IDoc and one time for second IDoc.

Please provide inputs how to achieve this.

Thanks,

Marz

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Use mapping like below.

Source(Field used for populate value)Splitbyvalue(ValueChange)target.

If you have to populate element then

Source(other field)Format by examble-target.

Source(Field used for populate value)Splitbyvalue(ValueChange)

Regards,

Prakasu

Former Member
0 Kudos

Hi Kumar,

Try using copy-value std function to get the same segment replicated twice.

I am not sure, jus give a try.

Regards,

Swetha.

prateek
Active Contributor
0 Kudos

Now for my target i need to create two IDoc nodes(one each for Value1 & value2) which I am able to create.

I guess you must be using SplitByValue -> Value Change

there is one segment, which needs to be repeated two times for first IDoc

Map the source multiple nodes directly to Idoc segment. What is happening then?

Regards,

Prateek

Former Member
0 Kudos

Hi,

Now for my target i need to create two IDoc nodes(one each for Value1 & value2) which I am able to create.

I guess you must be using SplitByValue -> Value Change

Yes, I am using the same.

there is one segment, which needs to be repeated two times for first IDoc

Map the source multiple nodes directly to Idoc segment. What is happening then?

If I do it that way, then it will repeat child segment only in first IDoc not for second IDoc.

I need to repeat child segment in IDoc depending upon every unique set of values.I have single source parent node which is repeating multiple times.Now say my record is repeating three times from source side, two have same value for a field(X),and one have different value for a field(X)

then two IDocs are created(one each for different value), but each IDoc has one child segment which needs to be repeated according to uniqueness of value.Means child segment under first IDoc should repeat two times and child segment under second IDoc should repeat single time.

Hope I have put it clear here.

Thanks,

Kumar

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

For the nodes, right-click the child you want to be duplicated then select duplicate subtree.

For the each unique value of the source, a new IDOC is to be created, you can use this mapping:

source --> removeContext --> sort:lexicographical ascending --> splitByValue: Value Changed --> collapseContext --> Target

Hope this helps,

Former Member
0 Kudos

Hi,

Use the splitByValue with setting 'Value changed' to accomplish this.

Kind regards,

Koen