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

MDX formula error in BPC 10

Former Member
0 Likes
409

Dear All

we have updated a member formula for a member, while processing we are getting this error . please help

We are facing the issue while processing dimension after updating memberformula.

we have checked and noticed that already SAP note applied.

could you please help.

Here is the LGF file content

*FUNCTION fn_sa_54(SA_02,SA_104,SA_107,SA_110,SA_113,SA_116,SA_119,SA_122,SA_125,SA_128,SA_131,SA_134,SA_137,SA_140,SA_143,SA_146)

// SIFa - Contractor

// (All contractor actuals by precursor) / Exposure hours * 200,000

IIF([PR_ACCOUNT].[PARENTH1].[SA_02]=0,NULL,([PR_ACCOUNT].[PARENTH1].[SA_104]+[PR_ACCOUNT].[PARENTH1].[SA_107]+[PR_ACCOUNT].[PARENTH1].[SA_110]+[PR_ACCOUNT].[PARENTH1].[SA_113]+[PR_ACCOUNT].[PARENTH1].[SA_116]+[PR_ACCOUNT].[PARENTH1].[SA_119]+[PR_ACCOUNT].[PARENTH1].[SA_122]+[PR_ACCOUNT].[PARENTH1].[SA_125]+[PR_ACCOUNT].[PARENTH1].[SA_128]+[PR_ACCOUNT].[PARENTH1].[SA_131]+[PR_ACCOUNT].[PARENTH1].[SA_134]+[PR_ACCOUNT].[PARENTH1].[SA_137]+[PR_ACCOUNT].[PARENTH1].[SA_140]+[PR_ACCOUNT].[PARENTH1].[SA_143]+[PR_ACCOUNT].[PARENTH1].[SA_146])/[PR_ACCOUNT].[PARENTH1].[SA_02]*200000)

*ENDFUNCTION

and

memberformula

fn_sa_54(SA_02,SA_104,SA_107,SA_110,SA_113,SA_116,SA_119,SA_122,SA_125,SA_128,SA_131,SA_134,SA_137,SA_140,SA_143,SA_146)

Please help

thanks

Prasad

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

As I already mentioned - incorrect *FUNCTION syntax!

Please read help *FUNCTION / *ENDFUNCTION - SAP Business Planning and Consolidation, version for SAP NetWeaver - SAP ...

You function will be something like (no arguments!):

*FUNCTION fn_sa_54()

IIF([SA_02]=0,NULL,([SA_104]+[SA_107]+[SA_110]+[SA_113]+[SA_116]+[SA_119]+[SA_122]+[SA_125]+[SA_128]+[SA_131]+[SA_134]+[SA_137]+[SA_140]+[SA_143]+[SA_146])/[SA_02]*200000)

*ENDFUNCTION

And member formula:

fn_sa_54

Vadim

P.S. You don't need to prefix account dimension members with dim name...

Former Member
0 Likes

hi Vadim

thanks for the reply.

Actually we want to pass parameters. There are already some existing functions which have parameters and working fine.

please advise

thanks

Prasad

Former Member
0 Likes

Hi Vadim

even after i declare function with no parameters i am getting error while processing, MDX error

please advise

thanks

Prasad

former_member186338
Active Contributor
0 Likes

You can pass parameters, but not the way you are doing it!

You have:

fn_sa_54(SA_02,SA_104,SA_107,SA_110,SA_113,SA_116,SA_119,SA_122,SA_125,SA_128,SA_131,SA_134,SA_137,SA_140,SA_143,SA_146)

IIF([SA_02]=0,NULL,([SA_104]+...

Incorrect!

Correct is like:

*FUNCTION fn_sa_54(%P1%,%P2%,...)

IIF(%P1%=0,NULL,(%P2%+...)/%P1%*200000)

And you have to call this function in the member formula:

fn_sa_54([SA_02],[SA_104,],...)

Vadim

PLEASE READ HELP!

former_member186338
Active Contributor
0 Likes

Sorry, looks like you are doing something wrong!

But without detailed screenshots I am unable to help!

Vadim

Former Member
0 Likes
Former Member
0 Likes

hi vadim

got the error only that function

existing formulas worked well with the syntax i gave.

attached screenshots

please advise

thanks

prasad

former_member186338
Active Contributor
0 Likes

Sorry, but do you see the difference between my proposal:

fn_sa_54([SA_02],[SA_104],...)

And what I see on you screenshot:

fn_sa_54(SA_02,SA_104,...)

square brackets are not optional!

And where is the function text??? Not shown!

P.S. And where is the screenshot with the function file reference?

former_member186338
Active Contributor
0 Likes

Please read

Former Member
0 Likes

hi Vadim

even after changed the parameters in brackets also faced the same error.

There are other functions with similar syntax worked fine in that script logic.

ONly the below SA_54 added today which is not allowing to process dimension.

attached screen shots and complete lgf file.

please suggest

thanks

Prasad

former_member186338
Active Contributor
0 Likes

Sorry, but you functions are not correct!

The parameters are not used!

Please read

And do exactly as it's explained here!

P.S. What for you provide screenshot of the lgf scripts for the model???

The lgf with functions have to be located in the different place in UJFS...

And I still do not understand why you want to use parameters! No reason!

former_member186338
Active Contributor
0 Likes

P.P.S. And in the file: calc_pr_accounts.txt

there is no function fn_sa_54!!!!

former_member186338
Active Contributor
0 Likes

And you don't even need a function:

IIF([SA_02]=0,NULL,([SA_104]+[SA_107]+[SA_110]+[SA_113]+[SA_116]+[SA_119]+[SA_122]+[SA_125]+[SA_128]+[SA_131]+[SA_134]+[SA_137]+[SA_140]+[SA_143]+[SA_146])/[SA_02]*200000)

is only 171 character long!