on 09-07-2006 7:29 PM
Hi,
I want to display a R/3 table of 5 columns in the dropdownbox with only one column, how can I do that?.
Is this possible without simple types. Since we dont know the contents of drop-down box at design time, I cant use simple type. How can I achieve this feature?.
Thanks.
/sunita.
Hi
Try this
Use the Dropdown by index
1.Creat a node for the Dropdown
2.Bind The values from BAPI after Execution
IPrivate<ViewName>.I<DropName>Node node = wdContext.node<DropName>();
int len=wdContext.node<BAPIList>().size();
for(int l=0;l<len;l++) {
String id=String.valueOf(((IPrivate<viewname>.I<BAPIList>Element)(wdContext.node<BAPIList>().getElementAt(l))).get<Parameterid>());
String value=String.valueOf(((IPrivate<viewname>.I<BAPIList>Element)(wdContext.node<BAPIList>().getElementAt(l))).get<Parametervalue>());
IPrivate<ViewName>.I<DropName>Element element = wdContext.create<DropName>Element();
element.set<Param>(id"-"value);
node.addElement(element);
}
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If u want to populate values using a DropDownByKey UI Element this code will help you.
IWDAttributeInfo ainfo = wdContext.node<<NodeName>>().getNodeInfo().getAttribute("<<Value Attribute that is bound to the Drop Down by Key element>>");
ISimpleTypeModifiable st = aiinfo.getModifiableSimpleType();
IModifiableSimpleValueSet vs = st.getSVServices().getModifiableSimpleValueSet();
for(int i=0;i<wdContext.node<<name of the node>>().size();i++)
{
vs.put(Key,Value}
}
Also go through the following link to know more about Drop Down by key element.
http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/frameset.htm
Check this for a sample application using Drop Down by key UI element.
http://help.sap.com/saphelp_nw04/helpdata/en/c6/a5d4a523bf4b4c9085a114e46c6ed3/frameset.htm
Also check out the following discussion in forum :
Regards,
Saraswathi
Pls reward point if it is useful information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.