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

How to debug Script logic with value

Former Member
0 Likes
1,058

Hi expert,

I am working on support project and need to debug script ...

for debugging i am using UJKT  and able to only verify that script syntax is correct or not but not able to get the value for example

i have salesvalue, price, quantity

now logic is

sales values=price*quantity

so i have a script

*XDIM_MEMBERSET  ACCOUNT_RE842016 = SALVALUE ,SALPRICE, SALQTY

*WHEN ACCOUNT_RE842016

*IS SALQTY

*REC(EXPRESSION = %VALUE%*[ACCOUNT_RE842016].[SALPRICE],[ACCOUNT_RE842016].[SALVALUE])

*ENDWHEN

*COMMIT


After using UJKT


i am getting result on log but not values


On Log

LGX:

*XDIM_MEMBERSET ACCOUNT_RE842016 = SALVALUE ,SALPRICE, SALQTY

*WHEN ACCOUNT_RE842016

*IS SALQTY

*REC(EXPRESSION = %VALUE%*[ACCOUNT_RE842016].[SALPRICE],[ACCOUNT_RE842016].[SALVALUE])

*ENDWHEN

*COMMIT

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

LOG:

FILE:\ROOT\WEBFOLDERS\PKT_RELIANC_8_4_2016 \ADMINAPP\Reliance_Finance8416\TEST.LGF

USER:SAPUSER

APPSET:PKT_RELIANC_8_4_2016

APPLICATION:Reliance_Finance8416

[INFO] GET_DIM_LIST(): I_APPL_ID="Reliance_Finance8416", #dimensions=8

ACCOUNT_RE842016,CATEGORY,ENTITY_RE842016,MEASURES,RELI_AUDIT842016,REL_INTERO842016,RPTCURRENCY,TIME

#dim_memberset=1

ACCOUNT_RE842016:SALVALUE,SALPRICE,SALQTY,3 in total.

REC :%VALUE%*[ACCOUNT_RE842016].[SALPRICE]

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 844.00 ms. 69  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

QUERY TIME : 1033.00 ms. 138  RECORDS QUERIED OUT.

CALCULATION TIME IN TOTAL :73.00 ms.

69  RECORDS ARE GENERATED.

CALCULATION END.

SCRIPT RUNNING TIME IN TOTAL:2.29 s.


I am giving param as

SALPRICE=10

SALQTY=15


BUT ANY WHERE IN LOG I AM NOT GETTING


SALVALUE=10*15=150


ANY IDEA THAT HOW TO TEST


PLEASE FIND ATTACHED SCREEN ALSO






Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

Your script syntax is incorrect has to be:

*XDIM_MEMBERSET  ACCOUNT_RE842016 =  SALPRICE, SALQTY

*WHEN ACCOUNT_RE842016

*IS SALQTY

*REC(EXPRESSION = %VALUE%*[ACCOUNT_RE842016].[SALPRICE],ACCOUNT_RE842016=SALVALUE)

*ENDWHEN


Please read help about REC and WHEN ENDWHEN


And don't use useless COMMIT


Former Member
0 Likes

Hi Vadim,

Thanks but after this also i am not getting SALVALUE=150 in log .

It suppose to come or not ?

only script is executing successfully  and in log getting only QUERY script time details and record count details. but i think it should give multiplied values also means result ...



Thanks,

Prabhat

former_member186338
Active Contributor
0 Likes

Screenshot of the corrected script, please! And full text of the log after you press Execute.

P.S. Result in SALVALUE has to be in the log.

Former Member
0 Likes

UJKT

Environment = PKT_RELIANC_8_4_2016  Model ID= Reliance_Finance8416

PARAM

SALPRICE=10;SALQTY=15

Data region

ACCOUNT_RE842016 = SALVALUE

Script

*XDIM_MEMBERSET  ACCOUNT_RE842016 = SALPRICE, SALQTY

*WHEN ACCOUNT_RE842016

*IS SALQTY

*REC(EXPRESSION = %VALUE%*[ACCOUNT_RE842016].[SALPRICE],ACCOUNT_RE842016=SALVALUE)

*ENDWHEN

On Log

LGX:

*XDIM_MEMBERSET ACCOUNT_RE842016 = SALPRICE, SALQTY

*WHEN ACCOUNT_RE842016

*IS SALQTY

*REC(EXPRESSION = %VALUE%*[ACCOUNT_RE842016].[SALPRICE],ACCOUNT_RE842016=SALVALUE)

*ENDWHEN

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

LOG:

FILE:\ROOT\WEBFOLDERS\PKT_RELIANC_8_4_2016 \ADMINAPP\Reliance_Finance8416\TEST.LGF

USER:SAPUSER

APPSET:PKT_RELIANC_8_4_2016

APPLICATION:Reliance_Finance8416

[INFO] GET_DIM_LIST(): I_APPL_ID="Reliance_Finance8416", #dimensions=8

ACCOUNT_RE842016,CATEGORY,ENTITY_RE842016,MEASURES,RELI_AUDIT842016,REL_INTERO842016,RPTCURRENCY,TIME

#dim_memberset=1

ACCOUNT_RE842016:SALPRICE,SALQTY,2 in total.

REC :%VALUE%*[ACCOUNT_RE842016].[SALPRICE]

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 716.00 ms. 69  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

QUERY TIME : 635.00 ms. 138  RECORDS QUERIED OUT.

CALCULATION TIME IN TOTAL :80.00 ms.

69  RECORDS ARE GENERATED.

CALCULATION END.

SCRIPT RUNNING TIME IN TOTAL:1.71 s.

former_member186338
Active Contributor
0 Likes

Do you use Execute or Execute Simulate? For Simulate no data will be written and shown in the log.

By the way for this script no parameters has to be set! And data region has to be empty...

former_member186338
Active Contributor
0 Likes

Param line is not for setting values

With parham line you can set variables like $VAR$

Former Member
0 Likes

Your script is not doing what you want it to do, but you can see those 69 written records if you set parameter SCRIPT_LOGIC_DETAIL_LOG = ON in SPRO.

Former Member
0 Likes

Hi Gersh,

I simply want to debug and check the values to verify that the logic is working fine .I searched and found that with the help of UJKT we can do debugging but it is not displaying values only it's dispating time of executing time of script ..any way to check the result..

Thanks

former_member186338
Active Contributor
0 Likes

"I simply want to debug and check the values to verify that the logic is working fine" - but you are doing it in the wrong way!

Former Member
0 Likes

Debugging and checking values are two different things.

if you want to debug you can put a break-point in class CL_UJK_RUN_LOGIC. There you can see statement by statement being executed, but it will take a lot of time.

If you want just to see values that were written to the cube you can set that parameter I told you above.

former_member186338
Active Contributor
0 Likes

I am even not sure that he is pressing Execute instead of Execute Simulate...

Former Member
0 Likes

Hi Vadim ,

The result which I have given to you is by pressing the Execute (simulate) button.

But Off course I checked with only Execute button too.

But still on the result as SALES VALUE =150.

Only query time,record queried out and calculation time details I am getting which is useless for me .

former_member186338
Active Contributor
0 Likes

Execute simulate will never show written records - simulate will not write anything

Execute will show. But you can't use Param line to get SALES VALUE =150

You have to write SALPRICE, SALQTY values by input schedule, then execute the script!

Former Member
0 Likes

Hi Gersh,

I know that some where I am doing mistake so plz letvmevknow if there is any article where I can see the step by step to do debugging as well as check the values too..Thanks

former_member186338
Active Contributor
0 Likes

P.S. Read here:

P.P.S. If you are not getting record lis with Execute - then check SCRIPT_LOGIC_DETAIL_LOG = ON in SPRO