on 08-03-2005 4:17 PM
Hi all,
I'm running a webdynpro application, inside it I'm executing a RFC that receives some parameters. Most of them are strings, but just one of them is BigDecimal type. When I run the app, I got the following error...
java.lang.NullPointerException
at java.math.BigDecimal.<init>(BigDecimal.java:181)
I appreciate any help you can give me.
Thanks in advance.
Jesus.
Hi Jesus,
Please try this code for executing the RFC:
public void executeRFC (java.math.BigDecimal importe)
{
try {
Zbapi_createVR_Input_Input input = new Zbapi_createVR_Input_Input();
input.setImp(importe);
wdcontext.nodeZbapi_createVR_Input_Input.bind(input);
wdContext.currentZbapi_createVR_InputElement().modelObject().execute();
// modelobject didn't have () in your code
}
catch (Exception e) {
}
I am not sure whether the way you entered input parameters will work. Anyway, this is the usual way we pass parameters to RFC.
Hope this works for you.
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
That means the context attribute "Importe" is empty.
Set some value using wdContext.currentContextElement().setImporte(VALUE) and try.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jesus,
Can you please paste your code here (the code where you are creating the BigDecimal object & passing to RFC) ?
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nibu,
Here you have the code that I'm using..
BigDecimal imp = new BigDecimal (
wdContext.currentContextElement().getImporte());
wdThis.wdGetVR_ControllerController.executeRFC(imp);
Then in the VR_Controller, I have created a method call executeRFC like this...
public void executeRFC (java.math.BigDecimal importe)
{
try {
wdContext.currentZbapi_createVR_InputElement().modelObject.setImp(importe);
wdContext.currentZbapi_createVR_InputElement().modelObject.execute(),
}
catch (Exception e) {
}
Thanks.
Jesus.
Hi ,
Is this field is mandatory ? may be you are not passing any value? Please check.
Regards, Anilkumar
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.