0
Jan 26, 2016 at 02:13 PM

# Script Logic issue: Settlement Rule

20 Views

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