cancel
Showing results for 
Search instead for 
Did you mean: 

dropdownbykey/ dropdownbyindex

Former Member
0 Kudos
45

Hi I'm trying to make dropdownbykey/ dropdownbyindex element in webdynpro application. Element should import list of options not from a code of itself but from database (mysql).

Every help/ tutorial and post talk about situation where data is taken from application code.

Do enybady know how to write this element??

Thank for any help.

Michal

View Entire Topic
Former Member
0 Kudos

Hi

See this help

http://help.sap.com/saphelp_nw04/helpdata/en/74/450e8af57065468e88e4b86de47e4b/frameset.htm

//For Dropdown by index

//Create a node with cardinality 0..n and selection 1..1

IPrivate<ViewName>.I<DropName>Node node = wdContext.node<DropName>();

//Make Database Connection

//rs as result set

while (rs.next) {

IPrivate<ViewName>.I<DropName>Element element = wdContext.create<DropName>Element();

element.set<Param>(rs.getString(1));

node.addElement(element);

}

//You can search the Forums and get more results

Kind regards

Mukesh