on 01-21-2015 4:04 PM
Dear All,
I am trying to make a data manager package that calls a script that should copy from one model(app) to another.
In model A(Operational) I have a operational entity dimension called O_Entity in model B(Consolidation) I have a Legal entity dimension called Entity. The dimensions is not shared between the models(apps). Model A have a property(L_Entity) in O_Entity that contains the values of model B's Entities.
I want the end user to be able to trigger this script by selecting Legal entity in model B, that should then call a script in model B that calls a script in model A with runlogic function.
I run for the data manager package in model B with Entity L46736.
I get the following error message:
(Member selection)
Entity: L46736
[Message]
--------------------------------------------------------------
Execute formulasError
Invalid instruction: *FUNCTION $MYENTITY$=[ENTITY] IN (N'L46736')
Please see data manager package and script logic below.
I am open to other solutions if there are any other suggestions on how to handle this.
PROMPT(SELECT,%SRCENTITY%, , "Select Legal Entity",%ENTITY_DIM%)
TASK(Execute formulas,FORMULASCRIPT,*FUNCTION $MYENTITY$=%SRCENTITY%)
TASK(Execute formulas,LOGICFILE,%ModelPath%\..\AdminApp\%Model%\GET_DATA_FROM_OPER.lgf)
TASK(Execute formulas,RUNMODE,1)
TASK(Execute formulas,LOGICMODE,1)
TASK(Execute formulas,CHECKLCK,1)
Script Logic in model B - GET_DATA_FROM_OPER.LGF
---------------------------------------------------------------------------------------------------------
// GET DATA FROM OPERATIONAL
**SELECT(%O_ENTITIES%, "[ID]", "O_ENTITY", "[L_ENTITY]='$MYENTITY$' ")
// STEP 1 - GET DATA
*RUNLOGIC
*APP=OPERATIONAL
*LOGIC=PUSH_TO_CONSOL_LOCAL
*DIMENSION O_ENTITY = %O_ENTITIES%
*ENDRUNLOGIC
Script Logic in model A - PUSH_TO_CONSOL_LOCAL.LGF
---------------------------------------------------------------------------------------------------------
*DESTINATION_APP=CONSOLIDATION
*RENAME_DIM O_AUDITTRAIL=AUDITID
*RENAME_DIM O_ACCOUNT=ACCOUNT
*RENAME_DIM O_ENTITY=ENTITY
*RENAME_DIM O_COST_CENTER = FLOW
*ADD_DIM CONSOSCOPE=G_NONE
*ADD_DIM INTERCO = I_NONE
*SKIP_DIM=O_COUNTERPART
*SKIP_DIM=O_PRODUCT
*SKIP_DIM=XTRANSACTIONCURRENCY
*SKIP_DIM=O_SUB_ENTITY
*XDIM_MEMBER CATEGORY = ACTUAL
*XDIM_MEMBER TIME = 2014.OCT
*XDIM_MEMBERSET O_AUDITTRAIL = INPUT,OUTSIDE_LINE
*XDIM_MEMBER CURRENCY=LC
*XDIM_MEMBERSET O_ACCOUNT=<ALL>
*SELECT(%DESTENTS%, "[ID]", "O_ENTITY", "[L_ENTITY]<>' ' and [L_ENTITY] in (select ID from mbrEntity) and [ID]='%O_ENTITY_SET%' ")
*XDIM_MEMBERSET O_ENTITY=%DESTENTS%
*WHEN O_ACCOUNT.ACCTYPE
*IS AST,LEQ
*REC(O_ACCOUNT=O_ACCOUNT.ACCOUNT,O_ENTITY=O_ENTITY.L_ENTITY,O_AUDITTRAIL=INPUT,O_COST_CENTER=F99)
*ELSE
*REC(O_ACCOUNT=O_ACCOUNT.ACCOUNT,O_ENTITY=O_ENTITY.L_ENTITY,O_AUDITTRAIL=INPUT,O_COST_CENTER=PL99)
*ENDWHEN
*COMMIT
Brgds
Mattias
Solution:
Data manager script modified to:
------------------------------------------------
PROMPT(SELECTINPUT,,,"Please select category, time and entity to get from OPERATIONAL Reporting","CATEGORY,TIME,ENTITY")
TASK(Execute formulas,USER,%USER%)
TASK(Execute formulas,Environment,%Environment%)
TASK(Execute formulas,Model,%Model%)
TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
TASK(Execute formulas,LOGICFILE,%ModelPath%\..\AdminApp\%Model%\GET_DATA_FROM_OPER.LGF)
TASK(Execute formulas,RUNMODE,1)
TASK(Execute formulas,LOGICMODE,1)
TASK(Execute formulas,CHECKLCK,1)
Script Logic in model B - GET_DATA_FROM_OPER.LGF modified to:
--------------------------------------------------------------------------------------------------
// GET DATA FROM OPERATIONAL
// STEP 1 - GET DATA
**SELECT(%O_ENTITIES%, "[ID]", "O_ENTITY", "[L_ENTITY]='%ENTITY_SET%' ")
*RUNLOGIC
*APP=OPERATIONAL
*LOGIC=PUSH_TO_CONSOL_LOCAL
*DIMENSION CATEGORY = %CATEGORY_SET%
*DIMENSION TIME = %TIME_SET%
*DIMENSION O_ENTITY = %O_ENTITIES%
*DIMENSION ENTITY= //Must be there to exclude ENTITY since it doesn't exist in OPERATIONAL, the script logic validator don't like it but from data manager it works
*ENDRUNLOGIC
// STEP 2 - RUN DEFAULT LOGIC
*INCLUDE DEFAULT.LGX
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mattias,
Have you tried to ude SELECTINPUT in the PROMPT:
PROMPT(SELECTINPUT,%SRCENTITY%, , "Select Legal Entity",%ENTITY_DIM%)
instead of SELECT?
TKS
Dina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.