on ‎2021 Apr 06 8:34 PM
Hi, guys!
I've created ALV Grid for my data and added the custom button `&Save` on the ALV Grid toolbar.
Now I want to realise the logic when the user clicks on `&Save` the button should become inactive.
Would be grateful for useful advice or a step-by-step guide.
Here's my code for ALV and Button event:
DATA:
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_sort TYPE slis_t_sortinfo_alv,
lt_excluding TYPE slis_t_extab.
DATA(ls_layout_alv) = VALUE slis_layout_alv( colwidth_optimize = abap_true
zebra = abap_true ).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_grid_title = CONV lvc_title( lv_grid_title )
it_fieldcat = lt_fieldcat
it_sort = lt_sort
i_callback_program = sy-repid
is_layout = ls_layout_alv
i_callback_pf_status_set = `PF_STATUS`
i_callback_user_command = `USER_COMMAND`
TABLES
t_outtab = gt_report_success
EXCEPTIONS
program_error = 1
OTHERS = 2.
FORM pf_status USING it_pf_status TYPE stt_fcode.
SET PF-STATUS `Z_STATUS`.
ENDFORM.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN `&SAVE`.
" Here should be the code which makes button inactive after click
ENDCASE.
ENDFORM.
Request clarification before answering.
You need to "exclude" the buttons that you want to hide, and pass it on to the ALV in IT_EXCLUDING parameter.
Below links can help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.