on 10-08-2005 1:18 PM
Dear all,
I hv made a list box on the view. Now how to fill this box withe data from R/3. Please suggest.
regds,
Anup.
Hi Uniyal,
To fill the drop down with the values from back-end, follow the following stpes.
0.) Create a local context attribute in the view
1.) Bind the drop down to a local context attribute
Then in the wdDoInit() execute the BAPI and write the following code.
ISimpleTypeModifiable myType = wdThis.wdGetAPI().getContext().getModifiableTypeOf("<<u>yourlocalcontextattributename</u>>");
IModifiableSimpleValueSet values = myType.getSVServices().getModifiableSimpleValueSet();
IPrivate<viewName>View.I<<u>Elementwhichreturnsthevalue</u> table = wdContext.current<<u>Elementwhichreturnsthevalue</u>>();
int i = wdContext.node<u>whichreturnsthevalue</u>().size();
for (int i = 0;i < maxvalues; i++ )
{
IWDNodeElement element = wdContext.node<u>whichreturnsthevalue</u>().getElementAt(i);
String str = (String)element.getAttributeValue("Username");
values.put(str, str);
}
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.