cancel
Showing results for 
Search instead for 
Did you mean: 

Default logic

Former Member
0 Kudos

Hallo experts.

I have confused my self a bit over the last week regarding the default script logic, and how it actually works.

The question is quite simply, how much data does the default script run for? Will the script only run for the data that is being sent to the database, or will it everthing that is XDIMed in the script?

I am asking because I am doing a default that will be runing different calculations based on the category, but the users will only be sending data to one category. Will the default script then only calculate for the category being sent to, or will it recalculate for all categories?

This will have a quite a bit influence on the performance.

Best regards

Mikkel Kristensen

Accepted Solutions (1)

Accepted Solutions (1)

former_member186498
Active Contributor
0 Kudos

Hi Mikkel,

the Deafult logic would always is triggerred when you are submitting the data via input schedule.

So if you send only data with one category this will be the scope in the default logic, but if you want to be sure that some instructions in the default logic will be executed only for one category you should use *XDIM_FILTER

Kind regards

     Roberto

Former Member
0 Kudos

Hej Roberto,

Thank you very much for your answer. I just have a clarifying questions.

So if I send 1 piece of data for an input schedules, then the default will be scoped in the default? And if I the next time send 10, then it will be scoped to the10 new ones?

Kind regards,

Mikkel Kristensen

former_member186498
Active Contributor
0 Kudos

Hi Mikkel,

yes, that's why if you send, also from other input sched, data with the categories you don't want in the piece of default script then you must add a filter.

Kind regards

     Roberto

Former Member
0 Kudos

Hi Mikkel,

The default logic will take all the intersections to which data is sent. So, the scope of the default script is determined by the data region to which the data is sent. You might send 1 record or 10 records. The number is irrelevant. The only exception is account. It scopes all the accounts of your dimension unless specified otherwise using XDIM.

Having said this, you can always overwrite or modify the default scope by using XDIM statements.

Hope this helps.

former_member186338
Active Contributor
0 Kudos

Hi Roberto,

I have to correct you:

XDIM_FILTER statement is actually not a filter, it's absolutely the same as XDIM_MEMBERSET, with the only difference: it set scope using not member names but member property.

*XDIM_FILTER SOMEDIM=[SOMEDIM].properties("SOMEPROPERTY")="SOMEVALUE"

is equivalent to:

*SELECT(%MEMBERLIST%,"[ID]",SOMEDIM,"[SOMEPROPERTY]='SOMEVALUE'")

*XDIM_MEMBERSET SOMEDIM=%MEMBERLIST%

B.R. Vadim

former_member186498
Active Contributor
0 Kudos

Hi Vadim,

sorry I thought that the behaviour of XDIM_FILTER was the same that on MS.

Kind regards

     Roberto

former_member186338
Active Contributor
0 Kudos

Hi Roberto,

I am also sorry! What I told was relevant for BPC NW 7.5 and for BPC NW 10 before SP 8. From BPC NW 10 SP 8 the XDIM_FILTER is the same as for BPC MS.

In general it's a bad practice to change operators this way (and without any changes in help).

B.R. Vadim

former_member186338
Active Contributor
0 Kudos

Hi Nilanjan,

At least in BPC 7.5 NW the scope for default.lgf is all combinations of changed members for all dimensions. No difference for account dimension. Example:

Account dim members: A1, A2, A3

Other dim members: O1, O2, O3

Sent by input schedule at once: A1,O1 and A2, O3

The scope will be: A1, A2 and O1, O3 resulting in the following members:

A1,O1; A1,O3; A2,O1; A2,O3

Scope in yellow.

Tomorrow I will test the same on BPC NW 10 SP13

B.R. Vadim

former_member186338
Active Contributor
0 Kudos

In BPC NW 10 scoping in default.lgf works the same way as in BPC NW 7.5. Tested.

Test script:

*WHEN ACCOUNT

*IS *

*REC(EXPRESSION=%VALUE%+1)

*ENDWHEN

Original data:

DUMMY BE
ACTUAL
Periodic
2005.JAN2005.FEB2005.MAR
MEDINSEMP111
MEDINSEMPADM111
MEDINSCHILD111

The default.lgf script added and the data was changed in some cells (before send data):

DUMMY BE
ACTUAL
Periodic
2005.JAN2005.FEB2005.MAR
MEDINSEMP211
MEDINSEMPADM112
MEDINSCHILD111

After data send (2 values):

DUMMY BE
ACTUAL
Periodic
2005.JAN2005.FEB2005.MAR
MEDINSEMP312
MEDINSEMPADM213
MEDINSCHILD111

MEDINSEMP, MEDINSEMPADM and MEDINSCHILD are the members of the ACCOUNT dimension.

B.R. Vadim

Answers (2)

Answers (2)

bishwajit_das
Active Contributor
0 Kudos

Hi,

Its very simple.If users will only be sending data to one category.Then the default script will only calculate for the category being sent.

Regards,

Bishwajit.

former_member186338
Active Contributor
0 Kudos

Hi Mikkel,

You can test the scope with a simple DEFAULT.LGF script like:

*WHEN ACCOUNT

*IS * //no restrictions!

*REC(EXPRESSION=%VALUE%+1)

*ENDWHEN

Create some input schedule, fill number of members with 1, send data and after put this script as default.lgf

Change number of values at once and send data. See results.

B.R. Vadim