I have a list of transaction codes that a user wants to summarize in a report that replicates what they've produced in excel. The transaction codes don't form a natural hierarchy for this. The excel report pulls out various individual codes, groups some together, summarises others etc.
To achieve this I've got a line item subset with each of the report's line items in it. The user can then define what codes go into which line items. The way I do this is to have a DATA list where each item has a line item from the report, and a code to be included:

I then have an "included?" line item in a module with the formula: DATA Management Reporting Account Codes.Included?[ANY: DATA Management Reporting Account Codes.GL Account, ANY: DATA Management Reporting Account Codes.LineItem, and an "Amount" calculated with IF Included? THEN 'REP01 - Amounts by GL Code'.ClosingBalance[SUM: PROP G GLCodes.'G2 Department', SUM: PROP G GLCodes.'GA3 Account Code'] ELSE 0 both dimensioned by GL code and the lineitem subset.
The report module then uses the Amount line item: 'SYS01 - Management Reports GL Code Mapping'.Amount[SELECT: 'GA1 Financial Statements'.Total, SELECT: 'Management Reports (SS)'.International]
The problem I have is that this intermediary module is very large. The number of GL accounts * number of report module line items is big. (I'm leaving out some other dimensions common to the report and subsequently the intermediary module which further increase the size).

Is there any way I can remove, or reduce the size of the intermediary module?