Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

abap error

Former Member
0 Kudos

hi all ,

i'm now stuck with my coding...

dunno which part and why?

i do this coding

SELECT cdwclm amlabr INTO TABLE ta_labor FROM ywcl

FOR ALL ENTRIES IN ta_ywch1

WHERE cdwclm = ta_ywch1-cdwclm.

when i debug, its only capture 2 records.

but when i do a sqvi..its display 3 record which is correct. why ya?

SQVI :

EQA20800001052 10.00 MYR 10 424244

EQA20800001052 10.00 MYR 10 424244

EQA20800001052 0.00 MYR 99 424244

coding

1 EQA20800001052 | 10.00 |

2 EQA20800001052 | 0.00 |

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

EQA20800001052 10.00 MYR 10 424244

EQA20800001052 10.00 MYR 10 424244

it is considering this entry as 1 record removing duplicate.. In for all entries extend the key in the where condition and check .

br,

Vijay.

5 REPLIES 5

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Select all the key fields of your table.

FOR ALL ENTRIES automatically deletes the duplicates based on the selected field list.


IF NOT ta_ywch1[] IS INITIAL.  "Mandatory check is also missing
SELECT cdwclm amlabr INTO TABLE ta_labor FROM ywcl
FOR ALL ENTRIES IN ta_ywch1
WHERE cdwclm = ta_ywch1-cdwclm.
ENDIF.

Thanks,

Vinod.

Former Member
0 Kudos

Hi,

EQA20800001052 10.00 MYR 10 424244

EQA20800001052 10.00 MYR 10 424244

it is considering this entry as 1 record removing duplicate.. In for all entries extend the key in the where condition and check .

br,

Vijay.

former_member188827
Active Contributor
0 Kudos

how many records does " ta_ywch1" hold?

Former Member
0 Kudos

hi,

In sqvi above two entry are same ........... in coding output depends upon the data in ta_ywch1...may be same data is available 2 times in internal table but finally internal table doesn't contains duplicate entry....because of For All Entry..

regards

Gaurav

0 Kudos

hi instead of using for all entries

try using left outer join

u will get 3 entries

cheers

s.janagar