on 01-18-2008 3:51 PM
Hello all,
in a mapping response from an oracle base after a RFC call with a select statement, i have the following response :
<StatementSelect_response>(cardinality 0..1)
<row1>(cardinality 0..unbounded)
<field1>1</field1>
<field2>2</field2>
</row1>
<row2>
<field1>3</field1>
<field2>4</field2>
</row2>
</statement>
i have to map those fields in a RFC_response like :
<RFC_response>(0..1)
<field1>
<field2>
</rfc _response>
Problem : I only need to send back to the rfc_response the last records of my StatementSelect_response in order to have the following message :
<RFC_response>
<field1>3
<field2>4
</rfc _response>
How can i select only the last row of my records plz ?
Thanks by advance
I will try on next monday and will do a feedback.
Thanks for the first answers...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>>>> _.java:65: ')' expected result.addValue(""a(a.length-1)"");
Can you please check that if u missing a "," (Comma) thr.. or xcheck in above n below lines of this if you missing some bracket or some semi colon. if no
check out if you are providing the correct parameters to the addValue.
It should be like this
public void addValue(java.lang.String key,
double val,
java.lang.String comment)
. I hope you giving the two parameters.
regards
Aashish Sinha
PS : reward points if helpful
>
> Hi,
>
> public void LastRow(String[] a,ResultList result,Container container){
>
> int len = a.length();
> Result.addValue(a\[len-1\]);
>
> }
VJ,
Please don't confuse him. If you want to update the thread, let me leave it aside.Coz it shouldn't cause him trouble. Can u check a.length() is correct? it has to be a.length, isn't it?
We all here to help others, not under any motivation of compete..
Sorry, if I hurt you..
raj.
Hi Raj,
Me too not a Java expert either. Obviously everyone tries to help but not to confuse any one. Then again, supplying well compiled code to the people will stop them thinking. Their problem will get solved, but next time they will have to come to the forum again.
The mistake was not intentional though. Thanks for pointing out.
VJ
Jean,
Follow the logic.
field1(source)- removecontext- udf- field1(Target)
field2(source)- removecontext- udf- field2(Target)
UDF code (input variable a, type queue)
result.addValue(""a(a.length-1)"");
The above should work.
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For that I beleive you have to go for Java Mapping. So the Java code will except the database resp. and it counts the no. of records and take only last and map it to the target.
thanks
farooq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.