on 07-06-2011 8:08 PM
Hi all,
i change a field in a popup screen to obligatory. I change the method WDDOBEFOREACTION and works fine!! But now if the user click in cancel button in screen, a error message is displayed because the obligatory field is empty...
How I call the method only when user click in OK button? There existe a like "ok_code" object in web dynpro?
Thanks all!
Regards.
Renato
Yes, Get the Action ( associated with Push buttons) and enforce validations only when required..something like this..
LO_API_CONTROLLER = WD_THIS->WD_GET_API( ).
LO_ACTION = LO_API_CONTROLLER->GET_CURRENT_ACTION( ).
if LO_ACTION is bound.
case LO_ACTION->NAME.
when 'ACT_OK'. " Action associated with OK.
* Check all the mandatory attributes
L_VIEW_CONTROLLER = WD_THIS->WD_GET_API( ).
call method CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW
exporting
VIEW_CONTROLLER = L_VIEW_CONTROLLER
DISPLAY_MESSAGES = ABAP_TRUE
importing
MESSAGES = LT_CHECK_RESULT_MESSAGE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
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.