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 menu in selection screen field

Former Member
0 Likes
414

Hi all,

my requirement is

In selection-screen in one field I have to get drop down menu for 2 values.

1. Pvalue.

2. Hvalue.

By default it should pickup Pvalue.

can any one guide me how to get the logic for that

Regards

cnu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
393

Just paste this code: u will get idea..

report YH642_DROP_DOWN_BOX.

TYPE-POOLS vrm.

**"Table declarations...................................................

*TABLES sscrfields.

*"Table declarations...................................................

PARAMETERS:

p_connid(11) AS LISTBOX

VISIBLE LENGTH 20 default 'FOREX-ANANTH'.

  • p_value TYPE i MODIF ID QWR.

*" Data declarations...................................................

"----


  • Work variables *

"----


DATA:

w_char(20) TYPE c,

w_flag TYPE i.

"----


  • INITIALIZATION. EVENT *

"----


INITIALIZATION.

"----


  • Internal table to hold delivery header data *

"----


DATA:

t_table TYPE

STANDARD TABLE

OF vrm_value,

vrm_values1 LIKE LINE OF t_table.

vrm_values1-key = 'a'.

vrm_values1-text = 'sap'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '2'.

vrm_values1-text = 'testing'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '2'.

vrm_values1-text = 'java'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '4'.

vrm_values1-text = '.net'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '5'.

vrm_values1-text = 'vc++'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'che'.

vrm_values1-text = 'chetta-ram'.

APPEND vrm_values1 TO t_table.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'p_connid'

values = t_table

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2

.

reward points if helpful,

regards,

seshu.

Hi all,

my requirement is

In selection-screen in one field I have to get drop down menu for 2 values.

1. Pvalue.

2. Hvalue.

By default it should pickup Pvalue.

can any one guide me how to get the logic for that

Regards

cnu

1 REPLY 1
Read only

Former Member
0 Likes
394

Just paste this code: u will get idea..

report YH642_DROP_DOWN_BOX.

TYPE-POOLS vrm.

**"Table declarations...................................................

*TABLES sscrfields.

*"Table declarations...................................................

PARAMETERS:

p_connid(11) AS LISTBOX

VISIBLE LENGTH 20 default 'FOREX-ANANTH'.

  • p_value TYPE i MODIF ID QWR.

*" Data declarations...................................................

"----


  • Work variables *

"----


DATA:

w_char(20) TYPE c,

w_flag TYPE i.

"----


  • INITIALIZATION. EVENT *

"----


INITIALIZATION.

"----


  • Internal table to hold delivery header data *

"----


DATA:

t_table TYPE

STANDARD TABLE

OF vrm_value,

vrm_values1 LIKE LINE OF t_table.

vrm_values1-key = 'a'.

vrm_values1-text = 'sap'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '2'.

vrm_values1-text = 'testing'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '2'.

vrm_values1-text = 'java'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '4'.

vrm_values1-text = '.net'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = '5'.

vrm_values1-text = 'vc++'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'che'.

vrm_values1-text = 'chetta-ram'.

APPEND vrm_values1 TO t_table.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'p_connid'

values = t_table

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2

.

reward points if helpful,

regards,

seshu.