cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Script Logic issue: Settlement Rule

Former Member
0 Kudos
156

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.

WBSACCOUNTENTITYPROFITCENTERAUDITTRAILAMOUNT
123478956EN1100PC111PROJECT100
WBSACCOUNTENTITYPROFITCENTERAUDITTRAILAMOUNT
123445678EN1100PCNONEPERCENT33.33
RESULT-AFTER SCRIPT
WBSACCOUNTENTITYPROFITCENTERAUDITTRAILAMOUNT
123445678EN1100PCNONESETTLEMENT100*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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

You have to explain full entity logic! If entity are not changed you don't need FOR loop for entities.

Former Member
0 Kudos

I removed FOR loop and it did worked.

thank you so much.

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

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