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 push button in menu bar

Former Member
0 Kudos

Hi all,

requriment that if authorized user runs the transaction code than a push button is enabled.

if he is not he authorized person the that push button on menu bar is disabled

please this is very urgent.

thanx for all guru's

in advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You need to know the Function Code(FCODE) for the button which you want to disable.

Then check the authorization.

If the authorization is not there then execute this code


DATA: itab TYPE TABLE OF sy-ucomm. 
APPEND 'DELE' TO itab. " To be excluded
APPEND 'PICK' TO itab.  " To be excluded.
SET PF-STATUS 'STA3' EXCLUDING itab.  "Replace STA3 with your PF-STATUS.  

Hope this helps

Regards

Nishant

2 REPLIES 2

Former Member
0 Kudos

Hi,

You need to know the Function Code(FCODE) for the button which you want to disable.

Then check the authorization.

If the authorization is not there then execute this code


DATA: itab TYPE TABLE OF sy-ucomm. 
APPEND 'DELE' TO itab. " To be excluded
APPEND 'PICK' TO itab.  " To be excluded.
SET PF-STATUS 'STA3' EXCLUDING itab.  "Replace STA3 with your PF-STATUS.  

Hope this helps

Regards

Nishant

Former Member
0 Kudos

Hi Kiron,

Can you please mark this thread as answered and close it?

I am sure the answer would have solved your question

Regards

Nishant