Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Shared Variable in summary formula

Hi All,

I would appreciate any help I can get on this.

I have a subreport that retrieves a Foriegn Exchange rate for a specific date ( main report & sub-report are linked by date). I have no problem passing the value to the main report but when I use that value in a summarized formula field (@Princip Rem Term) I get the following error "A summary field has been specified on a non-recurring field Details: @Princip Rem Term"

Here are my formulas

Sub-report:

@FX rate

Shared numbervar FX;

FX := TONUMBER({ZFI_EXCHANGE_RATE.MRATE})

Main report:

@FX Rate

shared numbervar FX;

@PrincipalCAD

if {ZFI_TREASURY.VTBFHAPO-WZBETR} = "USD" then

{ZFI_TREASURY.VTBFHAPO-BZBETR} * {@FX Rate} else

{ZFI_TREASURY.VTBFHAPO-BZBETR}

@Principal Rem Term

{@PrincipalCAD}*({ZFI_TREASURY.VTBFHAZU-DELFZ}-{@AsofDate})

Is there a way to solve this problem? Can't I use the value I retrieved from the sub-report as a staic vlaue and summarize it??

Thanks for help...very much appreciated!!

Romeo

Former Member
Former Member replied

What you'll have to do is manually summarize the field in the formula field @Principal Rem Term using a global variable, then create another formula field that will return the global variable's value and place it where you need it on the report.

HTH,

Carl

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question