cancel
Showing results for 
Search instead for 
Did you mean: 

BPC reverse sign in database and BADI for LEQ accounts

abagrevatil
Explorer
0 Kudos

Hello everyone,

we have a problem with sign for LEQ accounts: in database we have, for example, 321456 but when calling the BADI (in ct_data table), -321456

To solve this issue, we create custom measure (copy of PERIODIC through UJA_MAINTAIN_MEASURE_FORMULA program) and remove negative signs for LEQ and INC accounts. However, when calling BADI through UJKT and setting ZPERIODIC as value of MEASURES parameter, we receive this error:

UJO_READ: MDX declaration error: Cannot use more than one hierarchy per dimension

Someone knows why this occur?

Do we need to configure other settings to solve the reverse signs problem?

Is the only solution multiplying LEQ accounts amount by -1 in BADI?

The EPM version is 10.0 SP 26

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

OK, I will explain with a sample:

The model is PERIODIC

ACCOUNT A1 - ACCTYPE LEQ

In RSA1 you have: 321456

In EPM report: -321456

In script logic BADI call:

If you scope:

*XDIM_MEMBERSET MEASURES = PERIODIC

in ct_data: -321456

If:

*XDIM_MEMBERSET MEASURES = SIGNEDDATA

in ct_data: 321456

If no scope for MEASURES - equivalent to SIGNEDDATA

in ct_data: 321456

You don't need any custom measures!

former_member186338
Active Contributor
0 Kudos

P.S. Please show your script with badi call and provide the model default storage type (PERIODIC or YTD)!

former_member186338
Active Contributor
0 Kudos

Some screenshots:

Report for LEQ account:

RSA1 data:

Script code:

*XDIM_MEMBERSET MEASURES=PERIODIC

*START_BADI WRITE_ZERO
DEBUG=ON
QUERY=ON
WRITE=OFF
*END_BADI

Debug result:

Script code:

*XDIM_MEMBERSET MEASURES=SIGNEDDATA

*START_BADI WRITE_ZERO
DEBUG=ON
QUERY=ON
WRITE=OFF
*END_BADI

Debug result:

Script code:

// No explicit *XDIM_MEMBERSET MEASURES=...

*START_BADI WRITE_ZERO
DEBUG=ON
QUERY=ON
WRITE=OFF
*END_BADI

Debug result:

abagrevatil
Explorer
0 Kudos

Wow, it works!

The script code that we were using:

*XDIM_MEMBERSET MEASURES = PERIODIC

*START_BADI ALLOCATION_FUNDING
TIME = 2016.04
*END_BADI

I debug both, with SIGNEDDATA value and without MEASURES parameter and the amount it's what we need!

Большое спасибо Вадим! (So much thank's Vadim!)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Ups, strange...

"in database we have, for example, 321456" - may be not in database but in report?

INC and LEQ accounts are shown in the report with reverted sign (look on the standard measure formula).

In database (SIGNEDDATA) you have original signs...

What do you want to calculate in the badi?

abagrevatil
Explorer
0 Kudos

With this "in database we have, for example, 321456" I mean the data available in RSA1. Here we have one sign and receive in BADI the reversed (as shown in EPM).

We need to calculate the amount aggregation for all accounts for every TIME.

Thanks for answering!