Application Development and Automation 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: 
Read only

Supressing Tab selection screen on selection screen ....

Former Member
0 Likes
1,092

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.

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
869

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®

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
870

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®

Read only

0 Likes
869

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 ?

Read only

0 Likes
869

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®

Read only

0 Likes
869

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

Read only

0 Likes
869

Faisal,

I tried your code , still color image of tab showing in the screen,

a®

Read only

0 Likes
869

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