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

Screen fields dynamically...

Former Member
0 Likes
760

Hello,

I ahve requirement where the fields on selection screen should be displayed dynamically ? For example there are three fields on screen. Now those fields should be dispalyed on screen only if program matches certain logic.

I know that buttons in application toolbar can be displayed dynamically but not sure about screen fields ?

Please help.

Regards,

Rajesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
726

Hi,

Put your logic in the AT selection-screen output.

Use the ACTIVE field of the structure SCREEN to hide (active = space) or display ( active = 1) the fields on the selection screen.

regards,

Advait

6 REPLIES 6
Read only

Former Member
0 Likes
726

HI Rajesh,

Please find the Sample Code Below

Parameters: chk1 type c as checkbox,

chk2 type c as checkbox modif id 'ID1'.

AT SELECTION SCREEN.

LOOP at SCREEN.

IF screen-group1 = 'ID1'

if chk1 = 'X'.

screen-invisible = ''.

else.

screen-invisible = 'X'.

ENDIF.

modify screen.

ENDIF.

ENDLOOP.

Please check the Syntax..Hope this will be Helpful.

Please Find the LInk Below

[Sample Code|]

THanks

Kalyan

Read only

0 Likes
726

hello,

have to do loop at screen in event at selection-screen output...

AT SELECTION-SCREEN OUTPUT.

loop at screen.

if screen-name eq 'PNPS$MSL'.

screen-active = 0.

endif.

modify screen.

endloop.

Read only

Former Member
0 Likes
726

Hi,

You will have to use AT SELECTION-SCREEN OUTPUT EVENT and in this event you will have to use LOOP AT SCREEN.

Read only

Former Member
0 Likes
727

Hi,

Put your logic in the AT selection-screen output.

Use the ACTIVE field of the structure SCREEN to hide (active = space) or display ( active = 1) the fields on the selection screen.

regards,

Advait

Read only

Former Member
0 Likes
726

Hi,

This will resolve your query.

Parameters: p_rad1 radiobutton group radi  user-command ucomm default 'X',
            p_rad2 radiobutton group radi.

selection-screen begin of block b1.
parameters: field1 type c modifid md1.
parameters: field1 type c modifid md2.
selection-screen end of block b1.


AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.
IF p_rad1 = 'X' .
IF screen-group1 = 'MD2'.
screen-active = 0.
ENDIF.
ElseIF p_rad2 = 'X'.
IF screen-group1 = 'MD1'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.

Regards,

Gurpreet

Read only

Former Member
0 Likes
726

hi,

make visible the screen field which will come default and other field should be invisible

AT SELECTION-SCREEN. IF you want to change the screen display, modify the internal table SCREEN of that screen field.

in selection screen

AT selection screen.

if <some condition>

loop at screen.

if <screen field> = field name.

invisible = 'x'.

endif,

modofy screen.

endloop.

screen internal table contains all information regarding screen.

please check and let me know if have found any problrm