Skip to Content
avatar image
Former Member

DropdownList box to display R/3 table

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 08, 2006 at 04:32 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 08, 2006 at 06:33 AM

    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 :

    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/search%21default.jspa%3FforumID%3D52%26threadID%3D52985

    dynamic-dropdownbykey

    Regards,

    Saraswathi

    Pls reward point if it is useful information

    Add comment
    10|10000 characters needed characters exceeded