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: 

Group By Clause

Former Member
0 Kudos

Hi experts,

I am using group by clause in a select statement. Their is no problem in select statement. My need is to find how many groups are retrived form that select statement. eg, In a report program i am generating PO item list created for a day such that i am grouping PO items with reference to PO Number.At the same time i also need the number PO's created for a day. Methods like looping throught internal table,etc are possible but i want system field that will give no of groups from the select statement itself.

With Regards,

Rk

2 REPLIES 2

Former Member
0 Kudos

Hi

You can't get the number of groups straight from the select statement

Fetch the data into internal table ITAb first from DB tables

SORT that Internal table by the fields on which you want Groups.

then find the required info

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

You might be able to do this with a sub-query.

Rob