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

Disable some fields in the selection screen

Former Member
0 Likes
843

Below given is my Selection Screen

Plant (With Range and mandatory)

WBS Element (With Range not mandatory)

Month / Calender Year (Given in parameters and mandatory)

My question is,

If the user enters the WBS element with range,

Month/ Calender Year should be mandatory.

If the user enters the WBS element without range,

Month/ Calender Year should be disabled.

How can i do this in ALV?.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
803

Hi Vennila,

You can handle this in AT SELECTION_SCREEN ON Field event.

Try like below.

AT SELECTION_SCREEN ON s_wbs.

loop at s_wbs.

if not s_wbs-low is initial and

not s_wbs-high is initial.

lw_flag = 'X'.

EXIT.

endif.

endloop.

if lw_flag is initial.

loop at screen.

if screen-name = 'P_CALENDER'.

screen-input = '0'.

modify screen.

endif.

end loop.

AT SELECTION_SCREEN ON p_calender.

IF not lw_flag is initial and p_calender is initial.

raise error message

Endif.

Hope this will help u in resolving this issue..

Below given is my Selection Screen

Plant (With Range and mandatory)

WBS Element (With Range not mandatory)

Month / Calender Year (Given in parameters and mandatory)

My question is,

If the user enters the WBS element with range,

Month/ Calender Year should be mandatory.

If the user enters the WBS element without range,

Month/ Calender Year should be disabled.

How can i do this in ALV?.

6 REPLIES 6
Read only

Former Member
0 Likes
803

hi there...

open the report in se80 and go to screen painter.

there set the attribute of the screen field that u want to disable. u can also use the field name and the property name visible in the screen painter to code this thing dyanamically.

Hope it helps. Do reward if it does or get bak with further queries.

Read only

0 Likes
803

Hai Prem,

Thank you for your reply. i wll try this.I thought of doing this through coding by as follows.

If the WBS element is enter with out range i will set the satus of month and year as 'X'.

Any way i will try yours. Thanks a lot for your timely help.

Read only

0 Likes
803

hi Vennila,

ur welcome. Do lemme know if it helps. i could hav given the entire steps but its better u chk it out urself. wil help in log run.

regards

Prem Sharma

Read only

0 Likes
803

Thank you Prem.

Read only

Former Member
0 Likes
804

Hi Vennila,

You can handle this in AT SELECTION_SCREEN ON Field event.

Try like below.

AT SELECTION_SCREEN ON s_wbs.

loop at s_wbs.

if not s_wbs-low is initial and

not s_wbs-high is initial.

lw_flag = 'X'.

EXIT.

endif.

endloop.

if lw_flag is initial.

loop at screen.

if screen-name = 'P_CALENDER'.

screen-input = '0'.

modify screen.

endif.

end loop.

AT SELECTION_SCREEN ON p_calender.

IF not lw_flag is initial and p_calender is initial.

raise error message

Endif.

Hope this will help u in resolving this issue..

Read only

0 Likes
803

Hai Babu,

Thanks your for your answer. You coding sample is quite helpfull for me. thanks for your timely help.