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

Logic Script is not calling with default Logic

Former Member
0 Kudos
353

Hello Team,

I have issue on calling the Logic Script in Default Logic.

Please see attached file for logic script.

If same, I runs in DMP and UJKT then its running fine.

Please Guide.

Thanks in Advance....

Best Regards,

Tarun Agarwal

+91-9904548785

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear All,

Thanks for reply

Script posted previously worked with small changes

Previous only 11 dimension out of 12 was used in script for scoping the data for BADI. When 12th dimension was used in scoping, it started working from default itself.

Lesson learned:

1. %DIM_SET% collects the value posted through input templates.
2. Scoping for all dimension needs to be provided when it is running through default logic.( I am not sure whether it is a standard rule or not, but it worked in our case).

Regards
Tarun Agarwal
 

former_member186338
Active Contributor
0 Kudos

"Scoping for all dimension needs to be provided when it is running through default logic.( I am not sure whether it is a standard rule or not, but it worked in our case)" - strange statement!


Scoping is required only if you want to include some members that are missing in the sent data!


And anyway, your default.lgf will work correctly only with some templates, it's not universal...


Also I see a lot of fixed scopes (not related to the scope of sent data)! If you fix scope then badi will run with this scope independent on the data sent - not sure it's fine.



Answers (3)

Answers (3)

former_member186338
Active Contributor
0 Kudos

By the way, if you want to use badi to calculate something in default.lgf it's better not to use default.lgf and custom logic badi but to create write back badi

former_member186338
Active Contributor
0 Kudos

In write back badi you will get ONLY members you are sending by input schedule, not a combined scope!

Former Member
0 Kudos

%DIM_SET% is not works in default logic.

In my case i want to use below given these three condition in logic script scoping and same i want to be runs in Default Logic.

*SELECT(%ENTI1%,COMPANY_CODE,COST_CENTER,BUSINESS_AREA=%BUS_AREA_SET%)

*SELECT(%TIME1%,YEAR,TIME,ID=%TIME_SET%)

*SELECT(%FCST%,PLAN_FCST,CATEGORY,ID=%CATEGORY_SET%)


And of applying this three condition I want to used member getting saved or from context of input template. 

So how can I do this.

Please guide for the same.


Best Regards,

Tarun Agarwal

Former Member
0 Kudos

Hi Tarun,

I dont think Vadim's explanations in the document are so hard to understand!

Anyways, Why are you passing the scope using SELECT statement. I am not an expert in script logic, but I would suggest to do all scopings, selective filtering of members in BADI itself unless you have any user specific selections to be passed to BADI for calculations because you are using default logic not some script logic! If not in BADI add all the 3 dimensions in the report with member required!

Regards,

JP

Former Member
0 Kudos

Hi tarun,

Please use Vadim's document to write the logic properly in default.....http://scn.sap.com/docs/DOC-55628

If your running through  default, how will %DIM_SET% work????

Regards,

JP

Former Member
0 Kudos

Hello JP,

Thanks for reply.

I think %DIM_SET% will take value from the data which is getting save through input template.

Please correct me if I am wrong?

Best Regards,

Tarun Agarwal

Former Member
0 Kudos

No! Please read the document to understand the working of default logic. You will find your answers there.

Regards,

JP

former_member186338
Active Contributor
0 Kudos

%DIMx_SET% will have the scope of changed members in script logic!

But can you explain, what do you want to achieve with this script?

Former Member
0 Kudos

Dear Vadim,

Thanks for reply..

We want to write the dynamic scoping for custom badi based on time, category & business area entered through input template.

Trying to write below condition to achieve dynamic variable to make scoping dynamic.

*SELECT(%ENTI1%,COMPANY_CODE,COST_CENTER,BUSINESS_AREA=%BUS_AREA_SET%)

Company code based on Business area entered in input sheet

*SELECT(%TIME1%,YEAR,TIME,ID=%TIME_SET%)

Year based on time enter in input sheet

*SELECT(%FCST%,PLAN_FCST,CATEGORY,ID=%CATEGORY_SET%)

Plan category based on forecast category entered in input sheet.

This is working through DMP and not working through default.

Regards

Tarun

former_member186338
Active Contributor
0 Kudos

It's possible to have dynamic scoping with default.lgf, but I don't see any input form samples to understand what data you are sending to the cube!

By the way in default.lgf the scope will be a sum of all scopes of changed data. It means that the script will not work correctly for any input form (if different members are updated)

former_member186338
Active Contributor
0 Kudos

Example: if you save data for 2 years then this script will result in error