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

Drop Down on selection screen doesn't work

Former Member
0 Likes
981

Hi,

I did the below coding and it doesn't work. I want to provide X & Space in the drop down list on the selection screen for my parameter p_rsml.

Any suggestions please.

AT SELECTION-SCREEN OUTPUT.

  • Build Drop Down for RSML Indicator

DATA: i_vrm TYPE vrm_values,

wa_vrm LIKE LINE OF i_vrm,

g_name TYPE vrm_id.

g_name = 'P_RSML'.

wa_vrm-key = '1'.

wa_vrm-text = 'X'.

APPEND wa_vrm TO i_vrm.

CLEAR: wa_vrm.

wa_vrm-key = '2'.

wa_vrm-text = ' '.

APPEND wa_vrm TO i_vrm.

CLEAR: wa_vrm.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = g_name

values = i_vrm

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.

This doesn't work in INITILIZATION EVENT Also.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
918

You need to declare parameter as list box.

Like

PARAMETERS : P_RSML TYPE c AS LISTBOX VISIBLE LENGTH 10.

You might have missed it.

Check .

Edited by: harsh bhalla on Sep 22, 2009 9:37 PM

7 REPLIES 7
Read only

Former Member
0 Likes
919

You need to declare parameter as list box.

Like

PARAMETERS : P_RSML TYPE c AS LISTBOX VISIBLE LENGTH 10.

You might have missed it.

Check .

Edited by: harsh bhalla on Sep 22, 2009 9:37 PM

Read only

0 Likes
918

Thanks. But I dont want to see the Key Values 1, 2 etc...when I use the drop down. I just want the values. How can I do it?

Thanks,

Kiran

Read only

Former Member
0 Likes
918

See Rich's answer in

Rob

Read only

0 Likes
918

Thanks Rob. Thats what I did, if you see my first post.

That will give me 1 <Value 1>, 2 <Value 2> etc... I just want to see the values and not the keys 1,2 etc along with the values.

Thanks

Kiran

Read only

0 Likes
918

I did see your first post - it doesn't pass a syntax check.

You're not being clear. Do you want to see the key or the text?

Rob

Read only

0 Likes
918

hi kiran,

as far as i know what you mean to say is:

1 'X'

2 '__'

this is what you are getting now.and you want it as:

'X'

'__'

right?

i have seen this situation before, to my knowledge its a user setting, it varies from user to user. i guess you need to check with basis guys. i am not infront of sap system.. so cant check.

Read only

0 Likes
918

Yes, I just want 'X' & Space.

I think I solved it. I passed X & Space into field KEY and not having any texts for it. That solved.

Thanks,

Kiran