‎2008 May 21 1:38 PM
1. how can i get the duplicate data while using on for all entry?
‎2008 May 21 1:58 PM
Maybe a query like this:
select field from table into corresponding fields of i_table group by field having count( * ) > 1.
‎2008 May 21 1:58 PM
Maybe a query like this:
select field from table into corresponding fields of i_table group by field having count( * ) > 1.
‎2008 May 21 2:00 PM
Hi Chakri,
When you use FOR ALL ENTRIES syntax, the data is fetched based on the data stored in the first internal table, on which you write , IF NOT INITIAL condiiton.
I general, FOR ALL ENTRIES does not fetch duplicate entries, so it is better to opt for writing seperate SELECT stmts. to fetch the data as per your requirement.
Hope this is helpful to you. If you need further information, revert back.
Reward all the helpful answers.
Regards
Nagaraj T
‎2008 May 21 4:20 PM
hi,
say if the source table has duplicate entries:
1
1
2
3
3
3
if you dont delete the duplicates and use it in for all entries to fetch data, ex. 1 occurs twice, the same data will be fetched twice. same is the case for 3 too. if u delete the duplicates, only once the matching data will be fetched.
regards,
madhu
‎2008 May 22 1:22 AM
For ALL ENTRIES doesnt give u a duplicate data depending on the selected tables. If it is so you can use
DELETE ADJACENT DUPLICATES FROM it_table.
‎2008 May 22 8:13 PM
For all entries in select statement always deletes duplicates data in result internal table comparing all fields.
Therefore, If you want some duplicates data in some fields, I suggest you to get all key fields of the selected table into your internal table then you will get duplicates data you want.
Regards,
Chaiphon Pulnitiporn
‎2008 May 23 7:44 AM
Please ask your question properly, the database table can not have duplicates, because the primary key MUST be unique. If you select which
FOR ALL ENTRIES with Select * or Select primary key, then you get everything there is nothing missing.
But the FAE is a select´distinct, if you have a field list with less fields, such that you woould get duplicates, then they will disappear from the result table.
=> choose your field list properly
Siegfried
‎2008 May 27 9:35 AM
hi
let say..
if itab is the source table having 2 same data
then whiling joining by for all entries at that time the data will fetch from the source is default one or first one
that is why u can avoid the duplicacy.
if u want to populate duplicate value then use innre join.
thanks
sachhi
‎2008 Jun 03 6:10 PM
Hi,
If you want to have duplicate data with For all entries
you must avoid to select key field in the select statement.
because of For all entries will removed duplicates data from the current select statement
Cheers
Wiparat