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

WRITE BACK BADI and Custom Logic

0 Likes
2,945

Hi Guys,

I need suggestion on the WRITE Back BADI Vs Custom Logic BADI.

1st Step:

For example I need to do some calculation which has to applied for the whole category - FORECAST . The logic will be in a custom logic BADI and I will execute the BADI through a script logic and calling the script logic through the default formulas DM package.

2nd Step:

After executing the above then the user will check and if it is not correct then will change the existing record values or create some additional records . Now again need to do the custom logic BADI calculation. I want to execute the BADI only for the changed or created records and not for the whole category(FORECAST) which the user did in the first place.

I am thinking of doing the above using the default logic or WRITE back BADI when the user created/changed the records in the input schedule.

In the default logic can I call the custom logic BADI and the scope should be the input schedule context right ?

or can I add the calculation logic in the WRITE Back BADI .

To apply the logic only for the changed or newly created records in the input schedule which one is better

* WRITE BACK ( I need to add the calculation logic to the WRITE BACK BADI - already some logic existing for WRITE Back)

or

*Default Logic ( CALL the custom logic BADI -Include the custom logic calculation)

Based on the performance and best practice which one is the best solution.Again in the first place I will execute the custom logic through default formulas DM package for the CATEGORY (FORECAST).

Thanks in advance for the help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes
former_member614876
Participant
0 Likes

Hi Vadim,

In similar context, we have a custom logic BADI that is called with a context:

-> Profit Center

-> Sales Office

This results in CT_Data bringing all the GL Accounts/ Whether changed or not, from the Cube. We only need the latest sent record from an input template, for a particular GL, without giving this GL Account filter in the input for BADI. (Or in the context).

Can you confirm if we have a standard option to enable delta's for above scenario?

Thanks

Gagan

former_member614876
Participant
0 Likes

Hi Vadim,

We are loading data from a BPC cube to S4. Our selection for retraction ensures that our context for retraction pulls up more than the previously changed records i.e example, if we changed for a certain GL Account in Profit Center, and Sales Office, the ct_data is populated with all the GL Accounts for that Profit Center and Sales Office combination. We need only the latest changed record, without providing the GL account filter during retraction. Is there a standard way/ option to enable the same. We are using a Custom Logic BADI, with Query and Write ON. I checked the Organize Delta option for the Data Manager package, but that looks to be more about getting the data into the Cube from external sources

Thanks

Gagan

former_member186338
Active Contributor
0 Likes

learningchamp

Look on my answer - do not use Custom logic badi, use write back badi!

And it's a bad idea to comment on old questions/answers. Post a new one!

Answers (1)

Answers (1)

0 Likes

Thanks Vadim for the quick response. Will go with WRITE Back in the input schedule and custom logic/DM for the whole category. Thanks

former_member186338
Active Contributor
0 Likes

By the way, what is the calculation logic to be programmed?

0 Likes

Calulation logic :calculating the COGS based on the units and unit cost and some additional validations.This is done through a BADI.

I will incorporate it in the WRITE back.