on 05-08-2008 7:59 AM
Hi All ,
I have One Requirement, i have Two table one is company and another is Branches , Braches will display as the company , In the Branch view I have there button one ADD , EDIT , DELETE ,
i can add the new branches corresponding to the company ,also we can edit and delete the branches corresponding to the company .
BUT the problem is if there is no branch exit only ADD Button display in the Branches View and Rest of the Two Button EDIT and DELETE should be Disable Mode; please help how to do this, Any method for Disable for ALV Button.
Regards ,
Nihar Swain .
Hi nihar
to disable a alv customized button use this code.
DATA: lo_button TYPE REF TO cl_salv_wd_fe_button,
lo_btn_function TYPE REF TO cl_salv_wd_function,
l_text1 type string.
l_text1 = 'button_text'.
CREATE OBJECT lo_button.
Set the button text 'button_text' .
CALL METHOD lo_button->set_text
EXPORTING
value = l_text1.
Create the function for binding with the toolbar.
lo_btn_function = lo_config_model_value->if_salv_wd_function_settings~CREATE_FUNCTION( 'func1' ).
lo_button->set_enabled( ABAP_FALSE ). -> to disable button
Assign the button to the toolbar function.
lo_btn_function->set_editor( lo_button ).
regards
chythanya
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 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.