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

Selection-Screen

Former Member
0 Likes
656

Hi Frendz,

i have a selection-screen with three blocks, my issue is when i select a varaint, it should display only 2 blocks. how to solve this issue ?

Thanks in Advance..

Srini Kumar

7 REPLIES 7
Read only

Former Member
Read only

Former Member
0 Likes
630

Hi,

While creating the variant , you can make the fields in the third block as invisible . So when you choose the variant , the third block will not be visible.

Regards,

M.saravanan

Read only

Former Member
0 Likes
630

Hi,

While saving your variant hide the fields present in the Block. then it will not show that block when you select the variant.

in your selection screen enter the data and press save Button then it will show one screen, in that find the fields in the Block and mark <b>'X'</b> under <b>Hide</b> option for the Fields. then the Block will be Hidden.

Regards

vijay

Read only

Former Member
0 Likes
630

Hello Srini,

U can use this code.

REPORT ZV_TEST6 .

DATA: DATA(2).

SELECTION-SCREEN: BEGIN OF BLOCK 1 WITH FRAME.

SELECT-OPTIONS S_DATA FOR DATA .

SELECTION-SCREEN: END OF BLOCK 1.

SELECTION-SCREEN: BEGIN OF BLOCK 2.

SELECT-OPTIONS S_DATA1 FOR DATA .

SELECTION-SCREEN: END OF BLOCK 2.

SELECTION-SCREEN: BEGIN OF BLOCK 3.

SELECT-OPTIONS S_DATA2 FOR DATA .

SELECTION-SCREEN: END OF BLOCK 3.

AT SELECTION-SCREEN OUTPUT.

IF SY-SLSET = 'TEST'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'S_DATA2-LOW' OR

SCREEN-NAME = 'S_DATA2-HIGH' or

SCREEN-NAME = '%_S_DATA2_%_APP_%-TEXT' or

SCREEN-NAME = '%_S_DATA2_%_APP_%-OPTI_PUSH' or

SCREEN-NAME = '%_S_DATA2_%_APP_%-TO_TEXT' or

SCREEN-NAME = '%_S_DATA2_%_APP_%-VALU_PUSH' .

  • SCREEN-NAME =.

SCREEN-INPUT = '0'.

SCREEN-OUTPUT = '0'.

SCREEN-INVISIBLE = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Reward points and close the thread.

Regards,

Vasanth

Read only

Former Member
0 Likes
630

Hi Vasanth,

Small correction it should not be screen-invisible = 1.

But it should be screen-acitve = 0

Read only

andreas_mann3
Active Contributor
0 Likes
630

hi,

do you mean to modify screen after selecting a variant ?

so try that code:

AT SELECTION-SCREEN OUTPUT.
  IF sy-xcode = 'PICK'. "from selecting variant
    LOOP AT SCREEN .
      IF screen-group1 = 3.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Andreas

Read only

Former Member
0 Likes
630

hi

i think there is only problem in variant making plz check it or make it again ,

chetan vishnoi