Script Logic Tutorial
Script Logic Tutorial
Page 1 of 6
Share Report Abuse Next Blog Create Blog Sign In
SAP BPC Tutorials |SAP BPC 7.1 Tutorials |SAP BPC Interview Questinos
SAP BPC Tutorials, SAP BPC Interview Questions , SAP BPC 7.1 Interview Questions ,SAP BPC 7.1 Tutorials
Ads by Google
MDX Queries
SQL Cube
More SAP BPC Links 2011 (59) November (13) BPC 10 for NetWeaver Authentication Scenarios Ownership Manager System Generated Proposals from ... SAP Change and Transport System for SAP Business P... Demystifying Financial Consolidation Part I Making The Case for Investing in Financial Excelle... How to manage scope changes with SAP BusinessObjec... SAP BusinessObjects Operational Performance Manage... Debugging BPC 10 for NetWeaver How to manage scope changes with SAP BusinessObjec... Impact of Maintaining Debug Users in BPC NW BPC Script logic for Dummies? (Part 2) Comparision list of BPC Script Logic command betwe... OSS Note Reply - It is By Design ? May (2)
ACFX is the best forex broker in India. Regulated, easy and honest!
http://sapbpctutorials.blogspot.com/2011/11/i-explained-basic-3-parts-of-script.html
14-12-2011
SAP BPC Tutorials |SAP BPC 7.1 Tutorials |SAP BPC Interview Questinos: BPC Scri... Page 2 of 6
April (44) 2010 (26)
Then about *XDIM_FILTER_ACCOUNT will select CASH member only. Let's assume If you already used multiple *XDIM_MEMBERSET command and below are selected data from the fact tables. *XDIM_MEMBERSET TIME = 2011.JAN *XDIM_MEMBERSET CATEGORY = BUDGET <Result> EXTSALES , 2011.JAN, BUDGET, 9000 CASH , 2011.JAN, BUDGET, 3000 TAXES , 2011.JAN, BUDGET, 800 NETINCOME, 2011.JAN, BUDGET, 1500 Now if you add *XDIM_FILTER against ACCOUNT dimension. *XDIM_MEMBERSET TIME = 2011.JAN *XDIM_MEMBERSET CATEGORY = BUDGET *XDIM_FILTER ACCOUNT = [account].properties(ACCTYPE) =AST Only one record will be selected from above result because CASH is the only account member that has 'AST' value of ACCTYPE property. <Result> CASH , 2011.JAN, BUDGET, 3000 2. Scope using member value We just figured out how to scope the source data based on the property. Then someone might ask this question. "Can we scope based on the value? For example, can we select all data that an account value greater than 100? Of course, we can do it. The command is *XDIM_GETMEMBERSET. Unlike other command, it needs *ENDXDIM command to specify data. Here is the grammar of XDIM_GETMEMBERSET and an example. *XDIM_GETMEMBERSET {dimension} [={member set}] [*APP={application}] //optional [*XDIM_MEMBERSET {dimension} [={member set}] //as many of these as needed [*QUERY_TYPE= 0 | 1 | 2] //optional *CRITERIA {expression} //required *ENDXDIM *XDIM_GETMEMBERSET P_CC=[P_CC].[H1].[AAPJ].CHILDREN *APP=PLANNING *XDIM_MEMBERSET P_DataSrc=INPUT *CRITERIA [P_ACCT].[H1].[CE0001000]>1000 *ENDXDIM It will get the data and those are.. a. Children member of AAPJ in the P_CC dimension. AND b. from the PLANNING application AND c. INPUT member of P_Datasrc dimension AND
15000+ Jobs across India for Dec Upload Resume.Apply to Wipro Now!
TimesJobs.com/Wipro-Hirin
www.Aptech-Education.com
Sql Server
With Fluid Data Storage Technology For Data Center. Know More. Visit!
www.Dell.com/Compellent
About Me
S AP B P C TUTO R IA LS
SAP BPC Tutorials And SAP BPC Interview Questions And SAP BPC Books View my complete profile
http://sapbpctutorials.blogspot.com/2011/11/i-explained-basic-3-parts-of-script.html
14-12-2011
SAP BPC Tutorials |SAP BPC 7.1 Tutorials |SAP BPC Interview Questinos: BPC Scri... Page 3 of 6
d. CE0001000 member's value of the P_ACCT dimension should be greater than 100000 Let's Assume Fact table has below records.
Join this site
Followers
CE0001000, CE0002000, CE0001000, CE0002000, CE0003000, CE0001000, CE0001000, CE0003000, CE0001000, CE0001000,
2011.JAN, 2011.JAN, 2011.JAN, 2011.JAN, 2011.JAN, 2011.FEB, 2011.FEB, 2011.JAN, 2011.FEB, 2011.FEB,
ACTUAL, INPUT, KOREA , 2500 ACTUAL, INPUT, CHINA , 5000 ACTUAL, ADJ , CHINA , 3000 ACTUAL, INPUT, JAPAN , 1999 ACTUAL, INPUT, JAPAN , 2222 BUDGET, ADJ , KOREA , 345 BUDGET, INPUT, TURKEY, 1999 ACTUAL, INPUT, TURKEY, 1100 BUDGET, INPUT, CHINA , 1050 BUDGET, INPUT, JAPAN , 450
Which records will be selected? The answer is CE0001000, 2011.JAN, ACTUAL, INPUT, KOREA, 2500 CE0001000, 2011.FEB, BUDGET, INPUT, CHINA, 1050 Below records will not be selected even though P_ACCT is CE0001000 because its value is less than 1000 or Datasrc is not INPUT or it is not the child member of AAPJ (Asia Pacific) CE0001000, 2011.JAN, ACTUAL, ADJ , CHINA , 3000 (datasrc is not input) CE0001000, 2011.FEB, BUDGET, ADJ , KOREA , 345 (datasrc is not input) CE0001000, 2011.FEB, BUDGET, INPUT, TURKEY, 1999 (Turkey is not child member of AAPJ) CE0001000, 2011.FEB, BUDGET, INPUT, JAPAN , 450 (Value is less than 1000) Here are some important Notes for using this command. Note 1: This command works only for BPC MS. Note 2: if you don't specify each dimension's scope, it will be performed in the corresponding members of the pre-selected region which is defined with DIMMEMBERSET of previous line or Passed by Data Manager. Note 3: This command will generate MDX statement so it takes more time to execute. if your dataset has only base members, you can use *XDIM_GETINPUTSET. (please refer help file) 3. When user wants to add more members on top of current scoped data. Let's say a user wants to add USASales entity on top of predefined memberset. In that case user defines as below. *XDIM_ADDMEMBERSET Entity = USASales The main reason why we need this is a. Sometimes XDIMMEMBERSET doesn't work with some specific functions like BAS(parent). For example, IN BPC NW, *XDIM_MEMBERSET = BAS (US),CANADA will not work.
Already a member?Sign in
Online SAP BPC Training SAP Interview Question s and Answers SAP MDM 7.1 Tutorials SAP MDM Tutorials SAP Netweaver Tutorials SAP PI 7.1 Tutorials Powered by Blogger.
http://sapbpctutorials.blogspot.com/2011/11/i-explained-basic-3-parts-of-script.html
14-12-2011
SAP BPC Tutorials |SAP BPC 7.1 Tutorials |SAP BPC Interview Questinos: BPC Scri... Page 4 of 6
Therefore, we should use *XDIM_MEMBERSET and *XDIM_ADDMEMBERSET. *Note: In BPC MS, BAS() will not work with XDIM_MEMBERSET. b. if user always wants to run a specific memberset whenever logic runs, should use *XDIM_ADDMEMBERSET 4. Dynamic Scope and saving it to a variable. Sometimes we need to save our scoped data into a script logic variable. But... what if your dimension members are updated frequently? As I know, almost every customer updates their dimension at least once a month. If customer changes their dimension members, what will happen in your script logic? You can use *Filter but sometimes it may not work all the time. Then we can use *SELECT and *MEMBERSET command as a dynamic scope tool. Like other script engine, Logic script also supports Variable to save some data. The Variable is defined using % symbol.Here are some examples, %MYTIME% , %CUR% etc. So how can we save some data into the variable and when it can be used? Usually, the variable can be filled using *SELECT command and *MEMBERSET command. Both of them is scope command but *SELECT will be faster because it will create SQL statement. Here is the grammar of both commands. *SELECT ({variable}, {What}, {From}, {Where}) *MEMBERSET({variable}, {member set in MDX format}) Let's see how to use *SELECT command. *SELECT(%REPORTING_CURRENCIES%, ID, CURRENCY, [GROUP] = 'REP') This command will get the 'member ID(what)' from the 'currency dimension(From)' that the GROUP property has the value 'REP' (where). Actually, it will create a SQL statement as below SELECT ID from mbrCurrency where [GROUP] = 'REP' After it executes above SQL command, all result will be saved into %REPORTING_CURRENCIES% variable. Here is an example of *MEMBERSET which will make same result but execute MDX statement instead of SQL. *MEMBERSET(%REPORTING_CURRENCIES%, filter {[CURRENCY].members, [currency].properties(GROUP)=REP) The variable can be used anywhere in the logic, like in this example:
http://sapbpctutorials.blogspot.com/2011/11/i-explained-basic-3-parts-of-script.html
14-12-2011
SAP BPC Tutorials |SAP BPC 7.1 Tutorials |SAP BPC Interview Questinos: BPC Scri... Page 5 of 6
*XDIM_MEMBER_SET CURRENCY=% REPORTING_CURRENCIES% Let's assume Currency dimension has below members. ID GROUP USD EUR KRW JPY REP REP
Then above statement will be converted as *XDIM_MEMBER_SET CURRENCY = USD,EUR When you define and fill in data using *SELECT and *MEMBERSET, please remember this as 'MEMBERSET Variable' Note: MEMBERSET command is only supported by MS version. We reviewed key command of scoping today. We will review advanced calculation command and control command like *IF or *FOR - *NEXT in the next post. If you have questions or want to know something about it, please leave a comment. Thank you.
Posted by SAP BPC Tutorials at 2:06 AM
Recommend this on Google
Labels: Matrix Security, SAP BPC Books, SAP BPC TRAINING IN HYDERAD, SAP BPC TUTORIALS, SAP BPC TUTORIALS 7.1, Script Logic
Publish
Preview
http://sapbpctutorials.blogspot.com/2011/11/i-explained-basic-3-parts-of-script.html
14-12-2011
SAP BPC Tutorials |SAP BPC 7.1 Tutorials |SAP BPC Interview Questinos: BPC Scri... Page 6 of 6
Newer Post
Home
Older Post
http://sapbpctutorials.blogspot.com/2011/11/i-explained-basic-3-parts-of-script.html
14-12-2011