2008 Jan 18 7:55 PM
Hi All,
I have added a free text field to a Z table (field size is 255 chars), and have generated a maintenance for the same.
I dont want to add this field as a "key" in the table
I want the user to enter text in this field only during a record creation. When the user is trying to view/edit records, i need to make this text field as read-only..
Is this possible to code in "PAI" module of the single screen ??
Thanks in advance,
Regards,
Raviraj
2008 Jan 18 8:12 PM
I have done something similar. Use event 01 (Save Data) and set the screen field as display only.
Rob
2008 Jan 18 8:12 PM
I have done something similar. Use event 01 (Save Data) and set the screen field as display only.
Rob
2008 Jan 18 10:02 PM
Hi Rob,
Thanks for the quick reply.,
I'm not quite sure how to "set screen field to display". I hav'nt worked much on screen programming. is it a SY field that i need to set ?
Thanks,
Raviraj
2008 Jan 18 10:30 PM
I'm afraid I misinterpretted my thinking on this one.
I used that event to automatically fill in certain fields, not change the display status. I believe I set the fields to no-display in the screen painter and I don't think this helps you.
You would have to do this somewhere in the PBO, but I'm not sure where. I'll try to get back to you on this.
Rob
2008 Jan 18 11:27 PM
Read this for SM30 events:
Try this code inside some of the events forms:
LOOP AT SCREEN.
IF screen-name EQ 'TABLE-FIELD'. " Table field you wish to make read only
screen-input = 0. " 0 disables, 1 enables
MODIFY SCREEN.
ENDIF.
ENDLOOP.
regards