{1 - 24} GreyGrey
{25 - 49} GreenGreen
{50 - 499} BlueBlue
{500 - 4999} OrangeOrange
{5000 - 24999} RedRed
{25000+} BlackBlack

Please confirm that you would like to report this for an admin to review.


SUM or GROUP BY .. In internal Tables

ABAP SAP Consultant needs help regarding “SUM or GROUP BY .. In internal Tables “

Hello Experts,

I am fairly new to ABAP, but i have good understanding of ABAP as well as SAP, (I hold Mstr degree in SAP)

I often come to situation like to sum the currency field in an internal table, just like

SELECT FIELD1
              FIELD2
              FIELD3
              SUM( FIELD4 )
              FROM...
              WHERE <CONDITIONS...>
              GROUP BY FIELD1 FIELD2 FIELD3...

This would be easy to do, but what i have all the datas in an internal table,
i want to perform the same thing as above using internal table,

i tried using AT END OF…ENDAT but you cant use nested AT to get the sum..

Example…
i have field COMPANY CODE, GL NO , Document NUMBER, DATE, AMOUNT.

in this case i want to amount to be grouoped by all before fields (i.e. CC, GL no, Doc no, Date)
*I only need to know how can do better using internal table.

ABAP Consultant, needs help regarding SUM or GROUP BY .. In internal Tables Help!



Confirm that you would like to Remove Email Alerts for your question. You cant undo this and you will not be able to re-subscribe.


Tags

No Answers

You must be Logged In to Answer this Question

Already a Member, Log In
Not a member yet? Sign Up
sap forum