Logic script copy
Hi expert,
part of my script:
*DESTINATION_APP = FINANCE
*SKIP_DIM = MATERIAL,Product
*ADD_DIM Location = Entity.Loc
what I concern that is *ADD_DIM Location = Entity.Loc ......is not working fine
when store to database, it store the "Entity.Loc" to my column Location.
but what actually I want is store the value from the PROPERTY call "Loc" from my dimenson ENTITY.
any idea how to do this??
Thanks...
Hi Nilanjan
I have a similar issue...
Can you explain please how can I use the variable for many members...
Im performing correctly some data copy to another app.
The problem is that when I use add_dim it is not possible to input more than 1 member per dim.
How can i fix this?
I.e.
Conceptos.vap (all this members) --> account 40000 (destination member)
Conceptos "toner" ---> account 50010 (destination member)
I wanted to simplfy my script by typing this (to me this is supposed to work, is very simple, also running a script separately works for both Conceptos)
*select(%conceptos%,"id","conceptos","vap='i'")
*xdim_memberset conceptos=%conceptos%
*xdim_memberset moneda=mxn,usd
*xdim_memberset lob=servicios_out
*xdim_memberset metrica=importe_p
*xdim_memberset consumibles=consumibles_dummy
*xdim_memberset tiempo=%tiempo_set%
**WHEN conceptos
**IS %conceptos%,toner*
WHEN metrica
*IS importe_p,importe_r
*REC(FACTOR=1,metrica="dummy_metrica")
*ENDWHEN
*ENDWHEN
*COMMIT
*DESTINATION_APP= ALLDORA_FINANZAS
*xdim_memberset moneda=mxn,usd
*xdim_memberset lob=servicios_out
*xdim_memberset metrica=dummy_metrica
*xdim_memberset tiempo=%tiempo_set%
*skip_dim = conceptos
*skip_dim = consumibles
*add_dim ceco=A010ops001
*add_dim cuenta=40000, 50010 ---> ERROR !!!!
*add_dim empleado=empleado_dummy
*WHEN conceptos
*IS %conceptos%
*REC(FACTOR=1,cuenta="40000")
*IS toner
*REC(FACTOR=1,cuenta="50010")
*ENDWHEN
*commit
If I just type separately the logic for each one WITHIN the same script, the Account destination member taken is the one found at the bottom of the script, i mean, it is not performing the input in the final Account (40000 and 50010), just for one of them.
However... since i have to do 14 different logics, it is very awkward to execute 14 scripts... in order for this logic to work,
Thanx
Velázquez
Similar Messages
-
Logic Script (Copying records while save from input screen)
Hi Gurus,
How to handle below requirement in script logic:
Input screen column = Time (5 years)
User want to input forecast data in current year and same data should be copied over to rest of the 4 years.
I am new to Logic Script!
Thanks.Another option is to add 4 properties to TIME dimension: SHIFT1,SHIFT2,SHIFT3 and SHIFT4 and fill them with members:
2014.01 -> 2015.01 2016.01 2017.01 2018.01
2014.02 -> 2015.02 2016.02 2017.02 2018.02
... etc
Some maintenance work...
The code will be simple and without FOR/NEXT loop:
*WHEN CATEGORY
*IS FORECAST
*REC(EXPRESSION=%VALUE%,TIME=TIME.SHIFT1)
*REC(EXPRESSION=%VALUE%,TIME=TIME.SHIFT2)
*REC(EXPRESSION=%VALUE%,TIME=TIME.SHIFT3)
*REC(EXPRESSION=%VALUE%,TIME=TIME.SHIFT4)
*ENDWHEN
Vadim -
BPC Logic Script: Copy from calculated members (non-base) to base members
Hi experts,
I want to copy some values from some calculated members to base members in the same dimension. It appears I have a hard time scoping the calculated members.
This is my C_ACCOUNT dimension:
And this is the COPYCALC.LGF script I am running:
LGX:
*XDIM_MEMBERSET C_ACCOUNT = 450
*WHEN C_ACCOUNT
*IS 450
*REC( EXPRESSION = %VALUE%, C_ACCOUNT = 50)
*ENDWHEN
LOG:
LOG BEGIN TIME:2014-02-26 17:21:12
FILE:\ROOT\WEBFOLDERS\STEP_UNIT_TEST \ADMINAPP\BUDGET_CASH\TEST.LGF
USER:KAROLISB
APPSET:STEP_UNIT_TEST
APPLICATION:BUDGET_CASH
[INFO] GET_DIM_LIST(): I_APPL_ID="BUDGET_CASH", #dimensions=16
AA_NUMBER,AUDITTRAIL,BUDGET_OBJECT,BUDGET_TYPE,CATEGORY,COFOG,CURRENCY,C_ACCOUNT,C_ACCOUNT_DT,ENTITY,FLOW,GRANTS,MEASURES,TIME,TIME_DT,VERSION
#dim_memberset=4
CATEGORY:RES,1 in total.
CURRENCY:LC,1 in total.
TIME:2012,1 in total.
C_ACCOUNT:450,1 in total.
SCRIPT RUNNING TIME IN TOTAL:1.00 s.
LOG END TIME:2014-02-26 17:21:12
My model structure:
So as you can see I am trying to copy from account 450 (which is non base) to account 50 ( which is base member). Also you can see that in the previous example no record was generated.
Whereas, if I replace the account 450 with 4500 I get record generated in order:
LGX:
*XDIM_MEMBERSET C_ACCOUNT = 4500
*WHEN C_ACCOUNT
*IS 4500
*REC( EXPRESSION = %VALUE%, C_ACCOUNT = 50)
*ENDWHEN
LOG:
LOG BEGIN TIME:2014-02-26 18:26:26
FILE:\ROOT\WEBFOLDERS\STEP_UNIT_TEST \ADMINAPP\BUDGET_CASH\TEST.LGF
USER:KAROLISB
APPSET:STEP_UNIT_TEST
APPLICATION:BUDGET_CASH
[INFO] GET_DIM_LIST(): I_APPL_ID="BUDGET_CASH", #dimensions=16
AA_NUMBER,AUDITTRAIL,BUDGET_OBJECT,BUDGET_TYPE,CATEGORY,COFOG,CURRENCY,C_ACCOUNT,C_ACCOUNT_DT,ENTITY,FLOW,GRANTS,MEASURES,TIME,TIME_DT,VERSION
#dim_memberset=4
CATEGORY:RES,1 in total.
CURRENCY:LC,1 in total.
TIME:2012,1 in total.
C_ACCOUNT:4500,1 in total.
REC :%VALUE%
CALCULATION BEGIN:
QUERY PROCESSING DATA
QUERY TIME : 0.00 ms. 1 RECORDS QUERIED OUT.
QUERY REFERENCE DATA
CALCULATION TIME IN TOTAL :0.00 ms.
1 RECORDS ARE GENERATED.
CALCULATION END.
ENDWHEN ACCUMULATION: 1 RECORDS ARE GENERATED.
DATA TO WRITE BACK:
AA_NUMBER AUDITTRAIL BUDGET_OBJECT BUDGET_TYPE CATEGORY COFOG CURRENCY C_ACCOUNT C_ACCOUNT_DT ENTITY FLOW GRANTS TIME TIME_DT VERSION SIGNEDDATA
AA_NONE LIM NONE 10 RES FA_NONE LC 50 CAD_NONE A00 F99_1 NONE 2012 TD_NONE CURRENT 222.00
1 RECORDS HAVE BEEN WRITTEN BACK.
WRITING TIME :1.00 ms
Why can I not copy value from 450 ? How do I solve this problem ?
PS: currently I am testing this as a DM package run script but in the future I would like to make it a Default.lgf functionality.
I am working on:
BPC 10 SP5 for NW, calculation engine ABAP, BW 7.4Sorry to keep you in darkness. My code has developed since I have started this thread:
*SELECT(%ADMISSIBLE%, "[ID]", C_ACCOUNT, " [THIERARCHY]<>'' AND [ACCTYPE]<>INC ") // DEFINE THE SET OF REAL(ACTUALY EXISTING), NON-REVENUE AND NOT ANCIENT CASH ACCOUNTS HERE.
*SELECT(%INADMISSIBLE%, "[ID]", C_ACCOUNT, " [ID] <> %ADMISSIBLE% ")
*SELECT(%L1%, [ID], C_ACCOUNT, "[ID] = %C_ACCOUNT_SET%") // DEFINE BASE LEVEL ACCOUNTS
*SELECT(%L2%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L1% ") // DEFINE FIRST(COUNTING FROM BASE) LEVEL PARENTS
*SELECT(%L3%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L2% ") // DEFINE SECOND(COUNTING FROM BASE) LEVEL PARENTS
*SELECT(%L4%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L3% ")
*SELECT(%L5%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L4% ")
*SELECT(%L6%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L5% ")
*SELECT(%LALL%, "[ID]", C_ACCOUNT, "[ID] = %L1%,%L2%,%L3%,%L4%,%L5%,%L6%") //UNION OF ALL LEVELS
*XDIM_MEMBERSET AUDITTRAIL = INPUT
*XDIM_MEMBERSET VERSION = CURRENT
*XDIM_MEMBERSET AA_NUMBER = AA_NONE
*XDIM_MEMBERSET TIME_DT = TD_NONE
*XDIM_MEMBERSET C_ACCOUNT_DT = CAD_NONE
*XDIM_MEMBERSET C_ACCOUNT = %INADMISSIBLE% //SCOPE LEAVES ALL POTENTIAL DESTINATIONS FOR MEMBERS IN %PARS%
*FOR %A% = %PARS% //LOOP OVER ALL ADMISSIBLE PARENTS
*WHEN C_ACCOUNT
*IS L_C_%A%
*REC( EXPRESSION = [C_ACCOUNT].[%A%], C_ACCOUNT = L_C_%A%) //SUM UP THE VALUES OF LEAVES AND WRITE THE SUM TO DESTINATION ACCOUNT
*ENDWHEN
*NEXT
screen shot of part of member table for C_ACCOUNT:
continuation in next reply (I have problems with my text editor) -
Hello Friends,
I am facing the logic script error when validating the script. "the script is apparently invalid, as you cannot have member "". The logic is run for grouped cost center.
Logic Script:
//***********************START OF HEADER*****************
//SUB QUERY:
//PURPOSE: Copy high Level forecast data from Actuals, Budget, commitments to base level cost centres defined for forecat
//CALLED FROM: Data Manager Package
//WHO: Matt Penston (itelligence)
//VERSION: 1
//DATE: 26-11-2012
//CHANGE LOG:
//***********************END OF HEADER********************
//********************** Need to first of all clear down the BW data in the base member costcentres ***************
// Set XDIM_MEMBERSET
*XDIM_MEMBERSET CATEGORY = Actual,Budget,COMMITMENTS
*XDIM_MEMBERSET AUDITTRAIL = BW
*XDIM_MEMBERSET ACCOUNT = <ALL>
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET ACCDETAIL = F_None
//Select Current Month Time Member to copy from
//*SELECT(%TIME_CURRMTH_FYA%,"[ID]","TIME","[FCST_PROFILES] = 'A'")
//*XDIM_MEMBERSET TIME = %TIME_CURRMTH_FYA%
*XDIM_MEMBERSET TIME = BAS(201314.TOTAL)//CHANGE ONCE PER YEAR
//Select CostCentres for high level Forecast entry
//*SELECT(%HL_FCST_ENT%,"[ID]",COSTCENTRE,"[HL_FCST_ENT] = 'Y'")
// Use For Loop to run through the Cost Centres
//*FOR %HL_FCST_FOR% = %COSTCENTRE_SET%
*XDIM_MEMBERSET COSTCENTRE = BAS(%COSTCENTRE_SET%)
//*SELECT(%HL_FCST_BASE%, "[ID]", COSTCENTRE, "[HL_FCST_PRNT] = %COSTCENTRE_SET%")
*SELECT(%HL_FCST_BASE%, "[HL_FCST_BM]", COSTCENTRE, "[ID]= %COSTCENTRE_SET%")
// Set the Ref Data to Transaction, is the default but defined anyway.
*WHEN_REF_DATA=TRANSACTION_DATA
*WHEN CATEGORY
*IS *
*REC(FACTOR=-1, AUDITTRAIL = BW_HL, COSTCENTRE = %HL_FCST_BASE%)
*REC(FACTOR=1, AUDITTRAIL = BW, COSTCENTRE = %HL_FCST_BASE%)
*ENDWHEN
//*NEXT
*COMMIT
The Error Came once validate above script:
Can anyone please guide the same.
Regards,
Dev.Hello Vadim,
As you guided above mail yes, I have put the Data Region: "COSTCENTRE=YPROG" and the below script is copied in Script File Location:
*XDIM_MEMBERSET CATEGORY = Actual,Budget,COMMITMENTS
*XDIM_MEMBERSET AUDITTRAIL = BW
*XDIM_MEMBERSET ACCOUNT = <ALL>
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET ACCDETAIL = F_None
//Select Current Month Time Member to copy from
*XDIM_MEMBERSET TIME = BAS(201314.TOTAL)//CHANGE ONCE PER YEAR
*XDIM_MEMBERSET COSTCENTRE = BAS(%COSTCENTRE_SET%)
*SELECT(%HL_FCST_BASE%, "[HL_FCST_BM]", COSTCENTRE, "[ID]= %COSTCENTRE_SET%")
// Set the Ref Data to Transaction, is the default but defined anyway.
*WHEN_REF_DATA=TRANSACTION_DATA
*WHEN CATEGORY
*IS *
*REC(FACTOR=-1, AUDITTRAIL = BW_HL, COSTCENTRE = %HL_FCST_BASE%)
*REC(FACTOR=1, AUDITTRAIL = BW, COSTCENTRE = %HL_FCST_BASE%)
*ENDWHEN
//*NEXT
*COMMIT
and the Log is given : UJK_VALIDATION_EXCEPTION:Member "" not exist
Please let me know were is the problem.
My findings:
After checking the Category Dimension come to know that the member dimension is maintained with 201213.TOTAL and in script logic we are using the 201314.TOTAL.
Can you please let me know what is the issue in the script logic.
Regards,
Rajesh. K -
Inventory movement using logic script - BPC NW 10
Hello BPC experts,
I'm working on inventory movement using logic script. The idea is that the initial stock of the first period equals the final stock of the previous period.
Here is an example of my inventory report : (Dimension INVT in function of dimension TIME)
2014.01 2014.02 2014.03 2014.04
F01 Stock first period 12
F02 Initial Stock 12 11 10 9
F03 Inventory Inputs 2 4 6 8
F04 Inventory Outputs 3 5 7 9
F05 Final Stock 11 10 9 8
The Stock of the first period is entered
The initial Stock = Stock first period (12 in our case)
Inventory inputs and Outputs are entered
Final Stock = Initial Stock + Inventory Inputs - Inventory Outputs
I tried the following script but it does not work :
*XDIM_MEMBERSET TIME = 2014.01 //we should then retrieve the first period of each year which is not necessary the first month of the year
*WHEN TIME
*IS 2014.01
*REC(EXPRESSION = [INVT].[F01], INVT = F02)
*ENDWHEN
*SELECT(%TIME_LIST%,"[ID]","TIME","[PREVMEMBER]"<>"") // PREVMEMBER is a property of TIME
*XDIM_MEMBERSET TIME = %TIME_LIST%
*XDIM_MEMBERSET INV = F05
*WHEN TIME
*IS %TIME_LIST%
//Something is missing here.. How to retrieve F05 values related to all periods and copy them in F02
*REC(EXPRESSION =[INVT].[F05],INVT = F02)
*ENDWHEN
Please how can I achieve this ?
Thanks
MahaHi Vadim,
Thank you for your reply
I'm working with BPC NW 10 SP 05 (CPMBPC 801 SP 05), Engine ABAP
My model contains the following dimensions ACCOUNT (A), TIME (T), CATEGORY (C), ENTITY (E), CURRENCY (R), INVT (User Def)
In the INVT dimension we have members like (Stock first period, Initial Stock, Inventory Inputs, Inventory Outputs, Final Stock)
- [INVT].[Stock first period] is entered
- [INVT].[Initial Stock] = [INV].[Stock first period]
- [INVT].[Inventory input] and [INVT].[Outputs] are entered
- [INVT].[Final Stock] = [INVT].[Initial Stock] + [INVT].[Inventory Inputs] - [INVT].[Inventory Outputs]
We want to calculate Initial Stock in DEFAULT.lgf :
[INVT].[Initial Stock] when (TIME=2014.01) = [INVT].[Stock First Period] when (TIME= 2014.01)
[INVT].[Initial Stock] when (TIME=2014.02) = [INVT].[Final Stock] when (TIME= 2014.01)
[INVT].[Initial Stock] when (TIME=2014.03) = [INVT].[Final Stock] when (TIME=2014.02)
[INVT].[Initial Stock] when (TIME=2014.04) = [INVT].[Final Stock] when (TIME=2014.03)
When a user enters the values of "Stock first period", "Inventory Inputs" and "Inventory Outputs", Initial Stock and Final stock should be calculated via logic script
Regards
Maha -
Logic script considering comments
Hi everybody,
I would like to know wether is it possible to generate a logic script which is able to obtain a comment associated to a dimensional point of the cube. Then it should use the comment to look for a member of a different dimension with the ID equals to the comment. Then, I want to copy a transactional value associated to this ID in the previous dimensional point from which we got the comment.
Firstly, I would like to know if it is feasible to do? Then, in case it is, I would start thinking how to really implement it.
Any help will be appreciated,
Regards,
AntonioMany Thanks Sheldon,
I discart using comments to develop the logic. However, do you know if is possible to get in a variable the value of a property of a dimension member? it would be very usefull since it would solve the problem we have in the new solution we have proposed for the logic script.
Regards,
Antonio -
Cannot modify logic script on BPC 10.0
Hello All,
I need to change a simple logic in our existing logic script. I changed, validated and hit a save button. It says that "The Script Logic file has been updated". However, my change is not saved. When I open a script Logic after I saved, I see the original one only.
I talked to BASIS team to check the PROCTIMEOUT on server and found that it has 3600. Which is two times higher than SAP recommended. There are about 200 lines in logic scripts.
Could you please help why I can not modify the logic scripts?
Thank you very much in advance!!!
Thanks
IndraHi Indra,
I dont think its related to the timeout settings of a DIA process. Could you please check if you have proper authorizations to Update the script Logic in BPC ?
Regards
Ram -
How to SIMPLY use the %DIMENSION_TO_SET% variables into logic scripts
hello,
I'm using a prompt of type "COPYMOVE" or "COPYMOVEINPUT". In this type of prompt, there are 2 columns of dimension members list, one for defining the "source zone" and one for defining the "target zone" of logics.
The left colum of the prompt (for source zone) feeds the variables %DIMENSION_SET% : %ACCOUNT_SET%, %ENTITY_SET%, %CATEGORY_SET%, etc...and these variables can be used in the logic scripts in *XDIM_MEMBERSET instructions for example.
The right colum of the prompt feeds the variables %DIMENSION_TO_SET% : %ACCOUNT_TO_SET%, %ENTITY_TO_SET%, %CATEGORY_TO_SET%, etc...and I don't know how to SIMPLY use these variables in the logic scripts.
I've found a tricky way to do that but I meet 2 problems :
- it is complicated
- the multi-info instruction (BEGININFO/ENDINFO) seems to be bugged as blank lines are added all the time in the code and sometimes I have to wait for minutes when I try to modifiy the package code through BPC for excel eData/modify package menu.
So the question is how to SIMPLY get the %DIMENSION_TO_SET% variables into logic scripts and use them ? Thanks, R.
Here is the tricky package code I use at this time (I build one function for each %DIMENSION_TO_SET% variable and I pass these functions to the logic) :
PROMPT(COPYMOVE,,,,"ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
TASK(Execute formulas,USER,WS-WW\PlauchuR)
TASK(Execute formulas,APPSET,US)
TASK(Execute formulas,APP,SV)
TASK(Execute formulas,SELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\FROM_1561_.TMP)
TASK(Execute formulas,TOSELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\TO_1561_.TMP)
BEGININFO(%FSS%)
*FUNCTION TARGETACCDETAIL=%ACCDETAIL_TO_SET%
*FUNCTION TARGETACCOUNT=%ACCOUNT_TO_SET%
*FUNCTION TARGETCATEGORY=%CATEGORY_TO_SET%
*FUNCTION TARGETDATASRC=%DATASRC_TO_SET%
*FUNCTION TARGETENTITY=%ENTITY_TO_SET%
*FUNCTION TARGETTIME=%TIME_TO_SET%
*FUNCTION TARGETYEARS=%YEARS_TO_SET%
ENDINFO
TASK(Execute formulas,FORMULASCRIPT,%FSS%)
TASK(Execute formulas,LOGICFILE,D:\BPC\Data\WebFolders\US\SV
..\AdminApp\SV\_TEST.Lgf)
TASK(Execute formulas,RUNMODE,1)
TASK(Execute formulas,LOGICMODE,1)
Edited by: ALEXANDRE BEDIER on Jun 16, 2010 3:15 PMhello,
finally I've discovered that there is no need of BEGININFO instruction.
One can pass several functions to a logic with one FORMULASCRIPT task. The functions definitions have to be separated by instructions. See below :
PROMPT(COPYMOVEINPUT,%FTARGETS%,,"select source and target zone for category and datasource.","ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
TASK(Execute formulas,FORMULASCRIPT,*FUNCTION TACCDETAIL=%ACCDETAIL_TO_SET% *FUNCTION TACCOUNT=%ACCOUNT_TO_SET% *FUNCTION TCATEGORY=%CATEGORY_TO_SET% *FUNCTION TDATASRC=%DATASRC_TO_SET% *FUNCTION TENTITY=%ENTITY_TO_SET% *FUNCTION TTIME=%TIME_TO_SET% *FUNCTION TYEARS=%YEARS_TO_SET%)
TASK(Execute formulas,USER,%USER%)
TASK(Execute formulas,APPSET,%APPSET%)
TASK(Execute formulas,APP,%APP%)
TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
TASK(Execute formulas,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\_TEST.LGF)
TASK(Execute formulas,RUNMODE,1)
TASK(Execute formulas,LOGICMODE,1)
Then one will be able to use the functions TACCDETAIL, TCATEGORY, TACCOUNT,... in the logic script.
Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:31 AM
Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:33 AM -
Lookup total value in logic script
hi experts,
is it possible to lookup with same criteria that returns many row and fetch the total of all returning rows ? if it is possible, how ?
you can see at attached picture, i try to lookup with same criteria (row 3 & row 5), the different only at column 3. what i want is fetch the total value of row 3 & row 5 = 1000 + 10000 = 11000
but what i get is 1000 which means only fetch the first row (row 3).
the code that i using in my logic script:
*XDIM_MEMBERSET ACCOUNT = 551010
*XDIM_MEMBERSET METRIC = PERCENTAGE
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET SUBITEM1 = NO_SUB1
*XDIM_MEMBERSET MEASURES = PERIODIC
*XDIM_MEMBERSET SUBITEM3 = NO_SUB3
*XDIM_MEMBERSET BUAREA = NO_BUAREA
*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
*XDIM_MEMBERSET CATEGORY = 2014Q3
*XDIM_MEMBERSET AUDITTRAIL = Input, OFFSET
*XDIM_MEMBERSET INTERCO <> NO_INTERCO
*XDIM_MEMBERSET TIME = 2014.07
*LOOKUP Finance
*DIM EXP_Input:AUDITTRAIL = Input
*DIM EXP_Input:METRIC = AMOUNT
*ENDLOOKUP
thank you.Hi Yoki,
Please, read How To: Ask questions about Script Logic issues
Point 9! and other...
In general it's possible to use LOOKUP to get a value of the parent node, but it's not clear what total do you want to get.
Vadim -
Passing variables from DM to logic script problem (REPLACEPARAM)
Dear All,
I would like to send variables from data manager to a logic script. The script copies values from an account to an other. If I hardcode two accounts in the script, it works fine, but I want to pass these two accounts dynamically from data manager to the script.
My advanced script in DM looks as follows:
PROMPT(SELECTINPUT,%ENTITY_M%,,"Select entity:","ENTITY_DIM")
PROMPT(SELECTINPUT,%SOURCE%,,"Select source account:","ACCOUNT_DIM")
PROMPT(SELECTINPUT,%TARGET%,,"Select target account:","ACCOUNT_DIM")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(PROCESS_CHAIN_RUNL,TAB,%TAB%)
TASK(PROCESS_CHAIN_RUNL,EQU,%EQU%)
TASK(PROCESS_CHAIN_RUNL,SUSER,%USER%)
TASK(PROCESS_CHAIN_RUNL,SAPPSET,%APPSET%)
TASK(PROCESS_CHAIN_RUNL,SAPP,%APP%)
TASK(PROCESS_CHAIN_RUNL,SELECTION,%ENTITY_M%)
TASK(PROCESS_CHAIN_RUNL,LOGICFILENAME,ACCOUNT_COPY_LOGIC.LGF)
TASK(PROCESS_CHAIN_RUNL,MEMBERSELECTION,SOURCE%EQU%%SOURCE%%TAB% TARGET%EQU%%TARGET%)
In the logic script, I'm using $SOURCE$ and $TARGET$ as variables, but it seems that only the first of them gets the value from DM, the other one not, and I always get an error message:
Member "$TARGET$" not exist
The second variable doesn't seem to get the value. If I use only one variable, either SOURCE or TARGET, it works fine...
...and I also tried to replace the MEMBERSELECTION statement with a REPLACEPARAM statement:
TASK(PROCESS_CHAIN_RUNL,REPLACEPARAM,SOURCE%EQU%%SOURCE%%TAB% TARGET%EQU%%TARGET%)
This way I got an other error message, saying: "Member .../PrivatePublications/user not exist"
Do you have any idea? How to pass two user selected parameters to a logic script?
Thanks for your help,
A.Hi CsernusAttila
You cannot use ACCOUNT_DIM with promp SELECT and variable $SOURCE$ because it only works with variable ACCOUNT_SET in your script logic.
instead of you can use TEXT
PROMPT(TEXT,%,ENTITY_M%%,"Select Entity",)
PROMPT(TEXT,%,SOURCE%%,"Select Source",)
PROMPT(TEXT,%,TARGET%%,"Select Target",)
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(PROCESS_CHAIN_RUNL,TAB,%TAB%)
TASK(PROCESS_CHAIN_RUNL,EQU,%EQU%)
TASK(PROCESS_CHAIN_RUNL,SUSER,%USER%)
TASK(PROCESS_CHAIN_RUNL,SAPPSET,%APPSET%)
TASK(PROCESS_CHAIN_RUNL,SAPP,%APP%)
TASK(PROCESS_CHAIN_RUNL,SELECTION,%SELECTION%)
TASK(PROCESS_CHAIN_RUNL,LOGICFILENAME,ACCOUNT_COPY_LOGIC.LGF)
TASK(PROCESS_CHAIN_RUNL,REPLACEPARAM,SOURCE%EQU%%SOURCE%%TAB% TARGET%EQU%%TARGET%)
or you can modify your script like this
*XDIM_MEMBERSET ACCOUNT=%ACCOUNT_SET%
*XDIM_MEMBERSET ENTITY=%ENTITY_SET%
And your Prompt like this
PROMPT(SELECTINPUT,,,,"%ACCOUNT_DIM%,%ENTITY_DIM%,")
TASK(PROCESS_CHAIN_RUNL,TAB,%TAB%)
TASK(PROCESS_CHAIN_RUNL,EQU,%EQU%)
TASK(PROCESS_CHAIN_RUNL,SUSER,%USER%)
TASK(PROCESS_CHAIN_RUNL,SAPPSET,%APPSET%)
TASK(PROCESS_CHAIN_RUNL,SAPP,%APP%)
TASK(PROCESS_CHAIN_RUNL,SELECTION,%SELECTION%)
TASK(PROCESS_CHAIN_RUNL,LOGICFILENAME,ACCOUNT_COPY_LOGIC.LGF
I hope it helps
Regards!! -
Dear All,
How can I use MDX in logic scripts?
For example, I would like to use the function IIF(...), but the system doesn't want to recognise it as a valid keyword. Even if I nest it in a REC statement as an expression, it doesnt work. Do you have any idea?
Thanks for your help in advance,
A.Hi Ergin,
I can understand your approach not to use ABAP hence you miss the skills witin your project team.
However, you (or you client) has chosen the NetWeaver version for whatever reason. I'm sure a thorough decisions process has lead to this decision. In choosing the NetWeaver version with SAP BI you will sooner or later come to the point that you will have to use ABAP if you like it or not. Especially when you start using further capabilities within NetWeaver and the BI solutions. So from my point of view ABAP knowledge is an essential skill you need in a project based on SAP NetWeaver anyway.
Additionally I heared some statements that MDX is causing some performance issues on the NetWeaver version. This may have been fixed in the meantime with some SPs.
As the SQL within the NetWeaver verison does not have the full functionality than it has in MS Version SQL is not an option for me.
I do also not see the cost impact hence someone need to do the support anyway. In case of MDX you need an MDX developer, in case of ABAP and ABAP developer. Or a technical BPC consultant able to do the development (which I would recommend you should have in your project team anyway).
So coming back to your original question, I would recommend to do as much as possible using ABAP BADIs.
Cheers,
Steffen -
hi experts,
how to use syntax "avg" in logic script? or is there any way to implement the average calculation?
as example of data in 1 model:
emp01 entity01 interco01 percent 0.1
emp02 entity01 interco01 percent 0.2
emp03 entity01 interco01 percent 0.3
emp01 entity01 interco01 amount 1
emp02 enitty01 interco01 amount 1
emp03 entity01 interco01 amount 1
calculate average:
avg = sum(percent) / sum(amount)
avg = 0.6 / 3
avg = 0.2
thank you.hi Vadim,
this average result will be stored and using as basis of other calculation. this average will show in input template with the standard calculation at backend, but user can overwrite it in input template.
percent means proportion to be allocated
amount means amount of headcount to related employee (this value always 1 for every employee)
after i get this average, this value will be used as driver to calculate cost.
additional example from above:
emp01 entity01 interco01 cost 1000
emp02 enitty01 interco01 cost 1000
emp03 entity01 interco01 cost 1000
expected average result:
no_emp entity01 interco01 avg 0.2
record another row:
no_emp entity01 interco01 avgcost 0.2 * 3000
i just give a simple example and want to know how to do average in logic script. is it possible to calculate average using logic script?
thank you. -
BPC Security - Edit Logic Script
Trying to find the security task that give edit access to Logic Script(BPC 10 NW SP9). Is this combined with the "Edit Packages" Data Manger task?
Thank you.
Regards,
Vinod SwarnapuriVinod,
I think the one you are looking for is Manage Business Rules.
Akos -
Compound boolean logic scripting
Greetings! I would like to pick everyone's brains for how one might implement compound boolean logic scripting in LabVIEW ... specifically LabVIEW-RT.
My application is an in-vehicle data acquistion and logging setup. The app is setup so that the user provides a configuration file which is the list of channels (GPS, DAQ, CAN) that they wish to record...so this means there isn't any hard coded variable but an array of clusters built from the configuration file.
A mode of operation is a 'trigger' mode, which means the logger doesn't record anything until a trigger has occured. Currently the user provides a simple comparator (0=lessthan, 1=equalto, 2=greaterthan, else=none), and the trigger value.
The users want to be able do compound conditions like PARAMETER <= x OR Parameter >= y ... possiblly even between 2 different data points like PARAMETER_A <= x AND PARAMETER_B >=y.
Any comment, hints, tips, suggestions ?
Thanks!
Jason StallardJason,
It's interesting how often the problem of text-based scripting to drive LV pops up.
I had a problem with similar properties: given a set of data and an
arbitrary set of rules, substitute data into each rule and see if it
evaluates to true or false. This is used to provide directions
from engineers to operators on how to perform failure analysis and
recovery, without the engineer needing to be present.
The problem that I ran into turns out to not be in evaluating the data
and rules, but in parsing the arbitrary input equation. There
just isn't any general way inherent to LV to parse an arbitrary text
language into an intermediate form (like a postfix expression or an
abstract syntax tree). A relative lack of recursion makes it a
little more painful as well.
I can't release my code, but it essentially had three parts:
1. In a given rule in infix form (variableA<7, for instance),
perform macro replacement. Essentially, substitute values for
variable names, perform file lookups, etc.
2. Transform the substituted infix equation into a much easier to
deal with postfix equation. (Thanks to Mike Porter for this
suggestion as well). This step can be non-trivial. I'm
currently building an editor that will build equations more easily,
sparing my engineers much pain.
3. Evaluate the postfix equation for a single true/false
result. This algorithm should be available in many books, but I
adapted the one from an earlier version of this book:
http://www.amazon.com/gp/product/0201702975/qid=1137608429/sr=2-3/ref=pd_bbs_b_2_3/103-3337903-1387046?s=books&v=glance&n=283155
It also contains a short description of a stack-based parser that's fairly easy to implement for step 2.
Anyway, there's my 2 cents. Maybe someday I'll find time to write
that LV based parser generator to "simplify" all of this Good
luck!
Joe Z. -
Hi everybody,
Is it possible in a logic script to get the record saved for a member I_123456 and save it in a member of another dimension which is equal to the 6 right caracters of the first ID: I_123456 ---> 123456
Many thanks in advance,
AntonioHi,
From your example, it looks like I_123456 is from Intco dimension and 123456 is from entity dimension. I will take it as example. Your code should be something like:
*WHEN INTCO
*IS I_123456
*REC(ENTITY = 123456)
*ENDWHEN
In the above code "ENTITY = 123456" is fixed. We can make it dynamic by maintaining it as a property of the Intco dimension. In that case, the code will be like:
*WHEN INTCO
*IS I_123456
*REC(ENTITY = INTCO.ENTITY)
*ENDWHEN
Still, the statement "*IS I_123456" is fixed. The logic is running for only I_123456. You need to generalize it as per the requirement.
The above code will just create another record with entity as 123456. The original record, however, is not deleted.
Hope this helps.
Maybe you are looking for
-
Is there a way to create a coorporate account for Itunes?
Is there a way to create a coorporate account for Itunes?
-
Urgent Help - OBIEE11.1.1.6 SSO INTEGRATION WITH RSA CLEARTRUST
Can anyone help me what are the steps that need to be done to integrate OBIEE 11G Single sign on with RSA Clear trust. Any help will be appreciated
-
Stored procedure with database link with "from table(...)"
Hi guys, I've been told I can't create views on a database by the design team and so have to use this stored procedure to obtain the values. select HAN_ID, HAN_DS, GLOBAL_IN, LOCAL_IN from table(cast(ODADMIN.ODP00002_QUERY.Execute001@DBLINK(11312,'EN
-
I have some items in my download queue which apparently I can't remove.
I have some items in my download queue which apparently I can't remove. The items are large (several gigs in total) and I'd prefer to not have to download them, but am annoyed by the fact that it keeps wanting to resume downloading whenever I start i
-
I've found something out. If u download a tv show and convert it and then go to info> album:> and type in season 1> Options> video kind TV and wala it should be there. on ur ipod under tv