Application Development and Automation 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: 
Read only

Abap code to avoid aggregation

dinesh_smhdr
Participant
0 Likes
1,372

Need an ABAP

code to avoid aggregation for the for records marked in yellow. The records from the month of April are aggregating creating incorrect results. We need to make one of the record as zero or any solution that can stop aggregating the data.

4 REPLIES 4
Read only

bbalci
Contributor
0 Likes
1,256

Hello ,

Use "COLLECT" command instead of "APPEND" while adding your records to the internal table.

Read only

0 Likes
1,256

we have not used append anywhere. its a looping on result package and each value in field symbol assinged to each result field in the loop. Please suggest some other way to achieve this.Many thanks in advance.

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,256

I don't understand. Please show both the initial data, and the expected result.

Read only

bbalci
Contributor
0 Likes
1,256

Hello ,

So describe new internal table as a copy of this internal table,

and then Loop on this internal table to add all records to the new table using COLLECT command.

I'm trying to find easiest solution to save your time.