Application Development 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: 

Reg:Module pool drop down

Former Member
0 Kudos
145

Hi Gurus,

please suggest how to add drop down option for the filed with multiple values in the module pool program.

thanks in advance,

Mahendar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
125

Hi

See the program and do maccordingly

Input : p_char = 'J'.

Press: enter

List Box of Month = January, June , July.

REPORT ZLIST_VALUES.

TYPE-POOLS vrm.

tables:

spfli.

parameters: p_char type c.

parameters:

p_month(12) as listbox visible length 20,

p_year as listbox visible length 20 .

DATA:

t_table TYPE STANDARD TABLE OF vrm_value,

t_table1 TYPE STANDARD TABLE OF vrm_value,

vrm_values1 LIKE LINE OF t_table.

DATA:

t_year TYPE STANDARD TABLE OF vrm_value.

data: w_year(4) type n value '2000'.

*****************

at selection-screen output.

vrm_values1-key = 'a'.

vrm_values1-text = 'January'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'p'.

vrm_values1-text = 'February'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'q'.

vrm_values1-text = 'March'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'r'.

vrm_values1-text = 'April'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 's'.

vrm_values1-text = 'May'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 't'.

vrm_values1-text = 'June'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'u'.

vrm_values1-text = 'July'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'v'.

vrm_values1-text = 'August'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'w'.

vrm_values1-text = 'September'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'x'.

vrm_values1-text = 'October'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'y'.

vrm_values1-text = 'November'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'z'.

vrm_values1-text = 'December'.

APPEND vrm_values1 TO t_table.

t_table1[] = t_table.

delete t_table1 where text+0(1) <> p_char.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'p_month'

values = t_table1

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2.

do 10 times.

add 1 to w_year.

vrm_values1-key = sy-index.

vrm_values1-text = w_year.

APPEND vrm_values1 TO t_year.

enddo.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'p_year'

values = t_year

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2.

start-of-selection.

write: p_month.

Reward points if useful

Regards

Anji

8 REPLIES 8

Former Member
0 Kudos
126

Hi

See the program and do maccordingly

Input : p_char = 'J'.

Press: enter

List Box of Month = January, June , July.

REPORT ZLIST_VALUES.

TYPE-POOLS vrm.

tables:

spfli.

parameters: p_char type c.

parameters:

p_month(12) as listbox visible length 20,

p_year as listbox visible length 20 .

DATA:

t_table TYPE STANDARD TABLE OF vrm_value,

t_table1 TYPE STANDARD TABLE OF vrm_value,

vrm_values1 LIKE LINE OF t_table.

DATA:

t_year TYPE STANDARD TABLE OF vrm_value.

data: w_year(4) type n value '2000'.

*****************

at selection-screen output.

vrm_values1-key = 'a'.

vrm_values1-text = 'January'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'p'.

vrm_values1-text = 'February'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'q'.

vrm_values1-text = 'March'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'r'.

vrm_values1-text = 'April'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 's'.

vrm_values1-text = 'May'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 't'.

vrm_values1-text = 'June'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'u'.

vrm_values1-text = 'July'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'v'.

vrm_values1-text = 'August'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'w'.

vrm_values1-text = 'September'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'x'.

vrm_values1-text = 'October'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'y'.

vrm_values1-text = 'November'.

APPEND vrm_values1 TO t_table.

vrm_values1-key = 'z'.

vrm_values1-text = 'December'.

APPEND vrm_values1 TO t_table.

t_table1[] = t_table.

delete t_table1 where text+0(1) <> p_char.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'p_month'

values = t_table1

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2.

do 10 times.

add 1 to w_year.

vrm_values1-key = sy-index.

vrm_values1-text = w_year.

APPEND vrm_values1 TO t_year.

enddo.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'p_year'

values = t_year

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2.

start-of-selection.

write: p_month.

Reward points if useful

Regards

Anji

former_member196299
Active Contributor
0 Kudos
125

hi Mahendar ,

To make a field as dorp down field in the scren :

In the field attributes there should be an option for ' Dropdown' . Click on that and select an option. thats it you will get an arrow mark for the drop down option for that field .

Use the FM VRM_GET_VALUES for filling the dropdown list and showing the values in the screen..

Revert for further help if needed!

Regards,

Ranjita

Former Member
0 Kudos
125

Hi

If u have fixed values in ur domain just give that field as listbox that entries will automatically come as drop down.

Hope this helps

Regds

Seema

Former Member
0 Kudos
125

help ful

Former Member
0 Kudos
125

help ful

Former Member
0 Kudos
125

help ful

Former Member
0 Kudos
125

help ful

Former Member
0 Kudos
125

help ful