on 07-05-2006 1:53 PM
Hi I create a model for my RFC.
The model import a BAPI ( 7 input fields , 1 output field)
Into the SAP this function run good but one of the 7 input fields is empty.
I create a view with 7 input and 1 outuput fields, but when I execute the BAPI, I have a null pointer exception.
The problem is setting the value of the empty fields in Bapi function.
This is no my first exsercise, but is my first time that I manage one empty field of a BAPI.
Hi Marco,
Handling of BAPI input fields are same as other attributes.
you can check the value is null before execute the BAPI.
if(wdContext.current<nodeName>Element.get<ElementName>()==null){
wdContext.current<nodeName>Element.get<ElementName>()="";
}
kind Regards,
Mukesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marco,
Out of the 7 fields, set to empty values for the variables which you are not setting/passing any value.
Sample code looks like follows:
wdContext.Current<your node name>.setInputField1("");
Hope this helps you.
Regards,
Shiva Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marco,
What is the datatype of that field? If it is <i>String</i>, then set it to "null".
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.