Skip to Content
0

Default Logic not working but script working through UJKT

Feb 12 at 09:34 AM

41

avatar image
Former Member

Hi Experts,

I having issue triggering script present in Default logic.

However the same script is executing properly when run through UJKT.

Below is the script

*XDIM_MEMBERSET CATEGORY = <ALL>
*XDIM_MEMBERSET TIME = 2022.001
*XDIM_MEMBERSET RPTCURRENCY = USD
*XDIM_MEMBERSET MEASURES = YTD
*XDIM_MEMBERSET FLOW = <all>

*WHEN ACCOUNT
*IS "2920000"
*WHEN CS_DATASRC
*IS "DS_LOAD"
*WHEN FLOW
*IS "F_ACTIVITY"
*REC(EXPRESSION=%VALUE%, ACCOUNT = "2920000", CS_DATASRC = "DS_CALC")
*ENDWHEN
*ENDWHEN
*ENDWHEN

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

3 Answers

Best Answer
Vadim Kalinin Feb 12 at 03:23 PM
0

The correct default.lgf - without any XDIM_MEMBERSET!

*WHEN RPTCURRENCY 
*IS USD //Only for USD posting!
*WHEN FLOW
*IS F_ACTIVITY //Only for F_ACTIVITY
*WHEN CS_DATASRC
*IS DS_INPUT //Only for DS_INPUT
  *REC(EXPRESSION=%VALUE%-[CS_DATASRC].[DS_LOAD],CS_DATASRC = DS_CALC)
*ENDWHEN
*ENDWHEN
*ENDWHEN

Please read my blog about default.lgf: https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/

Share
10 |10000 characters needed characters left characters exceeded
Peter KREUTLEIN
Feb 12 at 10:12 AM
0

Please explain what you mean "having issue triggering script". Is it not being triggered at all? Or is there an error when the default logic is executed?

And How are you triggering the default logic? Normally default logic is triggered whenever data change occurs.

Please provide more details on your issue as currently there is not enough detail to understand at all.

Regards,

Peter Kreutlein

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

"Normally default logic is triggered whenever data change occurs." - sorry, but incorrect in general.

Triggered on:

1. Data entry in input form

2. Journal post if journal.lgf is missing.

3. Some DM packages have option to run default.lgf

0
Former Member

I am triggering based on data entry in input form

0

And what is the issue? The logic is not executed at all? Or it behaves differently? Please provide details!

0
Former Member

Not executing at all

0

If you don't want to provide full info in line with https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues

then I will not help! What do you want to achieve with this script?

P.S. It's strange to use XDIM_MEMBERSET in default.lgf :)

1
Former Member

Hi Vadim,

I have made some changes based on you blog. Below is my updated script.

Scenario:-

1) Data from BW is loaded to DS_LOAD. For example say USD 1000

2) Then data is entered in DS_INPUT. For example say USD 1100

3) Based on the data entered in DS_INPUT through Input form below script logic should get triggered and the difference of DS_INPUT and DS_LOAD (i.e. DS_INPUT - DS_LOAD) should get posted to DS_CALC .

Hence difference of 1100 - 1000 i.e. 100 should get posted to DS_CALC

Now the issue is only 1100 is getting posted to DS_CALC and not the difference of 1100-1000. So the second When condition is not working

Default Script:-

*XDIM_MEMBERSET CATEGORY = <ALL>
*XDIM_MEMBERSET TIME = <ALL>
*XDIM_MEMBERSET RPTCURRENCY = USD
*XDIM_MEMBERSET MEASURES = YTD
*XDIM_MEMBERSET FLOW = F_ACTIVITY

// Below when condition is to move data from DS_INPUT to DS_CALC further in Input form data is entered at DS_INPUT and hence data from DS_INPUT is copied to DS_CALC

*WHEN CS_DATASRC
*IS DS_INPUT
*REC(FACTOR = 1,CS_DATASRC = DS_CALC)

// Below when condition is to move data from DS_LOAD to DS_CALC and below data has to moved to DS_CALC as well.
*ELSE
*WHEN CS_DATASRC
*IS DS_LOAD
*REC(FACTOR = -1, CS_DATASRC = DS_CALC)
*ENDWHEN
*ENDWHEN

0
Vadim Kalinin Feb 12 at 10:12 AM
0

First: you are not preparing the question in line with: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

Please correct and add missing info.

Second - default.lgf behaves differently then the script in DM package. But anyway you need to explain required logic!

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

Hi Vadim,

I have made some changes based on you blog. Below is my updated script.

Scenario:-

1) Data from BW is loaded to DS_LOAD. For example say USD 1000

2) Then data is entered in DS_INPUT. For example say USD 1100

3) Based on the data entered in DS_INPUT through Input form below script logic should get triggered and the difference of DS_INPUT and DS_LOAD (i.e. DS_INPUT - DS_LOAD) should get posted to DS_CALC .

Hence difference of 1100 - 1000 i.e. 100 should get posted to DS_CALC

Now the issue is only 1100 is getting posted to DS_CALC and not the difference of 1100-1000. So the second When condition is not working

Default Script:-

*XDIM_MEMBERSET CATEGORY = <ALL>
*XDIM_MEMBERSET TIME = <ALL>
*XDIM_MEMBERSET RPTCURRENCY = USD
*XDIM_MEMBERSET MEASURES = YTD
*XDIM_MEMBERSET FLOW = F_ACTIVITY

// Below when condition is to move data from DS_INPUT to DS_CALC further in Input form data is entered at DS_INPUT and hence data from DS_INPUT is copied to DS_CALC

*WHEN CS_DATASRC
*IS DS_INPUT
*REC(FACTOR = 1,CS_DATASRC = DS_CALC)

// Below when condition is to move data from DS_LOAD to DS_CALC and below data has to moved to DS_CALC as well.
*ELSE
*WHEN CS_DATASRC
*IS DS_LOAD
*REC(FACTOR = -1, CS_DATASRC = DS_CALC)
*ENDWHEN
*ENDWHEN

0