on 09-26-2006 7:58 AM
I am creating a view which has to populate all the "employee names" in a dropdown list from
which a have to choose one employee.....after that I would click "go" button which displays the details of the corresponding employee.
Let the employee names are in "EMPLOYEE" table in SQL DB.
Please let me know the corrsponding UI element to be used and how to access and map to display all the employee names in the dropdown list.
Here I found two UI elements
"DropdownbyIndex" and "DropDownByKey".....please let me know the correct UI element to be used.
Regards,
Cris
Hi,
Refer the below link you will get useful information
Dropdownlist to display r3 table
see this link for when to use DropDownByIndex (DDI) vs DDK (DropDownByKey) and how populate data from R/3.
create context value attribute and bind to drop down by key
Dynamically adding values to dropdown by key thread
Dropdown by key
http://help.sap.com/saphelp_nw04/helpdata/en/4a/8613e41629344194e4f40393740d51/content.htm
Regards,
Saraswathi.
Pls reward points for useful info
Message was edited by: Saraswathi D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cris,
You can use either DropDown - Index or Key.
Use the below code for DropDownByKey Control. This control gives you Key of the Selected Emplpoyee.
For this create a Context element(Employee) and assign it to the DropDown "selectedKey" Property.
IContextElement conElement=wdContext.currentContextElement();
IWDNodeInfo nodeInfo=wdContext.getNodeInfo();
IWDAttributeInfo aInfo=wdContext.getNodeInfo().getAttribute("Employee");
IModifiableSimpleValueSet dropValueSet=matAttrInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
String employeeName =null;
int nodeLength=wdContext.node<Response>().size();
for(int i=0;i<nodeLength;i++)
{
employeeName =String.node<Response>().getEmployee();
dropValueSet.put(employeeName ,employeeName );
}
Regards,
Sridhar
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 quick response.
The Thread which is provided contains the "web services part".
Please let me know the process to populate the data into dropdown list box.
Regards,
Cris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cris,
I got this content from experts.
It's very interesting question: DropDownByIndex (DDI) vs DDK (DropDownByKey).
Here is how I usually choose between both:
if (I need not to have different values per row in table) {
if (I do not alter valueset || valueset is from R3) {
use DDK;
}
else if (I may alter valueset) /Here I need to alter valueset/
{
if (I'm creating dynamic UI controls)
use DDK; //it is simpler
else // Design-time controls
use DDI;
}
else {
use DDI;
}
}
else {
use DDI;
}
see this thread for code:
Regards, Suresh KB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.