‎2008 Nov 04 8:35 AM
Hi Experts,
My requirement is to diplay a parameter as listbox with only 2 values.
but right now i am getting all the value from the respective table into the list box.
Please see the code which i have written :
PARAMETERS :
p_obtyp TYPE hrp1000-otype OBLIGATORY
AS LISTBOX VISIBLE LENGTH 20
USER-COMMAND onli
DEFAULT ' '.
please help me out.
‎2008 Nov 04 8:38 AM
Yes it will show all the values because the domain of the OTYPE is having a value table so that's why you are able to get all the values
‎2008 Nov 04 8:41 AM
Hi Pavan,
Thanx for the reply..
but, how can i display the two value in the list box..
please help me.
‎2008 Nov 04 8:42 AM
Hi,
The reason why you ar getting ll the values is beacause of the use of "hrp1000-otype " in your code.
Instead create a z-data element with the required attributes and assign fixed-values to it.
-Goodluck,
Bhumika
‎2008 Nov 04 8:44 AM
Hi,
Do like this...
PARAMETERS : year1 TYPE yyear1 AS LISTBOX VISIBLE LENGTH 20 OBLIGATORY.
INITIALIZATION.
WRITE 'F' TO year1.
" create a data type say 'yyear1' via se11 whose domains contains the value you require to dsplay...in the value range of the domain give the values...
Regards
Debarshi
‎2008 Nov 04 8:47 AM
Hello Gautam,
U declare the parameter with type C
p_obtyp TYPE C.(Remaining things Common for List Box)
Now u will get only the list box without any values.
Now select the data upto 2 rows with respect to
hrp1000-otype.
Now Call FM f4if_int_table_on_valuerequest
and get the values.
Hope useful to U.
Regards,
Priya
‎2008 Nov 04 8:57 AM
Hi Rahul
You can also use the function VRM_SET_VALUES in initialization.
Just append the two values in table vrm_values and call the following FM.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_OBTYP'
values = vrm_values
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
Hope it helps !!
Neeraj
‎2008 Nov 04 9:01 AM
Try to populate the List box using VRM_SET_VALUES.
then only u can get what u have desired...