Skip to Content
0

Data manager Question

Feb 19 at 02:00 PM

24

avatar image

Hello experts ,

I have the modele Purshase and Planning

Purshase have the dimensions:CENTRE_DE_COUTS(cost center),Artilce_SOCIETE(Material) , COMPTE(Account),TYPE_VALEURS(KPIS:Quantity, Price..)

Planning:CENTRE_DE_COUTS(cost center),COMPTE(Account),

CENTRE_DE_PROFIT(Profit center).

every material has an attribute (compte_A) wich is the purshase account.

every cost center has an attribute profit center

I have a script in my DEFAULT.LGF wich is

*SELECT(%CP%,[CENTRE_DE_PROFIT],CENTRE_DE_COUTS,ID=%CENTRE_DE_COUTS_SET%)
*SELECT(%CA%,[COMPTE_A],ARTICLE_SOCIETE,ID=%ARTICLE_SOCIETE_SET%)
*SELECT(%C%,ID,COMPTE,ID=%COMPTE_SET%)
*SELECT(%ARTICLES%,ID,ARTICLE_SOCIETE,COMPTE_A =%CA%)
*XDIM_MEMBERSET ARTICLE_SOCIETE = %ARTICLES%
*DESTINATION_APP = Planning
*SKIP_DIM = TYPE_VALEUR, ARTICLE_SOCIETE
*ADD_DIM CENTRE_DE_PROFIT = %CP%
*WHEN TYPE_VALEUR
*IS QTE
*WHEN COMPTE
*IS NA
*REC(EXPRESSION=%VALUE% ,COMPTE=ARTICLE_SOCIETE.COMPTE_A)
*ENDWHEN
*WHEN COMPTE
*IS <>NA
*REC(EXPRESSION=%VALUE% * [TYPE_VALEUR].[PRIX_UNIT] ,COMPTE=%C%)
*ENDWHEN
*ENDWHEN
*COMMIT

///////

but I want to automate the execution with /CPMB/DEFAULT_FORMULAS.

with the code :

PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%,"CENTRE_DE_COUTS_DIM"")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,ACHATS.LGF)

but it's not working .

how can I achieve that ?

regards

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

2 Answers

Vadim Kalinin Feb 19 at 02:05 PM
0

"but it's not working ." - What do you mean??? Where is the log file??

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

do you mean the by the log file the details of execution ?

error.png (38.9 kB)
0
Fatima Zahra EL Amrani

Incorrect syntax of this line:

PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%,"CENTRE_DE_COUTS_DIM"")

Has to be:

PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%,CENTRE_DE_COUTS")

0
Vadim Kalinin Feb 19 at 02:11 PM
0

P.S. And this script is incorrect in general even for default.lgf. It may work in some cases but in general - not!

P.P.S. And required logic is not described in line with:

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

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

Hi Vadim ,

the script is working with default.LGF .

I already tested it? IT WICH CASE IT SHOULD NOT WORK ?

regards.

0
Fatima Zahra EL Amrani

"IT WICH CASE IT SHOULD NOT WORK ?" - I will explain it later!

Asking second time - please describe the required logic in WORDS!!!

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

0