on 11-27-2012 12:52 PM
Hi,
I am looking for a way to create UI layout elements in webdynpro ABAP depending on certain parameters. that i want to display only certain number of fields depending on the value of a particular parameter.
A typical way would be to hide UI layout elements but that would leave a blank space at that location, I dont want that but I am looking for a way to show UI elements dynamically in one webdynpro application i.e that is different layout elements appear for different parameter values.
Any help in this regard would be greatly appreciated.
Thanks.
Hi Karan,
You wrote, "but that would leave a blank space at that location". That depends on your layout and how you use the Visibility property of the UI elements. For example, in Matrix layout if you hide both an InputField and the field's Label, the rest of the form elements will simply move up in the Matrix and no blank space will be left by the hidden elements. You can also hide the container that an element belongs to (Group, Panel, TransparentContainer, etc.) and everything inside the container will also be hidden.
If you still prefer dynamic programming for your requirement, check out Thomas Jung's eLearning sessions, and .
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amy,
Thanks for the info on the blank spaces. I am actually looking for a way to create a generic form where different fields appear for different users and the layout also remains consistent.
Is there any standard way implementing such kind of mechanism or do we have to create UI element through code.
Thanks,
Karan.
Hi Karan,
You've correctly identified the two options-- at design-time by controlling visibility and at runtime with dynamic programming.
If there aren't too many fields to consider, controlling visibility of fields created at design-time is a simpler approach. If there are too many fields for this to be manageable, runtime dynamic programming may be the way to go.
A third option I suppose could be to combine the two approaches. If you are able to separate out the various field "variants" into separate views, you could create these views at design-time. On the main view, you would also create at design-time as many ViewContainerUIElements as needed. Then at runtime, you could just assign the appropriate views to their view containers using dynamic programming.
In 2006, Thomas Jung published an eLearning video, "Web Dynpro ABAP - Dynamic Programming - SE16 Data Browser" which showed how to create a highly dynamic WDA that mimics the functionality of SAPgui transaction SE16. I've not be able to find the document since SAP reorganized the SCN site a year or two ago but if you can find it, it may be quite helpful to you.
Cheers,
Amy
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.