on 12-28-2010 2:18 PM
Hi All,
I have a scenario in where I have to split a large file (txt) into smaller files and then process them in PI.
Normally I use FCC and message per recordset... It splits all messages and everything is ok.
BUT, now I have to split the messages at specific key points. I cannot split it by a static number. It may vary. It is totally dynamic.
So I want to use the adapter module to write my own code to split the message when I need to. but how?
When using the FCC the messages get split before they even arrive at my adapter module. So is it possible to split them manually using adapter module???
Thanks.
Hi Chris,
These are my thoughts on this issue. 40 MB (larger file) need to be split into small files (according to your requirement, at dynamic key points).
You can split large file using OS script, but it cannot be monitored using SAP PI infrastructure. I think you are considering writing an adapter module. So, I assume your PI system can handle that large file (40 MB) in memory. My opinion is, do not go with adapter module, as it is difficult to code, maintain and memory intensive. Try to create another new scenario, which picks up this large file, splits it into small pieces and place these small files in folder, from where current scenario picks up files. In new scenario, use Java Mapping (as input in not XML, we cannot use Graphical, XSLT) to split the payload at dynamic key points using OutputAttachments http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/OutputAttachments.html .
Hi All,
I have seen messages with multiple attachments which were processed in SAP PI (I have seen multiple attachments in SXI_MONITOR). I have not tried using OutputAttachments http://help.sap.com/javadocs/pi/SP3/xpi/index.html . Please let me know, whether we can generate multiple files from multiple attachments and place them in target directory using receiver file channel?
Regards,
Raghu_Vamsee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> When using the FCC the messages get split before they even arrive at my adapter module. So is it possible to split them manually using adapter module???
No, it is not possible to split the message in an adapter module.
Inside the adapter module you will have the whole file in memory, so if your file is too big, it might crash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It must create around 1 million IDocs.
With 40 bytes of data each? OMG!
try to find a way to create packages. Which IDoc is it? Maybe there is a BAPI also, then you can create an ABAP proxy which handles 1000 records and calls the BAPI inside.
40 MB pliain text will increase up to 6 times XML message size, you can reduce message size on creating short tag names.
Maybe the file can be processed anyway.
If you share more information about your scenario, we could discuss several possible solutions.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.