on 09-10-2007 8:50 PM
Hi Gurus,
I have a table view which is having a button called "Approve". Once its clicked, a popup should be opend with OK and CANCEL. If I click on OK, it has to take the particular row, which is selected from the table view, and update the Dictionary table. It is working fine without popup ( like once the approve button is clicked am taking the row values thru get_static_attributes, and updating the ztable.) But If I put the same statement in OK event handling of POPUP, its not wokring and throwing an error "Access via 'NULL' object reference not possible. " Please suggest me how can I fix it.
Thanks,
David.
hi david......
hope you will know the process of the pop up window. consider you are in a view 'A'. one you call a pop up, the window will be called but at the same time, the other methods like 'wddomodifyview' will be run in the background... so this method might be containing the coding which has to be processed only after you press the 'OK' button in the pop up window. that is why you are getting' Access via 'NULL' object reference not possible' error. so make sure that your logic works fine.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neha,
The error is coming at
Elem_Plan->get_static_attributes(
IMPORTING
static_attributes = stru_order ).
I have put this code in OK event handling of Popup view. But the table view is in different view. I think am getting the error bcaz of this as the above statement is expecting rows in that view itself. I just wanted to know how to access the details of other view being in popup window. Please help me.
David,
From what you described, you should create this context node on the component controller, map this context node to the table view and have the table bind to this mapped context node. Also you should create a method on the component controller to retrieve the selected context element from this context node then update DDIC. This way, when popup view's ok button is clicked, you can call wd_comp_controller-><the update method> to update the data.
Hope this helps,
Tina Yang
David, can you post more details of this node (cardinality, Initialize Lead Selection, etc), as well as the code where the error is happening.
By the way, you said you put the "OK" handler in your popup. I believe it would be better if this code were in the caller view, as described in <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4">Quick Tips and Tricks on Web Dynpro for ABAP - How to use ALV and Pop Ups</a>. At the end of page 8, it explains how you can handle the "OK" and "CANCEL' button clicks.
Hope this helps.
Andre
Hello David,
Where is the code for the event handler located? It should be in the controller where the context nodes are defined. 'Acces via NULL object reference' could in your case mean that you are trying to access a context node which was not found in the context of your controller.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.