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: 

Pushbutton on application toolbar

former_member549415
Participant
0 Kudos

Hi to all

Please tell me how i can hide the pushbutton on application toolbar i have 2 button & i want to Hide 2nd when i will click on 1st button and visa versa

i have following code.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2,

INITIALIZATION.

sscrfields-functxt_01 = 'LH'.

sscrfields-functxt_02 = 'UA'.

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

WHEN 'FC01'.

p_carrid = 'LH'.

p_cityfr = 'Frankfurt'.

WHEN 'FC02'.

p_carrid = 'UA'.

p_cityfr = 'Chicago'.

ENDCASE.

Thankx in advanced

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try this out,

AT SELECTION-SCREEN OUTPUT.

If sy-ucomm = FC01.

loop at screen where name = FC01.

screen-invisible = 0.

endloop.

else.

loop at screen where name = FC02.

screen-invisible = 0.

endloop.

endif.

Thanks,

Muthu

6 REPLIES 6

Former Member
0 Kudos

In the PBO module while setting the PF-status approach as follows..

If fcode = 'BUT1'.

SET PF-STATUS 'S100' EXCLUDING BUT2.

else.

SET PF-STATUS 'S100' EXCLUDING BUT1.

ENDIF.

Reward points if helpful

Former Member
0 Kudos

Hi,

Try this out,

AT SELECTION-SCREEN OUTPUT.

If sy-ucomm = FC01.

loop at screen where name = FC01.

screen-invisible = 0.

endloop.

else.

loop at screen where name = FC02.

screen-invisible = 0.

endloop.

endif.

Thanks,

Muthu

0 Kudos

hi muthu..

i tried your code still it shows the error.

0 Kudos

Hi,

I missed one statement in the code. It will work if you defined the screen through code. It you created the screen toolbar in SE41 then use the code under the PBO event.

AT SELECTION-SCREEN OUTPUT.

If sy-ucomm = FC01.

loop at screen where name = FC01.

screen-invisible = 0.

modify screen.

endloop.

else.

loop at screen where name = FC02.

screen-invisible = 0.

modify screen.

endloop.

endif.

Hope it will helpful to you!!

Thanks,

Muthu

Former Member
0 Kudos

Hi Somnath.

I would like to suggest,

Firstly, To disable your push button you must have a statement in AT USER-COMMAND event.

Which is SET PF-STATUS 'ORDER' (say) EXCLUDING 'READ' (say).

Secondly, To Disable / Gray out the pushbutton for input disabling, Go To SE41 Menu Painter or Double click on SET PF-STATUS 'ORDER' (On Order).

In Menu Painter, GoTo -


> Attributes -


> Pushbutton Assignment -


> Check Radio button (Display all).

Or You can Check Radio button (Function) for specific option.

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

Former Member
0 Kudos

Hi,

you can use set pf-status with excluding 'button name' addition

hope it will help

Thanks,

Kamesh Bathla