on 01-19-2015 12:22 PM
hi experts,
Iam new to webdynpro abap. I have doubt in webdynpro abap.I am creating selection screen in webdynpro abap.In this screen i am having 4 selection screen fields.but my reqirement is first two selection screen fields would be in first row.how to achieve this reqirement.plz let me know the solution.
Thanks&Regards
ananth.
Hi Ananth,
The ADD_SELECTION_FIELD and ADD_PARAMETER_FIELD methods of interface IF_WD_SELECT_OPTIONS don't include an option to layout the fields horizontally-- each method call creates the field on a new line.
However, you can still achieve your requirement with a little layout magic. Create two separate ViewContainerUIElement containers on your view and place these side-by-side. Then create two separate WDR_SELECT_OPTIONS component usages and add one to each of these containers-- let's call the component usages SELOPT_LEFT and SELOPT_RIGHT. Then create some select-options fields in SELOPT_LEFT and other select-options fields in SELOPT_RIGHT.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Discussion moved from ABAP Development to Web Dynpro ABAP space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
It is working now.Thanks for your reply.Is there any alternative way to achieve this requirement.
Thanks&Regards.
ananth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anantha,
all the solutions provided above should apply; I'd suggest to start from the document linked by Harsha in order to have a better, clear idea on how layout types work in Abap WD.
As per your requirement, an "easy" and quick way to design a WD layout could be as follows:
- define a "root" container, using MatrixLayout;
- define each element which you need to be in the first "column" as MatrixHeadData, while following fields on the same row should adopt MatrixData instead.
Quick example: working on 4 different fields, A B C and D. The root container has the property "Layout" set as MatrixLayout.
Setting the property LayoutData for the fields as follows:
A -> MatrixHeadData
B -> MatrixData
C -> MatrixHeadData
D -> MatrixData
leads to the following output:
A B
C D
Hope that helps,
M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anantha,
The select_options are visible as ViewContainerUIElement. These can be treated as per the example shown in the above posts.
You would need to add multiple elements and align them accordingly but you would have to bind the each select option to separate wdr_select_options component and view element.
Regards,
Karan
Hi achari,
if you are using wdr_select_options components, then you should have a ViewContainerUIElement where your field are placed.
You can then proceed as follows:
Let's say that you have 4 selection fields in your view, call them A, B, C, D.
Create 4 different TransparentContainer elements: the layout of the root should be MatrixData, and the root will contain the 4 transparentContainer.
In each TransparentContainer, add your ViewContainerUIElement.
So basically the tree should be as follows:
ROOTUIELEMENTCONTAINER
-> TC_1
--> ViewContainerUIElement (which is used for A)
-> TC_2
--> ViewContainerUIElement (which is used for B)
-> TC_3
--> ViewContainerUIElement (which is used for C)
-> TC_4
--> ViewContainerUIElement (which is used for D)
Now you can work on the LAYOUT DATA property of each TC, with the following rules:
MatrixHeadData -> the element is shown in the first "column" of your view;
MatrixData -> the element is shown in the column that follows the previous element.
With respect to my previous example:
TC_1-> MatrixHeadData
TC_2 -> MatrixData
TC_3 -> MatrixHeadData
TC_4 -> MatrixData
leads to the following output:
A B
C D
Hope that helps,
M.
Hi Anantha,
As suggested by KH, please set the Layout type as Row/ Matrix Layout for the ROOTUIELEMENTCONTAINER. And if you want to make the UI element to begin in a new line, set the corresponding UI 's layout data as Row Head data/Matrix head data.
Please check the following document which helps you in understanding the layout types in WebDynpro ABAP.
http://scn.sap.com/docs/DOC-28829
Regards,
Harsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As you mentioned it as WEBDYNPRO ABAP, try to post your requirement in this community
Any how check below for solution.
You can go for Matrix or Grid layout to achive your requirement. Check the below snapshot for reference where i've taken two i/p fields namely user name 1 and user name2 and i had set the layout of the transperant container as grid layout with col count = 4.
Hope this helps you.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.