Skip to Content

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

Use Drop Down by Key or any other UI?

Hi @,

In My case I am getting data in form of table where one column contains data which need to be displayed separately in the table like val1 val2 etc for the same table row. As per the requirement I have to populate these values in the same row but in Drop down so tht all the values can be accomodated within it.

I dont know how to embed and then populate drop down in Table. for each row?

Also I am thinking of any alternative solution/ better solution as the values in drop down will require user intervention to view all the details which I would like to avoid.

Any suggestions how we can achive this in better manner or atleast how to go for drop down in Table.?

Regards

replied

First thing you don't have to populate drop down for each row in table like other elements you use in table. Here is my solution to such problem:

Create a value node: LineItem

create a value attribute: quantityDD(string type)

create a method called initializeQuantityDD() and put following code in it.

	ISimpleTypeModifiable quantityDD = wdThis.wdGetAPI().getContext().getModifiableTypeOf("LineItem.quantityDD");
	IModifiableSimpleValueSet values = quantityDD.getSVServices().getModifiableSimpleValueSet();
		
	values.clear();
	
	values.put("0", "Select Quantity");
	String qtyValue = "";
	for(int i=1; i<5; i++)
	{
		qtyValue = new Integer(i).toString();
		values.put(qtyValue , qtyValue );  
  	}

call initializeQuantityDD() method in wdDoInit() method so that it populates quantity drop down before displaying it.

Last thing you need to do is create table, define its datasource and add drop down element into column and map its property to LineItem.quantityDD.

I hope this will help.

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