‎2009 Apr 02 8:19 PM
Hello Gurus,
I have following program. I want to make the Tab screen on selection screen inivisible when ceratin condition is set in configuration table. I know that I have to do it in AT SELECTION-SCREEN OUTPUT using loop - endloop. But how can I do it , lets say when variable v_block = 'X'.
REPORT ZTOPTEST .
data: v_block type char1.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
parameters:
max_res(8) default '20'.
SELECTION-SCREEN END OF SCREEN 100.
****************************************************************
SELECTION-SCREEN: BEGIN OF TABBED BLOCK tab_block FOR 5 LINES,
TAB (20) tab1 USER-COMMAND tabpush1
DEFAULT SCREEN 100,
END OF BLOCK tab_block.
AT SELECTION-SCREN OUTPUT.
LOOP AT SCREEN.
:
:
MODIFY SCREEN.
ENDLOOP.
‎2009 Apr 02 8:28 PM
Try this way
AT SELECTION-SCREeN OUTPUT.
if v_block = 'X'.
LOOP AT SCREEN.
if screen-name = 'TAB1'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
endif.
ENDLOO
, a®
‎2009 Apr 02 8:28 PM
Try this way
AT SELECTION-SCREeN OUTPUT.
if v_block = 'X'.
LOOP AT SCREEN.
if screen-name = 'TAB1'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
endif.
ENDLOO
, a®
‎2009 Apr 02 8:31 PM
If I do like this then TAB does get suppressed but there a thick Grey color patch that appears. I want the screen to look like as if there is no tab block. Do I need to play with screen-color for this ?
‎2009 Apr 02 8:52 PM
Yes you are right, If you makes the INVISIBLE default color is not hide it still there,. I am seeing something like this
http://img.photo.163.com/uK9W8WJgvPlghW7VLcWHNg==/84723967993187238.jpg
In that case try to make fields inside the tab to "display only " and not to HIDE the tab
a®
‎2009 Apr 02 9:13 PM
Hi, Jainam
Use the following Sample Code hope will solve out your problem,
AT SELECTION-SCREEN OUTPUT.
IF v_block = 'X'.
LOOP AT SCREEN.
IF screen-name = 'MAX_RES' or screen-name = '%_MAX_RES_%_APP_%-TEXT'.
* screen-active = 0. " Active this and Hide the Bellow if Compliantly Hide Fields and Lable
screen-input = 0. " You can see the Fields but not able to Input
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Best Regards,
Faisal
‎2009 Apr 02 9:18 PM
Faisal,
I tried your code , still color image of tab showing in the screen,
a®
‎2009 Apr 02 9:24 PM
Yes, a®s
My Code will hide the field max_res and its label not perform any action on Tab. in this way you can hide up all the field in the Tab or make them not ready for input.
Best Regard,
Faisal