on 07-23-2008 12:31 PM
Hi,
I have a WebDynpro Java application having only one BAPI used and working fine. Now I want to add one more bapi to the existing model and then call that perticular bapi and pull the data to a table.
I reimported my model and got the bapi and mapped the context accordingly. How can i call that perticular bapi now. I created a method in Component controler which is having the following statement and then calling that method in View controler. I am getting the nullpointer exeception. There is no import variables for the bapi.
wdContext.currentZfunmoduletest_InputElement().modelObject().execute();
Help in this case please
thanks
suresh
Hi suresh,
Did you bind the input element?
Regards,
P.Manivannan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Suresh,
You have to write the code to bind / execute for you second BAPI as you did for the Firstone.
otherwise use applytemplate.
Ramganesan Karuppaiyah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
If you have two BAPIs , then better thing is having two different models.
Try with this code in your execute BAPI method.
Zfunmoduletest_Input input = new Zfunmoduletest_Input();
wdContext.nodeZfunmoduletest_Input().bind(input);
try{
wdContext.currentZfunmoduletest_InputElement().modelObject().execute();
}
catch(Exception e) {
wdComponentAPI.getMessageManager().reportException(
e.getMessage(),fasle);
}
wdContext.nodeOutput().invalidate();
regards,
Tulasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
in the method u have initialize the model again and execute the model bind the node to the table so that those datas will be displayed in the table .
if u are binding the value node to the table then copy the data from the model node to the value node .
call the method from the view controller .
if possible paste the error stacktrace for better answers
Thanks and Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.