cancel
Showing results for 
Search instead for 
Did you mean: 

Values in the list box

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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);

}

Former Member
0 Kudos

thanks..Bala..

Regds,

Anup.

Former Member
0 Kudos

Hi Uniyal,

It will be gr8 if u can award me some points if my solution was useful for you.