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: 

Fields Noneditable

Former Member
0 Kudos

Hi,

How to make perticular field on screen non editable.

What is code to make it non editable and other fields remaining editable.

Regards,

Deepak.

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_MATNR'.
SCREEN-INPUT = 1.  " Change it to 0 or 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

Best regards,

Prashant

5 REPLIES 5

former_member223537
Active Contributor
0 Kudos
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_MATNR'.
SCREEN-INPUT = 1.  " Change it to 0 or 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

Best regards,

Prashant

Former Member
0 Kudos

For module pool

Code like this in MODULE in PBO

LOOP AT SCREEN.

IF SCREEN-FIELDNAME = 'ABC'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

For selection screen

Under AT SELECTION-SCREEN OUTPUT. event

Code:

LOOP AT SCREEN.

IF SCREEN-FIELDNAME = 'ABC'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Former Member
0 Kudos

Hi,

If the required field is in module pool screen then in the attributes of the field under the 'Program Tab'--> check 'Output only'.

This will prevent it from editable.

Thanks,

Ramya.

Former Member
0 Kudos

Try this

AT SELECTION SCREEN OUTPUT

LOOP AT SCREEN.

IF SCREEN-NAME = 'XYZ'.

SCREEN-INVISIBLE = 1.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Former Member
0 Kudos

hi deepak,

you have to assigned group to all fields which you want to disable with same group name.

write code in PBO

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G1'.>>> your group name

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

here group name is G1.

hope it works

thanks

SAchin