‎2010 Sep 01 7:41 AM
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.
‎2010 Sep 01 7:58 AM
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.
‎2010 Sep 01 7:59 AM
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.
‎2010 Sep 01 8:10 AM
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
‎2010 Sep 01 8:13 AM
Follow up with program demo_dynpro_dropdown_listbox
Regards
Marcin
‎2010 Sep 01 9:27 AM
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..
‎2010 Sep 01 9:31 AM
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
‎2010 Sep 01 9:33 AM
Hi,
Declare a field with the same name as your list box parameter in the module pool.
DATA : RQM07-EMAILADR1(20).
Regards,
Srini.
‎2010 Sep 01 9:36 AM
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.
‎2010 Sep 01 10:42 AM
HI Sniper,
i made in the same way as you mentioned, but still same problem.
‎2010 Sep 01 10:49 AM
is there any othe FM to display values in dropdown box in module pool instead of 'VRM_SET_VALUES' FM.
‎2010 Sep 01 10:54 AM
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.
‎2010 Sep 01 10:55 AM
Yes, you can use fm F4IF_INT_TABLE_VALUE_REQUEST instead. Refer program DEMO_DROPDOWN_LIST_BOX .
Regards
Marcin
‎2010 Sep 01 10:56 AM
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.
‎2010 Sep 01 11:15 AM
is there any othe FM to display values in dropdown box in module pool instead of 'VRM_SET_VALUES' FM.
‎2010 Sep 01 11:31 AM
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
‎2010 Sep 01 12:12 PM
From the peice of code you have shown, i see that you have not populated the lw_values-key field. Please check this.