tmannais
6th February 2018, 08:55
Hi,

As the title says, how to have some conditions for Additional Information to be read-only?
For example, I have an Additional Information field that must not be editable after a certain data is changed to a specific state (status).
I tried looking in the Application Extensibility -> Extension, which I have been using it to customize many components nowadays but it does not seem to have a functionality to do this kind of customization.

Regards,
Thana

JaapJD
6th February 2018, 10:14
You can do that by creating a table extension for tcstl210. Of course you need to check the context of the additional info (e.g. sales orders), but then you can prevent the modification of additional info field.

tmannais
6th February 2018, 10:50
Hi JaapJD,

Thank you for your solution. I have one problem according to this.
How can I check the context of the current session that this extension is running on e.g. Sales Order Line. I understand the rest of your point that I have to put the conditions in one of the hooks in the Extension Modeler to make it as required. Please elaborate how can I determine which context it is.

Regards,
Thana

JaapJD
6th February 2018, 10:58
You could for example check the main.table$ variable. Note that it is prefixed with a "t". So you need to do something like:

if main.table$ = "ttdsls401" then
....
endif

tmannais
6th February 2018, 11:51
Hi JaapJD,

Thank you again for your help.
It works well for the requirement I have but there is another extra thing that might cause a problem.
It is the [EXTENDED FIELDS] button after the Additional Information field.
Even though the field is read-only now by the help of Extension so the field cannot be edited via the field itself, but when clicking the button that I mentioned earlier to go inside and modify the field in that specific place, the user can change the value of the Additional Information field remotely.
Any advice?

Regards,
Thana

JaapJD
6th February 2018, 17:25
In that case main.table$ has another value (ttcstl210). You need to import the main table of the calling session and check that one.

tmannais
7th February 2018, 05:22
Hi JaapJD,

I don't quite understand what you explained. Could you kindly provide me with more details please? I am a beginner at this. I am very sorry.

Regards,
Thana

JaapJD
7th February 2018, 09:56
If the user pressed Extended Fields a new session is started. To know whether you should make things readonly, you must check values of the parent session. You can import those values.

tmannais
7th February 2018, 12:21
Hi JaapJD,

Thank you very much for your help.
The solutions you gave me are perfect.
I can get it to work as intended now.

Regards,
Thana