cancel
Showing results for 
Search instead for 
Did you mean: 

default logic script scope clarifications

benet
Discoverer
0 Kudos

In this admittedly old SAP document "SBOP Planning and Consolidation version for Netweaver" there is the statement

Calling Script Logic from an Input Schedule Data Send (Default logic script) This scope consists of all records created or modified by the Input Schedule. A list of all the unique members in the sent data is used to derive the scope. An exception is the account dimension, where all accounts are always part of the initial scope.

My experience is that not all accounts are sent and if I read Vadim's excellent post on default logic, I think it implies that even account is controlled by the input schedule data change. Am I missing something or is "SBOP Planning and Consolidation version for Netweaver" just no longer correct about the account dimension scoping for default logic?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

First of all - please read my old blog: https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/

An exception is the account dimension, where all accounts are always part of the initial scope. - completely incorrect!

From my blog:

When launched the default.lgf will receive scope as a combination of all members of all dimensions of data sent by user and actually saved to the cube.


benet
Discoverer
0 Kudos

Thank you. Yes it is this conflict between this document and your blog that I was trying to get to grips with. I have tended to avoid default logic for years but now having to move into it and a use it to fire off a badi and scope is key (and somewhat challenging at times.

former_member186338
Active Contributor
0 Kudos
benet

Think about write back badi!

Answers (1)

Answers (1)

0 Kudos

In my experience, the scope contains only created/modified data on the input schedule. Account dimension is not an exception. I've just tested with following procedure:

1) create an enhancement implementation for BADI_UJ_CUSTOM_LOGIC (with a break-point line.)

2) create a DEFAULT logic to simply call the badi

3) open an input schedule and save data

4) check the entries in CT_DATA in ABAP debugger. I can only see the data entries that were created/modified from the input schedule.

former_member186338
Active Contributor
0 Kudos

"the scope contains only created/modified data on the input schedule."

Sorry, but also incorrect statement!

Look on my blog: https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/

It will be a combination of scopes. And you don't need to write badi to check it.

By the way, "only created/modified data" is available only in write back badi.

0 Kudos

I don't agree with you. It is not sending "a combination of all members of all dimensions of data". Yes, the dimension members are a Cartesian product of all dimension members related with changed data cells, but not data.

"By the way, "only created/modified data" is available only in write back badi." -- from real testing, if you call a badi in default logic, it's possible to catch the created/modified data.

former_member186338
Active Contributor
0 Kudos

"I don't agree with you. It is not sending "a combination of all members of all dimensions of data". Yes, the dimension members are a Cartesian product of all dimension members related with changed data cells, but not data."

Sorry again, but you are using wrong test scenario! You are sending data to the empty intersections.

Look on my script sample in the blog. If you already have data then you will get not changed records based on Cartesian product!

"By the way, "only created/modified data" is available only in write back badi." -- from real testing, if you call a badi in default logic, it's possible to catch the created/modified data.

Sorry, but you need to understand the difference between custom logic badi in default.lgf and write back badi. Write back badi will get changed records before they are saved in the model. Custom logic badi will read records after saving using scope based on Cartesian product.