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: 

how to gray out a particular field in screen?

Former Member
0 Kudos

hi all,

please help me out in this. In online programming iam using two screens.

the first screen contains one field that is 'employee number' and it consists of two buttons such as 'display' and 'change'.The second screen consists of two fields that is 'empno' and 'empname' and two buttons that is 'back' and 'save'. when i enter the the empno in the first screen and when i click the dispaly button the second screen should be displayed and all the fields should be grayed out except back button. and in the first screen when i give the empno and change button is clicked the details of the employee should be retrieved in the second screen but only empno should be grayed out but not the empname because i want to change the empname there and when i click the save button there it should be updated in the table. please reply this as soon as possible.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

In the second screen, for field empno, set the attribute Output only as X and set group1 for empname as 'INP'.

In PBO of second screen, write this code.

loop at screen.

case screen-group1.

when 'INP'.

if sy-ucomm = 'DISP' . "sy-ucomm value when you click display

screen-input = '0'.

modify screen.

endif.

endcase.

endloop.

regards

Navneet

Message was edited by:

Navneet Saraogi

2 REPLIES 2

Former Member
0 Kudos

Hi Aparna,

Have you tried it yourself? Can you paste your code and tell what is the problem?

Regards,

Atish

Former Member
0 Kudos

Hi

In the second screen, for field empno, set the attribute Output only as X and set group1 for empname as 'INP'.

In PBO of second screen, write this code.

loop at screen.

case screen-group1.

when 'INP'.

if sy-ucomm = 'DISP' . "sy-ucomm value when you click display

screen-input = '0'.

modify screen.

endif.

endcase.

endloop.

regards

Navneet

Message was edited by:

Navneet Saraogi