cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping data (structure issue)

former_member440449
Participant
0 Kudos

Hi Gurus,

I am not able to find a way to get this solved yet.

Please take a look at this:

Source structure
IDOC (can come multiple)
>Snode1 (0..unbounded)
>>Sfield1
>>Snode11(0..unbounded)
>>>Sfield11(0..1)
>Snode2 (0..unbounded)

Target structure
Recordset (1..unbounded)
>Tnode1 (1..1)
>Tnode2 (1..unbounded)
>>Tfield2

For each incoming IDOC, one Recordset will be created.

node1 will always be created.

node2 will have to be created at least once, and condition will be the next:

IDOC/Snode1/Snode11/Sfield11 = "A" then create Tnode2 (under IDOC context).

Inside node2, there is a field called field2 which has same condition as :

if IDOC/Snode1/Snode11/Sfield11 = "A" then send IDOC/node1/field1 to Tfield2

I am not able to generate corresponding data here.

I tried with an if without else but it is giving me an error.

Anyone has any idea on how can I solve this?

Thanks in advance.

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member440449
Participant
0 Kudos

All,

thanks for replying.

I think I know what the problem is now, but I still don't know how to solve it.

I've tried everything you told me before, but it was still giving me errors while trying to test.

Issue is next one: when I try to send data from IDOC/node1/field1 to Tfield2, it is not sending only 1 queue; it is sending all queues and that is why it fails (because Tfield2 is 1..1).

What I will need (and I don't know how) is to send only CORRESPONDING context data of Sfield1 to Tfield2 (only once per each Tnode2 created).

RKothari
Contributor
0 Kudos

Please check if field1 context is at node1 for Tfield2 mapping.

Try using SplitByValue(Each) at the end of the mapping of field Tfield2.

Former Member
0 Kudos

1. IDOC/Snode1/Snode11/Sfield11 = "A" then create Tnode2 (under IDOC context).

Mapping :


Sfield11(Keep the context at node1) 
                             --> equals --> creatif -> Tnode2
"A"

2. if IDOC/Snode1/Snode11/Sfield11 = "A" then send IDOC/node1/field1 to Tfield2

Map this directly.

Former Member
0 Kudos

.

Former Member
0 Kudos

do you need any repetition ?

if so try changing the context of the source field in the mapping for node2

RKothari
Contributor
0 Kudos

>>node2 will have to be created at least once, and condition will be the next:

IDOC/Snode1/Snode11/Sfield11 = "A" then create Tnode2 (under IDOC context).

Keep the logic as it is on Tnode2 i.e. if without else, just make sure that suppress is present in the output queue. Keep source context of Sfield11 at IDOC level.

>>if IDOC/Snode1/Snode11/Sfield11 = "A" then send IDOC/node1/field1 to Tfield2

Remove the above logic just map the Idoc field field1 to Tfield2