on 12-04-2007 5:45 AM
Hi,
I need to have a drop down UI element in my view and this drop down should contain the values from a bapi.
Which is the type of drop down i should use? Is it dropdownbykey or dropdownbyindex?
And also how to fetch the values in the dropdown ui element dynamically?
Regards,
Padmalatha.K
Hi Padma,
Go for drop down by index in this case.
Here, <outputnode> is the node of your RFC that holds the result and <nodename> is the node binded to your ddi.
for(int i=0; i<wdContxt.node><outputnode>().size();i++)
{
IPrivate<viewname>.I<nodename>Element ele = wdContext.node<nodename>().createElement();
ele.set<attribute>(wdContext.node<outputnode>().getElementAt(i).get<attribute>();
wdContext.node<nodename>().addElement(ele);
}
for ddk:
IWDAttributeInfo attr = wdContext.getNodeInfo().getAttribute(<attributename>);
ISimpleTypeModifiable sim = attr.getModifiableSimpleType();
IModifiableSimpleValueSet vs = sim.getSVServices().getModifiableSimpleValueSet();
for(int i=0; i<wdContxt.node><outputnode>().size();i++)
{
String temp = wdContext.node<outputnode>().getElementAt(i).get<attribute>();
vs.put(temp,temp);
wdContext.currentContextElement().set<attribute>(<value>); // to get initial selection.
}
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Your requirement is to put values into DropDown Dynamically..
So, use DropDownByIndex UI Element
ArrayList al=new ArrayList();
loop upto the size of data coming from BackEnd
IPrivate<ViewName>View.I<DDNode>Element ele=wdContext.create<DDNode>Element();
ele.set<value>(<Value from Vackend>);
al.add(ele);
end loop
wdContext.node<DDNode>().bind(al);
Regards
LakshmiNarayana
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.