11-04-2006 12:17 PM
i m trying to get the dropdowm list into paramater in selection screen for bukrs ( ccode ) fetched from lips.
I m using following code.
PARAMETERS : z_p_burk TYPE bukrs OBLIGATORY
AS LISTBOX
VISIBLE LENGTH 4.
I want to see the ccode list when user clicks on the drop-down icon.
With the code mentioned above , I m only getting the icon but the list is empty !
What additional code should I write ??
11-04-2006 12:18 PM
hi,
chk this.
Check the link to know how to populate values as a LIST(drop down list)
here is the sample piece of code,
PROGRAM zlist.
TYPE-POOLS : VRM.
DATA: param TYPE vrm_id,
values TYPE vrm_values,
value LIKE LINE OF values.
PARAMETERS: p_name(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
param = 'P_NAME'.
value-key = '1'.
value-text = 'NAME1'.
APPEND value TO values.
value-key = '2'.
value-text = 'NAME2'.
APPEND value TO values.
*--and so onnn
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = param
values = values.
rgds
anver
<i>pls mark points, if ur issue solved and close the thread</i>.
11-04-2006 12:21 PM
11-04-2006 5:18 PM
You can either populate internal table for your listbox in INITALIZATION event (it was on SND before):
TYPE-POOLS: vrm. " Value Request Manager: Typen und Konstanten
DATA:
gt_values TYPE vrm_values.
......
INITIALIZATION.
Select the allowed values for dropdown listbox
SELECT bukrs AS key FROM t001 INTO TABLE gt_values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'Z_P_BURK'
values = gt_values
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
or
You can define your parameter not as listbox and
program event to display popup window to select values :
AT SELECTION-SCREEN ON VALUE-REQUEST FOR Z_P_BURK
and use FM 'HELP_VALUES_GET_WITH_TABLE' or F4IF_INT_TABLE_VALUE_REQUEST which can be used to display/select your values, in this case you may populate yhe table with severla fields like add a description field to make selection easier.
04-12-2007 1:24 PM