SAP Knowledge Base Article - Public

1552198 - How to create a report based off a BEx Query with replacement path variable(s) in Crystal Reports for Enterprise?

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

  1. In BEx Query Designer, create a BEx Query with a replacement Path variable.
      
  2. In Crystal Reports for Enterprise, create a report off the SAP BW BEx Query.
      
  3. 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:
      
    1. In BEx Query Deisgner, make a copy of the SAP BW BEx Query.
        
    2. Remove the replacement path variable(s) from the BEx query and save it.
        
    3. In Crystal Reports for Enterprise, create a report off the new SAP BW BEx Query.
         
    4. 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  formula that would be used as a field heading. For example:
          
        "Sales Volume: " + {?Sales Month}

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