SAP Business Planning and Consolidation 7.5 version for NetWeaver
Business has requested to set up and maintain a significant number of validation business rules in BPC NW. It might be time consuming to enter the validation business rules via BPC Admin Client as well as there is a risk of typo errors when doing this manually.
This document is primarily designed for BPC NW Administrators in order to simplify their work.
In Part 1 of this document it will be explained how to create underlying program to use during upload. In How to perform mass upload of validation business rules into BPC 7.5 for NetWeaver – Part 2 it will be shown how to create CSV files with validation rules and upload them.
When there is a considerably significant number of validation business rules which are to be entered in the system it might become a nightmare for a BPC NW Administrator to enter them into the system manually. Entering validation business rules via BPC Admin Client might take long time and a risk of typos exists.
It might be considered to be easier to maintain validation business rules in a separate MS Excel workbook and then upload them into the system. This document will demonstrate a procedure how to upload validation business rules from local CSV files.
The concept of the approach is the following:
1. Prepare validation business rules in MS Excel using the provided templates.
2. Save MS Excel files as CSV.
3. Upload the files using the provided program via NetWeaver.
4. Run validation of the uploaded business rules via BPC Admin Client.
Notice that the program performs minimum validation of the entered data. The full validation is performed at step 4 via standard functionality of BPC Admin Client.
The program was built and tested on the following configuration. With other Service Packs it was not tested.
· BPC 7.5 for NetWeaver SP11
· SAP NetWeaver 7.0.1. SP05.
Required/recommended expertise or prior knowledge
· SAP BusinessObjects Planning and Consolidation 7.5, version for SAP NetWeaver
· ABAP programming skills
· Access to SAP NetWeaver transaction codes: SE16, SE38, SE80.
· Developer key for NetWeaver user.
The following steps describe how to implement the desired functionality.
1. Log on to NetWeaver.
2. Enter ABAP Editor (transaction SE38)
3. In the Program field enter the name of the program, for example ZUJ_VALIDATION_CSV_UPLOAD.
4. Choose (Create). You reach the ABAP: Program Properties <Name of Program> Change screen.
5. Enter the title of the program.
6. Under Type in the Attributes field, choose Executable Program and then Save.
7. You reach the Create Object Catalog Entry dialog box.
8. In the Attributes field under Package enter $TMP and save the program as a Local Object.
9. The following screen appears with REPORT ZUJ_VALIDATION_CSV_UPLOAD.
10. Select all content from line 1 to line 10 and replace it with the code provided in at the bottom of this document. The result should be the following.
11. Check the code by clicking on Check.
12. Activate the program.
13. The program is ready to be executed, however it is good to maintain labels for selection screens. Go to Text Symbols from the menu as shown below.
14. On Selection Texts tab enter the texts as shown below
P_APPL Appset ID
P_APPSET Application ID
XLSFILED Validation rule detail file
XLSFILEH Validation rule header file
15. Activate and return to the previous screen.
The program is fully ready. If you click Execute you should see the following screen.
*&———————————————————————**& Report ZUJ_VALIDATION_CSV_UPLOAD*&*&———————————————————————**&*&*&———————————————————————*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR XLSFILEH.CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOGEXPORTING
N_LINES_H = 0.LOOP AT itab INTO L_STR.IF SY-TABIX = 1. “SKIP THE FIRST (HEADER) LINECONTINUE.ENDIF.CLEAR idat_h.
N_LINES_D = 0.LOOP AT itab INTO L_STR.IF SY-TABIX = 1. “SKIP THE FIRST (HEADER) LINECONTINUE.ENDIF.CLEAR idat_d.
lo_biz_rule = cl_uja_admin_mgr=>get_biz_rules( i_appset_id = appset_id
L_STR = N_LINES_H.CONCATENATE L_STR ‘ rules are successfully written to validation header table’ INTO L_STR.WRITE: / L_STR.
L_STR = N_LINES_D.CONCATENATE L_STR ‘ detail rules are successfully written to validation detail table’ INTO L_STR.WRITE: / L_STR.* BREAK-POINT.