Implementing Variables delivered by SAP BW/4HANA Content Add-on

Objective

After completing this lesson, you will be able to Create a query with variables delivered by SAP BW/4HANA Content Add-On and variable offset.

Variables delivered by SAP BW/4HANA Content Add-On (Business Content Variables)

SAP provide ready-to-use variables for many common scenarios. All types of variable are supported such as characteristic value type and text variables. These SAP-provided variables are delivered in the SAP BW/4HANA Content Add-On.

Before you can use these variables, they must be activated. Activating objects delivered by SAP BW/4HANA Content Add-On is a task that is typically carried out by SAP BW/4HANA administrators or architects.

Features of Variables delivered by SAP BW/4HANA Content Add-On

  • Must be activated before they can be used.

  • Help to accelerate query design.

  • Contain processing type SAP Exit as well as other processing types.

Types of Variables delivered by SAP BW/4HANA Content Add-On

Variables delivered by SAP BW/4HANA Content Add-On may be of different types, for example, there are simple characteristic value variables: 0P_PRODUCTS that allows a manual entry for the Product ID (0D_NW_PRID) characteristic, for example.

Some variables delivered by SAP BW/4HANA Content Add-On have the processing type SAP Exit, meaning that they contain program code. An example of such a variable is the 0CXIO_CML12CMCY variable for the Cal. year / Month (0CALMONTH) characteristic. This variable returns the Last 12 Months including Current Month. You can adapt content variables (and of course self-built variables as well) with offsets; for example, if you need to go six months into the past, you can add an offset of -6.

When you need a variable with program logic, search in SAP BW/4HANA Content Add-On. If you find a suitable variable with an SAP Exit, you do not need to create an own variable with a Customer Exit or an SAP HANA Exit.

Variable Offset

You use variable offsets to analyze key figures that have a fixed time relationship to each other, for example, to compare the net order amount from the current time period with the net order amount of the same time period in the previous year.

You can use the same variable several times to restrict key figures and determine a difference from the input value.

You can also define the range between two variables as a restriction. Select the required start variable and end variable and choose Create Range. If the variables are characteristic value variables (Single Value), you can also specify offset values for the interval built from these variables in the Enter Offsets Values for Range dialog box.

Variables from SAP BW/4HANA Content Add-On and Variable Offset

In the following video, we use variables from SAP BW/4HANA Content Add-On and Variable Offset to compare different time periods with each other.

Variables with Replacement Path Current Member

CURRENT MEMBER variables are not a variable type, they are processed by Replacement Path with Replacement SourceCurrent Member. With a CURRENT MEMBER variable, you can define filters for structure elements of a query; these filters have limits that depend on the value of a characteristic in the drilldown.

CURRENT MEMBER variables can only be defined for characteristics, which relate to a calendar. These include 0CALDAY, 0CALMONTH, 0FISCPER and other similar characteristics, as well as characteristics that reference these. This function is not possible for other characteristics, especially pseudo time characteristics such as 0CALMONTH2 or 0FISCPER3

The corresponding variables for the content time characteristics are delivered with the technical content in SAP BW∕4HANA. The technical name of the variables is made up of the prefix 0CURMEM_ and the technical name of the time characteristic, 0CURMEM_CALDAY or 0CURMEM_CALMONTH for example. You can also create a variable of your own

CURRENT MEMBER variables have been introduced with BW7.4.

The example query P_QD_CURRENT_MEMBER_VARIABLE_001 above illustrates a variety of ways in which a CURRENT MEMBER variable can be used. There are six structure elements in this example.

  • Net Order Amount USD: This is the basic key figure. It retrieves the net sales of the month

    in drilldown.

  • Net Order Amount USD -1: In this selection, there is a restriction on Calendar Year/Month with variable 0CURMEM_CALMONTH with an offset value -1.

  • 01.2013 to Current Member: In this selection, there is a restriction on Calendar Year/Month with variable 0CURMEM_CALMONTH with a range between January 2013 to current member.

  • Current Member to 12.2013: In this selection, there is a restriction on Calendar Year/Month with variable 0CURMEM_CALMONTH with a range between current month that is being processed to December 2013.

  • (Current Member - 2) to Current Member: In this selection, there is a restriction on Calendar Year/Month with variable 0CURMEM_CALMONTH with a range between current month that is being processed with an offset value -2 to current month.

  • AVG ((Current Member - 2) to Current Member): An exception aggregation Average on reference characteristics Calendar Year/Month.

Constraints for CURRENT MEMBER variables

  • Can only be defined for time characteristics.
  • Can only be used if the time characteristics of the selected InfoProvider have the same semantics and are thus dependent on each other.
  • Can only be used in selections of a structure element or in a restricted key figure, but not in the filter for the query
  • Each structure element can have just one selection with a CURRENT MEMBER variable or with a range made up of CURRENT MEMBER variables (one single value or one interval). This filter cannot be defined as excluding (only INCLUDING is allowed).
  • No planning is possible on restricted key figures with a CURRENT MEMBER variable.

Log in to track your progress & complete quizzes