Skip to Content

CONDITIONAL SCRIPT LOGIC

Hello Experts,


I want to perform simple calculation.

eg: if the GL(GW) has positive balance, it should be posted in (A01) and if it has negative balance, it should be posted in (L02L)


But while performing the same logic, I am facing a strange issue when using conditional logic. My script logic is:

*XDIM_MEMBERSET CATEGORY =Actual

*XDIM_MEMBERSET AUDITTRAIL=AJ_COI

*XDIM_MEMBERSET ACCOUNT_C=GW

*XDIM_MEMBERSET TIME= 2012.12

*XDIM_MEMBERSET SCOPE=G_CGG01

*XDIM_MEMBERSET RPTCURRENCY =INR

*XDIM_MEMBERSET FLOW=F_999

*XDIM_MEMBERSET INTERCO=I_NONE

*XDIM_MEMBERSET PROFIT_CENTER=PC_7007

*XDIM_MEMBERSET COST_CENTER=CC_7007

*XDIM_MEMBERSET ENTITY=1000

*XDIM_MEMBERSET SEGMENT=10

[ACCOUNT_C].[#A01]=([ACCOUNT_C].[GW]>0?[ACCOUNT_C].[A01]:0)

[ACCOUNT_C].[#1011]=([ACCOUNT_C].[GW]<0?[ACCOUNT_C].[1011]:0)

*COMMIT.


I have entered the following data:

ACCOUNT_CAUDITTRAILCOSTCENTERENTITYFLOW INTERCOPROFITCENTERCURRENCYSCOPESEGMENT2012.12 GWAJ_COICC_70071000F_999I_NONEPC_7007INRG_CGG0110100

I am getting the following message while running the above script in UJKT.

Error Message:

*XDIM_MEMBERSET CATEGORY =Actual

*XDIM_MEMBERSET AUDITTRAIL=AJ_COI

*XDIM_MEMBERSET ACCOUNT_C=GW

*XDIM_MEMBERSET TIME= 2012.12

*XDIM_MEMBERSET SCOPE=G_CGG01

*XDIM_MEMBERSET RPTCURRENCY =INR

*XDIM_MEMBERSET FLOW=F_999

*XDIM_MEMBERSET INTERCO=I_NONE

*XDIM_MEMBERSET PROFIT_CENTER=PC_7007

*XDIM_MEMBERSET COST_CENTER=CC_7007

*XDIM_MEMBERSET ENTITY=1000

*XDIM_MEMBERSET SEGMENT=10

[ACCOUNT_C].[#A01] =([ACCOUNT_C].[GW]>0?[ACCOUNT_C].[A01]:0)

[ACCOUNT_C].[#1011] =([ACCOUNT_C].[GW]>0?[ACCOUNT_C].[1011]:0)

*COMMIT

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

LOG BEGIN TIME:2015-10-21 00:11:28

FILE:\ROOT\WEBFOLDERS\\ADMINAPP\Consolidation\TEST.LGF

USER:

APPSET:

APPLICATION:Consolidation

FORMULA : [ACCOUNT_C].[A01]=([ACCOUNT_C].[GW]>0?[ACCOUNT_C].[A01]:0)

FORMULA : [ACCOUNT_C].[1011]=([ACCOUNT_C].[GW]>0?[ACCOUNT_C].[1011]:0)

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 1.00 ms. 1 RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

2 RECORDS ARE GENERATED.

CALCULATION END.

DATA TO WRITE BACK:

ACCOUNT_C AUDITTRAIL CATEGORY COST_CENTER ENTITY FLOW INTERCO PROFIT_CENTER RPTCURRENCY SCOPE SEGMENT TIME SIGNEDDATA

A01 AJ_COI Actual CC_7007 1000 F_999 I_NONE PC_7007 INR G_CGG01 10 2012.12 0.00

1011 AJ_COI Actual CC_7007 1000 F_999 I_NONE PC_7007 INR G_CGG01 10 2012.12 0.00

2 RECORDS HAVE BEEN WRITTEN BACK.

WRITING TIME :0.00 ms.

SCRIPT RUNNING TIME IN TOTAL:1.00 s.

LOG END TIME:2015-10-21 00:11:29

Regards,

Rahul Periwal

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 20, 2015 at 07:32 PM

    Hi Rahul,

    Instead of MDX use WHEN/ENDWHEN:

    *XDIM_MEMBERSET CATEGORY =Actual

    *XDIM_MEMBERSET AUDITTRAIL=AJ_COI

    *XDIM_MEMBERSET ACCOUNT_C=GW

    *XDIM_MEMBERSET TIME= 2012.12

    *XDIM_MEMBERSET SCOPE=G_CGG01

    *XDIM_MEMBERSET RPTCURRENCY =INR

    *XDIM_MEMBERSET FLOW=F_999

    *XDIM_MEMBERSET INTERCO=I_NONE

    *XDIM_MEMBERSET PROFIT_CENTER=PC_7007

    *XDIM_MEMBERSET COST_CENTER=CC_7007

    *XDIM_MEMBERSET ENTITY=1000

    *XDIM_MEMBERSET SEGMENT=10

    *WHEN ACCOUNT

    *IS *

    *REC(EXPRESSION=(%VALUE%>0) ? %VALUE% : 0, ACCOUNT=A01)

    *REC(EXPRESSION=(%VALUE%<0) ? %VALUE% : 0, ACCOUNT=L02L) //or 1011??

    *ENDWHEN

    Vadim

    P.S. GW has to be base account!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.