cancel
Showing results for 
Search instead for 
Did you mean: 

Splitting messages based on a field

former_member185846
Active Participant
0 Kudos

HI All

Im working on a scenario where the incoming message needs to be split based on one of the fields in the .dat file (source file ).

for e.g if the file is a .dat (data file contatining multiple Entity codes ) and the file needs to be split based on every line item corresponding to new Entity codes by XI , how do we do it ???????

I have suggested some changes to be made in the Incoming file

a)Adding an additional field indicating header and Data separately

b)additional header record to be added on every on data change

But i want to achieve this with the original file format

kindly help to give some pointers on the same , and suggest some solutions on it.

thanks

Joe

Accepted Solutions (0)

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Joe,

this only a mapping problem. Just look to <a href="/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible">Multi-Mapping without BPM - Yes, it’s possible!</a>. You have a XML structure like

- Messages

- Message01 / content

- Message02 / content and so on

You have to build the target XML with the logic you need. I would do that with XSLT, but its you choice to take XSL, message mapping, ABAP or Java for bus logic.

Regards,

Udo

former_member185846
Active Participant
0 Kudos

Hey Udo

Do u have any documentation on how to go about it using XSLT ,or any other mapping

or the blog u suggested should suffice ??

Can i know the reasons for you to prefer Xslt mapping ??

the incoming file is a data file with no xml in it , just plain records and very correctly the format u have specified

thnaks

Joe

udo_martens
Active Contributor
0 Kudos

Hi Joe,

just google for your prefered mapping.

I like XLST, its a personal affectation. You can solve that problem as well with other mappings.

The sender file adapter output is definitiv XML. So first step for you: Create your Repository and Directory objects except the mapping and test a message. Download the adapter output from SXMB_MONI to have a test file.

The use test functionality in Repository if you like a message mapping, for XSL mapping use XMLSpy. For ABAP there are test transactions in ABAP stack, for Java use ur development tool.

Every kind of mapping has handicaps and advantages. XSL has a bad performance. If you expect a lot big messages than you shouldnt take it. But it is the (my point of view) the most easy way to create a mapping. You can print a XSL documentation on 10 sides.

Regards,

Udo

Former Member
0 Kudos

Hi Joe,

If you want to create a a new target message corresponding to each line item that contains an entity code, and if you want to achieve this from the original file itself, first confirm if the .dat file has xml stored in it.

If its an xml, the changes that you suggested will be very helpful, but if it is not an xml file-you will have to opt for content conversion and then chosse the right record set parameters in order to get the desired output.

Hope this helped!

Regards,

Sushumna