05-21-2010 3:59 PM
Hi Guys,
I am fetching the BUKRS GJAHR BELNR and BUZEI from BSEG table, using for all entires of BSEG data, i am getting the data from BSID table.
But in BSID table, i have duplicate records, those records i am not able to get.
Could you please suggest me, is any wrong in my code. Please sugest is any other way to get the data.
SELECT bukrs
belnr
gjahr
buzei
xref1 INTO TABLE it_bseg
FROM bseg
WHERE bukrs = p_bukrs
AND gjahr IN s_gjahr
AND xref1 IN s_xref1.
SORT it_bseg BY bukrs gjahr belnr buzei.
SELECT bukrs
kunnr
zuonr
gjahr
belnr
budat
bldat
xblnr
blart
dmbtr
shkzg INTO TABLE it_bsid
FROM bsid
FOR ALL ENTRIES IN it_bseg
WHERE bukrs = it_bseg-bukrs
AND belnr = it_bseg-belnr
AND gjahr = it_bseg-gjahr
AND buzei = it_bseg-buzei
AND blart IN r_blart.
Thanks
Gourisankar.
05-21-2010 4:07 PM
This is a FAQ. FOR ALL ENTRIES eliminates duplicates. Press F1 on SELECT and look at FOR ALL ENTRIES.
Rob
05-21-2010 4:07 PM
This is a FAQ. FOR ALL ENTRIES eliminates duplicates. Press F1 on SELECT and look at FOR ALL ENTRIES.
Rob
05-21-2010 4:08 PM
Hi Sankar,
if there are duplicates entries select statement will omit those records. try to include fields in the select statement which makes the selected record different from other atleast by one field.
cheers!!
05-21-2010 4:20 PM
Hi Guys,
I know that For all entries will eliminate the duplicate entries, is any way can i get the duplicate entries using for all entries.
thanks,
Gourisankar.
05-21-2010 4:28 PM
Thanks gusy, after passing different filed, i could able to get ncessary thanks.