on 03-25-2015 3:56 PM
Limiting Default Script to Specific Entity
Hi Experts
I created a manual task (copy of Default) that executes the default script. I would like to limit to a specific ENTITY. However, it runs for all entities.
Below is the DM script I used and part of the default script (it runs 2 separate ABC to calculate Net Income and the variation F15 flow).
The script does not limit to entity – even when I hard code the entity value and run in UJKT.
Any way to limit?
1) Added ENTITY_DIM
DM Script:
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%ENTITY_DIM%,%TIME_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,DEFAULT_AUTOMATIC.LGF )
// DEFAULT_AUTOMATIC.LGF 23/3/15 SETUP TO RUN BY DM TASK
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
ENTITY = %ENTITY_SET%
CURRENCY = %CURRENCY_SET%
TID_RA = %TIME_SET%
SCOPE = S_NONE
CALC=NETINCOMESPLIT2
*ENDRUN_PROGRAM
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
ENTITY = %ENTITY_SET%
CURRENCY = %CURRENCY_SET%
TID_RA = %TIME_SET%
SCOPE = S_NONE
CALC = TBS
*ENDRUN_PROGRAM
Hi Eyal,
Change your logic to:
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
TID_RA = %TIME_SET%
GROUPS = S_NONE
CALC=NETINCOMESPLIT2
OTHER=[ENTITY = %ENTITY_SET%;CURRENCY = %CURRENCY_SET%]
*ENDRUN_PROGRAM
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
TID_RA = %TIME_SET%
GROUPS = S_NONE
CALC = TBS
OTHER=[ENTITY = %ENTITY_SET%;CURRENCY = %CURRENCY_SET%]
*ENDRUN_PROGRAM
Let me know how it goes
BR,
Hendry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for your helpful responses.
1) Hendri/Vadim - I ran the script as below via 2 tests below. It runs the script and filters on the category currency and time as expected but not entity. To verify I loaded
data in different currencies, periods and another category and confirmed the script did not update that data.
2) The name of the entity dimension is ENTITY as per the script logic.
3) If I use this script in UJKT and hard code the entity value e.g. ENTITY = 3521, it still runs for the 3 entities regardless of whether I limit the entity.
This leads me to believe that the default script code does not allow for limiting to ENTITY. See script below for UJKT (TEST 3)
4) There's no BADI involved here, straight ABC and script logic
Ideas?
Thanks again.
Eyal
TEST 1
// DEFAULT_AUTOMATIC.LGF 23/3/15 SETUP TO RUN BY DM TASK
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
TID_RA = %TIME_SET%
SCOPE = S_NONE
OTHER [CURRENCY = %CURRENCY_SET%;ENTITY=%ENTITY_SET%]
CALC = NETINCOMESPLIT2
*ENDRUN_PROGRAM
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
OTHER [ENTITY=%ENTITY_SET%;CURRENCY=%CURRENCY_SET%]
TID_RA = %TIME_SET%
SCOPE = S_NONE
CALC = TBS
*ENDRUN_PROGRAM
TEST 2
// DEFAULT_AUTOMATIC.LGF 23/3/15 SETUP TO RUN BY DM TASK
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
//ENTITY = %ENTITY_SET%
CURRENCY = %CURRENCY_SET%
TID_RA = %TIME_SET%
SCOPE = S_NONE
OTHER [ENTITY=%ENTITY_SET%]
CALC = NETINCOMESPLIT2
*ENDRUN_PROGRAM
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
//ENTITY = %ENTITY_SET%
CURRENCY = %CURRENCY_SET%
TID_RA = %TIME_SET%
SCOPE = S_NONE
OTHER [ENTITY=%ENTITY_SET%]
CALC = TBS
*ENDRUN_PROGRAM
TEST 3
As run in UJKT:
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
CATEGORY = ACTUAL
ENTITY = 3521
CURRENCY = USD
TID_RA = 2015.12
SCOPE = S_NONE
CALC = NETINCOMESPLIT2
*ENDRUN_PROGRAM
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = ACTUAL
ENTITY = 3521
CURRENCY = USD
TID_RA = 2015.12
SCOPE = S_NONE
CALC = TBS
*ENDRUN_PROGRAM
Hi Vadim,
Just to correct:
OTHER = [ENTITY=%ENTITY_SET%;CURRENCY = %CURRENCY_SET%]
CURRENCY has to be defined before, as:
CURRENCY = %CURRENCY_SET%
Look on the help: Account-based Calculations as Script Logic - SAP Business Planning and Consolidation, version for SA...
Vadim
Hi Eyal,
Please provide the REAL name of the ENTITY type dim!
Then use the real name in
OTHER=[ENTITY = %ENTITY_SET%]
CURRENCY = %CURRENCY_SET% - correct!
Anyway, look on the syntax here:Account-based Calculations as Script Logic - SAP Business Planning and Consolidation, version for SA...
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eyal,
Can you please elaborate in detail.
1. What is the use of DM Script, though you r passing hard coded values.
2. if you used DM package, you need to run through RUN package and passed the values from there
3. If you wanna go with the DM package and want to check your values, please implement UJ_CUSTOM_LOGIC BADI
and write the below code in logic script.
*START_BADI XYZ (your BADI Filter name)
QUERY = ON
WRITE = ON
VERSION = %VERSION_SET%
ENTITY = %COMPANY_CODE_SET%
TIME = %YEAR%
*END_BADI
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
2 | |
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.