cancel
Showing results for 
Search instead for 
Did you mean: 

Changing attributes of Table UI element in Web dynpro

Former Member
0 Kudos

Hi,

We are wanting to change the 'visibleRowCount' attribute of a Table UI element in an existing SAP Web dynpro within Travel Management. I believe the only way we can do this is as a repair to the Web Dynpro view. My understanding of the Enhancement Framework is that it only allows you to add UI elements or hide existing UI elements but not modify (overwrite) attributes of existing elements.

Is there a way of achieving this outside of doing a repair?

Michael Arter

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Here is a trick you can use with the Enhancement Framework. You can't change the properties of the standard with the Enh Framework, but you can hide existing UI elements and then add new UI elements. So hide the existing table and then create a new Table UI element. Bind your new table to the same context (and make all the other properties the same, expect for the ones you want to override). There is a little bit of risk here, if SAP would make changes to this table UI element in a future release you would have to manually change the new table UI element you added. There is obviously no system connection between the two UI elements.

Former Member
0 Kudos

Hi Thomas,

That is a handy hint. We'll weigh up doing it that way as an enhancement or simply modify the attribute directly as a repair.

Thanks for your reply.

Michael

vaibhav_tiwari
Contributor
0 Kudos

Hi Michael,

You can enhance the code to change the number of visible rows of the table. To do that create the enhancement implementation (I think you would be knowing that). Now follow the below steps:

1. Go to methods tab.

2. There you will be able to see pre-exit and post-exit buttons in front of every method.

3. Enhance the code to change the row count of the table in pre-exit or post-exit of the suitable method.

Hope it will be helpful..

Regards,

Vaibhav

Former Member
0 Kudos

Hi Vaibhav,

Unfortunately the table attribute is statically bound so we can't influence via any coding in a pre-exit method.

Michael