on 11-11-2013 11:08 AM
Hi Webdynpro gurus!
I need to edit an existing webdynpro. At the moment it displays a table where I would like to have a column-field enabled for input, but *only* when other column has certain values. (So, if column A has value 'BI' column C should be open for input (and not all lines!)).
I've searched the forum for existing enquiries but couldn't find a satisfactory answer..
It also might be handy to mention that I am a little novice/new to WD.
thanks in advance,
Ron.
Hi,
Check this document. http://scn.sap.com/docs/DOC-27125 . While looping the internal table check the clumn A value. If it met the condition make the coljumn C input enabled.
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.
Hi,
You could use 'get_attribute' method to check whether particular attribute ( Coulmn ) returns value.
If true, then you could use 'set_attribute_property' method to make next required column ready for input using property attribute read_only = false.
Best Regards,
Abirami
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bad advice, that method executes after every user interaction and doing that will kill your performance
Abirami S wrote:
Hi,
You need to build logic in modify_view method of your V_MAIN view.
Best Regards,
Abirami
Ron, Find the place where you load data, and place that above mentioned loop after data is loaded (in that example it is WDDOINIT).
Hello Maksim,
In wddoinit method only if we know specific column that has value, we can handle it.
We cannot predict every time whether value will be populated with respect to specific column.
To handle changes dynamically, we need to write code in modify_view. I have done similar kind of requirements and it is working fine. We can take care from performance point of view, it is wrong opinion that all code written in modify view will hange the performance.
Basically, it depends on your business requirement where to write logic. And you must optimize your code such that it will not affect performance of application.
Don't call it as bad advice before you have clear picture on it!!!
Best Regards,
Abirami
As suggested by Maksim, it is a bad practice to handle data changes in wd_modify view as it has a serious impact on the performance.
Option 1: While screen initialization/table initialization, use a context parameter( which is set to the edit property of the column) to control the behavior of the table column/row by setting values in each table element based on your condition.
Option 2: Set a dropdown element in the table column. If it is set to BI, then change the context property linked to other columns or the row, accordingly.
Regards,
Sharath
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.