‎2006 Dec 28 8:40 AM
Hi All,
I have drop down list box on the my screen.
I have assigned function code to this list box.
Lets say there are 5 entries in the drop down list box
Now whenever i clicks on this list box it drops down to show all 5 entries.
If i selects one among them,it gets selected.
But when next time i clicks on drop down list,previously selected entry gets added int the list,that means it shows 6 entries.
Every time it shows 6 entries,that means 5 entries + one entry which is previously seleted.
But if i remove function code assigned to this drop down list,it works fine.
Can anybody suggest me,why is it happening so.and the solution for that?
‎2006 Dec 28 8:51 AM
Hi Sanjay,
clear the field <value> when u call the VRM_SET_VALUES FM.
because when the fcode is executed,again the PBO is getting executed that is why your getting the selected value again in the drop down list.
Regards,
Balaji Reddy G
****Rewards if answers are helpful
‎2006 Dec 28 8:59 AM
Hi,
Thanks for your reply.
But i could not understand you clearly.
I am using 'F4IF_INT_TABLE_VALUE_REQUEST' to fill the F4 help.
where 'T_HEADER-PO_SUPPLEM' is my field to which i have given drop down.
and r_po_supplem is the range which contains all input values.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LOW'
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'T_HEADER-PO_SUPPLEM'
value_org = 'S'
TABLES
value_tab = r_po_supplem.
In your statment u have mentioned to clear <b>field <value></b> but i did not understand that..
can you please explain it?
‎2006 Dec 28 9:18 AM
I meant always clear the values(field) which you are building in the drop down list table.since the after executitng the fcode it goes to pbo again.
Checck the code after below my prvious post
‎2006 Dec 28 8:56 AM
Hi,
Try this.
PROGRAM zcmtest01.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
<b> clear value.
refresh list.</b>
name = 'PS_PARM'.
value-key = '1'.
value-text = 'Line 1'.
APPEND value TO list.
value-key = '2'.
value-text = 'Line 2'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = name
values = list.
START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.
‎2006 Dec 29 10:39 AM
Hi Sanjay,
Assign the values to list box under INITIALIZATION event.Your problem will get resolved.
Pls. mark for useful answers.