‎2007 Mar 08 3:17 PM
Hi,
I have created a selection screen with a subscreen area to include screen exits. If there are no screen exits, this block has to be hidden. I loop at the screen and hide every object in the block. On two of our systems everything is fine, but today I imported the transports to a third system and there I just see the empty block, with nothing on it. Is there maybe a parameter in SAP that tells to show or hide empty block in a selection-screen?
This is my code:
SELECTION-SCREEN BEGIN OF TABBED BLOCK C1 FOR 10 LINES.
SELECTION-SCREEN TAB (10) TAB1 USER-COMMAND ucomm1.
SELECTION-SCREEN TAB (10) TAB2 USER-COMMAND ucomm2.
SELECTION-SCREEN TAB (10) TAB3 USER-COMMAND ucomm3.
SELECTION-SCREEN TAB (10) TAB4 USER-COMMAND ucomm4.
SELECTION-SCREEN TAB (10) TAB5 USER-COMMAND ucomm5.
SELECTION-SCREEN TAB (10) TAB6 USER-COMMAND ucomm6.
SELECTION-SCREEN TAB (10) TAB7 USER-COMMAND ucomm7.
SELECTION-SCREEN TAB (10) TAB8 USER-COMMAND ucomm8.
SELECTION-SCREEN TAB (10) TAB9 USER-COMMAND ucomm9.
SELECTION-SCREEN END OF BLOCK C1.
and in initialization event:
IF L_LENGTH = 0.
LOOP AT SCREEN.
IF SCREEN-NAME(3) = 'TAB'.
SCREEN-ACTIVE = 0.
screen-required = 0.
screen-input = 0.
screen-output = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*Sets empty screen as basic but this is not shown
C1-dynnr = '0200'.
C1-prog = '/ARINSO/BC_PG_OCI'.
C1-activetab = 'TAB1'.
GW_SCREXITS-SCREEN = '0200'.
GW_SCREXITS-REPNA = '/ARINSO/BC_PG_OCI'.
‎2007 Mar 08 3:23 PM
hi Bjorn,
try using <b>MODIF ID <id></b> option with selection screen objects.
hope this helps,
Sajan Joseph.
‎2007 Mar 08 3:41 PM
hi Bjorn,
also, try this change:
LOOP AT SCREEN.
IF SCREEN-NAME(3) = 'TAB'.
SCREEN-ACTIVE = 0.
screen-required = 0.
screen-input = 0.
screen-output = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
"include this check
if SCREEN-NAME = 'C1'.
screen-active = 0.
screen-required = 0.
screen-input = 0.
screen-output = 0.
screen-invisible = 1.
modify screen.
endif.
ENDLOOPHope this works,
Sajan Joseph.
‎2007 Mar 08 4:23 PM
Hi, thanks for your answers, but none of them seem to work.
Adding modif just hides the same objects as before.
And there doesn't seem to be anything that comes near to C1 in the table SCREEN.
The main difference between the system on which it works and the one on which it doesn't work is that the system on which it doesn't work is a non-unicode system. Maybe that's the reason.
‎2011 Sep 29 2:44 AM
Try in this way.
type-pools: icon.
data: switch.
selection-screen begin of block b2 with frame title text-001.
parameters: radio radiobutton group rnd user-command test default 'X',
radio2 radiobutton group rnd.
selection-screen end of block b2.
selection-screen begin of block b1 with frame title text-001.
parameters:
test type bkpf-belnr modif id sc1.
selection-screen end of block b1.
selection-screen begin of block b3 with frame title text-001.
parameters:
test1 type bkpf-belnr modif id sc2.
selection-screen end of block b3.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1' AND RADIO EQ 'X'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
CONTINUE.
ELSEIF SCREEN-GROUP1 = 'SC2' AND RADIO2 EQ 'X'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
start-of-selection.
‎2007 Mar 16 11:21 AM
Hi Björn Blanckaert ,
Assign all the related screen fields to a modification ID ....
ex : parameters : p_matnr type mara-matnr modif Id 'MID'
Now at run time (At Selection screen output)
loop at sceen.
If screen-group1 = 'MID'.
screen-active = 0.
screen-invisible = 1.
modify screen.
Endif.
endloop
Hope this solves your problem
PS : Please reward points if solution is helpful
‎2011 Sep 29 2:31 AM
DATA: d_ucomm LIKE sy-ucomm,
a(1) type c.
SELECTION-SCREEN begin of block bl2.
PARAMETERS: p_grpa1(10) MODIF ID A,
p_grpa2(5) MODIF ID A,
p_grpb1(2) MODIF ID B.
SELECTION-SCREEN end of block bl2.
SELECTION-SCREEN begin of block bl1.
SELECTION-SCREEN PUSHBUTTON /2(10) btn user-command cl1.
SELECTION-SCREEN PUSHBUTTON /2(10) btn2 user-command cl2.
SELECTION-SCREEN end of block bl1.
INITIALIZATION.
clear a.
AT SELECTION-SCREEN.
d_ucomm = sy-ucomm.
AT SELECTION-SCREEN OUTPUT.
LOOP AT screen.
IF A = 'X'.
IF screen-group1 = 'B'.
screen-active = 0.
ENDIF.
CLEAR A.
ELSEIF A = ''.
IF screen-group1 = 'A'.
screen-active = 0.
ENDIF.
A = 'X'.
ENDIF.
MODIFY screen.
ENDLOOP.
START-OF-SELECTION.
Hope this solves ur problem
‎2011 Sep 29 8:26 AM
Hi,
Your LOOP at SCREEN statement must be coded under event AT SELECTION-SCREEN OUTPUT...
Kr,
m.