Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Disable button on toolbar of ALV

Former Member
0 Kudos

Hi experts,

I have added tow buttons on toolbar of ALV grid as below:

form set_pf_status using rt_extab type slis_t_extab.

set pf-status 'ZSTANDARD'.

endform. "set_pf_status

*u201Cset_pf_status

form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

if r_ucomm eq 'BUTTON1'.

message ' button1'.

endif.

if r_ucomm eq 'STEP2'.

If BUTTON1 was clicked ==> BUTTON 2 enable ==> How to handle code ? endif.

endif.

if r_ucomm eq 'STOP'.

leave screen .

endif.

endform. "set_pf_status

endform.

Thank you so much.

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

Hi abaper1712,

...
DATA: lt_excl type table of sy-ucomm.
IF <condition_that_you_know_better_than_me>.
  APPEND 'BUTTON1' to lt_excl.
ELSE.
  APPEND 'BUTTON2' to lt_excl.
ENDIF.

set pf-status 'ZSTANDARD' EXCLUDING lt_excl'
..

.

Just to giveyou the idea.

Regards,

Clemens

2 REPLIES 2

Former Member
0 Kudos

can you be more specific with your problem... code is fine but what you want is not clear

Clemenss
Active Contributor
0 Kudos

Hi abaper1712,

...
DATA: lt_excl type table of sy-ucomm.
IF <condition_that_you_know_better_than_me>.
  APPEND 'BUTTON1' to lt_excl.
ELSE.
  APPEND 'BUTTON2' to lt_excl.
ENDIF.

set pf-status 'ZSTANDARD' EXCLUDING lt_excl'
..

.

Just to giveyou the idea.

Regards,

Clemens