on 06-21-2007 3:46 PM
Hallo all,
I want to check which button the user pressed.
I do this:
DATA:
LR_VIEW_CONTROLLER TYPE REF TO IF_WD_VIEW_CONTROLLER,
LF_ACTION TYPE REF TO IF_WD_ACTION.
LR_VIEW_CONTROLLER ?= wd_this->wd_get_api( ).
CALL METHOD LR_VIEW_CONTROLLER->GET_CURRENT_ACTION
RECEIVING
RESULT = LF_ACTION.
IF LF_ACTION->NAME = 'GO'.
do something
ENDIF.
It's ok. But when the user no button pressed, then i become a dump:
Access via 'NULL' object reference not possible
The problem is: LF_ACTION->NAME is initial.
Is there any otherv way to check were button pressed?
I know this:
data: lv_event_name type string.
lv_event_name = wdevent->get_name( ).
The problem here ist, it gos only in the event-handler-method. I will check it in another method.
Thanks for help.
greetings
Rainer
Hi
Use if initial check, it will solve your problem
Thanks
Anzy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
To avoid the Error
put all your code inside
if lf_action is not initial.
endif.
Regards
Abhimanyu L
Message was edited by:
Abhimanyu Lagishetti
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.