How to Launch Consolidation via RSPLAN
In BPC Embedded Consolidation the use of Data Manager Packages is not supported anymore. Instead Task Sequences are required to group the Business Rules to be executed via the Consolidation Monitor.
Through note 2476459 – Trigger Consolidation Tasks from Analysis Office, a new Function Type has been introduced to allow the launch of consolidation logic via planning functions. The planning function can then be attached to an Analysis for Office workbook and executed from there.
One gap in the function type, is that, does not allow the selection of BPC Environment or Model. Which will quite often cause an error when executing from RSPLAN or via ABAP (that will call the planning function).
To overcome this, we need to create a new Function Type and Implementation Class and make it available the option to set the BPC Environment and Model.
1- Implementation Class
Go to SE24 and copy the class: CL_UJP_CONS_SRVTYPE
I copied to ZCL_UJP_CONS_SRVTYPE
In row 46 include the following code:
* BPC Environment
get_parameter_value( EXPORTING i_r_param_set = <l_s_rule>-r_param_set
i_param_name = 'APPSET'
i_param_elem = rs_c_true
IMPORTING e_param_value = p_appset_id ).
* BPC Model
get_parameter_value( EXPORTING i_r_param_set = <l_s_rule>-r_param_set
i_param_name = 'APPL'
i_param_elem = rs_c_true
IMPORTING e_param_value = p_appl_id ).
Move the following section to the end of the loop at l_t_rule – as this section requires the BPC Environment and Model to work:
* Get key figure
IF p_keyfigure IS INITIAL.
TRY.
p_keyfigure = cl_ujp_utility=>get_dim_by_type( EXPORTING i_appset_id = p_appset_id
i_application_id = p_appl_id
i_type = cl_rsbpca_constants=>n_c_dim_type_measure
i_prov_role = cl_rsbpca_constants=>n_c_iprov_role_consolidation ).
CATCH cx_uja_admin_error.
CATCH cx_uj_no_auth.
CATCH cx_uj_static_check.
* X Message
ENDTRY.
ENDIF.
2- Info Objects
Create two info objects one for BPC Environment and one for BPC model.
I’ve created both as Char 20, no master data and no text.
3- Function Type
Now go to RSPLF1 and copy function type /CPMB/LAUNCH_LOGIC.
I copied to ZLAUNCH_LOGIC
In the properties tab, you will need to update the Implementation Class to your newly created one:
In the Parameter tab, create two new Elementary parameters:
APPSET and APPL
3- Planning Stuff
All done. Just create your Aggregation Level, Filter, Planning Function and Sequence and execute via RSPLAN.
Hi Lucas,
What row did you insert the following code into:)
* Get key figure
IF p_keyfigure IS INITIAL.
TRY.
p_keyfigure = cl_ujp_utility=>get_dim_by_type( EXPORTING i_appset_id = p_appset_id
i_application_id = p_appl_id
i_type = cl_rsbpca_constants=>n_c_dim_type_measure
i_prov_role = cl_rsbpca_constants=>n_c_iprov_role_consolidation ).
CATCH cx_uja_admin_error.
CATCH cx_uj_no_auth.
CATCH cx_uj_static_check.
Hi,
After the endloop of the loop at l_t_rule. This piece is actually at the beginning of the code, but it requires the parameters we created in order to work.
Cheers,
Lucas
Hi Lucas,
Nice post. Just two small remarks:
Best regards,
Gerd
Hi Gerd,
This peace of code is not working , i am getting dump.
Please advise.

SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S31 {
font-style: italic;
color: #808080;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
.L0S70 {
color: #808080;
}
IF p_keyfigure IS INITIAL.
TRY.
p_keyfigure = cl_ujp_utility=>get_dim_by_type( EXPORTING i_appset_id = p_appset_id
i_application_id = p_appl_id
i_type = cl_rsbpca_constants=>n_c_dim_type_measure
i_prov_role = cl_rsbpca_constants=>n_c_iprov_role_consolidation ).
CATCH cx_uja_admin_error.
CATCH cx_uj_no_auth.
CATCH cx_uj_static_check.
* X Message
ENDTRY.
ENDIF.
Thanks and Regards,
Prashant
Awsome blog post !! Just that a sap note is now available to debug the consolidation tasks as well just like UJKT but that might not be so great as this example !!
Awsome blog post !!
Thank you Lucas Gabriel, How do you restrict the planning function with property values. The planning sequence has a filter where it is restricted by Property but unable to restrict the planning function with property value. Due to this the planning function is not executing as it has different filters compared to planning sequence filter. Appreciate if you could explain how this can be achieved via Z - Custom Launch.
So please do not laugh at me too much, but how do I call this custom class using a Planning Function? I see the choice for "Launch Consolidation Logic, but where do I go from there?
We are using BW 7.4 SP16 on Hana with BPC 10.1 Embedded and we want to automate the Cons Monitor. I wrote ABAP code to automate the 'Post Loads' in BPC 7.5, but I cannot trap how the web-based Cons Monitor hooks into the Netweaver side. Any help or tricks would be greatly appreciated.
Kurt, did you find a solution to your problem? We are also interested in the possibility of launching our Abap from the Consolidation Monitor.
Hi Lukas,
I want to add some remarks about the approach outlined here.
1 BPC embedded runs in a kind of 'container' called the OLAP area: an area has attributes and two attributes are BPC Environment, BPC Model; this information has to be set by the client when the user session is opened. This approach is explained in
https://blogs.sap.com/2014/10/21/concepts-compared-bpc-standard-and-bpc-embedded/
in section 3.
2 Analysis Office and Design Studio allow to set BPC Environment/Model information, e.g. in Analysis Office on the Components tab -> Planning Model.
3. Without BPC Environment/Model set in the run time container (OLAP area) one gets BW-IP/PAK and no BPC embedded feature is considered at all, e.g. no DAPs, no BPC embedded work status. Only with BPC Enviroment/Model set by the client the run time knows about BPC embedded features and will e.g. check DAP (authorizations) and work status. More details can be found here:
https://blogs.sap.com/2016/07/18/bpc-101-embedded-how-daps-determine-authorizations-for-hcprs/
4. The above mentioned note 2476459 introduces two parameter IDs that allow to set BPC Enviroment/Model information to be used in transaction RSPLAN (i.e. the customizing and test enviroment for planning functions/sequences).
5. Note 2698203 allows to use the same parameter IDs to set BPC Enviroment/Model information in planning sequences used in process chains.
The approach described in this blog uses planning function parameters and a 'custom' planning function type that calls the BPC consolidation engine. The problem here is that planning functions might not be self-contained, i.e. BW services might be called that use no or other BPC Enviroment/Model information: this information must not come from planning function parameters but from the OLAP area used at run time. This is how the standard implementation works. The approach in the blog overwrites the OLAP area run time information in the planning function: p_appset_id, p_appl_id.
Regards,
Gregor
Hi Gregor,
Thanks for providing this information. If I understand correctly your approach recommends following the note 2476459 and then try to execute consolidation tasks via planning functions?
Or should we follow the custom class and function type development as detailed in this blog?
We are currently trying to run IC_DATA (IC Matching) business rule from AO (via planning function) and its giving the error "SAP BI Add-In has disconnected all the data source".
When we try to run the planning sequence from the back end (RSPLAN), we face the error "Access using a zero object reference is not possible".
Any help/guidance will be much appreciated.
Best Regards,
Syed Wasay
Hello Lucas,
I am receiving the same error as Prashant.
we had two issues with the logic
Thanks and Regards,
Shankar