Application Development 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: 

Why am not getting DROP-DOWN for my_P_parameter1?

Former Member
0 Kudos

form prepare_list_box_for_wstid .

DATA: l_wstid_list TYPE vrm_id,

l_list TYPE vrm_values,

l_value LIKE LINE OF l_list.

CLEAR: l_list, l_value.

REFRESH l_list.

DATA: BEGIN OF l_t_wstid OCCURS 0,

wstid LIKE Z_tbl-wstid,

END OF l_t_wstid.

SELECT wstid

INTO TABLE l_t_wstid

FROM Z_tbl

WHERE wstid ne space.

SORT l_t_wstid.

DELETE ADJACENT DUPLICATES FROM l_t_wstid.

LOOP AT l_t_wstid.

l_value-key = l_t_wstid-wstid.

WRITE l_t_wstid-wstid TO l_value-text.

APPEND l_value TO l_list.

ENDLOOP.

SORT l_list.

  • Set the LOWER values

l_wstid_list = 'P_WSTID'.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = l_wstid_list

values = l_list.

  • Set the HIGHER values

l_wstid_list = 'P_WSTID'.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = l_wstid_list

values = l_list.

endform. " prepare_list_box_for_wstid

Whts the wrong in my above code, bcoz, am NOT getting the DROP-DOWN for P_WSTID?

thanq

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Srinivas,

First, you must declare P_WSTID as a listbox something like this.


parameters: p_wstid type z_tbl-wstid as listbox.

Call the subroutine in the AT SELECTION-SCREEN OUTPUT event as given below.


 AT SELECTION-SCREEN OUTPUT.
   perform prepare_list_box_for_wstid.

Hope this helps. Rwd points for helpful answers.

Check the below link for more information.

[http://sap.niraj.tripod.com/id38.html|http://sap.niraj.tripod.com/id38.html]

Thanks,

Balaji

3 REPLIES 3

Former Member
0 Kudos

Hi Srinivas,

First, you must declare P_WSTID as a listbox something like this.


parameters: p_wstid type z_tbl-wstid as listbox.

Call the subroutine in the AT SELECTION-SCREEN OUTPUT event as given below.


 AT SELECTION-SCREEN OUTPUT.
   perform prepare_list_box_for_wstid.

Hope this helps. Rwd points for helpful answers.

Check the below link for more information.

[http://sap.niraj.tripod.com/id38.html|http://sap.niraj.tripod.com/id38.html]

Thanks,

Balaji

0 Kudos

thanq,

just curious,

Is it mandatory to use VISIBLE LENGTH, in this case?

If so, Pls. let me know that, Why particularly we need to use ADDITION of VISIBLE LENGTH, if we r implementing DROP-DOWN for my_p_parameter?

thanq

0 Kudos

VISIBLE LENGTH addition is not mandatory.

In your example, you are displaying the key value as well as the description. just to accomodate those, you can have it.

Hope this helps.

Thanks

Balaji