on 2018 Nov 26 10:14 PM
Hi,
Looking for script logic to sum records then divide and store in separate Account.
Formula : (A+B) / (C+D) = E
(12846+957)/(8.05+0.6)=1595.72
INV_ACCOUNTINCOTERMSSIGNEDDATASP_CCCIF12,846SP_CCCFR957SALESCIF8.05SALESCFR0.6
Sorry, but the info is still missing! No info about dimensions and hierarchy...
Look on:
([INV_ACCOUNT].[SP_QTY_STOCK],[AUDITTRAIL].[%C1%])
aggregation for INCOTERMS is missing
Has to be:
([INV_ACCOUNT].[SP_QTY_STOCK],[AUDITTRAIL].[%C1%],[INCOTERMS].[SOME_PARENT])
Where SOME_PARENT is a parent for CFR, CIF...
Not 100% sure due to missing info
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
SAP_BW 740 0013 SAPKW74013
CPMBPC 801 0010 SAPK-80110INCPMBPC CPM Business Planning and Consolidation
The current logic script is giving incorrect results where the issue has been identified due to multiple records of INCOTERMS. The formula should be as follows:
sum(SP_CC_MFG_REVAL) / sum(SP_QTY_STOCK) = MFG_REVAL_RATE
Incorrect Result : PFA Screenshot where the value in MFG_REVAL_RATE should be 13803.9521079/8.6529960 =
1595.280075005235, but it doubles as below script works like this formula A/B+C/D=E due to multiple records with difference in INCOTERMS
*SELECT (%START_MONTH%, START_MONTH, VERSION, ID = %VERSION_SET%)
*SELECT (%END_MONTH%, END_MONTH, VERSION, ID = %VERSION_SET%)
*SELECT (%TIME%, ID, TIME, ID >= %START_MONTH% AND ID <= %END_MONTH% AND CALC = N)
*XDIM_MEMBERSET TIME = %TIME%
*XDIM_MEMBERSET VERSION = %VERSION_SET%
*XDIM_MEMBERSET INV_ACCOUNT = SP_CC_MFG_REVAL
*XDIM_MEMBERSET RPTCURRENCY = GC
*XDIM_MEMBERSET AUDITTRAIL = BAS(INV_VALUATION)
*XDIM_MEMBERSET INV_FLOW = SALES_COGS
*XDIM_MEMBERSET AUDITTRAIL AS %AUDIT% = BAS(INV_COGS_AGING)
*FOR %C1% = %AUDIT%
*WHEN INV_ACCOUNT
*IS SP_CC_MFG_REVAL
*REC(EXPRESSION = %VALUE%/([INV_ACCOUNT].[SP_QTY_STOCK],[AUDITTRAIL].[%C1%]), INV_ACCOUNT = MFG_REVAL_RATE, AUDITTRAIL = %C1%, INCOTERMS = NO_INCOTERMS, SALES_CHANNEL = NO_SALES_CHANNEL)
*ENDWHEN
*NEXT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but looks like you don't want to read my blog - as a result I am unable to answer your question!
"4. Clearly identify the purpose of the script: to run as default.lgf or to be launched by DM package (different calculation logic!). Please, ALWAYS answer this question!!!!"
And data sample is missing! RSA1 is not the right way to show figures. Use report.
Please read my blog: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues
and provide required info!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
SAP_BW 740 0013 SAPKW74013
CPMBPC 801 0010 SAPK-80110INCPMBPC CPM Business Planning and Consolidation
The current logic script is giving incorrect results where the issue has been identified due to multiple records of INCOTERMS. The formula should be as follows:
sum(SP_CC_MFG_REVAL) / sum(SP_QTY_STOCK) = MFG_REVAL_RATE
Incorrect Result : PFA Screenshot where the value in MFG_REVAL_RATE should be 13803.9521079/8.6529960 =
1595.280075005235, but it doubles as below script works like this formula A/B+C/D=E due to multiple records with difference in INCOTERMS
*SELECT (%START_MONTH%, START_MONTH, VERSION, ID = %VERSION_SET%)
*SELECT (%END_MONTH%, END_MONTH, VERSION, ID = %VERSION_SET%)
*SELECT (%TIME%, ID, TIME, ID >= %START_MONTH% AND ID <= %END_MONTH% AND CALC = N)
*XDIM_MEMBERSET TIME = %TIME%
*XDIM_MEMBERSET VERSION = %VERSION_SET%
*XDIM_MEMBERSET INV_ACCOUNT = SP_CC_MFG_REVAL
*XDIM_MEMBERSET RPTCURRENCY = GC
*XDIM_MEMBERSET AUDITTRAIL = BAS(INV_VALUATION)
*XDIM_MEMBERSET INV_FLOW = SALES_COGS
*XDIM_MEMBERSET AUDITTRAIL AS %AUDIT% = BAS(INV_COGS_AGING)
*FOR %C1% = %AUDIT%
*WHEN INV_ACCOUNT
*IS SP_CC_MFG_REVAL
*REC(EXPRESSION = %VALUE%/([INV_ACCOUNT].[SP_QTY_STOCK],[AUDITTRAIL].[%C1%]), INV_ACCOUNT = MFG_REVAL_RATE, AUDITTRAIL = %C1%, INCOTERMS = NO_INCOTERMS, SALES_CHANNEL = NO_SALES_CHANNEL)
*ENDWHEN
*NEXT
User | Count |
---|---|
13 | |
4 | |
3 | |
2 | |
2 | |
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.