Skip to Content
0

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

Dec 14, 2016 at 08:30 AM

65

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers