‎2008 Mar 17 10:52 AM
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
‎2008 Mar 17 11:07 AM
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
‎2008 Mar 17 10:58 AM
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...
‎2008 Mar 17 11:07 AM
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
‎2008 Mar 17 11:14 AM
hi,
if u want from Dictionary then why u need dropdown list ...u can use F4 help...
‎2008 Mar 17 11:24 AM
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.
‎2008 Mar 18 6:10 AM
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