Skip to Content
0

Logic script question

Apr 13, 2017 at 03:53 PM

97

avatar image

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

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

3 Answers

Best Answer
Vadim Kalinin Apr 14, 2017 at 11:30 AM
0

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/

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

your blog is very helpful

and Thank u so much.

0

But what is the reason to remove "accept" from my answer?

0

it s just a fault of tape. I m sorry.

0

Now it's OK :)

0
Vadim Kalinin Apr 13, 2017 at 04:02 PM
0

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/

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

when the first script is execute the result is not sent in the destination app

I want that the result of the first script be transferred to the destination.

So can i have a suggestion to solve this,

thank you .

0

Sorry, but you don't want to read my blog and to provide required information.

Looks like you don't need an answer!

0

Sorry there is my question :

BPC NW 10.1

In the model TRANSFERT_PF we have the following dimensions: TV_TRANSFERT_SEM (A) Article(USER DEF) Centre_reception(USER DEF) Centre_Regional(E) TEMPS (T) version (C)

In the ACCOUNT dimension there are members Qté à transferer/recevoir (EXP ) WITH THE ID ( TR001),

In the model "OBJ_COM_PROD_BS" we have the following dimensions: TYPE_VALEUR(A) (USER DEF) Centre_Regional(E) TEMPS (T) version (C)

In the ACCOUNT dimension there are members Qté à transferer/recevoirPF with the ID (OP006) ....

WE have two center the reception one and the sender when the sender sent (Qté à transferer/recevoir) the value is calculated for the reception center by the calculation ( Qté à transferer/recevoir = -Qté à transferer/recevoir)

then we want to sent this member to another member ["OBJ_COM_PROD_BS "].[Qté à transferer/recevoirPF]

but when the first calculation is execute the result is not sent.

<<<<< There is the script >>>>>>

/////////// 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

<<<<<<<< UJKT>>>>>>

there is the UJKTest of the script logic

<<<<<<<<< Question >>>>>

when we put data for qté a transferer/recevoir the data is calculated by the first calculation but the result is not sent to the destination app in the second part of the script : so please can i have a suggestion.

Thank you.

lgx1.png (27.7 kB)
lgx1.png (20.0 kB)
lgx2.png (29.3 kB)
lgx3.png (34.8 kB)
lgx2.png (13.2 kB)
lgx3.png (12.3 kB)
lgx4.png (2.9 kB)
0

Sorry, I don't need you incorrect scripts screenshots!

First you mentioned that the script will be default.lgf

Then it will be executed on data save by input form for TRANSFERT_PF

You have to provide screenshot of your input form with all dimensions visible.

And on the same screenshot please explain the calculation logic with sample data.

What is the data to be calculated for TRANSFERT_PF model?

What has to be sent to OBJ_COM_PROD_BS?

0

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)
0
Saad SQUALLI Apr 14, 2017 at 02:06 PM
0

your blog is very helpful

and Thank u so much.

Share
10 |10000 characters needed characters left characters exceeded