on 07-17-2007 12:22 AM
Hi Friends,
I am trying to call a BAPI from a webdynpro application when a user
hits a button in a table. The table will have a button for each entry.
There is an iView that has the table, a custom controller that executes
the BAPI (model).
I am setting the value of the custom controller context at the onAction event handler of the iView and calling the method executeBAPI once the user hits the button. The problem is it works fine for the first time. If the user hits another button of the table on the same screen it throws a nullPointer exception. ie all the subsequent calls fail.
What could be wrong?
java.lang.NullPointerException
at com.sap.tc.prototype.ITView.onActionEventSelect(ITView.java:160)
at com.sap.tc.prototype.wdp.InternalITView.wdInvokeEventHandler(InternalITView.java:160)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
...
Thanks in advance.
Nathan.
Hello ,
I am on EP7.0 ERP05 NW04s and trying to modify the ESS Address application by pointing to a custom Function Module rather than the standard one , and getting a similar message like "Attempt to send a message to a non-object value".
Is it because the custom BAPI is returning a null structure value .....?
Looking forward to your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wdThis.wdGetTCRegisterCustController().wdGetContext().nodeBapiInput().bind(new Bapi_Input());
I solved it using this statement at the beginning of the event handler. Dont know if its the right approach. Any suggestions on this would be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nathan,
Can u send the code...what r u doing at line 160 in ITView.java??
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
wdThis.wdGetTCRegisterCustController().wdGetContext().currentBapi_InputElement().setCount(count);
This is what i am doing at line 160. And i am setting some more values for the node.
I tried to debug it. I executed this line in the debugger and it shows the following error:
Evaluation failed. Reason(s):
Attempt to send a message to a non object value
Thanks
Nathan.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.