Skip to Content

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

To show the value of a shared variable


Simply how to show that? We can't directly put it in a formula and show it!

Former Member


To show the value from main report to a sub report using a Shared variable:

Create a formula in main report and take a shared variable. Assign the required value to it.


 Shared currencyVar grandtotal := Sum ({Customer.Last Yearu2019s Sales})

Create another formula in the subreport and declare the same shared variable there like

Shared currencyVar grandtotal;

Place this formula in say Report Header of the sub-report.

Place this sub-report in the main report. Make sure that the sub-report should be placed below the formula we created above(in main report) as report is processed top to bottom and left to right.

Please let us know if your requirement is different from this.


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