cancel
Showing results for 
Search instead for 
Did you mean: 

Running total reset on two groups

08-23-2012 7:53 AM
kjetil_sandvik2 Participant
841 views 6 comments
0 Likes
SAP Managed Tags
Subscribe

Hi,

Im trying make a running total which shall reset whenever one out of two groups are changed. I'm only allowed to choose one group.

Could I use any formula do to this?

The two fields I have grouped is:

OITM.U_Beskr and

OITM.U_Opprinnelsesland

Greatful for any help!

BR
Kjetil Sandvik

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Likes

Hi Kjetil,

Yes you can set the Running Total to reset on any one of the groups.

Open Field Explorer > Right-click Running Total Fields > Select New > Choose the Field to Summarize and the Operation > and then where it says 'Reset' at the bottom click on 'On change of Group' and choose one of the groups from the drop-down.

- Abhilash

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

kjetil_sandvik2
Participant
0 Likes

HI, thanks for the reply!

Though what I ment was, this function is fine, but I need it to also reset whenever another group changes. Because I have two groups, and whenever one of the two groups are changing, I need it to reset. But I can only choose one group. Thats why I was thinking, is it possible to add a formula so both groups will be considered?

Thanks

BR

Kjetil Sandvik

abhilash_kumar
Active Contributor
0 Likes

Hi Kjetil,

Create a manual running total and use a reset formula to reset at all levels.

So for eg: If your Manual Running Total formula is like this:

whileprintingrecords;

numbervar x;

x := x + {database_field};

The reset formula would be:

whileprintingrecords;

numbervar x := 0;

Place this reset formula on Group header 1 and Group Header 2 i.e

OITM.U_Beskr and

OITM.U_Opprinnelsesland

- Abhilash

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

kjetil_sandvik2
Participant
0 Likes

Thanks, it seems like I'm getting closer! I have supressed details and hide group headers so only footer will show. Because I dont need all details, only summary. But now, it will display formula for manual running total will (in footer section) only show the sum of last record in each group?

Any ideas?

BR

Kjetil Sandvik

abhilash_kumar
Active Contributor
0 Likes

Hi Kjetil,

The formula needs to be there on the Details section. It doesn't matter if the section is suppressed or not, what's important is that the formula is there.

And, I'm not sure if I understand what you mean in last lines of your reply.

Do you have a screenshot?

- Abhilash

kjetil_sandvik2
Participant
0 Likes

I must be doing SOMETHING wrong. Here is a screenshot of it, hope you can see what I'm doing wrong. I have created two formulas as you described.