Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Multiple Dtop down lists populating incorrectly..

Former Member
0 Likes
823

Hi Experts,

I have an issue when populating DDL's. I currently have 2 ddl's on a selection screen. Im using fm 'VRM_SET_VALUES'

to populate the values of both ddl's but all of the values seem to be populating in the same control. All my code is placed within 2 sub-routines that are named differently as below within the INITIALISATION event.

************************************************************************

INITIALIZATION.

************************************************************************

PERFORM fill_dropdown_list USING ddl_bill.

PERFORM fill_dropdown_list1 USING ddl_ord.

form fill_dropdown_list using p_ddl_bill.

name = ddl_bill.

value-key = '601'.

value-text = 'C Cancellation'.

APPEND value TO list.

etc, etc....

ALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list

The first control is empty and the second control contains all values????

Also im replicating the values in the list manually...is there any way to bind the control to a set of table values i.e values from VBAK??

Many Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
749

Hi Dhwani,

Thanks for the speedy reply....

This works perectly..

Is there anyway to bind the ddl to table values tho instead of having to manually create the list??

Also, how do i refernce the values in my program ??

Thanks

5 REPLIES 5
Read only

Former Member
0 Likes
749

hi,

here is the example of two listbox

parameters: p_mode as listbox visible length 10.

parameters: p_mode1 as listbox visible length 10.

AT SELECTION-SCREEN OUTPUT.

PERFORM fill_dropdown_list USING 'p_mode'(001).

PERFORM fill_dropdown_list1 USING 'p_mode1'(007).

FORM fill_dropdown_list USING value(f_parameter).

TYPE-POOLS: vrm. " For parameter drop down lists

DATA: name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

name = f_parameter.

value-key = 'C'.

value-text = 'Fist'.

APPEND value TO list.

value-key = 'F'.

value-text = 'Second'.

APPEND value TO list.

value-key = 'H'.

value-text = 'Third'.

APPEND value TO list.

value-key = 'D'.

value-text = 'Forth'.

APPEND value TO list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list.

ENDFORM. " fill_dropdown_list

FORM fill_dropdown_list1 USING value(f_parameter).

TYPE-POOLS: vrm. " For parameter drop down lists

DATA: name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

name = f_parameter.

value-key = 'C'.

value-text = 'Fist'.

APPEND value TO list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list.

ENDFORM. " fill_dropdown_list

reward if usefull...

Read only

Former Member
0 Likes
750

Hi Dhwani,

Thanks for the speedy reply....

This works perectly..

Is there anyway to bind the ddl to table values tho instead of having to manually create the list??

Also, how do i refernce the values in my program ??

Thanks

Read only

0 Likes
749

hi,

if u want from Dictionary then why u need dropdown list ...u can use F4 help...

Read only

0 Likes
749

If the values are static and will always be the same,

Modify/Create the Domain for the data element to add the value range(s) (SE11)

Then no need for VRM usage.

Read only

0 Likes
749

Hi,

Maintain value range for the domain. Then u can get .

if you give fixed values in Value range, change screen element as list box in attributes. automatically List box will come.

Regards,

Venkat.O