cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hi Friends,

I am working on File to IDoc.

I am getting a source field hkont in detail record. but these detail records r repeating.

But i am chking condition here

If hkont equals to A and hkont equals to B...then need to pass I2 or else I0.

But here this condition is just chkning 1 st detail record.if there is no A and B...then giving I0.

But this condition has to apply all detail records at source.

Please suggest me.

Regards,

Suri

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I agree with Raja!

You need to change context node to the root element.

Former Member
0 Kudos

Yes tried...but not working

Former Member
0 Kudos

Hi Friends,

Here my source structure is

Recordset

Header

Detail

Trailor

Target is Idoc

HKONT field is existing in detail record

So detail records r repeating here.

i have given context level to detail and tried with recordset.both but that condition is not satisfying.

please give me any clue.

Regrds,

Suri

Former Member
0 Kudos

Hi

I think your condition is wrong

If hkont equals to A and hkont equals to B...then need to pass I2 or else I0.

the and should be OR. they can't have both the same value at the same time

Former Member
0 Kudos

Hi Cio,

Here detail records r repeating.everytime time we will get 1 HKONT value.

if suppose 100 detail records r coming.if those 2 values r coming in 100 details then it sud be I2 or else I0.

A and B values r here 10 digit numbers.

Regards,

Suri

Former Member
0 Kudos

Is the target appearing the same number of times as the source (HKONT)?

If yes, then I suggest using fixValues, it allows for more than two values

If not then you might want to use a different logic or maybe a UDF.

Former Member
0 Kudos

Yes Cio,

Here in target side there r 3 segments

K3,A3 and T3.

In 1 st detail record there is some condition like if NEWBS=31 need to populate in K3.this sud be fine.

from 2nd detail records NEWBS=40 need to populate in A3.here Detail records r repeating with NEWBS=40

We need to populate that particular value in to A3 segmnent.

Regards,

Suri

Former Member
0 Kudos

Hi,

Use this mapping

HKONT -


> fixValues -


> target

in fixValues the default should be to pass the key, in the first column add the source values and in the second column add the target value.

The context for HKONT should be the lowest as possible (i.e. Detail).

Regards,

Horia

rajasekhar_reddy14
Active Contributor
0 Kudos

Change context to root node and try. it should work