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

how to hide selection text

Former Member
0 Likes
2,438

hi there,

i have the following selection screen definitions:

SELECTION-SCREEN COMMENT 01(33) text-001.

PARAMETERS: p_ras1(4) TYPE n DEFAULT '0031'.                
PARAMETERS: p_ras2(4) TYPE n DEFAULT '0062'.
PARAMETERS: p_ras3(4) TYPE n DEFAULT '0093'.
PARAMETERS: p_ras4(4) TYPE n DEFAULT '0000'.
PARAMETERS: p_ras5(4) TYPE n DEFAULT '0000'.

in a variant i hide the 5 parameters for the user.

but the text-001 is still displayed. so i only have the text there. how can i hide the text-001 for a specific variant. i can't do it in the variant itself, i have to do it in my z-program.

best regards, Martin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,583

hi,

i am not sure if this helps or not, but if you can identify the screen field name for the text, you can modify the screen structure.

if sy-slset = <variant-name>

loop at screen.

IF screen-fieldname = 'TEXT'.

screen-invisible = '0'.

screen-active = '0'.

modify screen.

endif.

endloop.

endif.

Edited by: sap_wiz on Jul 29, 2011 2:45 PM

hi there,

i have the following selection screen definitions:

SELECTION-SCREEN COMMENT 01(33) text-001.

PARAMETERS: p_ras1(4) TYPE n DEFAULT '0031'.                
PARAMETERS: p_ras2(4) TYPE n DEFAULT '0062'.
PARAMETERS: p_ras3(4) TYPE n DEFAULT '0093'.
PARAMETERS: p_ras4(4) TYPE n DEFAULT '0000'.
PARAMETERS: p_ras5(4) TYPE n DEFAULT '0000'.

in a variant i hide the 5 parameters for the user.

but the text-001 is still displayed. so i only have the text there. how can i hide the text-001 for a specific variant. i can't do it in the variant itself, i have to do it in my z-program.

best regards, Martin

5 REPLIES 5
Read only

GauthamV
Active Contributor
0 Likes
1,583

Use variable SY-SLSET.(Used Selection Screen Variant )

Read only

Former Member
0 Likes
1,583

yes, i know that i can use SY-SLSET.

but HOW can i hide the text ??????

Read only

GauthamV
Active Contributor
0 Likes
1,583

Hmmm. I thought if i give the variable you can just build the logic.

Anyway you got the logic also now.

Read only

Former Member
0 Likes
1,584

hi,

i am not sure if this helps or not, but if you can identify the screen field name for the text, you can modify the screen structure.

if sy-slset = <variant-name>

loop at screen.

IF screen-fieldname = 'TEXT'.

screen-invisible = '0'.

screen-active = '0'.

modify screen.

endif.

endloop.

endif.

Edited by: sap_wiz on Jul 29, 2011 2:45 PM

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,583

Try a

SELECTION-SCREEN BEGIN OF BLOCK 001 WITH FRAME TITLE text-001.
PARAMETERS: p_ras1(4) TYPE n DEFAULT '0031'.
PARAMETERS: p_ras2(4) TYPE n DEFAULT '0062'.
PARAMETERS: p_ras3(4) TYPE n DEFAULT '0093'.
PARAMETERS: p_ras4(4) TYPE n DEFAULT '0000'.
PARAMETERS: p_ras5(4) TYPE n DEFAULT '0000'.
SELECTION-SCREEN END OF BLOCK 001.

And look what happens to frame and title when every parameter is hidden in it.

Regards,

Raymond