Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to Feel dropdown box at runtime?

Hi

Experts.

i have one database table name "Company".

Now i want to feel one dropdown box with all company name and key should be

id of company.

I know JDBC and database connectivity in webDynpro.

Now How can i create runtime simple time with enumration?

Regards

Sunny.

Former Member
Former Member replied

Hi

1) Execute the query using JDBC and get the result.

2) Iterate through the resultset.

3) Add company iD as key and name as value.

Ex:

// Execute the query;

ResultSet resultSet = stmt.executeQuery("SELECT Id, name FROM country");

IWDNodeInfo nodeInfo=wdContext.<your node>().getNodeInfo();

IWDAttributeInfo attribInfo=nodeInfo.getAttribute(<YOUR ATTRIBUTE>); // Country

ISimpleTypeModifiable simpleType=attribInfo.getModifiableSimpleType();

while( resultSet.next() )

{

valueset.put(rs.getString(1),rs.getString(2));

}

// Close the result set,

rs.close() ;

Regards

Ayyapparaj

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question