Skip to Content
0
Former Member
May 19, 2015 at 03:48 AM

Help with Script logic

22 Views

Hi,

We are working on SAP BPC 10.1 NW version on HANA. I need your help regarding script logic. I am executing the following code which get the Year from the Category dimension and then uses it in script logic to get the sum of sales 3 years prior and 2 years prior. It also gets the sum of sales for a particular period specified in the For loop 3 years and 2 years prior. When I executes the following code, it multiplies the value (sales) by 28 times sometimes 25 times etc.Please help!!! Kindly find attached the log files.

*SELECT(%YR%,"[YEAR]",CATEGORY,"[ID] = BUDGET")

*XDIM_MEMBERSET CATEGORY = ACTUAL

// *XDIM_MEMBERSET ACCOUNT = BAS(FS0132), BAS(FS0133)

*XDIM_MEMBERSET ACCOUNT = 400000

*XDIM_MEMBERSET PROFIT_CENTER = PC_101004, PC_101001

*XDIM_MEMBERSET DATATYPE=DT_CURRENCY

*XDIM_MEMBERSET COST_CENTER=CC_NONE

*XDIM_MEMBERSET INTERCO=I_NONE

*XDIM_MEMBERSET MEMBER_VENDOR AS %MEM% = BAS(MEMBER)

*WHEN ACCOUNT

*IS 400000

*WHEN PROFIT_CENTER

*IS PC_101004

*WHEN MEMBER_VENDOR

*IS %MEM%

*FOR %MYPER% = %YR%.01,%YR%.02,%YR%.03,%YR%.04,%YR%.05,%YR%.06,%YR%.07,%YR%.08,%YR%.09,%YR%.10,%YR%.11,%YR%.12

*REC(EXPRESSION = ([TIME].[TMVL(-36,%YR%.01)] + [TIME].[TMVL(-36,%YR%.02)] + [TIME].[TMVL(-36,%YR%.03)] + [TIME].[TMVL(-36,%YR%.04)] + [TIME].[TMVL(-36,%YR%.05)] + [TIME].[TMVL(-36,%YR%.06)] + [TIME].[TMVL(-36,%YR%.07)] + [TIME].[TMVL(-36,%YR%.08)] + [TIME].[TMVL(-36,%YR%.09)] + [TIME].[TMVL(-36,%YR%.10)] + [TIME].[TMVL(-36,%YR%.11)] + [TIME].[TMVL(-36,%YR%.12)] + [TIME].[TMVL(-24,%YR%.01)] + [TIME].[TMVL(-24,%YR%.02)] + [TIME].[TMVL(-24,%YR%.03)] + [TIME].[TMVL(-24,%YR%.04)] + [TIME].[TMVL(-24,%YR%.05)] + [TIME].[TMVL(-24,%YR%.06)] + [TIME].[TMVL(-24,%YR%.07)] + [TIME].[TMVL(-24,%YR%.08)] + [TIME].[TMVL(-24,%YR%.09)] + [TIME].[TMVL(-24,%YR%.10)] + [TIME].[TMVL(-24,%YR%.11)] + [TIME].[TMVL(-24,%YR%.12)]), TIME = TMVL(0,%MYPER%), ACCOUNT = "PRIOR_YR_SALES", MEMBER_VENDOR = "MV_NONE", DATATYPE = "DT_CURRENCY", CATEGORY = "BUDGET", AUDITTRAIL = "SEASONALITY_ADJ")

*REC(EXPRESSION = ([TIME].[TMVL(-36,%MYPER%)] + [TIME].[TMVL(-24,%MYPER%)]), TIME = TMVL(0,%MYPER%), ACCOUNT = "TWO_PRIOR_PERIOD_SALES", DATATYPE = "DT_CURRENCY", CATEGORY = "BUDGET", AUDITTRAIL = "SEASONALITY_ADJ", MEMBER_VENDOR = "MV_NONE")

*NEXT

*ENDWHEN

*ENDWHEN

*ENDWHEN

*COMMIT

Attachments

LGX.txt.zip (2.2 kB)