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: 

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

former_member220489
Active Contributor
0 Kudos

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 ztable..as 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.

Regards,
Srinu

0 REPLIES 0