cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic - Tax calculation

Former Member
0 Kudos

Hi BPC Gurus,

I am trying to calculate 30% of tax on profit after depreciation and then transfer the amount to Tax account . I have drafted the following script, but it is not working. I have PAD = Profit after depreciation and 489100 = Corporate Income Tax.

*WHEN P_ACCT

*IS PAD

REC(EXPRESSION=%VALUE%0.3, P_ACCT=489100)

*ENDWHEN

*COMMIT

Can you help and explain whats wrong in it and why its not working.

Regards,

KumarMG

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Are you getting any error?

How are you executing this script?

Try to validate and execute it in UJKT and let me know the result.

Former Member
0 Kudos

Hi Nilanjan,

I have tested in UJKT, the result is as follows.

APPSET:BPC_Planning

APPLICATION:PLANNING

[INFO] GET_DIM_LIST(): I_APPL_ID="PLANNING", #dimensions=10

CATEGORY,ENTITY,MEASURES,PCHARKF,PFLOW,P_ACCT,P_ACTIVITY,P_DATASRC,RPTCURRENCY,TIME

#dim_memberset=0

SCRIPT RUNNING TIME IN TOTAL:0.06 s.

Regards

KumarMG

Former Member
0 Kudos

Hi,

So, the script is running but not giving the correct result. Am I right?

Can you please explain what is that you are expecting and what is the result you are getting?

Former Member
0 Kudos

Hi Nilanjan,

For example if my company has a profit of Rs.1000000 after depreciation, I want 30% of PAD to be calculated automatically and then the amount to be transferred to Corporate Tax (489100).

Now as script is working in UJKT, but it is not calculating the tax amount at all i.e. Rs. 300000 and transfered to corporate tax.

Regards,

KumarMG

Former Member
0 Kudos

Hi,

What is the value, you can see, in Corporate Tax?

Former Member
0 Kudos

Hi Nilanjan,

The figure in the corporate tax is blank. Actually I am maintaning my COA in such a heirarchy where in PBDP,PAD,PAT, RE are calculated on the fly. Does this causes the problem in calculation?

Regards,

KumarMG

Former Member
0 Kudos

Hi,

The problem is you are working on transaction mode. And there is not transactional data for PAD (since it is a calculated member). You need to run your logic through master data mode. Please refer to the SAP note # 1474115 from SMP.

Hope this helps.

Former Member
0 Kudos

Hi Nilanjan,

I have gone thru SAP note. I have written script and got validet in UJKT. Even then also the tax is not calculated. May be my script colud be not appropriate or can I use dim ension formula also. If so pls give me link for the script logics and dimension formula. I am pasting the script and its validation in UJKT.

*XDIM_MEMBERSET TIME = 2012.TOTAL

*WHEN_REF_DATA = MASTER_DATA

*WHEN P_ACCT

*IS PAD

REC(EXPRESSION=%VALUE%1.30, P_ACCT=489100)

*ENDWHEN

*COMMIT

UJKT Validation:

APPSET:BPC_Planning

APPLICATION:PLANNING

[INFO] GET_DIM_LIST(): I_APPL_ID="PLANNING", #dimensions=10

CATEGORY,ENTITY,MEASURES,PCHARKF,PFLOW,P_ACCT,P_ACTIVITY,P_DATASRC,RPTCURRENCY,TIME

#dim_memberset=1

TIME:2012.TOTAL,1 in total.

SCRIPT RUNNING TIME IN TOTAL:0.07 s.

Regards

KumarMG

Former Member
0 Kudos

You can not use parenth member in memberset. You should add "BAS()" like following.

*XDIM_MEMBERSET TIME = BAS(2012.TOTAL)

Former Member
0 Kudos

Hi Kumar,

You said "PAD" is a calculated member .If it is a Dimension member formula, you know that values are calculated on fly (when we run the report) they are not saved in the data base. When you are running the script on data region where there is no data, I don't think it will bring any values.

In your case, better you go with Dimension member formula.

FORMULA for 489100= [PAD]*0.3

Thanks

Former Member
0 Kudos

FORMULA = [PAD]*0.3 // some how Paranthesis is not visible. you use PAD within the paranthesis.

Edited by: Rushendra Pemmasani on Jun 3, 2011 12:37 AM

Former Member
0 Kudos

Hi Nilanajan & Rushendra,

Thanks for the input. I have inserted the MDX logic in the script logic. It worked very well.The following is the script:

In the Script Logic:

[#489100]=[PAD]*0.30

and then included the script in Default and got the desired result.

Regards

KumarMG