‎2010 Sep 07 2:52 PM
1. I have created a function module in which i am calling screen 0100.
2. The FM has two import parameters Flag1 and Flag2
3. This screen 0100 has 3 PushButtons on it(say Button1 , Button2 and Button3)
4. Depending upon the parameter passed to the Flag1 and Flag2 field i have to hide or display the PushButtons
How do i achieve this?
‎2010 Sep 07 2:54 PM
this depends a lot how you have done your buttons.
Did you add them to your screen by PF-Status or are it real pushbuttons on the screen done with the screen editor?
‎2010 Sep 07 2:54 PM
this depends a lot how you have done your buttons.
Did you add them to your screen by PF-Status or are it real pushbuttons on the screen done with the screen editor?
‎2010 Sep 07 3:00 PM
‎2010 Sep 07 2:57 PM
Hi,
If it is a push button created using screen painter do this,
Write a code in PBO,
if flag1 = 'X'.
loop at screen where name = 'BUTTON1'.
screen-active = ' '.
modify screen.
endloop.
endif.
else,
get the fcode for that button to hide and add this to a exclude table and then set the PF-STATUS excluding this fcode.
SET PF-STATUS 'PF01' EXCUDING EXTTAB.
Hope this will solve your problem.
THanks,
Anmol.
‎2010 Sep 07 3:05 PM
Hi ,
try this way...
"If it is on the screen designed then try to assign group1 to the button by double click the Push button
"and write the code in PBO..
LOOP AT SCREEN .
IF screen-group1 = 'ID1' . "Modi ground assigned by double click the push button on the layout at
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Prabhudas
Edited by: Prabhu Das on Sep 7, 2010 7:37 PM
‎2023 Apr 18 10:40 AM
If the button you created has name( ex: 'button_1') so you can hide this button by the condition field NAME.
ex :
LOOP AT SCREEN.
CASE ABAP_ON.
WHEN 'Create_mode'.
IF SCREEN-NAME = 'button_1'.
ENDIF.
WHEN OTHERS.
ENDCASE.