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

LOOP AT SCREEN NOT WORKING

Former Member
0 Likes
2,039

I want to make invisible a field in a selection-screen, but after my code, the fields doesn´t disappear, i can´t see the text and the button, but the fields appear

with *****. can anybody help me please?

Thanks in advance

I HAVE A SELECTION SCREEN LIKE

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.

select-options P1 for KNA1-LIFNR.

SELECTION-SCREEN END OF BLOCK 1.

initialization.

loop at screen.

IF SCREEN-GROUP4 = '006'.

SCREEN-INVISIBLE = 1.

modify SCREEN.

endif.

endloop.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,087

Hi Carl,

You can use ACTIVE element of SCREEN internal table to make the fields invisible and visible.

Try like this:

LOOP AT SCREEN.

IF SCREEN-GROUP4 = '006'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

SP.

5 REPLIES 5
Read only

Former Member
0 Likes
1,087

Hi Carl,

i guess you have that field as input output field.

you will get***** if the field is input and you are trying to make invisible which doesn't make sense.

let me know

Thanks

venki

Read only

Former Member
0 Likes
1,087

Hi Carl,

I don't think you can hide it using invisible option.

It would make only the contents of the fields invisible.

i.e. *s.

Regards,

ravi

Read only

Former Member
0 Likes
1,088

Hi Carl,

You can use ACTIVE element of SCREEN internal table to make the fields invisible and visible.

Try like this:

LOOP AT SCREEN.

IF SCREEN-GROUP4 = '006'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

SP.

Read only

Former Member
0 Likes
1,087

hi,

AT selection-screen output.

IF p_ml = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP4 = '006'.

SCREEN-INVISIBLE = 1.

modify SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Read only

Former Member
0 Likes
1,087

Hi Carl,

I think u need to MODIF ID for the selection screen.

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.

select-options P1 for KNA1-LIFNR MODIF ID 'XYZ'.

SELECTION-SCREEN END OF BLOCK 1.

initialization.

loop at screen.

IF SCREEN-GROUP1 = 'XYZ'.

SCREEN-ACTIVE = 0.

modify SCREEN.

endif.

endloop.