cancel
Showing results for 
Search instead for 
Did you mean: 

Open table for input in Web Dynpro

ron_dijkstra4
Explorer
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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

ron_dijkstra4
Explorer
0 Kudos

Hi Abirami,

and where would this take place? I'm always keen in using the PBO and PAI events of screen handling, but am aware in Webdynpro this isn't going to work 😉

So, I have a window: W_MAIN and a view: V_MAIN

Former Member
0 Kudos

Hi,

You need to build logic in modify_view method of your V_MAIN view.

Best Regards,

Abirami

former_member182372
Active Contributor
0 Kudos

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).

Former Member
0 Kudos

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

Sharathmg
Active Contributor
0 Kudos

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