cancel
Showing results for 
Search instead for 
Did you mean: 

Creating muliple messages (Split) in an adapter module

Former Member
0 Kudos

Hi,

Did anyone work on splitting the attachments in to separate XI messages in an adapter module? Is it possible? I am trying the possibilities of processing all the attachments of an XI message as separate XI messages.

Can we call the "process" method of the "ModuleProcessor" interface with channel ID and "ModuleData" object (created from each of the attachment of the original method)?

Any help or past experience would be appreciated.

VJ

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>Did anyone work on splitting the attachments in to separate XI messages in an adapter module? Is it possible?

as mentioned by Stefan it's not supported by SAP... but

it's possible

and you can do it quite easily within an adapter module

so if you can life with a risk of a message lost (due to lack of transaction handling) you can use it

Regards,

Michal Krawczyk

http://mypigenie.com XI/PI FAQ

VijayKonam
Active Contributor
0 Kudos

mmm.. thats tricky..!! This is Customer Orders.. so I do not think I have that freedom..!! [:(]

VJ

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can also try doing something like this

mail to file and use split multi mapping to create many files from one

mail (for each attachment)

then file to IDOC (or BAPI etc) that will create orders

then you will have two flows but everything will be in standard

and you can split it easily this way

Regards,

Michal Krawczyk

VijayKonam
Active Contributor
0 Kudos

But I am not getting the attachments in XI payload. They are separately treated as Attachments. I do not think I can do a split mapping because the source message does not contain the attachements too.

Think I am a bit vagues.. but thats how i could put it into words..!!

VJ

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

if your attachments contain order data and you can map them all to XI payload in an adapter module (which is pretty easy) then you can use

the standard split and do as I said

Regards,

Michal Krawczyk

Answers (2)

Answers (2)

ravi_raman2
Active Contributor
0 Kudos

Vijay,

I am trying to understand your scenario.........a bit.

There is a api call to countAttachments, count and iterate through them, issue seems to lie in making a new message out of each attachment, if that is indeed what you want........

Do let me know

Regards

Ravi Raman

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>issue seems to lie in making a new message out of each attachment,

getAttachment can be used to read attachment

Regards,

Michal Krawczyk

http://mypigenie.com XI/PI FAQ

VijayKonam
Active Contributor
0 Kudos

Yes guys. I have a solution now. Writing an adapter module to read all the attachments and adding to one XML payload.

Thanks for the inputs.

VJ

stefan_grube
Active Contributor
0 Kudos

This is not supported and you risk data lost, as no transaction habdling is available.

You have to create a whole adapter for this purpose.

Regards

Stefan

VijayKonam
Active Contributor
0 Kudos

Thanks Stefan. I am working on the Mail Adapter. Can I extend an existing mail adapter or should I need to write it from the scratch?? Like reading the mail etc or can I extend something that is already available?

VJ