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

SAP script graying out a field

Former Member
0 Likes
559

I have designed a screen where i have some fields. When i select an option from one field and if click on DISPLAY the data should be displayed in the rest of the fields, but should be grayed out and when i click on CHANGE all the fields should accessible.

can any one send me code for graying out and enabling the field .

I have designed a screen where i have some fields. When i select an option from one field and if click on DISPLAY the data should be displayed in the rest of the fields, but should be grayed out and when i click on CHANGE all the fields should accessible.

can any one send me code for graying out and enabling the field .

3 REPLIES 3
Read only

Former Member
0 Likes
491

hmmm i´d like to help your but something doesnt fit with your requirtements.

SAP-Script is the SAP language for Forms.

In forms you cannot have accesible fields, simply not possible since a form is to be printed, but not to be given back to the system in any way.

Are you talking about an ALV or a Table control maybe?

Read only

Former Member
0 Likes
491

Hi,

Have you tried this?

again posted the same question:

Give some Group Name for the other fields which has to be grayout.

If Field1 = <some value>

Loop at screen.

if screen-name1 = ' Give the group Name>.

screen-input = o.

modify screen.

endif.

endloop.

else.

Loop at screen.

if screen-name1 = ' Give the group Name>.

screen-input = 1.

modify screen.

endif.

endloop.

endif

Regards,

Anji

Read only

Former Member
0 Likes
491

Hi,

you should use

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'xxx' or SCREEN-NAME = 'ZFIELD'.

SCREEN-INPUT = 0."means no input

*OR SCREEN-INPUT = 1." input possible

ENDIF.

MODIFY SCREEN.

ENDLOOP.

regards,