cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Data in Dropdown .

Former Member
0 Kudos

How to populate data in a Dropdown list . the data to be populated in the dropdown list comes from the RFC.

And please also tell me, how i can, populate data in a table , according to the dropdown list .

Plese provide any tutorial and code samples .

Thanks in Advance ,

Upendra agrawal .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can solve this problem by using the following

(1) attributeInfo

(2) simpleTypeModifier

(3) valueSet

Follow this program; that dynamically add values to a dropdown list

you can use the RFC outobject instead here.


IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute( IPrivatePRG_PaymentView.IContextElement.ALL_YEARS);
	ISimpleTypeModifiable YearType = attributeInfo.getModifiableSimpleType();
	IModifiableSimpleValueSet valueSet = YearType.getSVServices().getModifiableSimpleValueSet();
	String yearCount = null;
	for( int i = 0; i < 75; i++)
	{
		yearCount = "" + ( 1990+i);
		valueSet.put( yearCount, yearCount);
	}

Regards

- Vinod

*

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks EveryBody

Former Member
0 Kudos

Hi,

The answer given by Sharanya is right. Please close the threat if your problem is resolved.

Regards

Deepak

Edited by: Deepak Tiwari on Mar 5, 2008 5:15 PM

Former Member
0 Kudos

hai upendra ,

try this code ,it easy n it works

create a context node and an attribute under that node use ur node and attribute in this code.bine that node to the drop down by index UI element in Layout.

try

{

IPrivateKv_bus.IKvnodeNode kvlevel=wdContext.nodeKvnode();

List lis=new ArrayList();

for(int i=0;i<4;i++)

{

if(i==0)

{

IPrivateKv_bus.IKvnodeElement el11 = kvlevel.createKvnodeElement();

el11.setKvlevel("Select kvlevel");

lis.add(el11);

}

if(i!=0)

{

IPrivateKv_bus.IKvnodeElement el11 = kvlevel.createKvnodeElement();

el11.setKvlevel("kvlevel"+i);

lis.add(el11);

}

}

kvlevel.bind(lis);

}

catch(Exception e)

{

}

place this coding in init method of your view.any issues plz let me know.

Thanks n Regards

Sharanya.R

Edited by: Sharanya.R on Mar 5, 2008 9:39 AM

former_member312910
Participant
0 Kudos
Former Member
0 Kudos

Hi

if the value from rfc is less than 10, if it is more than go for SVS or OVS.

Create value node and value attribute of cardinality 0:n.

copy the values from the model node to created local node.

Bind this with the Drop Down by key or Drop Down by Index of your choice...

Regards

Chandran S