Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
SAP BPC Learning Notes and Insights.docx
1. https://sapidesvm.blogspot.com/
Lesson 1: Overview
BPC official information: 330 Planning, 340 consolidation
The application of BPC is based on BW. The relationship between BPC and BW is similar to the relationship
between database and application program. BW is the basis of BPC application. Data is extracted from the ERP
system to BW, and then transferred to the BPC model. Data processing can be in ERP (before data is extracted to
BW), or in BW, or in BPC. If you do data processing in ERP, you need to pay attention to how to realize the
incremental extraction of data (all the information I found said that it needs to be developed separately, and you
need to ask a professional BW for this).
BPC involves operations on three platforms.
1. On the SAP GUI (on the BW server): mainly data maintenance (including business data and report
templates), enhanced development, error debugging, etc.
2. WEB interface: The main function is BPC configuration: including establishing dimensions, establishing
models, writing logic scripts, formulating business rules, formulating process templates and instances, authority
control, etc.
3. EXCEL (EPM plug-in): It involves the triggering of development functions (usually in the form of running
packages to trigger enhanced development), and the display of reports (use EPM formula to extract data in the
BPC model and display it in excel).
Lesson 2: Environment
Environment is a collection of models in SAP BPC, which is the highest level in BPC usage. When users want
to apply SAP BPC, they must first create their usage environment. In this environment, various application
models such as sales revenue plan, human resource plan, expense budget, financial budget, consolidated reports,
and analysis can be established according to business needs . SAP BPC provides the initial environment of
EnvironmentShell as the starting point of implementation, which includes commonly used (and necessary)
dimensions, models and business rules, etc. When users create a new environment, they must be copied from
this initial environment, and then based on the business Modifications are required.
1. The namespace of the environment: use SE11 in the SAP GUI to query the database table UJA_APPSET_INFO,
and you can query all current environment ids and technical names (information ranges), etc.
4. https://sapidesvm.blogspot.com/
3. Create a new environment by copying the template environment (copying the main data of the WEB page,
copying the model file)
4. Use T-CODE:UJBR in SAP GUI to backup/restore the environment, pay attention to the settings of the following
parameters.
5. https://sapidesvm.blogspot.com/
Lesson 3: Dimensions and Attributes
Dimensions can be understood as the angle of looking at things. For example, when making sales revenue
planning, revenue planning is generally carried out from the perspectives of products and customers, so products
and customers are two dimensions. Time (T), entity (E), subject (A), and category (C) are also necessary
dimensions in SAP BPC. This is the most flexible place in SAP BPC, but it is also easy to cause performance impact.
When there are too few dimensions to meet the management needs, and increasing the dimensions without
restriction will increase the requirements for data entry, and at the same time will have a great impact on
processing performance. As for how to set the dimensions and how many dimensions there are, it depends on
different customer needs. In the case of meeting business needs, there is room for expansion.
1. Create dimensions (Web pages)
Dimension Type: Account A, Version C, Audit Trail D, Company E, Parent Company G, Intercompany I,
Currency R, Period S, Custom U
9. https://sapidesvm.blogspot.com/
2. Information cube: model correspondence, data storage
A model corresponds to an information cube in BW
3. Multi-Cube: Do not save data, understand it as a view? (In the picture above, the information cube is on
the top, and the multi-cube is on the bottom)
Lesson 5: Permissions
1. Create users in SAPGUI, create self-built roles/compound roles, and assign roles to users
Composite role: 1), self-built role: UJ_IDENTI (environment); S_RS_ICUBE (information cube)
12. https://sapidesvm.blogspot.com/
3. Web pages establish DAP data access rights (can be controlled to dimension or dimension member
attributes)
4. Create task permissions on the Web page (menu permissions, limit user Web and EPM specific function node
permissions)
13. https://sapidesvm.blogspot.com/
5. Assign 3 and 4 to the team.
Lesson 6: EPM1
EMP is an office plug-in. Generally, we only use the plug-in in excel. Using this plug-in allows us to access BPC
data and call the BW process chain in excel.
After the EPM installation is complete, there will be two more menu items in the excel function menu bar.
If there is no EPM menu item after the installation is complete, enter the excel option to confirm whether the
plug-in is disabled
14. https://sapidesvm.blogspot.com/
EPM menu item: mainly used for report creation and query
Data manager: mainly used for batch processing of data
EPM context: Displays the current value of each dimension member, and the report data generated under
different value conditions will change accordingly.
15. https://sapidesvm.blogspot.com/
For detailed use of EPM, please refer to:
EPMofc_10_user_zh
_CN.pdf
Lesson 7: EPM2
Make an EPM report
1. After logging in to BPC, click the New Report button under EPM. Under Report Editor - Layout, drag and drop
the required dimensions into the page axis, row axis, and column axis (the page axis is not required, and the
report can be used normally without setting the page axis).
If you need to specify a dimension value (if not specified, the system defaults to the value of the corresponding
dimension in the context), click the axis dimension (click the ACCOUNT dimension as shown in the figure below),
and select the required dimension members to the right "Selected Members" area. (note the use of membership
and the order of members)
16. https://sapidesvm.blogspot.com/
In the above figure, because the subject dimension "14050000-stock goods" is the subject specified when
creating the report, it will not change with the change of the context selection. In this case, we can hide the
dimension that is always fixed in the context .
Click "Context Options" in "Options" in the EPM menu
Context display: You can set the color of the context display, hide and adjust the order of the context
18. https://sapidesvm.blogspot.com/
Lesson 8: EPM3
In the report example above, the page axis, row axis, and column axis are actually automatically generated by the
system with EPM function formulas (as shown in the figure below). The EPM function is a very important content,
and the EPM function supports the nested use of the excel function. Let's take a look at the use of several
commonly used EPM functions.
Click New Report in the EPM menu item to create a coaxial report, the page axis and row axis are the same as the
report "000" (the default report)
19. https://sapidesvm.blogspot.com/
Example: The year-on-year and chain ratios that often appear in budget items, one requires the data of the same
period of the previous year, and the other requires the data of the previous period. Let's take the year-on-year as
an example:
1. Change the time in the report "001" to the number of the same month of the previous year as the context
time
First get the number of the same month in the previous year: There are two methods
Commonly used excel functions: Concatenate, left/right, if, year/month/today
Commonly used EPM functions: EPMContexMember:This function retrieves the context members for the specified
dimension. The list of members can be filtered with dimension attributes as required.
EPMMemberOffset:This function will retrieve the offset of the specified member to retrieve the previous or next member.
E By default, if the optional 'level' parameter is not included, increments members at the same level as the specified
member.
Notice:If you select a specific level using the Level parameter, be aware that only members at the same level or higher in
the hierarchy as the member specified by the Member parameter will be displayed. If the specified level is lower than the
member, the 'level' parameter is ignored. Negative offsets can be used.
2. Then pass the time of the same period last year to the time dimension member of table "001"
The EPMOlapMemberO function is generally automatically generated by the system when creating a report, and
we can modify it.
Note: For other EPM formulas, please refer to the document "EPMofc_10_user_zh_CN" attached to Lesson 6
Lesson 9: EPM API
1. Excel VBA
20. https://sapidesvm.blogspot.com/
VB programming interface—>tool—>reference: FPMXLClient, FPMXLClient OlapUtilities
2. Subfunction of EPMExeCutAPI
DataManagerRunPackage, RefreshActiveSheet, OpenSpectificDocument, CloseExcel
For example:
Lesson 10: Data Loading
There are two parts to the data source in BPC, one is BW data transfer, and the other is manual import, both
of which are realized by process chain in essence. In the EPM, the runtime package is required to implement the
action of invoking the process chain. Before manually importing data, you need to upload the organized data
(txt/csv format) to the server first, and then run the package to write the data into the BPC data cube after
verification and conversion.
1. Data sorting in Excel table
The columns of the Excel table correspond to the dimensions of the BPC data model, and the corresponding
relationship between the column names of the Excel table and the BPC dimension names is reflected in
Transformation Files (transformation files), and if the data needs to be converted, it is reflected in Conversion
Files (conversion files). The sorted Excel table needs to be saved as a document in txt or csv format, such as:
测试数据20170810.
csv
2. Upload Data
21. https://sapidesvm.blogspot.com/
Upload the organized documents to the server
3. See Lesson 11 for the definition of transformation files (Transformation Files)
4. For definition conversion files (Conversion Files), see Lesson 12
5. Run Package (RunPackage) (see Lesson 13 for definition package)
Click the "Run Package" button in the data manager to run the package (/CPMB/IMPORT)
After running, click the "View Status" button to check whether the data has been imported
22. https://sapidesvm.blogspot.com/
Note: There is also a running package link in the data manager, which can make multiple packages into an
automatic running link, and the parameter settings of each package need to be saved in advance
23. https://sapidesvm.blogspot.com/
Set the running parameters of each package in the "Setting Prompt" in the above figure
Lesson 11: Transformation Files (excel/txt columns
correspond to model dimensions)
Click "Transformation File" - "New Transformation File" in the data manager
The system will generate a blank conversion file, which is divided into three parts: *OPTIONS, *MAPING, and
*CONVERSION (the left part of the figure below).
*OPTIONS defines the overall parameters (see the right side of the figure below for details)
*MAPING defines the corresponding relationship between our BW field or the column name of the
EXCEL/TXT file uploaded to the server and the BPC model dimension.
*CONVERSION defines the dimension value that needs to be converted after the data is transformed.
24. https://sapidesvm.blogspot.com/
1. *Options parameter
FORMAT = DELIMITED Whether there is a delimiter
HEADER = YES whether there is a header
DELIMITER = , delimiter with comma
AMOUNTDECIMALPOINT = decimal point
SKIP = 0
SKIPIF=
VALIDATERECORDS=YES Whether to verify
CREDITPOSITIVE=YES The debit account shows a positive value, and the credit account shows a negative value
MAXREJECTCOUNT=10 Error quantity limit, -1 means unlimited
ROUNDAMOUNT= round up
CONVERTAMOUNTWDIM=ENTITY acts on whether the FORMULA field in Conversion takes effect
CREDIT NEGATIVE
DELIMITER
ENDROUTINE
STARTROUTINER
OUTPUT DELIMITER
OUTPUTFORMAT=MORMAL
OUTPUTHEADER
SPECIFICMAPPING=YES/NO Whether to specify the field correspondence in MAPPING
2. *MAPPING formula
*COL(A): Indicates that the A column of the data source is taken, and the column name can also be written
directly
*COL(A,2:5): Take the 2nd to 5th characters in column A
25. https://sapidesvm.blogspot.com/
*FCOL(2:5): When the source data has no delimiter, take the character data from 2 to 5
*MVAL (keyfiguretype1|dim_mem1|| keyfiguretype2|dim_mem2|) multi-indicator, get the number
according to the indicator condition
Example: ENTITY=*MVAL(ACCOUNT|*NEWCOL(10120000)||VERSION|*NEWCOL(BUDGET))????
*MKEY???
*NEWCOL(A): The source data does not have this column, but the BPC model has this dimension, and assign
A to this dimension.
*STR (string): Constant, used inside the formula (see if statement below).
*if(condition1 then action1;condition2 then action2;default action)
Example: The median value of the data source is
Run statement ENTITY=*if(ENTITY+ACCOUNT=*STR(100010010000) then *STR(3000);VERSION(1:1)=*STR(A)
then *STR(6001);*STR(9001))
operation result:
3. *CONVERSION specifies conversion files and sheet pages
Example: ENTITY=CONVERSION.XLS!ENTITY
AMOUNT= CONVERSION.XLS!ENTITY This parameter is required if CONVERTAMOUNTWDIM=ENTITY parameter
in *OPTION
Lesson 12: Conversion Files (value conversion)
After Transformation Files defines the correspondence between data source fields and BPC fields, if there is still a
discrepancy between the field values in the data source and the BPC dimension member IDs, Conversion Files
can be used for conversion, which can be understood as a comparison table for BW and BPC data docking.
Support *,? The use of wildcards such as numbers.
EXTERNAL INTERNAL FORMULA
CN01 CNvalue*2 If the above two places have set parameters, this place will take effect
CN02 *SKIP
CP* CP
26. https://sapidesvm.blogspot.com/
Lesson Thirteen: Creating Packages
Generally, the package that comes with the system is imported, and in the data manager, click
"Organization" - "Organization Package List"
Right click and select "Add Package"
Select the process chain that comes with the system, and save it after confirming the parameters such as
the name (here we need to upload to).
Exit the "Organization Package List" and click the "Run Package" button in the data manager
27. https://sapidesvm.blogspot.com/
Select the package just created, click the run button, and select different parameters and dimensions
according to the different needs of the package during the running process.
Lesson 14: BW data extraction to BPC
Using package /CPMB/LOAD_INFOPROV_UI
28. https://sapidesvm.blogspot.com/
Lesson 15: EPM loads hierarchical data
Run package /CPMB/IMPORT_IOBJ_HIER
Settings: Transformation File creation and settings (UJN_S_HIER_NODE)
Cnoversion File creation and setting
Run the package to load the BW master data level to the BPC master data
Create a hierarchical structure in BW:
○
1 BW-INFOProvider lookupOCOMP_CODE(Company code)->Properties->Hierarchy(With
Hierarchy)->Activation->Maintain Hierarchy->Activation
○
2 Transformation File
*Options
Format=DELIMITED
HEADER=YES
DELIMITER=,
AMOUNTDELIMALPOINT=.
SKIP=0
SKIPIF=
VALIDATE RECORDS=YES
MAXREJECTCOUNT=
ROUNDAMOUNT=
*MAPPING
NODENAME=NODENAME
PARENT=PARENT
HIER_NAME=HIER_NAME
ORDER=ORDER
○
3 UJN_S_HIER_NODE
field
NODENAME
PARENT
HIER_NAME
ORDER
IOBINM
VERSION
Populate the BW source at runtimeOCOMP_CODE
Member ID (node) = BWNODE NAMEList
Hierarchy: The technical name in BW needs to be consistent with that in BPC
29. https://sapidesvm.blogspot.com/
Lesson 16: BW DSO transfers data to BPC
1. Create a data storage object
2. Create a data source
3. Create the conversion file and build the data package
4. Data is pumped into DSO, and then the data is activated
5. Run the package /CPMB/LOAD_INFOPROV_UI in EPM to extract data, see Lesson 14.
Lesson 17: BW of BPC DM and BPC processing chain
call each other
1. Introduction to basic functions
Call the corresponding Data Package in BPC through the BW standard processing chain (implemented by using
the program UJD_TEST_PACKAGE)
Call the corresponding processing chain in BW through Data Package in BPC
2. Program UJD_TEST_PACKAGE function and parameter explanation
○
1 After the package in EPM runs successfully, go to BW -> UJFS PrivatePublications/ghcus001/tempfiles to find
the log file, export txt, open txt, and copy the file as shown in the figure below.
○
2 Se38 runs UJD_TEST_PACKAGE and fills in relevant parameters
○
3 Save the above as a variant
30. https://sapidesvm.blogspot.com/
○
4 This program + variant can be called in the establishment of processing chain in RSA1
3. Data Package: Explanation of /CPMB/TRIGGER_BW_CHAIN
In EPM, the BW process processing chain is triggered by running the package. It is necessary to fill in the
technical name of the BW process processing chain and just run the package.
If the processing chain is triggered successfully but the EPM package log fails, you can try to upgrade the EPM
version, or add a Delete BPC Tables at the end of the BW process chain, with parameters (IFCHAINCLOSE: Y,
CLOSE_MODE: 1 as shown in the figure below).
31. https://sapidesvm.blogspot.com/
Lesson 18: Personalization of Package
The package corresponds to the processing chain in BW
PROMPT in Package code ModifyScript is an option dialog box (the dialog box for filling parameters that appears
when running the package)
INFO assigns values to background operations (system variables or create custom variables and assign values)
TASK corresponds to the TASK in the processing chain (which will be followed by parameters in PROMPT and
parameters in INFO)
The custom package is generally the package that comes with the COPY system and then modify it (delete the
corresponding code of PROMPT, you can remove the corresponding dialog box, and then find the corresponding
variable in the TASK code and assign it manually)
If there is SELECTINPUT in PROMPT, it is possible to set multiple variables or dimensions in one statement, you
can modify the SELECTINPUT script, use INFO to set custom variables and assign values, the following example
(modify the COPY package):
PROMPT(SELECTINPUT,%SELECTION%,,,"%TIME_DIM%",)
INFO(%VAR01%,DIMENSION:ACCOUNT|10010100|) Define a variable of ACCOUNT and assign the value
10010100
INFO(%VAR02%,DIMENSION:CATEGORY|PLAY|) Define a CATEGORY variable and assign PLAY
TASK(/CPMB/CM_CONVERT, SELECTION,%SELECTION%%VAR01%%VAR02%......) %SELECTION% is directly
followed by variables defined in INFO.
32. https://sapidesvm.blogspot.com/
Lesson 19: Package Links
To establish a package link, you need to set corresponding parameters for each link.
Lesson 20: User-defined Data Manager
Copy BPC: Default Formula Logic /CPMB/DEFAULT_FORMULAS
Generally put it in the BPC...SYSTEM directory
In EPM, create a new package, and you can find the self-built process chain in the corresponding directory.
Lesson 21: Logic Script 1
Three main parts of the logic script
//SCOPE limits the scope of program operation
//BODY program runs the main program
//COMMIT submit
*The beginning indicates a statement, [ ].[ ] indicates a dimension path, and the beginning of # indicates a
variable
After the logic script is established, it can be added to DEFAULT.LGF, and it will be triggered when the EPM
uploads data and clicks the SAVE button!
*INCLUDE=logic program name without suffix.
Lesson 22: Logic script II (SCOPE statement)
*XDIM_MEMBERSET specifies the dimension limit
Example: *XDIM_MEMBERSET TIME=2016.JAN,2016.FEB Limited multi-value separated by commas
BAS (ALL) indicates all dimension members under the TIME dimension
*XDIM_ADDMEMBERSET Adds a dimension member to the previously defined dimension members
Example: *XDIM_ADDMEMBERSET TIME=BAS(2010.Q3)
$XXX$ variable to run the package
*XDIM_FILTER Scope based on dimension attributes
Example: *XDIM_FILTER TIME=[TIME].Properties(“Period”)=JAN
*XDIM_MAXMEMBERS program data transmission package size, based on program running performance
considerations, used when program performance is low
Example: XDIM_MAXMEMBERS Account=5 transfer data in one package for 5 subjects
33. https://sapidesvm.blogspot.com/
Lesson 23: Logic script 3 (BODY part - data
processing function)
1. SQL function, function and syntax explanation
*REC cannot be used alone, it needs to be combined with the WHEN statement (select double-click to call out in
the Function list on the right)
*REC syntax: *REC (FACTOR Or EXPRESSION) FACTOR (scale factor) EXPRESSION (calculation logic)
Example: *REC(1.2) or *REC(EXPRESSION=#VALUE#*1.2)
SQL functions can refer to MDX functions, but MDX functions cannot refer to SQL functions
2. MDX function
Define with [ ], calculate with #
Example: *WHEN Account
*IS*
*REC(FACTOR=0.1)
*ENDWHEN
REC complex calculation
*REC(FACTOR=([TIME].[2011.JAN],[ACCOUNT].[10010100]/[ACCOUNT].[10010200],ACCOUNT=10020100,
TIME=2011.MAR)
Lesson 24 Logic Script About Apportionment
function RUNALLOCATION
WHAT, WHERE, USING, TOTAL, FACTOR
Example: //SCOPE
…………………………
//BODY
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ENTITY WHAT = NONE; WHERE=BAS(ALL); USING=<<<;TOTAL=<<<
*DIM ACCOUNT WHAT=10010100;WHERE=<<<; USING=<<<;TOTAL=<<<
*DIM OTHERS WHAT=F001; WHERE=<<<; USING=F002;TOTAL=<<<
The amortized data dimension receives the amortized dimension numerator and denominator
34. https://sapidesvm.blogspot.com/
Lesson 25 logic script lookup (read data from
different applications (models) in the same
environment)
Read the exchange rate of RMB in the Rates model and put it into the variable INPUTCURRENCY
*LOOKUP rates (rates: exchange rate model)
*DIM Category=”Actual”
*DIM Rateid="AVG" (limit the range of read members)
*DIM DESTCURR:INPUTCURRENCY="RMB" (DESTCURR is a variable)
*ENDLOOKUP
*WHEN ACCOUNT
*IS*
*REC(FATCTOR=LOOKUP(DESTCURR),INPUTCURRENCY=”USD”) (assign variable to conversion factor, limit
INPUTCURRENCY="USD")
*ENDWHEN
Following the enhancement above, customize the logic script to realize exchange rate conversion example:
*XDIM_MEMBERSET CATEGORY=ACTUAL CATEGORY dimension limited
*XDIM_MEMBERSET AUDITID=A0098 AUDITID dimension limited
*XDIM_MEMBERSET FLOW=F99 FLOW dimension limited
*LOOKUP RATES
*DIM RATEENTITIY=”GLOBAL”
*DIM RATEID=ACCOUNT.RATETYPE
*DIM DESUSD:INPUTCURRENCY="USD" variable DESUSD
*DIM DESEUR:INPUTCURRENCY="EUR" variable DESEUR
*DIM DESSOUR:INPUTCURRECY=ENTITY.CURRENCY variable DESSOUR
*ENDLOOKUP
*WHEN ACCOUNT
*IS*
*REC(FACTOR=LOOKUP(DESSOUR)/LOOKUP(DESUSD),INPUTCURRENCY=USD) USD to RMB exchange rate
conversion
*REC(FACTOR=LOOKUP(DESSOUR)/(LOOKUP(DESUSD)*LOOKUP(DESEUR),INPUTCURRENCY=EUR)
EUR to RMB Exchange Rate Conversion
*ENDWHEN
35. https://sapidesvm.blogspot.com/
Lesson 26: Data transfer between applications
(models) (Destinnation_app ScriptLogic)
*XDIM_MEMBERSET INPUTCURRENCY=LC
*XDIM_MEMBERSET FLOW=F99
*XDIM_MEMBERSET CATEGORY=ACTUAL
*Destination_app=target the target model to pass
*RENAME_DIM INPUTCURRENCY=CURRENCY Inconsistent correspondence between source and target
dimensions
*SKIP_DIM=AUDITID,FLOW,OTHERS2 do not need to pass to the source dimension of the target dimension
*ADD_DIM OTHERS3=MO001 The assignment of more dimensions in the target model than in the source model
*WHEN ACCOUNT
*IS*
*REC(EXPRESSION=%VALUE%*2)
*ENDWHEN
Include the logicscript in Default to transfer data from one MODEL to another.
Lesson 27: Work Status Management (Workstatus
Management)
Function: 1. Simple process management
2. Authority control
1. Operation interface: web management - function - working status
Set whether to have the permission to change the context dimension members when using the EPM
report, which is used to lock and unlock the report after the input table submits data.
2. After setting the working status on the web side, the SAP GUI side can be in se11—>Database
table/1CPMB/LKWS*(Note: * is the 7, 8, 10, 11, and 12 digits of the model technical name, such
as the model technical name is/CPMB/D2IVMSI,Then the table is /1CPMB/LKWSD2VMS) query to the working
status definition.
Work Status Storage Table
Working status master data: UJW_STATCODE;
Working status business data: UJB_INST, UJB_STEP_RGN, UJB_STEPT these table associations can be taken out
roughly
36. https://sapidesvm.blogspot.com/
Lesson 28, Lesson 29: BPF (Business Process
Processing)
process template
Process Template—Process Settings
Process Template - Activity
Opening conditions: all: all companies in the previous step have completed the operation before going to the
next step
Matching: match the units that go to the next step according to the driving dimension, which can realize that
after some units are completed, they can go to the next step, and it is not necessary for all companies to
complete before entering the next step(The driving dimension of the previous step needs to be the same as the
driving dimension of the next step)
37. https://sapidesvm.blogspot.com/
The driving dimension is generally the company, [Member] can be selected by company attributes or all leaf
members or sub-members under the company
If multiple levels of approval are involved, you can consider adding member attributes in the entit dimension
(such as adding input, audit, and Approval three member attributes to record the person who fills in, reviewer,
and approver), and the person who fills in, reviews, and approves for each company can fill in the operator
account or [ Team name] (if the team name needs to be enclosed in square brackets). When defining the
activities of the process template, you can choose the operation, review, and approver of each step.
Implementation idea of multi-level approval: when each level is submitted to the next step, it is necessary to
add and run the COPY package in the activity, copy the original data to the new data,
and use the Audit dimension to distinguish the data after each level of approval (add
new data after COPY Input form for Audit dimension)
Lesson 30 SAP BPC enhanced development
Enhance the necessity of development: 1. Expand the functions of tools 2. Realize the special needs of users
3. Most ABAP are not familiar with BPC enhancement 4. Debugging and analysis when the system goes
wrong
Procedures for SAP BPC:
type transaction code keywords
package Se80 UJ*
class Se24 Cl_UJB
Function Model Se37 UJD and Run
Package
BADI Se18 UJD*
report Se38 UJD*
38. https://sapidesvm.blogspot.com/
table Se11 UJD*
The main three debugging points:
1,Web Administrator: UJX, UJX0
CL_BPC_REST_RES Methods HANDLE_REQUEST
2,Data Manager:UJX, UJXD Methods DO_POST
CL_UJXD_PACKAGES_RES
3.Logic Script:SE38 UJK_SCRIPT_LOGIC_TESTER
Web debugging:se80 UJX->UJX0->CL_BPC_REST_RES->HANDLE_REQUEST
After entering the program, break the point, such as hitting an external breakpoint on line 56, after the web
side maintains dimension information (such as adding a new dimension member), it will enter the breakpoint.
Run package debug:se80 UJX->UJXD->CL_UJXD_PACKAGES_RES->Methods->Redefinition->DO_POST
exist179Set a breakpoint at the line; thenEPMRun the package, set "ls_package_run-if_debug =
X"ThenF8continue to enterBADIcode debugging;
Logic Script debugging:se38 UJK_SCRIPT_LOGIC_TESTER
Display, after entering the program, make a breakpoint at line 147 and return
Run the program, copy the Logic program into the script file location in the lower left corner, and then
execute it (simulation)
Lesson 31 UJ_CUSTOM_LOGIC
○
1 Run SE18, enter UJ_CUSTOM_LOGIC
Double-click the method EXECUTE, select EXCUTE in the upper half of the screen, and click Parameters to
view the parameters available for this enhancement point.
○
2 Create a filter (which will be used in the new logic script later), such as:ZBPC_CONS
○
3 Create a new logic script on the WEB side (the last reference of the package), such as: the name of the
logic script isZ_BADI.LGF
*START_BADIZBPC_CONS
query=ON must, otherwise BADI will not run
write=ON Required, whether the result of BADI is written back to BPC
percent=$percent$ not required, custom variable
○
4 package loading
At the end of the package, write the statement: TASK (/CPMB/APPEND_LOAD,Z_BADI.LGF)
39. https://sapidesvm.blogspot.com/
Lesson 32 UJD_ROUTINE
1. SE18 enters UJD_ROUTINE, write program to realize
2. Call
Add code to Transformation File's *OPTIONS
STARTROUTINE=Z_Routine
ENDROUTINE=
○
1 Run STARTOUTINE first
○
2 Run *MAPPING again
○
3 The result is returned to ENDROUTINE, and then the code in ENDROUTINE is run
Lesson 33
40. https://sapidesvm.blogspot.com/
Lesson 34
Thirty-fifth UJR_WRITE_BACK
Used when data is written back to BPC, the data can be processed before data is written back to BPC, and
the data can be written to BPC after processing.
Application scenario: SAP's permission assignment is a union, and some permissions are not what we want,
such as:
Authority file profile1 A department A subject
Profile2 B department B subjects
If profile1 and profile2 are assigned to a role, the actual authority of the role is A and B subjects of A and B
departments.
SE18 enter UJR_WRITE_BACK
Filter value: APPLICATION=Model
APPSET_ID=Environment
MODULE_ID={
1、DM :Data Manager 运行包时触发
2、JRN:JOURAL 运行日记账时触发
3、MAN :InputSchedule 点击 EPM 保存数据按钮时触发
Lesson 36: UJQ_SHARED_QUERY
Triggered when the EPM data refresh button is clicked, the refreshed data can be processed before the data
is displayed, and then displayed. This BADI is generally used together with writeback in Lesson 35. One controls
writing and the other controls reading. In the above example, only data with permission is saved when data is
saved. To control the data read when data is refreshed, you need to use this lesson BADI .
Note: This BADI works for all EPM tables, and performance issues should be considered