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

problem in selecting second value with drop down list box in module pool

Former Member
0 Likes
1,965

Hi all,

In Module pool programming i have created one drop down list box. i am populating two values into drop down list box by using FM 'VRM_SET_VALUES' .

In drop down list box first value is appearing by default. now my problem when i am selecting second value, it is not selecting to list box. still apearing first value in drop down list box.

what is the problem that it is not selecting second value. how can i resolve it.

cuold anybidy help me in this regard.

Thanks in advace,

Mythily.

16 REPLIES 16
Read only

Former Member
0 Likes
1,723

Hi,

Declare a field with the same name as your list box parameter in the program.

EX: If TESTLIST is the name of List box on the screen .. then in SE38 program declare a variable as.

DATA : testlist(10) .

Regards,

Srini.

Read only

Former Member
0 Likes
1,723

Hi ,

Did you put that field as drop down -> listbox in the module pool screen ?

//i am populating two values into drop down list box by using FM 'VRM_SET_VALUES' . -> it means its not domain field pick ..

is there any internal table where the header is not getting cleared if you trying explicitly to fill the itab for this drop down .

BR,

Vijay.

Read only

0 Likes
1,723

hi

my code is like below

lf_id = 'RQM07-EMAILADR1'.

LOOP AT lt_adr6 INTO lw_adr6.

if lw_adr6-flgdefault = 'X'.

lw_values-text = lw_adr6-smtp_addr.

else.

lw_values-text = lw_adr6-smtp_addr.

endif.

append lw_values to lt_values.

clear: lw_values,

lw_adr6.

ENDLOOP.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = lf_id

values = lt_values.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

i am not able to select second record

Read only

0 Likes
1,723

Follow up with program demo_dynpro_dropdown_listbox

Regards

Marcin

Read only

0 Likes
1,723

Hi

below is my code chaged according to demo program,

DATA: id TYPE vrm_id,

values TYPE vrm_values,

lw_text like LINE OF values.

id = 'RQM07-EMAILADR1'.

lOOP AT lt_adr6 INTO lw_adr6.

*

if lw_adr6-flgdefault = 'X'.

lw_text-text = lw_adr6-smtp_addr.

else.

lw_text-text = lw_adr6-smtp_addr.

endif.

append lw_text to values.

clear: lw_text,

lw_adr6.

ENDLOOP.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = id

values = values.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

still i am facing the same problem,

help me anybody..

Read only

0 Likes
1,723

Where are your PBO and PAI modules. Do you have any? Are you also calling any screen out there?

Refer the program and paste your code in corresponding places.

Regards

Marcin

Read only

0 Likes
1,723

Hi,

Declare a field with the same name as your list box parameter in the module pool.

DATA : RQM07-EMAILADR1(20).

Regards,

Srini.

Read only

0 Likes
1,723

Hi ,

1.Make that field in module pool screen as listbox ..=> id what u r giving in function module

2.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = id

values = values[]. -


> put a bracket here ..

IF sy-subrc 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

I'm assuming that u r doing this in the PBO of ur screen inside the loop endloop of table control ..

BR,

VJ.

Read only

0 Likes
1,723

HI Sniper,

i made in the same way as you mentioned, but still same problem.

Read only

0 Likes
1,723

is there any othe FM to display values in dropdown box in module pool instead of 'VRM_SET_VALUES' FM.

Read only

0 Likes
1,723

Hi ,

I think you have to paste ur code in snippets of PBO and the associated code to us thats the only option left.

Cause this is working fine in my end . To last two threads you did not confirm if the changes in the list box were present in ur end .

What you need to do is to debug and find the missing .

BR,

VJ.

Read only

0 Likes
1,723

Yes, you can use fm F4IF_INT_TABLE_VALUE_REQUEST instead. Refer program DEMO_DROPDOWN_LIST_BOX .

Regards

Marcin

Read only

0 Likes
1,723

Hi mythili,

just i typed the sample code here, please do the declaration as i did, it work properly for me...

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20 default 'SELECT'.

NAME = 'p_list'.

VALUE-KEY = '1'.

VALUE-TEXT = 'Name'. " instead of assign statically assign with internal loops if you are doing

with internal table

APPEND VALUE TO LIST.

CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.

hope this will help.

Read only

0 Likes
1,723

is there any othe FM to display values in dropdown box in module pool instead of 'VRM_SET_VALUES' FM.

Read only

0 Likes
1,723

I used this function modules for many screen its worked properly for me. i dint used any other funtion modules.

if you are having problem in receving values use case statement then you can achieve it.

Regards,

Thanesh

Read only

Former Member
0 Likes
1,723

From the peice of code you have shown, i see that you have not populated the lw_values-key field. Please check this.