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: 

Hide button in Application tool bar

Former Member
0 Kudos

Hi,

I have a requirement to add buttons in the application

tool bar. I have added 2 buttons in the appln tool bar.

Depending on condition, i will have to show either button1

or button2. For some conditions, i will have to hide one

or both buttons.

I can get this logic with more than 1 gui status. I want to know

that how can i hide the buttons in the application tool bar dynamically

in the code basing on some condition for a single GUI status.

Thanks in Advance,

Prasad

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

Use this statement..


DATA fcode TYPE TABLE OF sy-ucomm.

REFRESH fcode.
IF g_flag EQ 'X'.
  APPEND 'FCODE1'  TO fcode.
  SET PF-STATUS 'MENU' EXCLUDING fcode.
ELSE.
  APPEND 'FCODE2'  TO fcode.
  SET PF-STATUS 'MENU' EXCLUDING fcode.
ENDIF.

2 REPLIES 2

Former Member
0 Kudos

Press F1 on SET PF-STATUS.

Rob

Former Member
0 Kudos

HI,

Use this statement..


DATA fcode TYPE TABLE OF sy-ucomm.

REFRESH fcode.
IF g_flag EQ 'X'.
  APPEND 'FCODE1'  TO fcode.
  SET PF-STATUS 'MENU' EXCLUDING fcode.
ELSE.
  APPEND 'FCODE2'  TO fcode.
  SET PF-STATUS 'MENU' EXCLUDING fcode.
ENDIF.