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: 

Select SUM in FOR ALL ENTRIES Select Query

Former Member
0 Kudos

Hi ,

I am using for all entries select statment ,can any one guide me how can i use SUM in the select statment with for all entries .

Regards,

Veera

6 REPLIES 6

former_member191735
Active Contributor
0 Kudos

try this

Select vbeln sum(netwr ) into table itab

From vbak

For all entries in itab2

Where vbeln = itab2-vbeln.

Former Member
0 Kudos

Not sure if you can use this way.

A

former_member191735
Active Contributor
0 Kudos

I think you also need to use Group by vbeln at end of the statement.

try it

former_member191735
Active Contributor
0 Kudos

I am sorry, for all entries excludes all aggregate functions except count.

Former Member
0 Kudos

Hi,

THis is not possible using for all entries.

Thanks,

Sriram Ponna.

0 Kudos

you can use range object.

before, you should fill range object from itab after than you can use where condition.