Skip to Content

ABAP query output conversion to internal table for calculations in the same query itself

Dear Gents,

I have created an infoset query, where the data source is from a DIRECT READ FROM ZTABLE. And my ztable has field1 field2 field3 for all the 10 records/rows.

Now i have added field4 and field5 as addtional fields in SQ02, where these field4 and field5 are formula based, so values are updated based on ome calculations using field1/ field2/field3.

Now i have created an additional field6, for this field the formula is SUM of field4 for all 10 rows together. Since my field4 is not available in it is being calculated in the query itself, i cannot write a SELECT SUM() statement for additional field6.

I have spent lot of time, searching on forum, and found that filling the query output to an internal table (sequentially after field5 defenition in extras) within query itself and use that internal table for SELECT SUM() statement for the calcualtion of field6 value.

But unfortunately, i never worked on internal table concepts in queries. Please somebody help me to acheive the same.


Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.