cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Adapter Module to split messages

Former Member
0 Kudos

Hello,

Is it technically possible to create an XI adapter module (for a Sending File Adapter) that splits messages.

I know how to replace message using the ModuleData.setPrincipalData()

I know how to send a new message using a new instance of the Module Processor and using ModuleProcessor.process()

But is it possible to generate multiple messages and somehow giving them to the next step in the Module chain.

Thanks for your help

Jan Van Achte

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi

You can use a BPM in order to do this.

Hi you can see Jin Shin blog, without BPM

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Regards

Message was edited by:

Iñaki Vila

Former Member
0 Kudos

Hi Inaki,

Obviously I can do it in a BPM, but I don't want to, as it will make the interface topology much more complex. I need many interfaces to split files, and as each one has its own Message Interface, that would require a great many number of BPMs, just to do some splitting. A module would be much much better.

But thanks for your suggestion

Jan

Former Member
0 Kudos

I fear that will not be possible using an adapter module. You may have to develop a whole new adapter itself for this purpose.

I am not vey sure on this. Will get back if I get anything solid.

Regards,

Jai Shankar

Answers (2)

Answers (2)

Former Member
0 Kudos

All,

I got confirmation from SAP that the Adapter Module cannot do a message split.

You can change messages, and create new messages (which then go into a separate ModuleProcessor), but you cannot create additional messages which will go into the next module of the module chain.

Neither is this going to be possible in NW7.1.

Thanks all for your efforts and help.

I will now review which option I will take (there are others beyond BPM) and feed it back into this thread, so it might be of some use in the future.

Jan

Former Member
0 Kudos

Were you able to come up with any solution with this issue yet. I have a similar requirement and would be glad to hear you out, Let me know.

I have a large files (sometimes more than 2GB) in external FTP server and needs to be fed to PI 7.1. Cant use recordset per message,becasue there are some invalid chars in the data that XML parser will not convert to. Script is out of question at this point.

Please suggest an approach given my criteria.

Former Member
0 Kudos

Hi Priya,

I am facing the exact same issue and we are using PI 7.1 ... pls suggest me if you have any solution on this spliting of big files.

I think if there is no solution then I am going to use the command line arguments to break the file at FTP server.

Looking forward for your reply.

-SS

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Surendra,

Have you tried option Record set per message option in Filde adapter, it really works to split the file,

if you specify value 500 means it will process 500 lines at a time.

try with that.

Regards,

Raj

Former Member
0 Kudos

Hello Jan,

you wrote it is possible to create a new message in your sender adapter module (which then goes into a seperate ModuleProcessor). Do you have a sample code for this?

Regards

Markus

Former Member
0 Kudos

well technically speaking,i don't see any reason why you should not be able to split the file using Adapter modules.it should be possible.

but the thing is why do you want to use modules?can't you use <i>"Recordset per message "</i> option.

Thanx

Aamir

Former Member
0 Kudos

Hi Aamir,

The problem is that RecordSets per message does not work if you use the MessageTransformBean module to do the File Content conversion (see below for some background why I need to do it this way).

Technically speaking, the signature of the Module.process() method of the module is as follows:

public ModuleData process(ModuleContext moduleContext,

ModuleData inputModuleData)

throws ModuleException

ModuleData has the setPrincipalData(java.lang.Object) method. Typically you would put here one message (an implemenation or extension of XMBMessage, com.sap.aii.af.ra.ms.api.Message or a XIMessage (although obviously any java.lang.Object would do.

So my real question is, does one of these classes/interfaces have a java collections or similar method, so I could add multipe "messages".

Thanks for your help,

Jan

Background:

I need to use the module because I have another module before that to parse the file into lines (I receive one big blob of data that is byte-position delimited, with single and multi-byte characters. Every line is 80bytes, which could be 80 characters or less. So I need to read the file binary, split it into lines of 80 bytes and only then can I convert it to UTF and have the MessageTransformBean convert it to XML. I