on 11-26-2012 4:28 AM
Hi gurus,
I am new to sap pi i have one doubt that in one file having 1000 records but i need only 100 records out of 1000 how can we send 100 records from that.
is there and paremeter option adapters to send like this.Please give me the response for this
Thanks&Regards
N.Madhu
Hi N Madhu
Recomnend you specify the release and support pack of PI you are using as that will make it easier for people to answer you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi N.Madhu,
How will you choose which 100 records to send to target? Are there some conditions or you want to send first 100 records? In case you have some conditions then you need to put those conditions in a UDF and the records which satisfy those conditions are forwarded to the target.
Regards
Anupam
Hi N Madhu,
Please try using this UDF of type "context"
public void firstNValues(String[] a,ResultList result,Container container) throws StreamTransformationException {
int i,n=100;
for(i=0;i<a.length && i<n;++i)
{
result.addValue(a[i]);
}
}
a------->FirstNvalues UDF------>target
a is the input field to the UDF.
Regards
Anupam
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.