08-05-2008 12:10 PM
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
08-05-2008 2:06 PM
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
08-05-2008 12:23 PM
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
08-05-2008 2:06 PM
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
08-05-2008 2:34 PM
08-05-2008 5:06 PM
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
08-05-2008 2:53 PM
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
08-05-2008 10:22 PM
Hi,
you can use set pf-status with excluding 'button name' addition
hope it will help
Thanks,
Kamesh Bathla