cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Listbox values

Former Member
0 Kudos

Hi,

I want to populate the values in the listbox based on the value entered in other field. How to achieve this in Webdynpro. Though if I am attaching an event it is not getting triggered.

Thanks

Raghavendra

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member189058
Active Contributor
0 Kudos

Can you elaborate a liltle bit on what you have done exactly.

Former Member
0 Kudos

HI,

I have created a listbox element for the field Payment terms. If i am entering a vendor the possible payment terms needs to be populated in the list box.

Thanks

Raghavendra.

Former Member
0 Kudos

Hi Kumar Raghavendra Alwala,

You have to write the code to populate the list box values on the on enter event or on select event of Your Vendoe field.. so that each time you change the vendor that method to populate the list box is called.

Regards

Sarath

Former Member
0 Kudos

Hi,

It is not working even if a attaching the event at vendor field.

Thanks

Raghavendra

Former Member
0 Kudos

Hi,

Primarly when the view is displaying for the first time is it displaying some thing on the listbox?

Try writting the code the modify view based on some conditions. Try checking the context values at run time after the event happening on vendor field. If the Context is having changed values after the event from vendor field, avoid context mapping and try filling the list box using the method of if_wd_listbox.

Regards

Sarath

former_member189058
Active Contributor
0 Kudos

Hi Raghvendra,

Try this:

Context:

ListBox_Node --> node

Text --> attribute of type string

Layout:

1. Create an input field and bind its value to some attribute of the context. Create an event for "OnEnter" of the input field. eg GET_LISTBOX

2. Create an ItemListBox and bind its data source to ListBox_Node and text to Text attribute of ListBox_Node

Methods:

in the event handler for GET_LISTBOX take these steps

step 1. Invalidate the ListBox_Node.

step 2. read the context and get the attribute that is bound to the input field.

step 3. write query based on the input field and fetch all results

step 4. bind result table to ListBox_Node

Regards,

Reema.

Edited by: Reema Shahbazkar on Apr 2, 2008 2:30 PM