Skip to Content
avatar image
Former Member

Logic script question

Hi ,

My question is about " measure transfert between two cube "

I have two models TRANSFERT_PF with the following dimensions : 1-Article 2-Centre_reception 3-Centre_Regional 4-TIME 5-TV_TRANSFERT_SEM(mesure dimension) 6- version

and the second model OBJ_COM_PROD_BS with : 1-Article 2-Centre_Regional 3-TIME 4-TYPE_VALEUR (mesure dimension) 5- version .

The first calculation in my script is not sent in the destination app

there is the script on my default.lgf

/////////// first calculation ////////////

*WHEN TV_TRANSFERT_SEM

*IS TR001

*REC(EXPRESSION = -%VALUE%, CENTRE_REGIONAL = CENTRE_RECEPTION, CENTRE_RECEPTION = CENTRE_REGIONAL, TV_TRANSFERT_SEM = TR001) *ENDWHEN

/////////// transfert /////////

*XDIM_MEMBERSET CENTRE_RECEPTION =A000,B000,C000, D000,E000, F000,K000,L000, K000, M000, M100, N000, P000, R000,S000,T000

*DESTINATION_APP = OBJ_COM_PROD_BS

*RENAME_DIM TV_TRANSFERT_SEM = TYPE_VALEUR

*SKIP_DIM = CENTRE_RECEPTION

*WHEN TV_TRANSFERT_SEM

*IS TR001

*REC(EXPRESSION = %VALUE% , TV_TRANSFERT_SEM = OP006 )

*ENDWHEN

*COMMIT

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 14, 2017 at 11:30 AM

    You misunderstand the default.lgf scoping...

    The script has to be:

    //Saved by user CENTRE_REGIONAL=L000 and CENTRE_RECEPTION=C000 value=2000
    *WHEN TV_TRANSFERT_SEM
    *IS TR001
    *REC(EXPRESSION = -%VALUE%, CENTRE_REGIONAL = CENTRE_RECEPTION, CENTRE_RECEPTION = CENTRE_REGIONAL)
    *ENDWHEN
    //result: CENTRE_REGIONAL=C000 and CENTRE_RECEPTION=L000 value=-2000

    *DESTINATION_APP = OBJ_COM_PROD_BS
    *RENAME_DIM TV_TRANSFERT_SEM = TYPE_VALEUR
    *SKIP_DIM = CENTRE_RECEPTION

    //CENTRE_REGIONAL=L000 and CENTRE_RECEPTION=C000 value=2000 - scope not changed!
    *WHEN TV_TRANSFERT_SEM
    *IS TR001
    *WHEN CENTRE_RECEPTION
    *IS A000,B000,C000, D000,E000, F000,K000,L000, K000, M000, M100, N000, P000, R000,S000,T000
    *REC(EXPRESSION = -%VALUE%, CENTRE_REGIONAL = CENTRE_RECEPTION, TV_TRANSFERT_SEM = OP006)
    *ENDWHEN
    *ENDWHEN
    //result: CENTRE_REGIONAL=C000 and TV_TRANSFERT_SEM = OP006 value=-2000

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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2017 at 04:02 PM

    Sorry, but what is the issue? I don't see any question!

    What do you want to achieve?

    Please read:

    https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi Vadim,

      thank you so much for your kind help , you will find attatched screenshots of my input forms

      in my example i wrote the value of 2000 for centre_regional=L000 and centre_reception=C000 SO normaly i shoud have in OP006 THE VALUE 2000 wich is correct and in centre regional =C000 AND centre_reception=L000 THE VALUE -2000 wich i have but in OP006 I Don't have the value -2000

      what do you suggest ?

      regards

      rep1.png (23.0 kB)
      rep2.png (22.9 kB)
  • avatar image
    Former Member
    Apr 14, 2017 at 02:06 PM

    your blog is very helpful

    and Thank u so much.

    Add comment
    10|10000 characters needed characters exceeded