cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Java question

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravidra

You can do this

wdContext.currentPritemElement().setPreq_Price( new BigDecimal( "1.544" ) );

and it´s all .. you shouldn´t has any other problem...

If the answer helps you, regards

Josue Cruz

Former Member
0 Kudos

Thanks Josue,

The issue got sorted out.

Regards,

Ravindra

Answers (0)