on 02-26-2014 6:45 PM
Hiya,
I have a screen that has a table (not ALV) with a 'save' button.
The user enters values into the table - some lines they leave blank becasue they want a rest and would like to fill them in later.
The user presses the 'save' button and the lines with values are saved to the database.
However I'd also like these lines, with values, to now be read only - so the user can't edit them.
Now, I know how to make the whole table read only via:
But how would you do it for specific table rows?
Any thoughts would be much appreciated!
Hi,
Create an attribute of type wdy_boolean and bind the cell editor read only property of table columns to that attribute. Then in onAction Save, loop the table and set the attribute value to abap_true to make it disabled.
Check this document for reference: . In this I have demoed for single column, you can do the same for all columns.
Hope this helps u,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Robert,
Whlie binding the table set the read only property of the table Select this Radio buttin" BInd to the property of the selected attribute. ' in the POPUP while binding and then set and get attribute of the specific field.
Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Robert,
Even though Nishant's solution is more elegant, the easiest way to achieve this is to add an extra hidden (it's not visible in the UI) attribute to your context structure (preferably type WDY_BOOLEAN) and bind each table cell's read-only property to that attribute. Afterwards, depending on which table line you want to make read-only, you set the property of that attribute to abap_true.
Hope this was helpful!
Tudor
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.