cancel
Showing results for 
Search instead for 
Did you mean: 

Generate mutiple datarecord if source segment of idoc occur multiple times

Former Member
0 Kudos

Hi all,

I am doing an idoc to file scenario .In that an idoc segment E!FSEG is occuring five times totally and 3 time with two fields "eibeln"and sgtxt.I have to generate data record 3 times when the field eibelen and sgtxt both are persent in the segment.

I mapped my target datarecord with segment E!FSEG with if conditon that if both field r persent then map E!FSEG wtih data record but data record is getting created 5 times instead of 3.Plz guide me as its very urgent

Regards

Neha

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Neha,

Try the below option and let us know.

eibeln[change context to one level upper] --->Exist


> AND-> Createif Target

//

sgtxt[change context to one level upper] -


>Exist

Best regards,

raj.

Former Member
0 Kudos

in the display queue could you check if the value is true or false for the exists function and let us know

Answers (4)

Answers (4)

Former Member
0 Kudos

HI Raj& Arvind

I implemented the above logic and achived the desired result also

But one new problem is coming .

that suppose 3 in the 5 segment satisfy the conditon then its creating three segment but its taking first three.If first three segment satisfy the condition and last two doesnot then its working fine.but if the first one and last two does not satisfy the condition then its taking first three and discard last three.......ie its taking first one by default.

Regards

Neha

Former Member
0 Kudos

HI Raj

It worked .Thanks a lot

justin_santhanam
Active Contributor
0 Kudos

Good, to know it helps!!!!

The credit must go to arvind. He only suggested you, I made just an enhancement to his reply, thats it.

Best regards,

raj.

Former Member
0 Kudos

nice to get that reply

Former Member
0 Kudos

HI Arvind

I have tried this but even though its not working.I am surpised tha when i am usin if condition and only three times this condition is true then why its calling

the E!FSEG segment five time.

Regards

Neha

Former Member
0 Kudos

try this

map the field eibeln to the target data record but chnage the context of the field ebeln from segment E!FSEG to it's uppernode