SAP BPC 10.1 Embedded version work status information read from SAP IP Data Slice Exit.
We have SAP BW / IP system and we also have SAP BPC 10.1 Embedded version running as EPM tool. In our example, key user will lock the planning data from BPC interface. Once user locks the data, no one can input / edit the locked data in planning cube. The documents will helpful who is using BPC 10.1 Embedded version as EPM tool and he is also using BW HANA PAK. The BW reporting tool is Analysis Office.
System Architecture:
Planning sequence created on top of aggregation level. User interface run the planning sequence via analysis office. Needless to show the below activity, I am assume user can create the same.
- Create a Planning Cube.
- Create an Aggregation Level
- Create Filter, planning Function and Planning Sequence.
- Attached the planning sequence in Analysis office.
BPC can have process template and process template is attached with same as analysis office template which we created in planning application. Once the BPC process template instantiated we can find the work status information as we have created work status during creation of BPC process template. Needless to show the below activity, I am assume user can create the same.
- Create a BPC Process Template from BPC interface.
- Add the Analysis Office Planning Workbook from process Template.
- Instance the BPC process template.
- From BPC My activities user can lock/unlock work status.
Once key user lock the work status via BPC interface then it will store the data in BPC Planning Cube. This is not the same cube where Analysis office planning application created. When Analysis office template run then data slice will check the BPC work status information and the data slice will allow / protect the data for planning via analysis office.
Example:
In our planning Cube, we have Comp Code, Planning Year, Planning Version and Planning Submission besides other info objects. Business requirement is combination of Comp Code, Planning Year, Planning Version and Planning Submission information will be locked by key user or super user. The work status information will be stored in BPC Cube. When planning function will run it will check runtime whether the BPC work status for Comp Code, Planning Year, Planning Version and Planning Submission information is locked or not.
- A Planning Sequence created on the top of planning Cube in BW side which will load the plan data. This Planning Sequence will attach in Analysis Office template.
- An Exit type Data Slice created on the top of planning cube which will check runtime BPC work status information. Then it will decide whether the data will be posted in Planning Cube or not.
- BPC Process Template creation needs to be done. This template contains the Analysis Office Template.
- Lock the work Status from BPC and run the Analysis Office Template.
This will show an error message based on error message selected in data slice exit.
>> The Process template created in BPC Interface.
>> Link the Analysis Office Template which we created in planning application in BPC process template.
>> Instance the process template.
>> Work Status information created.
>> Able to see Work Status information data in BPC Cube.
>> Create exit type data slice in our planning application.
>> Read Work Status information from BPC objects.
Search table *UWQ* from se11 and you will find the table which contains work status information. If we press F4 help then we can find all work status table which is created for BPC.
If you see the table display we will find below as info provider is mandatory input. For our example it would be planning cube name.
>> Now we can write the code in data slice which will protect the data during runtime.
FIELD-SYMBOLS <fs_comp_code> TYPE /bi0/oicomp_code.
FIELD-SYMBOLS <fs_planyear> TYPE /bic/oizplanyear.
FIELD-SYMBOLS <fs_submission> TYPE /bic/oizplansts.
FIELD-SYMBOLS <fs_version> TYPE /bic/oizversion.
ASSIGN COMPONENT '/BIC/ZVERSION' OF STRUCTURE i_s_data TO <fs_version>.
ASSIGN COMPONENT 'COMP_CODE' OF STRUCTURE i_s_data TO <fs_comp_code> .ASSIGN COMPONENT '/BIC/ZPLANSTS' OF STRUCTURE i_s_data TO <fs_submission>.
ASSIGN COMPONENT '/BIC/ZPLANYEAR' OF STRUCTURE i_s_data TO <fs_planyear>.
DATA : wa_workstst TYPE /bic/uwqha2rlapm.
SELECT SINGLE * FROM /bic/uwqha2rlapm INTO wa_workstst
WHERE infoprov = 'DFI01R02' " Planning Cube name
AND /bic/zplansts = <fs_submission> AND /bic/zplanyear = <fs_planyear>
AND /bic/zversion = <fs_version> AND comp_code = <fs_comp_code> .
IF sy-subrc IS INITIAL.
IF wa_workstst-status = '0002'. (‘0002’ means work status lock)
e_noinput = rs_c_true.
ENDIF.
ENDIF.
>> Lock the data from BPC work status.
>> One entry will be generated in Work Status Table for lock.
>> You can see the error message when we run the planning function.
>> If you un-clock then the STATUS value will change.
Note :- When we transport the objects to other system, it might possible the technical name of the work status table will change. So we have to write a dynamic select code for table in data slice exit.
data: tab_name type tabname.
>> Maintain tab_name runtime. (One time Cutover Activity)
SELECT SINGLE * FROM (tab_name) INTO wa_workstst
WHERE infoprov = 'DFI01R02' " Planning Cube name
AND /bic/zplansts = <fs_submission> AND /bic/zplanyear = <fs_planyear>
AND /bic/zversion = <fs_version> AND comp_code = <fs_comp_code>.
(This is continuation of Exit type Data Slice - Step by step creation of Exit type Data Slice)