Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Every time you make any changes to real-time cube used in BI-IP all your aggregation levels get deactivated which you might have created in Planning modeler.

Then you have to go to planning modeler, open every aggregation level in change mode and activate it. This is time-consuming so you can use the following program to activate all my aggregation levels in just few secs. Sharing the same with all BI-IP community members to save them from the hassle of activating aggregation levels one-by-one and also to avoid transporting the inactivate aggregation levels in test/prod systems.

Error rendering macro 'code': Invalid value specified for parameter 'lang'
REPORT z_activate_alvl.

TYPE-POOLS: rs.

PARAMETER:  g_iprov TYPE rsinfoprov,
            g_objv TYPE rsobjvers DEFAULT 'M'.

PERFORM run.

*&---------------------------------------------------------------------
*& Form run
*&---------------------------------------------------------------------
FORM run.

  DATA: l_t_return TYPE STANDARD TABLE OF bapiret2,
        l_s_return TYPE bapiret2,
        l_subrc TYPE sysubrc,
        l_t_alvl TYPE STANDARD TABLE OF rspls_alvl,
        l_s_alvl TYPE rspls_alvl,
        l_t_alvl_iobj TYPE STANDARD TABLE OF rspls_s_rfc_alvl_iobj.

*Select all the aggregation levels for the given infoprovider
  SELECT * FROM rspls_alvl INTO TABLE l_t_alvl
    WHERE infoprov = g_iprov
    AND objvers = g_objv.
  CHECK l_t_alvl IS NOT INITIAL.

  LOOP AT l_t_alvl INTO l_s_alvl.

*Open the aggregation level in change mode
    CALL FUNCTION 'RSPLS_ALVL_CHANGE'
      EXPORTING
        i_aggrlevel    = l_s_alvl-aggrlevel
      IMPORTING
        e_subrc        = l_subrc
      TABLES
        i_tk_alvl_iobj = l_t_alvl_iobj
        e_tk_return    = l_t_return.

    CHECK l_subrc = 0.

*Check the aggregation level
    CALL FUNCTION 'RSPLS_ALVL_CHECK'
      EXPORTING
        i_aggrlevel = l_s_alvl-aggrlevel
        i_objvers   = rs_c_objvers-active
      IMPORTING
        e_subrc     = l_subrc
      TABLES
        e_tk_return = l_t_return.

    CHECK l_subrc = 0.

*Activate the aggregation level if no errors found
    CALL FUNCTION 'RSPLS_ALVL_ACTIVATE'
      EXPORTING
        i_aggrlevel = l_s_alvl-aggrlevel
      IMPORTING
        e_subrc     = l_subrc
      TABLES
        e_tk_return = l_t_return.

  ENDLOOP.

ENDFORM. "run
  • No labels