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

UJK_VALIDATION_EXCEPTION:Dimension set:"TIME" not assigned in Data Manager

Former Member
0 Kudos
1,112

Hi Folks,

Please I want to calculate  the value of member I have it's the value of the current iventory -inventory of the previous day .

when i'm trying to execute the script it's giving me this error how could achieve that.

Here is the informations you need

1-

*SAP_BW    740    0009    SAPKW74009    SAP Business Warehouse

*CPMBPC    801    0009    SAPK-80109INCPMBPC    CPM Business Planning and Consolidation

2- UJK_VALIDATION_EXCEPTION:Dimension set:"TIME" not assigned in Data Manager

3- I have  The Extractio Model, it contains  5 dimensions:

TIME:01.01.2015, 2015.01,2015.01,2015

TV_Extraction:Inventory,.....

Version: Type C Contains , Forecast , Budget...

4-Default.LGF

5 I-want to calculate  the value of member I have it's the value of the current iventory -inventory of the previous day . .

6- this script is just for testing the TMVL Function which is not working for me

*XDIM_MEMBERSET TV_EXTRACTION=EXTR0014

*XDIM_MEMBERSET TIME=%JOUR_SET%

*WHEN TV_EXTRACTION

*IS EXTR0014

*REC(FACTOR=1,TIME = TMVL(-1,%JOUR_SET%),TV_EXTRACTION =a)

*ENDWHEN

*COMMIT

7- Data like 7800

8-

UJK_VALIDATION_EXCEPTION:Dimension set:"TIME" not assigned in Data Manager

9-The script is not working.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Looks like you time dimension is named JOUR

*XDIM_MEMBERSET TV_EXTRACTION=EXTR0014

*XDIM_MEMBERSET JOUR=%JOUR_SET%

*WHEN TV_EXTRACTION

*IS EXTR0014

*REC(FACTOR=1,JOUR = TMVL(-1,%JOUR_SET%),TV_EXTRACTION =a)

*ENDWHEN

Vadim

Former Member
0 Kudos

My Time dimension  is JOUR , I just recalled it in englsh to post that here .

former_member186338
Active Contributor
0 Kudos

Please show the exact script text you are running!

Former Member
0 Kudos

*XDIM_MEMBERSET TV_EXTRACTION=EXTR0014

*XDIM_MEMBERSET JOUR=%JOUR_SET%

*WHEN TV_EXTRACTION

*IS EXTR0014

*REC(FACTOR=1,JOUR = TMVL(-1,%JOUR_SET%),TV_EXTRACTION =a)

*ENDWHEN

*COMMIT

former_member186338
Active Contributor
0 Kudos

Sorry, I do not understand:

"4-Default.LGF"

And error in Data manager?

How do you want to launch this script?

former_member186338
Active Contributor
0 Kudos

P.S. COMMIT is absolutely useless!

Former Member
0 Kudos

I want to launch it in default not via Data manager.

former_member186338
Active Contributor
0 Kudos

If you want to launch it as default.lgf it will not work if 2 or more different dates will be changed!

TMVL(-1,%JOUR_SET%) will work with a list of dates! Not what you want!

To test the script use UJKT

Post UJKT screenshot.

Vadim

former_member186338
Active Contributor
0 Kudos

By the way the error you have is due to missing members for JOUR dimension in Data Region field!

Vadim

Former Member
0 Kudos

I have the same thing as you , after executing the script in UJKT.

Former Member
0 Kudos

So how can I get that , to calculate the value of current member - the value of the previous member ?

Former Member
0 Kudos

Where can I find the data region field ?

former_member186338
Active Contributor
0 Kudos

You simply missed setting some members in Data Region! If you want to simulate default.lgf you need to specify dimensions and members here:

Like:

JOUR=2015.01

And the script will work correctly for the single time member.

But if you have:

JOUR=2015.01,2015.02

You will have incorrect result!

Correct script will be:

// No XDIM_MEMBERSET!

*WHEN TV_EXTRACTION

*IS EXTR0014

*WHEN JOUR

*FOR %J%= %JOUR_SET%

*IS %J%

*REC(FACTOR=1,JOUR = TMVL(-1,%J%),TV_EXTRACTION =a)

*NEXT

*ENDWHEN

*ENDWHEN

Vadim

former_member186338
Active Contributor
0 Kudos

Data Region field is on my screenshot with my red comment - "EMPTY!!!!"

Vadim

former_member186338
Active Contributor
0 Kudos

Sample:

Data Region:

PERIODS=2010.JAN,2010.MAR

BE=BE1000

TITLES=1100

PLANTYPE=ACTUAL

Script:

*WHEN INACCT

*IS 101

*WHEN PERIODS

*FOR %P%=%PERIODS_SET%

*IS %P%

*REC(EXPRESSION=%VALUE%,PERIODS=TMVL(-1,%P%))

*NEXT

*ENDWHEN

*ENDWHEN

LGX Result:

*WHEN INACCT

*IS 101

*WHEN PERIODS

*IS 2010.JAN

*REC(EXPRESSION=%VALUE%,PERIODS= 2009.DEC )

*IS 2010.MAR

*REC(EXPRESSION=%VALUE%,PERIODS= 2010.FEB )

*ENDWHEN

*ENDWHEN

Vadim

Former Member
0 Kudos

Vadim thank you so much for your help bu should I in my data region in the dimension JOUR  put every day for example from 01.01.02014 to 01.01.2017 ?

former_member186338
Active Contributor
0 Kudos

Sorry, but what for you want to "put every day for example from 01.01.02014 to 01.01.2017"???

Default.lgf will run with the scope of changed members, please read:

To simulate user input for 2 different time periods I used PERIODS=2010.JAN,2010.MAR.

Please explain your requirements from the business user point of view: step by step!

Vadim

Former Member
0 Kudos

the business user requirement is to calculate the difference between inventory in current member - the inventory of the previous member  and I should do this for every member of time dimension

when I have Days like values ,

Time diemnsion values : 01.01.2015,2015.01,2015...

Should I put in the script all members of time dimension .

I don't know if I was clear in my explication please mention it not.

thank you so much vadim

former_member186338
Active Contributor
0 Kudos

"the business user requirement is to calculate the difference between inventory in current member - the inventory of the previous member" Absolutely not clear!

Please, step by step!

What data user enter?

When he want to calculate?

Where he want to store the result?

Etc...

Just explain the proposed work process!

Vadim

Former Member
0 Kudos

Hi Vadim,

we will take example we have here: when the user input value in the inventory cell  we should calculate Weight wich is  Weight =( Current member of Inventory(Time=02.02.2015)-Previous member of inventory( Time=01.01.2015))/100

1- user will enter decimal numbers

2-he when to calculate it after entering the inventory value (signed data) of the current member.

3-he want to store it in weight.

Please if you need any addtional information tell me

former_member186338
Active Contributor
0 Kudos

Assuming that "EXTR0014" is Inventory and "a" is weight

"Weight =( Current member of Inventory(Time=02.02.2015)-Previous member of inventory( Time=01.01.2015))/100"

Use default.lgf:

*WHEN TV_EXTRACTION

*IS EXTR0014

*WHEN JOUR

*FOR %J%= %JOUR_SET%

*IS %J%

*REC(EXPRESSION=(%VALUE% -[JOUR].[TMVL(-1,%J%)])/100,TV_EXTRACTION =a)

*NEXT

*ENDWHEN

*ENDWHEN

Former Member
0 Kudos

Here  is the script I wrote just to put the value I enter of Inventory in the Weight KPI,

I have Inventory code EXTR0014, Weight a ,

here what i got after executing the script in ujkt

LGX:

*WHEN TV_EXTRACTION

*IS EXTR0014

*WHEN JOUR

*IS 01.01.2015

*REC(FACTOR=1 ,JOUR= 01.01.2014 ,TV_EXTRACTION=a)

*IS 02.01.2015

*REC(FACTOR=1 ,JOUR= 02.01.2014 ,TV_EXTRACTION=a)

*IS 03.01.2015

*REC(FACTOR=1 ,JOUR= 03.01.2014 ,TV_EXTRACTION=a)

*IS 03.01.2015

*REC(FACTOR=1 ,JOUR= 03.01.2014 ,TV_EXTRACTION=a)

*IS 04.01.2015

*REC(FACTOR=1 ,JOUR= 04.01.2014 ,TV_EXTRACTION=a)

*IS 05.01.2015

*REC(FACTOR=1 ,JOUR= 05.01.2014 ,TV_EXTRACTION=a)

*ENDWHEN

*ENDWHEN

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

LOG BEGIN TIME:2016-05-17 20:05:26

FILE:\ROOT\WEBFOLDERS\PLANNING_SHELL1 \ADMINAPP\Extraction_Sucreries\TEST.LGF

USER:FELAMRANI

APPSET:PLANNING_SHELL1

APPLICATION:Extraction_Sucreries

[INFO] GET_DIM_LIST(): I_APPL_ID="Extraction_Sucreries", #dimensions=5

JOUR,MEASURES,SITE,TV_EXTRACTION,VERSION

#dim_memberset=1

JOUR:01.01.2015,02.01.2015,03.01.2015,03.01.2015,04.01.2015,...6 in total.

REC :%value%*(1)

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 1  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

1  RECORDS ARE GENERATED.

CALCULATION END.

#dim_memberset=1

JOUR:01.01.2015,02.01.2015,03.01.2015,03.01.2015,04.01.2015,...6 in total.

REC :%value%*(1)

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 2  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

1  RECORDS ARE GENERATED.

CALCULATION END.

#dim_memberset=1

JOUR:01.01.2015,02.01.2015,03.01.2015,03.01.2015,04.01.2015,...6 in total.

REC :%value%*(1)

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 1  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

1  RECORDS ARE GENERATED.

CALCULATION END.

#dim_memberset=1

JOUR:01.01.2015,02.01.2015,03.01.2015,03.01.2015,04.01.2015,...6 in total.

REC :%value%*(1)

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 1  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

1  RECORDS ARE GENERATED.

CALCULATION END.

#dim_memberset=1

JOUR:01.01.2015,02.01.2015,03.01.2015,03.01.2015,04.01.2015,...6 in total.

REC :%value%*(1)

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 2  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

1  RECORDS ARE GENERATED.

CALCULATION END.

#dim_memberset=1

JOUR:01.01.2015,02.01.2015,03.01.2015,03.01.2015,04.01.2015,...6 in total.

REC :%value%*(1)

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 2  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

1  RECORDS ARE GENERATED.

CALCULATION END.

ENDWHEN ACCUMULATION: 5  RECORDS ARE GENERATED.

DATA TO WRITE BACK:

JOUR    SITE    TV_EXTRACTION    VERSION    SIGNEDDATA

01.01.2014    15    a    001    0.00

02.01.2014    15    a    001    0.00

03.01.2014    15    a    001    0.00

04.01.2014    15    a    001    0.00

05.01.2014    15    a    001    44.00

5  RECORDS HAVE BEEN WRITTEN BACK.

WRITING TIME :0.00  ms.

SCRIPT RUNNING TIME IN TOTAL:1.00 s.

LOG END TIME:2016-05-17 20:05:27

But  normaly i should have 44 in 04.01.2015 but I got 0

Former Member
0 Kudos

Here is the script

*WHEN TV_EXTRACTION

*IS EXTR0014

*WHEN JOUR

*FOR %P%=%JOUR_SET%

*IS %P%

*REC(FACTOR=1 ,JOUR=TMVL(-1,%P%),TV_EXTRACTION=a)

*NEXT

*ENDWHEN

*ENDWHEN

former_member186338
Active Contributor
0 Kudos

Sample on my system:

default.lgf:

*WHEN INACCT

*IS 101

*WHEN PERIODS

*FOR %P%=%PERIODS_SET%

*IS %P%

*REC(EXPRESSION=(%VALUE%-[PERIODS].[TMVL(-1,%P%)])/100,INACCT=102)

*NEXT

*ENDWHEN

*ENDWHEN

Result:

101 - Inventory

102 - Weight

former_member186338
Active Contributor
0 Kudos

Look on the correct script

And my sample in the next message!

former_member186338
Active Contributor
0 Kudos

Actually the script has to update the next month also 2 loops required:

*WHEN TV_EXTRACTION

*IS EXTR0014

*WHEN JOUR

*FOR %J%= %JOUR_SET%

*IS %J%

*REC(EXPRESSION=(%VALUE% -[JOUR].[TMVL(-1,%J%)])/100,TV_EXTRACTION =a)

*NEXT

*ENDWHEN

*ENDWHEN

*WHEN TV_EXTRACTION

*IS EXTR0014

*WHEN JOUR

*FOR %J%= %JOUR_SET%

*IS %J%

*REC(EXPRESSION=([JOUR].[TMVL(1,%J%)]-%VALUE%)/100,TV_EXTRACTION =a,JOUR=TMVL(1,%J%))

*NEXT

*ENDWHEN

*ENDWHEN

Former Member
0 Kudos

I tried just to write the same value In Day -1 but it's wrtitign the value in the same day of previous year, I don't know why , so I resolved that by stroring the previous value in another Member of Tv_Extraction and I added another property in the time dimension wich is Day +1 and then I use Destination App .

Ps : after Exectting the script ( just putting the value I enter in the previous day) , here is what happen

DATA TO WRITE BACK:

JOUR    SITE    TV_EXTRACTION    VERSION    SIGNEDDATA

01.01.2014    15    a    001    0.00

02.01.2014    15    a    001    0.00

03.01.2014    15    a    001    0.00

04.01.2014    15    a    001    0.00

05.01.2014    15    a    001    44.00  ( the same day of previous year)

5  RECORDS HAVE BEEN WRITTEN BACK.

WRITING TIME :0.00  ms.

Thank you so much Vadim , I'm really grateful.

former_member186338
Active Contributor
0 Kudos

Property is a good solution but require some maintenance! If you create 2 properties: PREV and NEXT (previous day and next day) then the script will be:

*LOOKUP SameModel

*DIM PRV: JOUR=JOUR.PREV

*DIM NXT: JOUR=JOUR.NEXT

*ENDLOOKUP

//current day calc

*WHEN TV_EXTRACTION

*IS EXTR0014

*REC(EXPRESSION=(%VALUE%-LOOKUP(PRV))/100,TV_EXTRACTION =a)

*ENDWHEN

//next day calc

*WHEN TV_EXTRACTION

*IS EXTR0014

*REC(EXPRESSION=(LOOKUP(NXT)-%VALUE%)/100,TV_EXTRACTION =a,JOUR=JOUR.NEXT)

*ENDWHEN

Vadim

Former Member
0 Kudos

Very helpful, thank you so much Vadim really really helpful , but do you have any idea why when i executed the first script  the one when i use TMVL , it's wrintign in the  same value of previous year not the the one of previous day ?

former_member186338
Active Contributor
0 Kudos

For TMVL to work properly TIMEID property has to be correctly set up for all base members of TIME dimension (increasing!). Please check...

Vadim

Answers (0)