on 01-11-2010 5:47 PM
Hello guys.
In a view i have method WDDOBEFOREACTION, which I can use to set an error message. But I only wanna display an error message depending on the button user pressed in that view (there are many buttons). How can I know it? Could you bring me an example code? Thanks.
hi ,
there is a property OnAction of your Button UI ..
u may be having many buttons in your view , so click on that property , and make a action for every button .
Suppose u have 2 buttons , SUBMIT and UPLOAD , so make a action for the two buttons , suppose u make the actions SUBMIT and UPLOAD ..
so now u raise ur error messages in the OnActionSubmit and OnActionUpload methods ..
so now u wud raise messages on click of the Specific Button ..
hope u have got the point , cheers:)
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On the basis of action names, I was able to set my functionality but using the user-exits buttons that allow to implement my desired functionality. Thank you guys
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
By default WDDOBEFOREACTION has following code written and commented.
* data lo_api_controller type ref to if_wd_view_controller.
* data lo_action type ref to if_wd_action.
* 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 '...'.
* endcase.
* endif.
You can just uncomment the code and do your validation based on the parameter lo_action->name.
Hope this helps.
Regards
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gilberto,
Instead of putting everything in WDDOBEFOREACTION, try making a custom action for the button. Select the button in your Layout and populate the onAction Event from the Properties.
-Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.