on 2016 Jan 26 2:13 PM
Hi Experts,
we have an issue on calculating the percentage from two different audittrail.
let me explain the requirement:
We have a model A, where we have data for two different auditsource i,e. PROJECT and PERCENT,
in our model we have three different percentage available, 100, 33.33 and 33.34
once the script runs,we need to put the calculated percentage amount to a new Auditsource-SETTLEMENT shown below.
| WBS | ACCOUNT | ENTITY | PROFITCENTER | AUDITTRAIL | AMOUNT |
| 1234 | 78956 | EN1100 | PC111 | PROJECT | 100 |
| WBS | ACCOUNT | ENTITY | PROFITCENTER | AUDITTRAIL | AMOUNT |
| 1234 | 45678 | EN1100 | PCNONE | PERCENT | 33.33 |
| RESULT-AFTER SCRIPT | |||||
| WBS | ACCOUNT | ENTITY | PROFITCENTER | AUDITTRAIL | AMOUNT |
| 1234 | 45678 | EN1100 | PCNONE | SETTLEMENT | 100*33.33/100 |
But our script generates three records instead of one:
*XDIM_MEMBERSET ACCOUNT = BAS(FCON)
*XDIM_MEMBERSET ASSET = BAS(ALL_ASSETS)
*XDIM_MEMBERSET ASSETCLASS = NOASSETCLASS
*XDIM_MEMBERSET AUDITPC = PERCENT,PROJECT
*XDIM_MEMBERSET CATEGORY = FORECAST
*XDIM_MEMBERSET CUSTOMER = BAS(ALLCUSTOMERS)
*XDIM_MEMBERSET ENTITY = BAS(ENTOTAL)
*XDIM_MEMBERSET PROFIT_CENTER = BAS(PCH1)
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET WBS = BAS(ALLWBS)
*WHEN AUDITPC
*IS PERCENT
*FOR %LV_ENTITY% = EN2100,EN2200,EN2500
*REC(EXPRESSION = (%VALUE%/100)*([ACCOUNT].[699511],[AUDITPC].[PROJECT],[PROFIT_CENTER].[PCNONE],[ENTITY].[EN2400]),AUDITPC = SETTLEMENT,ENTITY = %LV_ENTITY%)
*NEXT
*ENDWHEN
*COMMIT
Request clarification before answering.
in few cases the entities are different for both the Auditsource, but the WBS will be same.
the script mentioned above is for three different Entities with three different profit centers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but was is the logic for ENTITY? Why do you use FOR/NEXT for 3 entities?
In your explanation sample ENTITY is not changed!
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 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.