on 04-21-2014 12:42 PM
How to remove duplicate entries from dropdownlist in web dynpro abap? Can someone please help me
I have maintained the data in the z table wherein the records of particular fields are repeated but when i show that record in the Web Dynpro application dropdown list, the user should only be able to view the unique data for selection of that particular field.
Hi,
try this code in init method.
use the
Delete adjacent duplicates.
<set the table>
select <f1> from <table> into TABLE <Itab> whre <condition>.
DELETE ADJACENT DUPLICATES FROM <Itab> COMPARING <f1>.
lo_nd_vbap->bind_table( new_items = <itab> set_initial_elements = abap_true ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you everyone for your help. My problem got solved. I used the sort table and then deleted the adjacent duplicate entries in that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajinkya,
You mention that you maintain the values in a z-table. When you select the values from the z-table, use the SELECT DISTINCT keyword to eliminate duplicate records from the result set. For example,
DATA lt_carrid TYPE STANDARD TABLE OF s_carr_id.
SELECT DISTINCT carrid
FROM sflight
INTO TABLE lt_carrid.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ajinkya,
Remove all your duplicate entries from your ITAB, which you use to assign to the node creating Drop down.
Use any of the Following:
Delete adjacent duplicaties from lt_table comparing <field_lable_names>.
or
Loop on itab and delete all duplicate values..
Regards,
Chandan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just sort the value by key field and use delete adjacent before binding it to context attribute..
for reference:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First sort the table entries based on the key field and then use delete adjacent duplicates for that field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajinkya,
Before binding the table data to the node of your UI element, First delete duplicate entries in internal table.
Delete adjacent duplicaties from lt_table comparing <field_lable_names>.
Regards,
Ravikiran.K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.