on 02-27-2007 11:53 AM
Hi all,
I am doing a File Split scenario, requirement is to group a set of items coming
From a source file into messages .
File to flat file scenario source file is having n items requirement is to split this file after every 500 items not using BPM.
As of now I am able to generate as many files as the number of items but the
Requirement is to group atleast 500 items in one message because the target system
Can nt take that big file .
Is this scenario feasible in Message mapping ??
Regards,
KLK
Thanks all it is working using UDF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why don't you guys doesn't learn XSLT.
It's quite easy...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can achieve this using UDFs(queue type).
Create the following UDF and map the parent node as
item ---> UDF -
> parent node
input: a
int len = (int) Math.ceil(a.length/500.0);
for(int i=0; i<len; i++){
result.addValue("constant");
}
Then create a second UDF and map the child element.
item ---> UDF -
> child
input: a
for(int j=0; j<a.length; j++){
if(j%500 == 0 && j != 0)
result.addValue(ResultList.CC);
result.addValue(a[j]);
}
Regards,
P.Venkat
Message was edited by:
Venkataramanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Venkataramanan,
I am getting an error in the mapping saying Row which is under item can not be generated
Source is as follows :
MT
item
Row
field1
field2
Cannot produce target element /ns0:Messages/ns0:Message1/ns1:it_MT[2]/item/Row. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
HI,
You have an option in File adapter
--Source File Size : SourceFileSize
--Msecs to Wait Before Modification Check
Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.
This parameter is not available if you have selected File Content Conversion as the Message Protocol and then made an entry under Recordsets per Message that splits an input file into several messages
Also see the below link
/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi KLK,
Use UDF..
from source to target .. root. nodes.
source side one msg, target side two msgs.
target side first one is for 500 msgs,second one is for rest of msgs.
For this first send all record into Vector/Hash map.And then route these records based on loop condition first 500 to msg1 and rest to msg2..
Regards
Chilla..
Hi KLK,
this scenario is feasible without BPM....
In your sender file adapter just tell number of record-sets per message as 500...
then your source file will be broken after 500 records.
Thanks,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi KLK,
then there is a work around for your this msg split problem....
make a J2EE adapter module - from source file create files of 500 rec and put them in someother target folder........
now make another file com channel to pick the files from this target folder......so your scenario will take the second file comm channel and then your input files will be of 500 recs.
Thanks,
Rajeev Gupta
Message was edited by:
RAJEEV GUPTA
Hi,
Please see the below links for Message split ..
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
Regards
Chilla..
<i>Points rewarded if it is usefull..</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.