‎2020 Mar 11 1:13 PM
Hello All, I am fetching data from below select query -
SELECT rldnr,
rbukrs AS bukrs,
gjahr,
belnr,
"docln AS buzei,
drcrk AS shkzg,
hsl AS dmbtr,
wsl AS wrbtr,
zuonr,
sgtxt,
rcntr AS kostl,
anln1,
racct AS saknr,
ps_psp_pnr AS posid,
kunnr,
lifnr,
"wmwst,
kokrs,
awsys,
"projn,
ebeln,
ebelp,
racct AS hkont,
"mwsts,
koart,
ktosl
FROM acdoca
INTO CORRESPONDING FIELDS OF TABLE @lt_bseg
FOR ALL ENTRIES IN @lt_bkpf
WHERE rbukrs = @lt_bkpf-bukrs
AND belnr = @lt_bkpf-belnr
AND gjahr = @lt_bkpf-gjahr.
where lt_bkpf-bukrs = '1000', lt_bkpf-belnr = '1000002099' and lt_bkpf-gjahr = '2020', i got 26 records in my internal table (lt_bseg).
But when i am checking in SE16N with above BUKRS, BELNR & GJAHR, there are 50 records.
Any solution for above issue.
Thankyou In advance.
Regards,
Naveen
‎2020 Mar 11 2:21 PM
‎2020 Mar 11 1:19 PM
FOR ALL ENTRIES removes duplicates result of the fields indicated in the SELECT.
The entire logical expression sql_cond is evaluated for each individual row of the internal table itab. The results set of the SELECT statement is the union set of the results sets produced by the individual evaluations. Rows that appear in duplicate are removed from the results set automatically. If the internal table itab is empty, the entire WHERE condition is ignored and all rows from the database are placed in the results set.
‎2020 Mar 11 2:21 PM
‎2020 Mar 11 3:27 PM
Thankyou Frederic and Raymond,
For your quick response, both of you are right.