Is it for employees or managers you want to make it readonly, in that corresponding launch pad's personal profile, you have to pass these two parameters, to make it readonly.
You can see the doc link for more details on them. Codding is not needed to make it readonly.
In case for individual infotype/subtype you want to make it readonly then you have to configure subtype table.
READ_ONLY_PROFILE_WITH_DETAILS=&
READ_ONLY_PERSONAL_PROFILE=
Application Parameters - Business Package for Employee Self-Service (WDA) 1.50 - SAP Library