Application Development and Automation 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: 
Read only

abap error

Former Member
0 Likes
764

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
Read only

Former Member
0 Likes
715

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
Read only

vinod_vemuru2
Active Contributor
0 Likes
715

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.

Read only

Former Member
0 Likes
716

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.

Read only

former_member188827
Active Contributor
0 Likes
715

how many records does " ta_ywch1" hold?

Read only

Former Member
0 Likes
715

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

Read only

0 Likes
715

hi instead of using for all entries

try using left outer join

u will get 3 entries

cheers

s.janagar