Skip to Content
Former Member
Jun 09, 2007 at 06:09 AM

Not able to fetch correct data from RFC


Hi All,

I have made a RFC on SAP R/3 end. THe RFC does the following work.

data : ExRate1 type ZEXRTDIF, (data type dec 9,5 )

ExRate2 type ZEXRTDIF,


IF ExRate1 ge ExRate2.

exratedif = ExRate1 - ExRate2.


exratedif = ExRate2 - ExRate1.


where after certain calculation value comming in ExRate1 = '1.95583'

and in ExRate2 = '1.65683'.

Thus, import variable exratedif contains value '0.29900' .

RFC is running perfectly at R/3 end and showing correct output.

But when i call the RFC from portal application after establishing JCO connection

output = proxy.z_Ctrl_Exchangerate(input);

BigDecimal opExDifRate = output.getexratetdif();

Here the value of opExDifRate is 0.00000.

But if I hardcode the value of exratedif at SAP end as '0.29900' , It is perfectly shown at portal end.

Please help me in solving the problem. I am in urgent need.

I also attempted to keep the decimal value in string at RFC end. But similiar problem arises. Calculated value is not shown in portal but harcoded is.

Thanks in advance !