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

Dynamically making a field mandatory

Former Member
0 Likes
517

Hi Gurus,

I want to make a field mandatory in runtime based on inputs.

e.g.

if s_option1 has a value 10 then s_oprion2 should become a obligatory field.

How's it possible?

Pages: 1

Back to Thread List

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
465

Hi

Have you checked the property of SCREEN-REQUIRED = 'X'

in the loop at screen.

if rad1 = 'X'.

loop at screen.

if screen-name = <field name>.

screen-required = 'X'.

modify screen.

endif.

endloop.

check this and see.

<b>Reward points for useful Answers</b>

Regards

Anji

2 REPLIES 2
Read only

Former Member
0 Likes
466

Hi

Have you checked the property of SCREEN-REQUIRED = 'X'

in the loop at screen.

if rad1 = 'X'.

loop at screen.

if screen-name = <field name>.

screen-required = 'X'.

modify screen.

endif.

endloop.

check this and see.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
465

Hi,

Try this code

-


TABLES ltak.

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.

SELECT-OPTIONS : s_tanum FOR ltak-tanum .

SELECT-OPTIONS : s_lgnum FOR ltak-lgnum MODIF ID cda.

SELECTION-SCREEN END OF BLOCK blk1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'CDA'.

READ TABLE s_tanum WITH KEY low = '10'.

IF sy-subrc = 0.

screen-required = '1'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

-


If your query is resolved kindly close the thread and award points.

Cheers

Shafiq