Symptom
- Are replacement path variables supported?
- How to report off an SAP BW BEx Query that contains replacement path variable(s), in Crystal Reports for Enterprise?
- Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP Crystal Reports for Enterprise 4.2
- SAP Crystal Reports for Enterprise 4.3
Reproducing the Issue
- In BEx Query Designer, create a BEx Query with a replacement Path variable.
- In Crystal Reports for Enterprise, create a report off the SAP BW BEx Query.
- When refreshing the report, notice the Replacement Path variable for the columns header does not change on the report.
For example: Changing the replacement path variable month value from “AUG 2008” to “APR 2008” would result in a report that would have a different field heading (“Sales Volume: AUG 2008” would be replaced by “Sales Volume: APR 2008”) different Sales Volume values under this heading (for month APR 2008 as opposed to month AUG 2008)
But this is not happening.
Cause
- Crystal Reports for Enterprise does not support the SAP BW BEx Query feature of replacement path variables
Resolution
- To workaround this limitation in Crystal Reports for Enterprise:
- In BEx Query Deisgner, make a copy of the SAP BW BEx Query.
- Remove the replacement path variable(s) from the BEx query and save it.
- In Crystal Reports for Enterprise, create a report off the new SAP BW BEx Query.
- For each replacement path variable from the original query perform the following on the report in Crystal Reports for Enterprise:
- Create a parameter that would represent the variable part of the replacement path
(For example, {?Sales Month}, a parameter that would allow the user to enter the month).
- Create a formula that would include only records that satisfy a certain condition that involves the parameter. For example, create a formula like:
If {SALES_BY_MONTH.Calendar Year/Month} = {?Sales Month}
Then {SALES_BY_MONTH.Sales Volume}
Else 0
- Create a parameter that would represent the variable part of the replacement path
- In BEx Query Deisgner, make a copy of the SAP BW BEx Query.
-
-
- Create a formula that would be used as a field heading. For example:
"Sales Volume: " + {?Sales Month}
- Create a formula that would be used as a field heading. For example:
-
Keywords
CR4E, cr for enterprise , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
SAP Crystal Reports 2016 ; SAP Crystal Reports 2020
SAP Knowledge Base Article - Public