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

Amount calculation with Data Manager

simon_kussmann
Participant
0 Likes
245

Hi,

I need to load transactional data from an Infocube and I want to calculate my BPC amount during my loading process.

I have several key figures available in my Infocube, but I want to calculate the amount on my own.

For example:

BPC amount = KF1 + KF2 / KF3....

Is there any possibility to do something like this with transformation or conversion files?

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Hi Simon,

Not possible with transformation or conversion... Can be done with routine badi! Or with post processing by script!

Vadim

simon_kussmann
Participant
0 Likes

Hi Vadim,

thanks!

So if I want to use post processing, I have to load all key figures to different dimension members and then calculate my result with script logic?

Are there any badi examples for doing something like this?

Simon

former_member186338
Active Contributor
0 Likes

"So if I want to use post processing, I have to load all key figures to different dimension members and then calculate my result with script logic?" - Correct!

"Are there any badi examples for doing something like this?"

Vadim

P.S. "and then calculate my result with script logic" - in some cases it's better to use dimension member formulas - for example if you need to show ratio KPI's

simon_kussmann
Participant
0 Likes

Hi Vadmin,

I am trying to use a member formula to calculate my result.

Due to the character limitation, I wanted to move this formula into an .lgf file.

Sth. like you already described here:

Member Formula. 255 Characters limitation and Option file

http://scn.sap.com/thread/3463627

But I don't need any If-Clause and just want to calculate one member.

member1 = member2/member3+member4...

How can I move this calculation into the .lgf file?

Thanks!

former_member186338
Active Contributor
0 Likes

Hi Simon,

If you have division in your formula then dimension member formula is the correct way! But do you really have an issue with 255 char limit? Please post the required formula here! And remember that for account type dimension you don't need to use "[DIMNAME]." prefix.

Vadim

simon_kussmann
Participant
0 Likes

Hi,

yes I have an issue with 255 char limit.

The calculation is based on 37 members, each with a length of 10 chars (-> 370)

e.g.: [0GAVV400]+[0GAVV401]/[0GAVV405].... (I don't have the complete formula yet)

former_member186338
Active Contributor
0 Likes

OK, if you are 100% sure that you will need 37 members (you can use parents by the way), then:

"But I don't need any If-Clause" - incorrect, you have to test for division by zero!

*FUNCTION KPICALC(%DIV%)

IIF(%DIV%=0,NULL,[0GAVV400]+[0GAVV401]/%DIV%...)

*ENDFUNCTION

And use this function in the member formula:

KPICALC([0GAVV405]);SOLVE_ORDER=10

Hope that 0GAVV400... are members of account type dimension (strange id's starting with 0)

Test with simple formula, then increase the complexity!

Vadim

simon_kussmann
Participant
0 Likes

Yes all members are account members.

It is possible to test the division by zero multiple times in one IIF-Clause?

Something like that:

*FUNCTION KPICALC(#0GAVV430%, %0GAVV475%)

IIF(%0GAVV430%=0 OR %0GAVV475%=0, NULL, XXXXXXX)

Thanks!

former_member186338
Active Contributor
0 Likes

Strange syntax: %0GAVV430% - is a variable, not a member! Member is [0GAVV430]

If you want to test multiple members to be all not zero you can multiply:

IIF([0GAVV430]*[0GAVV475]*[xxxx]=0,NULL,[...)

Vadim

former_member186338
Active Contributor
0 Likes

And you can use function without parameters like:

*FUNCTION KPICALC

IIF([0GAVV405]*[0GAVV430]=0,NULL,[0GAVV400]+[0GAVV401]/[0GAVV405]+[xxx]/[0GAVV430]+...)

*ENDFUNCTION

member formula:

KPICALC;SOLVE_ORDER=10

Vadim

Answers (0)