on 07-13-2007 11:08 AM
Hi Experts,
I have a table and a dropdownlistbox.
What's the easiest possibilities to avoid that double entries are shown in the dropdownlistbox?
Thank you very much in advance!
hi,
you can create an internal table of type Hashed which will not allow the duplicate values...and directly pass the values in DDLB...
thanks
jaideep
*reward points if useful..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
For a DDLB(DropdownListBox) we have to pass an internal table to display values...
So the best way would be to use select distinct while populating the internal table....
What we normally do is use a table of type TIHTTPNVP.
eg.
<%
DATA : gt_tab type TIHTTPNVP,
gs_tab type IHTTPNVP
itab type standard table of ZTABLE,
wa type ZTABLE.
select distinct FIELD1 from ZTABLE into corresponding fields of table itab.
loop at itab into wa.
gs_tab-NAME = wa-FIELD1.
gs_tab-VALUE = wa-FIELD1.
append gs_tab to gt_tab.
endloop.
%>
Then pass this gt_tab to ur DDLB...!
eg.
<htmlb:dropdownListBox id = "DDLB"
table = "<%= gt_tab %>"
nameOfKeyColumn = "NAME"
nameOfValueColumn = "VALUE"
width = "100%"
onSelect = "onInputProcessing"
/>
Hope this helps.
<b><i>Do reward each useful answer..!</i></b>
Thanks,
Tatvagna.
Message was edited by:
Tatvagna Shah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.