Skip to Content
Technical Articles

Conversion SAP BW 7.x to SAP BW/4HANA: How to handle missing SAP Exit Variables

This technical blog post is for BW consultants who are involved in SAP BW 7.x to SAP BW/4HANA conversion projects.

During a SAP BW/4HANA conversion project the existing content artifacts will be automatically replaced by the new, future-proofed and HANA-optimized objects such as advanced DataStore objects, CompositeProvider and Open ODS views. Before this is done, following the SAP BW/4HANA conversion guide, a code scan report is executed to detect various possible issues. Beside other checks, the code scan report detects standard function modules or programs that are used in the data model, for example by BW Transformations or Exit Variables, that are obsolete and not longer available in SAP BW/4HANA.

How to handle these kind of issues, where obsolete standard function modules and programs are used inside your data model, is generally addressed in SAP Note 2673734.

In this blog post let us focus on problems related to missing function modules called by SAP Exit Variables.

Why are some SAP Exit Variables and their function modules not longer available in SAP BW/4HANA?

In SAP BW and the corresponding BI Content add-ons, there were a very high number of standard SAP Exit variables available. Some of these SAP Exit variables had similar logic as others, e.g. there were five variables providing the last month. At the same time the variables in the classic BI Content for SAP BW did not follow a clear naming convention. This made it hard to find the right variable for a particular reporting use case and many projects ended up creating their own SAP Exit Variables.

With the new standard content for SAP BW/4HANA a new streamlined set of variables following clear naming conventions is introduced to make it easier for content modelers to find the right variable. A full list of the new variables including the definition of the used naming conventions can be found as attachment in SAP Note 2395579.

Naming%20Conventions%20for%20Variables%20-%20BW/4HANA%20Standard%20Content

Naming Conventions for Variables – BW/4HANA Standard Content

What can I do when the function module of a currently used SAP Exit Variable is not longer available in SAP BW/4HANA?

While the new set of variables following a consistent naming convention is helpful for greenfield implementation projects, this certainly comes as a one-time hurdle when doing a conversion project.

To ease the conversion effort, the new BW/4HANA Content SAP Exit Variables with their function modules have been down ported to SAP BW 7.31 / 7.40 / 7.50 and SAP BI Content 737 / 747 / 757 by the SAP Notes

  • 2851061 – New BEx variables for simplification of conversion to SAP BW/4HANA
  • 2857063 – BI_CONT: New BEx Variables to simplify conversion from SAP BW to SAP BW/4HANA

By implementing the SAP Notes, these SAP Exit Variables are available in your SAP BW 7.x system and all you need to do – prior to the conversion – is to replace the previous used BI_CONT SAP Exit Variables by the new variables in the queries.

The list below shows all down ported SAP Exit variables. With assistance of this table, you can lookup for a currently used variable (column ‘Replaced Variable’) the functional equivalent variable (column ‘Variable (new)‘) that can be used as replacement. To make things more complicated, there are some SAP Exit Variables that dependent on other SAP Exit Variables. As an example the SAP Exit variable ‘Current Fiscal Year Period’ itself reads the SAP Exit variable ‘Fiscal Year Variant’. These kind of dependencies you need to take into account when replacing the SAP Exit variables. To assist you with that, all dependencies are properly documented in the column ‘Comment’ and in the detailed footnotes below.

Replaced Variable Variable (new) Description Comment  InfoObject
0CD_L14D 0CEIO_CDL14CDCY Last 14 Days 0CALDAY
0CD_L7D 0CEIO_CDL7CDCY Last 7 Days 0CALDAY
0CD_LD 0CEPO_CDPDCY Last Day 0CALDAY
0CDFY 0CXIM_CDFYCY Current Fiscal Year 0CALDAY
0CDLFY 0CXIM_CDFYPY Last Fiscal Year 0CALDAY
0CMCMLY 0CXPO_CMCMPY Current Month (Comparison) Previous Year 0CALMONTH
0CMCQUAR 0CXIO_CMCQCY Current Quarter 0CALMONTH
0CMCQULY 0CXIO_CMCQPY Current Quarter (Comparison) Previous Year 0CALMONTH
0CML12CM 0CXIO_CML12CMCY Last 12 Months Including Current Month 0CALMONTH
0CML12LM 0CXIO_CML12PMCY Last 12 Months Excluding Current Month 0CALMONTH
0CML3CM 0CEIO_CML3CMCY Last 3 Months Including Current Month 0CALMONTH
0CMLMLY 0CXPO_CMPMPY Last Month (Comparison) Previous Year 0CALMONTH
0CMLMON 0CEPO_CMPMCY Last Month (10) 0CALMONTH
0DPM_BV0 0FIPO_GRID_WIDTH Grid Width 0GRID_WIDTH
0F_LASTDTCD_IFPER 0CXSM_LASTCLDTV Clearing Dt.(Derive last CalDay using Var. 0CIIN_FISCPER) (6) 0CLEAR_DATE
0F_LASTDTCD_IFPER2 0CXSM_LASTCLDTV_CMP Clearing Dt.(Derive last CalDay by 0CIIN _FISCPER_CMP) (7) 0CLEAR_DATE
0F_LASTDTND_IFPER 0CXPM_LASTNDDTV Net Due Dt.(Derive last CalDay using Var. 0CIIN_FISCPER) (6) 0NETDUEDATE
0F_LASTDTND_IFPER2 0CXPM_LASTNDDTV_CMP Net Due Dt.(Derive last CalDay by 0CIIN _FISCPER_CMP) (7) 0NETDUEDATE
0F_LASTDTPD_IFPER 0CXPM_LASTPDDTV Posting Dt.(Derive last CalDay using Var. 0CIIN_FISCPER) (6) 0PSTNG_DATE
0F_LASTDTPD_IFPER2 0CXPM_LASTPDDTV_CMP Posting Dt.(Derive last CalDay by 0CIIN_ FISCPER_CMP) (7) 0PSTNG_DATE
0I_BA104 0CXIO_FPYTCPVCY Cumulated Up To Period (Var. 0CIPM_FISCPER) (1) 0FISCPER
0I_BA106 0CXIO_FPYTCPVPY Cumulated Up To Prior FY Period (Var. 0CIPM_FISCPER) (1) 0FISCPER
0I_CUFQU 0CXIO_FPCQCY Current Quarter of Fiscal Year 0FISCPER
0I_CUFYE 0CXIO_FPALLPCY All Periods of Current Fiscal Year 0FISCPER
0I_FPER 0CIIN_FISCPER Fiscal Year/Period 0FISCPER
0I_FPER2 0CIIN_FISCPER_CMP Comparison Fiscal Year/Period 0FISCPER
0I_L6MON 0CEIO_CML6CMCY Last 6 Month Including Current Month 0CALMONTH
0I_PRFQU 0CXIO_FPPQCY Previous Quarter of Fiscal Year 0FISCPER
0I_PRFYE 0CXIO_FPALLPPY All Periods of Previous Fiscal Year 0FISCPER
0LQUART 0CXIO_CMPQCY Last Quarter 0CALMONTH
0P_AUGDT 0CXPM_DATE_KEY_CLEAR Key Date for Clearing Date (3) 0DATE
0P_BA101 0CXPO_FPCPVPY Previous Year Period (Var. 0CIPM_FISCPER) 0FISCPER
0P_CHAEX 0CXPM_CHRT_ACCTS Determine Chart of accounts 0CHRT_ACCTS
0P_CSDT2 0CIPM_DATE_KEY_CMP Key Date for Comparison 0DATE
0P_DATE_OPEN 0CEPM_DATE_OPEN Open on Key Date / Default System date 0DATE
0P_FI_DOCSTAT_OPEN 0CIPO_FI_DOCSTAT_NI Item Status Open (No Input) 0FI_DOCSTAT
0P_FPER 0CIPM_FISCPER Fiscal Year/Period 0FISCPER
0P_FVAEX 0CXPN_FISCVARNT Fiscal year variant 0FISCVARNT
0P_KEYDT 0CEPM_NETDUEDATE Key Date for Due Date Analysis 0NETDUEDATE
0P_SIMD1 0CIPM_UC_SIM_ID1 Simulation ID 1 0UC_SIM_ID1
0S_1ST_QUART 0CXPO_CQQ1CY First Quarter of Current Year 0CALQUARTER
0S_CLEAR_DATE 0CXSO_CLEAR_DATE Clearing Date (4) 0CLEAR_DATE
0S_FC_ERDA 0CESO_ERDAT Creation Date 0ERDAT
0S_FI_DOCSTAT 0CISO_FI_DOCSTAT Item Status 0FI_DOCSTAT
0S_FI_DOCSTAT1 0CISO_FI_DOCSTAT_NI Item Status Cleared/Open (No Input) 0FI_DOCSTAT
0S_GL_CLRSTAT 0CISO_GL_CLRSTAT Clearing Status 0GL_CLRSTAT
0S_NETDUEDATE_L0 0CXIO_NETDUEDATE_G0 Due Date Grid 0 (8) 0NETDUEDATE
0S_NETDUEDATE_L1 0CXIO_NETDUEDATE_G1 Due Date Grid 1 (8) 0NETDUEDATE
0S_NETDUEDATE_L2 0CXIO_NETDUEDATE_G2 Due Date Grid 2 (8) 0NETDUEDATE
0S_NETDUEDATE_L3 0CXIO_NETDUEDATE_G3 Due Date Grid 3 (8) 0NETDUEDATE
0S_NETDUEDATE_L4 0CXIO_NETDUEDATE_G4 Due Date Grid 4 (8) 0NETDUEDATE
0S_NETDUEDATE_L5 0CXIO_NETDUEDATE_G5 Due Date Grid 5 (8) 0NETDUEDATE
0S_PSTNG_DATE 0CXSO_PSTNG_DATE Posting Date (5) 0PSTNG_DATE
0S_SIMR1 0CXSO_INVDAT_SIM1 Invoice Data <= Simulation Run 1 (2) 0INVOICEDAT
0T_FIBUCKET0 0TXPO_FIBUCKET0 Due Date Grid 0 – Text (9) 1TEXT
0T_FIBUCKET1 0TXPO_FIBUCKET1 Due Date Grid 1 – Text (9) 1TEXT
0T_FIBUCKET2 0TXPO_FIBUCKET2 Due Date Grid 2 – Text (9) 1TEXT
0T_FIBUCKET3 0TXPO_FIBUCKET3 Due Date Grid 3 – Text (9) 1TEXT
0T_FIBUCKET4 0TXPO_FIBUCKET4 Due Date Grid 4 – Text (9) 1TEXT
0T_FIBUCKET5 0TXPO_FIBUCKET5 Due Date Grid 5 – Text (9) 1TEXT
none (new) 0CXIO_CDCMCY Current Month 0CALDAY
none (new) 0CXIO_CDCQCY Current Quarter 0CALDAY
none (new) 0CEIO_CDN365CD Next 365 Days 0CALDAY
none (new) 0CXIO_CMPQPY Last Quarter (Comparison) Previous Year 0CALMONTH
none (new) 0CXPO_CQCQPY Current Quarter of Previous Year 0CALQUARTER
none (new) 0CXPO_FYPY Previous Fiscal Year 0FISCYEAR

(The table above can be also found in SAP Note 2857063)

(1): 0CXIO_FPYTCPVCY, 0CXIO_FPYTCPVPY

The new SAP Exit Variables read selection values from variable 0CIPM_FISCPER. The functional equivalent BI_CONT classic variables 0I_BA104 and 0I_BA106 read values from variable 0P_FPER.

Therefore, if you replace 0I_BA104 by 0CXIO_FPYTCPVCY or 0I_BA106 by 0CXIO_FPYTCPVPY in a BEx Query, you will need also to replace variable 0P_FPER by 0CIPM_FISCPER.

(2): 0CXSO_INVDAT_SIM1

The new SAP Exit Variable reads selection values from variable 0CIPM_UC_SIM_ID1. The functional equivalent BI_CONT classic variable 0S_SIMR1 reads values from variable 0P_SIMD1.

Therefore, if you replace 0S_SIMR1 by 0CXSO_INVDAT_SIM1 in a BEx Query, you will need also to replace variable 0P_SIMD1 by 0CIPM_UC_SIM_ID1.

(3): 0CXPM_DATE_KEY_CLEAR

The new SAP Exit Variable reads selection values from variable 0CIPM_DATE_KEY_CMP. The functional equivalent BI_CONT classic variable 0P_AUGDT reads values from variable 0P_CSDT2.

Therefore, if you replace 0P_AUGDT by 0CXPM_DATE_KEY_CLEAR in a BEx Query, you will need also to replace variable 0P_CSDT2 by 0CIPM_DATE_KEY_CMP.

(4): 0CXSO_CLEAR_DATE

The new SAP Exit Variable read selection values from variables 0CISO_GL_CLRSTAT, 0CISO_FI_DOCSTAT, 0CISO_FI_DOCSTAT_NI, 0CEPM_DATE_OPEN. The functional equivalent BI_CONT classic variable 0S_CLEAR_DATE reads values from variables 0S_GL_CLRSTAT, 0S_FI_DOCSTAT, 0S_FI_DOCSTAT1, 0P_DATE_OPEN.

Therefore, if you replace 0S_CLEAR_DATE by 0CXSO_CLEAR_DATE in a BEx Query, you will need also to replace the four variables 0S_GL_CLRSTAT, 0S_FI_DOCSTAT, 0S_FI_DOCSTAT1 and 0P_DATE_OPEN by 0CISO_GL_CLRSTAT, 0CISO_FI_DOCSTAT, 0CISO_FI_DOCSTAT_NI and 0CEPM_DATE_OPEN.

(5): 0CXSO_PSTNG_DATE

The new SAP Exit Variable read selection values from variables 0CISO_GL_CLRSTAT, 0CISO_FI_DOCSTAT, 0CISO_FI_DOCSTAT_NI, 0CIPO_FI_DOCSTAT_NI 0CEPM_DATE_OPEN. The functional equivalent BI_CONT classic variable 0S_PSTNG_DATE reads values from variables 0S_GL_CLRSTAT, 0S_FI_DOCSTAT, 0P_FI_DOCSTAT_OPEN, 0S_FI_DOCSTAT1, 0P_DATE_OPEN.

Therefore, if you replace 0S_PSTNG_DATE by 0CXSO_PSTNG_DATE in a BEx Query, you will need also to replace the five variables 0S_GL_CLRSTAT, 0S_FI_DOCSTAT, 0P_FI_DOCSTAT_OPEN, 0S_FI_DOCSTAT1 and 0P_DATE_OPEN by 0CISO_GL_CLRSTAT, 0CISO_FI_DOCSTAT, 0CISO_FI_DOCSTAT_NI, 0CIPO_FI_DOCSTAT_NI and 0CEPM_DATE_OPEN.

(6): 0CXPM_LASTNDDTV, 0CXPM_LASTPDDTV, 0CXSM_LASTCLDTV

These new SAP Exit Variables read selection values from variables 0CIIN_FISCPER and 0CXPN_FISCVARNT. The functional equivalent BI_CONT classic variables 0F_LASTDTND_IFPER, 0F_LASTDTPD_IFPER and 0F_LASTDTCD_IFPER read values from 0I_FPER and 0P_FVANT.

Therefore, if you replace 0F_LASTDTND_IFPER by 0CXPM_LASTNDDTV, 0F_LASTDTPD_IFPER by 0CXPM_LASTPDDTV and/or 0F_LASTDTCD_IFPER by 0CXSM_LASTCLDTV in a BEx Query, you will need also to replace the two variables 0I_FPER and 0P_FVANT by 0CIIN_FISCPER and 0CXPN_FISCVARNT.

Note: The used variable for fiscal variant 0CXPN_FISCVARNT (new) is defined now as a SAP Exit variable whereas 0P_FVANT (classic BI Content variable) is defined as an user input variable.

(7): 0CXPM_LASTNDDTV_CMP, 0CXPM_LASTPDDTV_CMP, 0CXSM_LASTCLDTV_CMP

These new SAP Exit Variables read selection values from variables 0CIIN_FISCPER_CMP and 0CXPN_FISCVARNT. The functional equivalent BI_CONT classic variables 0F_LASTDTND_IFPER, 0F_LASTDTPD_IFPER and 0F_LASTDTCD_IFPER read values from 0I_FPER2 and 0P_FVANT.

Therefore, if you replace 0F_LASTDTND_IFPER2 by 0CXPM_LASTNDDTV_CMP, 0F_LASTDTPD_IFPER2 by 0CXPM_LASTPDDTV_CMP and/or 0F_LASTDTCD_IFPER2 by 0CXSM_LASTCLDTV_CMP in a BEx Query, you will need also to replace the two variables 0I_FPER and 0P_FVANT by 0CIIN_FISCPER_CMP and 0CXPN_FISCVARNT.

Note: The used variable for fiscal variant 0CXPN_FISCVARNT (new) is defined now as a SAP Exit variable whereas 0P_FVANT (classic BI Content variable) is defined as an user input variable.

(8): 0CXIO_NETDUEDATE_G0, 0CXIO_NETDUEDATE_G1, 0CXIO_NETDUEDATE_G2,  0CXIO_NETDUEDATE_G3, 0CXIO_NETDUEDATE_G4, 0CXIO_NETDUEDATE_G5

These new SAP Exit Variables read selection values from variables 0CEPM_DATE_OPEN and 0FIPO_GRID_WIDTH. The functional equivalent BI_CONT classic variables 0S_NETDUEDATE_L0, 0S_NETDUEDATE_L1, 0S_NETDUEDATE_L2,  0S_NETDUEDATE_L3, 0S_NETDUEDATE_L4 and 0S_NETDUEDATE_L5 read values from 0P_DATE_OPEN and 0DPM_BV0.

Therefore, if you replace 0S_NETDUEDATE_L0 by 0CXIO_NETDUEDATE_G0, 0S_NETDUEDATE_L1 by 0CXIO_NETDUEDATE_G1, 0S_NETDUEDATE_L2 by 0CXIO_NETDUEDATE_G2, 0S_NETDUEDATE_L3 by 0CXIO_NETDUEDATE_G3, 0S_NETDUEDATE_L4 by 0CXIO_NETDUEDATE_G4 and/or 0S_NETDUEDATE_L5 by 0CXIO_NETDUEDATE_G5 in a BEx Query, you will need also to replace the two variables 0P_DATE_OPEN and 0DPM_BV0 by 0CEPM_DATE_OPEN and 0FIPO_GRID_WIDTH.

(9): 0TXPO_FIBUCKET0, 0TXPO_FIBUCKET1, 0TXPO_FIBUCKET2, 0TXPO_FIBUCKET3,  0TXPO_FIBUCKET4, 0TXPO_FIBUCKET5

These new SAP Exit Text-Variables read selection values from variables 0CEPM_NETDUEDATE and 0FIPO_GRID_WIDTH. The functional equivalent BI_CONT classic variables 0T_FIBUCKET00T_FIBUCKET1, 0T_FIBUCKET2, 0T_FIBUCKET3, 0T_FIBUCKET4 and 0T_FIBUCKET5 read values from 0P_KEYDT and 0DPM_BV0.

Therefore, if you replace 0T_FIBUCKET0 by 0TXPO_FIBUCKET0, 0T_FIBUCKET1 by 0TXPO_FIBUCKET1, 0T_FIBUCKET2 by 0TXPO_FIBUCKET2, 0T_FIBUCKET3 by 0TXPO_FIBUCKET3, 0T_FIBUCKET4 by 0TXPO_FIBUCKET4 and/or 0T_FIBUCKET5 by 0TXPO_FIBUCKET5 in a BEx Query, you will need also to replace the two variables 0P_KEYDT and 0DPM_BV0 by 0CEPM_NETDUEDATE and 0FIPO_GRID_WIDTH.

(10): 0CEPO_CMPMCY is defined as “Ready for Input”, whereas 0CMLMON is not defined as “Ready for Input”.

I cannot find the SAP Exit Variable in the list, what can I do?

If your SAP Exit Variable is not included in the list, it is still possible that one of the standard variables can fulfill your requirement. For example you are looking for a SAP Exit Variable that computes the current quarter based on calendar quarter. Although there is not such SAP Exit variable provided by the standard, there is however a standard SAP Exit variable available that restricts the query to the current quarter based on calendar day (0CXIO_CDCQCY) and could be used instead.

For missing SAP Exit variables on time characteristics you may also want to consider Replacement Path variables from variables. With this functionality you can define own variables accessing the value(s) of another SAP Exit variable, with the flexibility to read for example only a subset of the computed variable value (can be used to derive e.g. month from a calendar day SAP-Exit Variable), access the lower range limit (from value) or the upper range limit (to value) in case of an interval variable, and/or working with offsets (e.g. current calendar month -3).

No, there is no other SAP Exit Variable I can use and replacement path variables do not fill my gap. What can I do?

In this case the only option is as discussed in SAP Note 2673734:

“In general, we recommend in such case to copy the missing DDIC and/or ABAP objects to the customer namespace and to adjust the BW objects accordingly. This will then allow you to use the objects in SAP BW/4HANA or transfer them to compatible objects.”

/
Naming%20Conventions%20for%20Variables%20-%20BW/4HANA%20Standard%20Content
9 Comments
You must be Logged on to comment or reply to a post.
  • Hi Andreas,

    what is the new variables for OP_KEYDT & OP_KEYD2 & OP_KEYD3?

    we need to develop a customer aging report in the BW4HANA system but we could not see the above variables in BW4HANA 2.0 System.

    Thanks & regardds

    Dhananjaya B

    • Hi Dhananjaya,

      for 0P_KEYDT you can use the successor 0CEPM_NETDUEDATE.

      For the other two variables you could use the following instead which provide similar functionality and can be used for ageing reports:

      • For 0P_KEYD2 (based on 0PSTNG_DATE):
        • 0CXSO_PSTNG_DATE (previously 0S_PSTNG_DATE)
        • 0
      • For 0P_KEYD3 (based on 0CLEAR_DATE): 0CXSO_CLEAR_DATE (previously 0S_CLEAR_DATE)

      There is also a set of six SAP Exit variables provided that calculate six different age buckets based on a freely chosen grid width: 0S_NETDUEDATE_L0 – 0S_NETDUEDATE_L5

      For sample content queries where this is used you can check standard content query /IMO/V_FIAR01_Q0003.

      Best regards,

      Andreas

    • Hi,

      now we are shipping through difficult water.

      Indeed the two variables 0CXSO_PSTNG_DATE and 0CXSO_CLEAR_DATE do not have exactly the same functionality compared to 0P_KEYD2 and 0P_KEYD3.

      The SAP Exit for 0CXSO_PSTNG_DATE for example, already defines the value range to ‘less or equal’. Therefore there is no need to define a value range for the key figure selection in the query definition, you can just drag the variable for 0PSTNG_DATE into the selection definition and keep it with equal (=). (By the way, unless you want to show also values for customer line items posted after the chosen key date, you could consider to move this variable into the global filter…)

      The SAP Exit fpr 0CXSO_CLEAR_DATE has a defined value range to ‘greater than’. Therefore the same applies, just drag the variable into the key figure selection, no need to define it with value range ‘>’ here.

      All the best,
      Andreas

  • Hi Andreas,

     

    Thanks for the reply,

    Customer needs ageing buckets as below range.

    0 to 7, 8 to 15, 16 to 30, 31 to 45, 46 to 60, 61 to 90, 91 to 180 and Greater than 180.

    let me know how can I processed to create buckets using SAP exit variables.

     

    Thanks

    Dhananjaya naidu B

    • Hi Dhananjaya,

      it should be possible when you use for all the key figure selections

      • Exit variable 0CXSO_PSTNG_DATE (=)
      • Exit variable 0CXSO_CLEAR_DATE (=)

      and for each age bucket define corresponding ranges [] for 0CEPM_NETDUEDATE with the desired offsets.

      All the best,

      Andreas