on 12-20-2013 6:47 AM
Hi,
I have a custom methods in view like onactionsave and other is yes method, my req is i want to call onactionsave method in yes method please let me know how to call save method in yes method...i tried with this code but getting error..please check this code n rectify this now.....
wd_this->onactionon_save(
wdevent = " ref to cl_wd_custom_event
).
Am not getting what to pass in wdevent = . when i pass here my onactionon_save method name it showing error please let me know.
Hi,
You need to pass an object event with parameters.
Please try the below sample code.
DATA lo_event TYPE REF TO cl_wd_custom_event.
DATA lt_parameters TYPE wdr_event_parameter_list.
DATA ls_parameters LIKE LINE OF lt_parameters.
" Prepare parameters
CLEAR ls_parameters.
ls_parameters-name = 'ID'.
GET REFERENCE OF 'ON_SAVE' INTO ls_parameters-value.
INSERT ls_parameters INTO TABLE lt_parameters.
" Create custom event object with parameters
CREATE OBJECT lo_event
EXPORTING
name = 'ON_ACTION'
parameters = lt_parameters.
" Call event handler
CALL METHOD wd_this->onactionON_SAVE
EXPORTING
wdevent = lo_event.
Hope this resolves your issue.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.