on 06-17-2013 1:17 PM
Hi Experts,
I have a table where i need to display content in two columns.
The first column values are read-only keys,where as the second column value keeps changing based on the key.
the second column values can be a simple input field or a dropdown based on the key.
for example : ' Name " should be given as inputfield , Where as "Gender" should be given as dropdown.
How can i achieve this in a webdynpro table.
Please let me know,if you need more information.
Thanks
Appala
Ok..finally i was able to solve it.
Here are the steps how i solved .
1) created two cellvariants in the column one containing inputfiled and the other containing dropdownbyindex
2) created a calculated attribute called "variant" and setting it one of the two variants mentioned based on my kep value.
Thanks everyone for your help.
Thanks
Appala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Appala,
You can achieve this by using Cell Variants in web dynpro table. Please follow the below steps to achieve your requirement.
Before going to this, please check how to use cell variants inside web dynpro table. then follow the steps[i will give you the overview of your requirement]:
1. Insert Cell variant in your particular column. [You can use multiple cell variants for one column also]
2. Set the different variant key for each one of the cell variants. For Ex. One cell variant key is "InputField" and another cell variant key is "Dropdown".
3. Based on your key values, set that cell variant attribute to your cell variant key values.
For Sample code:
/* cell value is the attribute for keying our values ex. "Name", "Gender" etc. */
/* cell variant is the attribute for Cell Variants */
if(wdContext.currentContextElement().getCellValue().equalsIgnoreCase("Name"))
{
wdContext.currentContextElement().setCellVarient("InputField");
}else if(wdContext.currentContextElement().getCellValue().equalsIgnoreCase("Gender")){
wdContext.currentContextElement().setCellVarient("Dropdown");
}
You can go with this code and elaborate as per your requirements.
Thanks & Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Thanks for the response.
This solves my problem to certain extent.
But The dropdown values are not fixed in my case.
Based on the key value(first table column), the values in the dropdown needs to be changed.
For example, if the key column value is Gender , i need to display the dropdown with gender values.
If the key value is Region , i need to display the region specific dropdown values.
This means that i need to create the table content dynamically, please let me know,if there is any sample existing.
Thanks
Appala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Appala,
Using a BRM table might help in this case.
You will have one input and one output column. The input column will be filled with your "Keys" and the output column will be filled with the corresponding values. In Web Dynpro you will handle the result from your BRM and you will fill it in your Input Fields and Dropdowns accordingly.
Regards,
Grigor
I believe that this article will help you:
Hi Appala,
There could be a different approach, but using BRM has many positive aspects and you should give it another thought.
It will not be hard to apply and it will be very easy to change the data that you fill in the future. With just a simple import from an Excel table you can change all the inputs/outputs and I don't know if a different method can give you that. Plus the coding in Web Dypro will probably be less.
Sorry i could not get you.
It is a question and i am looking for somebody's help to proceed.
Table Cell Variants may not be of help as I need to have both inputfield and dropdownlist .
The worst part is that the dropdown list values are not same accross the table column.
The values may change based on the key value.
Hi,
I hope this will solve your problem.
http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynpro+for+ABAP+Cell+Variants
Regards,
Sreenivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
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.