Skip to Content
author's profile photo Former Member
Former Member

Values in the list box

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2005 at 12:59 PM

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

    }

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.