Application Development and Automation 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: 
Read only

Parameter List Box

Former Member
0 Likes
889

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.

7 REPLIES 7
Read only

bpawanchand
Active Contributor
0 Likes
860

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

Read only

0 Likes
860

Hi Pavan,

Thanx for the reply..

but, how can i display the two value in the list box..

please help me.

Read only

Former Member
0 Likes
860

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

Read only

Former Member
0 Likes
860

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

Read only

Former Member
0 Likes
860

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

Read only

Former Member
0 Likes
860

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

Read only

Former Member
0 Likes
860

Try to populate the List box using VRM_SET_VALUES.

then only u can get what u have desired...