cancel
Showing results for 
Search instead for 
Did you mean: 

Fields of type Decimal in a BAPI are returning "0" when i called it from WD

Former Member
0 Kudos

Hi forum

I have a BAPI that return a structure with some decimals fields, when i import this BAPi to my model, in the dictionary was created a structure with my decimals fields of type Decimal (10,2), and the class that the model generated, rerturns a BigDecimal. The problem is that when i tried to make a getField1OfTypeDecimal() of this kinds of fields, the function is returning me "0", and the BAPI works fine. I have been resolved this issue by changing the type of the output paremeters in the BAPI to Char, but i think that could be another solution.

THnks

Josué Cruz

Edited by: Josue Cruz on Jan 20, 2009 11:33 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Well, there is not a problem, there is a thing of conversion of units and calculated decimal fields, you have in the BAPI´s convert internal formats to external formats.

Former Member
0 Kudos

Hi Josue,

Instead of converting to char, it is more appropriate to convert BigDecimal into double (or float).

Convert with <BigDecimal>.doubleValue() method for the same & use this value in WD.

Kind Regards,

Nitin

Edited by: Nitin Jain on Jan 22, 2009 7:19 AM