Skip to Content
0

BADI for Adjustments

May 02 at 02:42 PM

55

avatar image

Hi all,

We are on BPC 10.1 HANA- EPM 28 and we have a scenario where an Input Form performs the adjustments. For this the business wants to utilize a BADI.

Scenario:

Set up:

ModelName: DevPlan

EnvironName: Sys1

5 dimensions.

Department - Has the dimension members needed for the adjustments

Input Form Set up:

Report1 :

Account1 Account2

Department 1 100 1000

Department 2 200 2000

Input Form 1:

Account 1 Account2

Percentage (Stored) 5% 2%

Adjustment_Dep 1 5 20

Adjustment 2_Dep 2 10 40

When the data in the input form is saved, the badi should deduct the adjustments from the department and post a value : (Account1, Department1)- (Account1, Adjustment_dep1 ) : 95 in this scenario. The adjustments apply for all the accounts.

Now I have looked at two options:

1) through Custom logic

2) through writeback - I think this is appropriate, please advice me if it is otherwise

With Writeback, I have seen the Method in PreProcess Writeback badi

What are the changes I need to do to implement something like this? How can the Method be changed i.e. to perform the calculation and write it back to the Department 1 member?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vadim Kalinin May 04 at 05:22 PM
1

Looks like you are doing something overcomplicated :)

Create a property ADJTARGET and fill it for DepartmentXXX_ADJ with the corresponding DepartmentXXX

Then script default.lgf:

*LOOKUP DevPlan
*DIM TGT:DEPARTMENT=DEPARTMENT.ADJTARGET //get target department value
*ENDLOOKUP

*SELECT(%ADJ%,ID,DEPARTMENT,ADJTARGET<>'') //Not empty property!
*WHEN DEPARTMENT
*IS %ADJ% //only for DepartmentXXX_ADJ
*REC(EXPRESSION=LOOKUP(TGT)-%VALUE%,DEPARTMENT=DEPARTMENT.ADJTARGET)
*ENDWHEN

Easy!

Show 1 Share
10 |10000 characters needed characters left characters exceeded

P.S. Please read my blog about default.lgf:

https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/

1
Vadim Kalinin May 03 at 07:06 AM
1

Sorry, the required logic is very simple, why do you need a badi at all? Just use a simple script in default.lgf

For complex calculations it's better to use write back badi. Write back badi will get data before writing to the cube and you can generate new records to save.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks.

I am trying to think of a logic script for this too. There is one issue with this though.. we don't have a relationship between the department and the adjustment department to scope it in properly. I mean Department1 has Department1_ADJ as the suffix for its corresponding adjustment member and nothing else in terms of properties. I am trying to think how we can manipulate the data in the logic script if we have a situation like this. We do have a property called "adjustments" that does filter out the departments that are adjustments related. I would assume using *select to filter out the departments I guess.

0