2007 May 24 5:41 AM
Hi
I have used an inner join to get data from two tables KNA1 and KNVP. In the result some entries are getting duplicated. How do i restrict it to get unique records???
Hi
I have used an inner join to get data from two tables KNA1 and KNVP. In the result some entries are getting duplicated. How do i restrict it to get unique records???
2007 May 24 5:43 AM
Hi,
after the data fetch , youcan execute the following command :
delete adjacent duplicates from ITAB comparing <some field>
regards,
2007 May 24 5:58 AM
2007 May 24 5:44 AM
Hi Mayur,
After selecting the datas you can delete the Duplicate Values from your internal Table.
For Internal tables use,
DELETE ADJACENT DUPLICATES FROM itab.
If u want to delete the duplicate entries depending on one or 2 columns then u can use
DELETE ADJACENT DUPLICATES FROM itab COMPARING f1 f2.
Thanks.
Reward If Helpful.
2007 May 24 5:58 AM
2007 May 24 5:45 AM
2007 May 24 5:46 AM
Hi,
Use DISTINCT option in your select query
like select distinct <field names ..............>.
Thanks
Sandeep
Reward if helpful
2007 May 24 5:48 AM
Hi
If you Dont want any duplicate entries from the database table you can use SELECT DISTINGT clause in the query...Otherwise if you want to delete duplicate by giving condition to some specific fields after the selection you can use this command..
DELETE ADJASCENT DUPLICATE FROM ITAB COMPARING <FIELDS>
Hope this will help u..
Reward ALL The Helpfull Answers.......
2007 May 24 5:49 AM
From Functional point of view, This join query should yield more than one records as A customer can be existing in more than one sales area(sales org, dist. channel, division).
What exactly is your requirement?
2007 May 24 5:56 AM
2007 May 24 6:30 AM
You have to follow the following steps..
Select A B C "(change it with the field you select)
Into ta_kna1_knvp
FROM KNA1
Inner Join KNVP
On...
where.... "(allways select based on primary key or index)
Sort ta_kna1_knvp by A B. "(Where A B is the key that differ your selection unique)
delete adjacent duplicates from ta_kna1_knvp comparing A B.
Allways use SORT and DELETE ADJACENT DUPLICATES after inner join.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |