on 04-12-2007 5:17 PM
Hi Experts,
I have to write one line like this in Java program of Web Dynpro:
wdContext.currentPritemElement().setPreq_Price("1.544");
This is not getting compiled. The error is "The method setPreq_Price(BigDecimal) in the type IPrivateMyView.IPritemElement not applicable for arguments(string)".
It looks like there is datatype mismatch and due to this we are getting above error. We Can we do some like typecasting etc to sort out the issue. If yes, how we can do so.
Regards,
Ravindra
Hi Ravindra,
The error is because of data type mismatch.
You can do like this:
wdContext.currentPritemElement().setPreq_Price(new BigDecimal(1234));
Thanks.
Best Regards,
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"1.544" is a string. To store this in the context element you either have to change the properties of the element to be either String or double, or create a BigDecimal object with the value of 1.544. To create a BigDecimal in the context change the code to wdContext.currentPritemElement().setPreq_Price(new BigDecimal(1.544));
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 | |
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.