2007 Sep 19 1:27 PM
Hi,
i placed a dropdown listbox on a dynpro and i'm filling the possible values in the PBO using FM VRM_FILL_VALIUES. But how do i set the default value?
//Rainer
2007 Sep 19 1:31 PM
hi Rainer,
very simple:
PARAMETERS : p_druck TYPE zdruc-druck OBLIGATORY
<b>DEFAULT '01'</b> USER-COMMAND lb01
AS LISTBOX VISIBLE LENGTH 40,
ec
2007 Sep 19 1:31 PM
hi Rainer,
very simple:
PARAMETERS : p_druck TYPE zdruc-druck OBLIGATORY
<b>DEFAULT '01'</b> USER-COMMAND lb01
AS LISTBOX VISIBLE LENGTH 40,
ec
2007 Sep 19 1:37 PM
Thanks, works fine for report with a selection screen, but i have a dynpro and therefore no parameter clause.
2007 Sep 19 1:40 PM
Declare a variable with the same name as the dropdown box in TOP INCLUDE. And then, in the PBO module set the default value you want to this variable. Hope this helps.
2007 Sep 19 1:46 PM
Hi Rainer ,
In the PBO afte the FM has been called assign the default value to the screen parameter.
I feel this should work.
Regards
ARUN
2007 Sep 19 1:54 PM
Hi ..
For Eg:
The Listbox field in the Screen Painter is MARA-MTART.
Then to Populate a Default value.
1) Declare the Global variable in the Program. Top include:
TABLES MARA.
2) In the PBO module called from the Screen put a Default value in this variable.
MARA-MTART = 'ROH'.
This value appears as default value in Checkbox.
Or in the Screen Painter :
Open the attributes of the Listbox
Enter the Default value in the TEXT attribute..
reward if Helpful.
2007 Sep 19 1:43 PM
hi,
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = '1'.
value-text = 'Line 1'.
APPEND value TO list.
value-key = '2'.
value-text = 'Line 2'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = name
values = list.
if helpful reward some points.
with regards,
Suresh Aluri.
2007 Sep 19 2:31 PM
Hi thanks, works fine. Is there any chance of getting rid of the empty line in the selection values? It seems t be there by default but rather to have an empty line would prefer something like "0 None".
2007 Sep 19 2:34 PM
U've to make the parameter as <b>OBLIGATORY</b> to get rid of the empty line.