Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

Need help with a script to write data to multiple accounts

$
0
0

Hi,

 

the basic requirement:

 

we have a number of groups of accounts. For each group we need to check the total value and if the total value is negative, we need to adjust the accounts in that group and post their values to other accounts.

 

Let me build an example:

 

accountaccount.netaccgroupamountadjustment to be made
acc1acc7GRP01-100
acc2acc8GRP0150
acc3acc9GRP0175
acc4acc10GRP0225-25
acc5acc11GRP02-5050
acc6acc12GRP02-5050
acc7
acc8
acc9
acc10-25
acc1150
acc1250
WK_0125 (generated by BR)
WK_02-75 (generated by BR)

 

acc1, acc2 and acc3 are the first group and acc4,acc5,acc6 are the second group. At the moment I do not have hierarchy nodes for the group totals but I could add those in an additional hierarchy.

 

As the total for the accounts in GRP01 is positive (25) no adjustments need to be made on these accounts.

 

As the total for the accounts in GRP02 is negative (-75) the adjustments shown above need to be made on a separate datasource. The adjustment on each source account needs to be offset by an adjutsment on the account given in the netacc property for the source account.

 

My current attempt at a solution:

 

I use the account based calculation business rule to work out the total for each group and store it on an account but only on I_NONE so I only have one value.

 

I then tried this script

 

*SELECT(%WK_01%,[ID],"ACCOUNT","[DIMLIST_WK] = 'WK_01'")

*WHEN ACCOUNT *IS WK_01

*FOR %A% = %WK_01%

*WHEN ACCTDETAIL

*IS F_CHKSUM

*REC(EXPRESSION = ([ACCOUNT].[WK_01],[ACCTDETAIL].[F_CHKSUM]),ACCOUNT = %A%,ACCTDETAIL=F_CHKSUM,DATASRC=INPUT_WK)

*ENDWHEN

*NEXT

*ENDWHEN

 

However, that does not give me the result I am looking for, in fact, it doesn't seem to be doing anything. Can anyone help me?

 

Thanks

Arnold


Viewing all articles
Browse latest Browse all 5414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>