Application Development 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: 

greying out an input field

Former Member
0 Kudos

Hi,

I have field which has a low and a high range of field1. When the user enters a high range of field1, I need to grey out the bottom two fields immediately, so that the user cannot enter anything on those fields. If the user just enters the low range of field1, then the bottom two fields can be input by the user. How do I do such a thing?

Thanks

Ram

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi Ram,

You can not achieve this only after filling the entry. There must be some kind of event lets say radio button click or ENTER key pressed.

Regards,

Atish

4 REPLIES 4

Former Member
0 Kudos

hi Ram,

You can not achieve this only after filling the entry. There must be some kind of event lets say radio button click or ENTER key pressed.

Regards,

Atish

Former Member
0 Kudos

Hi Ram,

You can handle this in AT Selection screen output event.

If the user enters value in HIGH field, pressing ENTER is required to trigger this event. In the event you can put the conditions and make the bottom fields grayed out.

Hope this will give you some idea.

ashish

Former Member
0 Kudos

Hi Ram

For sure it's not possible.

Unfortunately SAP is not flexible as VB or any other front end.

Input field is not event driven screen element. PAI will not trigger unless you press either Enter or F8.

The alternative solution is to have either a Check Box or Radio Button based on this you can do the above.

Explain the customer about the limitations of SAP to convience him. I think he/she might have been working with VB or so :).

Regards

Surya.

Former Member
0 Kudos

check the example code and use at selection-screen output event.

REPORT z_sample_alv.

tables :mara.

select-options : s_matnr for mara-matnr.

parameters : s_date like sy-datum ,

e_date like sy-datum.

at selection-screen output.

loop at screen.

if not s_matnr-high is initial.

if screen-name = 'S_DATE'.

screen-input = '0'.

screen-intensified = '1'.

modify screen.

endif.

if screen-name = 'E_DATE'.

screen-input = '0'.

screen-intensified = '1'.

modify screen.

endif.

endif.

endloop.

Thanks

Seshu