cancel
Showing results for 
Search instead for 
Did you mean: 

Split a message based on value in payload

Former Member
0 Kudos

Hi Experts,

I have a requirement of file to file scenario...

There are segments in the idoc based on which i have to pass the data to file 1 or file 2

the source xml will have a field ID .. If ID is 1 then file 1 else file 2..

I have done 1 .. n multi mapping...

I have added the rule in receiver determination and interface determination.. but the issue I am gettign is that both the files are gettign both the payloads...

Pls share u thoguths..

Regads,

Teja

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Tej,

If you are have a condition in receiver determination or interface determination based on some value in some segment which can itself repeating, in the case RD or ID just check the node value under the first occurence of the segment.

In order to avoid this you need to handle the split part at the message mapping level, rather than RD or ID level.

I hope this will help you in sort out the issue,

Regards,
Ashish

former_member191435
Contributor
0 Kudos

Hi Teja,

Take source has IDOC and create target has messages 1 and messages2

Map like this....

ID

          equals ------------------------>  createIF -------->   fiel1 Message1

Constant 1

for Message2 do the same mapping .... in place of constant 1 use constant 2

Still if you face any issue reply me

Thanks,

Sreenivas

former_member184789
Active Contributor
0 Kudos
nabendu_sen
Active Contributor
0 Kudos

Hi Teja,

Everything is good except your Mapping. I think its generating both the Messages (Message 1 as well as Message 2). As mentioned by Chaitanya above, check the Logic of populating Message 1 and Message 2.

chaitanya_sudha
Explorer
0 Kudos

Hi Teja,

You can use the condition in message mapping itself, if ID =1 then create the file1 message type, id ID = 2 then create the file2 message type in your 1:n mapping, if you want to deliver both files to same system then you no need to put the condition in RD and ID, keep one business system based on the condition in the mapping only one message interface will exist in the mapping and delivered one file only.