on 12-12-2013 10:08 PM
Hello
I placed the ALV table on my_view of my_wdc. I used standard ALV interface, hence i have all its buttons, like APPEND, INSERT, DELETE, well
But, once user clicks the APPEND button, i need to do some my custom stuff, or if user clicks the INSERT i need to dome other stuff
Pls. let me know how can i figure out that user clicked on APPEND button or INSERT button or some other button/action?
I tried Thomas's below direction but not working!
http://wiki.scn.sap.com/wiki/display/Snippets/Web+Dynpro+ABAP+-+ALV+Controlling+Standard+Buttons
Thankyou
Any help pls.?
Thnak you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi MSR,
The action of standard buttons viz APPEND, DELETE, INSERT of WD alv cannot be captured in event ON_STANDARD_FUNCTION OR ON_FUNCTION.
Your requirement can be achieved as below
•Hide the standard functions from tool bar by using methods of interface
if_salv_wd_std_functions
◦Hide Append button -
lo_alv_model->if_salv_wd_std_functions~set_edit_append_row_allowed(
abap_false )
◦Hide delete button
co_alv_model->if_salv_wd_std_functions~set_edit_delete_row_allowed(
abap_false )
◦Hide insert button
co_alv_model->if_salv_wd_std_functions~set_edit_insert_row_allowed(
abap_false )
•Add custom function / button to toolbar by using method of interface
if_salv_wd_function_settings
Example: Create new "INSERT_ROW'
DATA: lo_append_button TYPE REF TO cl_salv_wd_fe_button,
lo_append_func TYPE REF TO cl_salv_wd_function,
* Customize the INSERT button with the Icon display
CREATE OBJECT lo_append_button.
* Set button image
lo_append_button->set_image_source(
'ICON_INSERT_ROW' ).
* Set button function
lo_append_func =
Lo_alv_model->if_salv_wd_function_settings~create_function(
id = 'APPEND_ROW' ).
lo_append_func->set_editor( lo_append_button ).
"---------------------------------------------
•Go to view methods tab and create one event handler method "on_alv_action" and bind it to an event ON_FUNCTION of alv as show in below
Pleaser refer the below link for adding custom button in alv tool bar
Creating custom button in WD alv toolbar
Hope this helps you.
Regards,
Rama
Message was edited by: Ramakrishnappa Gangappa
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.