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

One of included in Default.lgf sript logic doesn't work (BPC 10 NW)

Former Member
0 Likes
529

Hello!

We'r facing a problem with Default scipt logic, to be more specific - with one of included sript logic, that doesn't want to work.

So our Default.lgf is looking like this:

*INCLUDE VAR_PL.LGF

*INCLUDE PL_CALC.LGF

*INCLUDE ALLOCATE_SEGM.LGF

VAR_PL.LGF is looking like this:

*SELECT(%FLW_IDS_EXCL_STORNO%, ID, FLW, ID <> FLW_PL_STORNO)

*SELECT(%COL_IDS_EXCL_STORNO%, ID, COL, ID <> COL_PL_STORNO)

And PL_CALC.LGF is like this:

*XDIM_MEMBERSET FLW = %FLW_IDS_EXCL_STORNO%

*XDIM_MEMBERSET COL = %COL_IDS_EXCL_STORNO%

*WHEN CAT

*IS <>V01

*WHEN BPKFG

*IS W5

*WHEN COL

*IS 100_U1

*REC(BPKFG = T100_00010)

*IS 100_U2

*REC(BPKFG = T100_00011)

*ENDWHEN //COL

*IS I806, I807, I809, I816, I817, I818, I819, I821, I822, I823, I824, I825, I826, I827, I828, I829, I844, I831, I832, I833, I834, I836, I804, I808, I810, I811, I812, I813, I814

*WHEN FLW

*IS <>140_DIS

*REC(FACTOR = -1, FLW = FLW_PL_STORNO)

*ENDWHEN //FLW

*ENDWHEN //BPKFG

*ENDWHEN //CAT

So when we send some data on the scoped region via input schedule, the logic PL_CALC doesn't work. But at the same time if we run it in UJKT - everything works fine. The third Include (Allocate_segm) is work fine when we send some data via input schedule.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

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

former_member186338
Active Contributor
0 Likes

Second - the calculation logic is not 100% clear, but in general it's better not to scope some fixed range of members with XDIM_MEMBERSET in default.lgf, better use scope coming from sent members.

Script like:

*SELECT(%FLW_IDS_EXCL_STORNO%, ID, FLW, ID <> FLW_PL_STORNO)

*SELECT(%COL_IDS_EXCL_STORNO%, ID, COL, ID <> COL_PL_STORNO)

*SELECT(%FLW_IDS_EXCL_STORNO140_DIS%, ID, FLW, ID <> FLW_PL_STORNO,140_DIS)

*WHEN CAT

*IS <>V01

  *WHEN BPKFG

  *IS W5

    *WHEN FLW

    *IS %FLW_IDS_EXCL_STORNO%

      *WHEN COL

      *IS 100_U1

        *REC(BPKFG = T100_00010)

      *IS 100_U2

        *REC(BPKFG = T100_00011)

      *ENDWHEN //COL

    *ENDWHEN //FLW

  *IS I806,I807,I809,I816,I817,I818,I819,I821,I822,I823,I824,I825,I826,I827,I828,I829,I844,I831,I832,I833,I834,I836,I804,I808,I810,I811,I812,I813,I814

    *WHEN FLW

    *IS %FLW_IDS_EXCL_STORNO140_DIS%

      *WHEN COL

      *IS %COL_IDS_EXCL_STORNO%

        *REC(FACTOR = -1, FLW = FLW_PL_STORNO)

      *ENDWHEN //COL

    *ENDWHEN //FLW

  *ENDWHEN //BPKFG

*ENDWHEN //CAT

Former Member
0 Likes

Unfortunately without XDIM_MEMBERSET this doesn't work too. Now I'll try to read your article and find out what's wrong in my script

former_member186338
Active Contributor
0 Likes

You have to check sent data scope! Please show screenshot of input form...

Former Member
0 Likes

Here is an example of data scope that i use to send and test this logic. As we can see, all  dimension members that are valuable are in scope. And again - nothing happen with Default logic, but in UJKT everything works correct.

former_member186338
Active Contributor
0 Likes

This scope will generate record - look on my script:

*WHEN CAT

*IS <>V01 - Yes "F"

  *WHEN BPKFG

  *IS W5 - No!

*IS I806,I807,I809,I816,I817,I818,I819,I821,I822,I823,I824,I825,I826,I827,I828,I829,I844,I831,I832,I833,I834,I836,I804,I808,I810,I811,I812,I813,I814

- Yes

*WHEN FLW

    *IS %FLW_IDS_EXCL_STORNO140_DIS% - Yes! "140_BEG"

*WHEN COL

*IS %COL_IDS_EXCL_STORNO% - Yes! "COL_NONE"

*REC(FACTOR = -1, FLW = FLW_PL_STORNO) has to be executed!

The value with negative sign has to be written to FLW_PL_STORNO with all other dimensions not changed.

Please check with single cell and show log of default.lgf

former_member186338
Active Contributor
0 Likes

Log is here: \root\webfolders\ENV_NAME\MODEL_NAME\privatepublications\USER_NAME\tempfiles\yyyymmddhhmmss\DEFAULT.LGF

corrected!

Former Member
0 Likes

Vadim, thanks for your help, i looked into log and it was correct, after that we asked our ABAP developers if they had done something, that can influence this  functionality and it has figured out that they did. So it was because of mistake in ABAP code.

former_member531802
Discoverer
0 Likes

Vadim, the link no longer works. Can you share an updated link to your "How-To: Write default.lgf"?

former_member186338
Active Contributor
0 Likes
kstrait

The link in my answer is updated now (pointing to the blog)

former_member186338
Active Contributor
0 Likes

kstrait

P.S. Sorry, incorrect blog link posted, now it's correct!