I have written following script for the distribution planning, when we execute this script on UJKT system return ZERO value, however there are many non-zero record available in the tables.
For example in the lookup statement of Sales Dist. Driver, when we add DISTRIBUTORS dimension system starts giving the values but when I remove the distributors system begin giving zero value. As per my understanding system should bring all record which have distributor or no distributor values i.e. system should not make any dimension mandatory in lookup statement.
I have attached the screen shot of the result given on UJKT.
SCRIPT
*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
*XDIM_MEMBERSET CATEGORY =%CATEGORY_SET%
//*XDIM_MEMBERSET TIME = "2014.01
//*XDIM_MEMBERSET COST_CENTER = "1010101001"
//*XDIM_MEMBERSET DISTRIBUTORS = "20001"
*XDIM_MEMBERSET DIST_METHOD = %DIST_METHOD_SET%
//*XDIM_MEMBERSET PRODUCT = "0100100101"
//*XDIM_MEMBERSET REGION = "10001"
*LOOKUP Sales_Main//the real name of model 1
*DIM CATEGORY = "Plan"
*DIM ENTITY = "1000"
//*DIM REGION = "10001"
//*DIM TIME = "2014.01"
*DIM QTY: SALES_ACCOUNT ="QTY"
*ENDLOOKUP
*LOOKUP Sales_Dist_Driver//the real name of model 2
*DIM CATEGORY = "Plan"
*DIM ENTITY = %ENTITY_SET%
*DIM VEHICLE = "50FT"
//*DIM REGION = "10001"
//*DIM TIME = "2014.01"
*DIM WAREHOUSE = %WAREHOUSE_SET%
//*DIM DISTRIBUTORS = "20001"
*DIM CAPACITY: ACC_SDIST_DRIVER ="CAPACITY"
*ENDLOOKUP
*WHEN_REF_DATA = MASTER_DATA
*WHEN ACC_SALESDIST
*IS "NO_Trip"
*REC(EXPRESSION = LOOKUP(QTY) * LOOKUP(CAPACITY))
*ENDWHEN
*COMMIT
RESULTS
#dim_memberset=4
WAREHOUSE:NOWH,1 in total.
ENTITY:1000,1 in total.
CATEGORY:Plan,1 in total.
DIST_METHOD:Dedicated,1 in total.
REC :LOOKUP(QTY) * LOOKUP(CAPACITY)
CALCULATION BEGIN:
QUERY PROCESSING DATA
QUERY TIME : 1.00 ms. 1 RECORDS QUERIED OUT.
QUERY REFERENCE DATA
QUERY LOOKUP DATA FROM APPLICATION: Sales_Main
QUERY TIME : 1.00 ms. 27 RECORDS QUERIED OUT.
QUERY LOOKUP DATA FROM APPLICATION: Sales_Dist_Driver
QUERY TIME : 0.00 ms. 3 RECORDS QUERIED OUT.
CALCULATION TIME IN TOTAL :0.00 ms.
1 RECORDS ARE GENERATED.
CALCULATION END.
ENDWHEN ACCUMULATION: 1 RECORDS ARE GENERATED.
DATA TO WRITE BACK:
ACC_SALESDIST CATEGORY COST_CENTER DISTRIBUTORS DIST_METHOD ENTITY PRODUCT REGION TIME SIGNEDDATA
NO_Trip Plan 1010101001 20001 Dedicated 1000 0100100101 10001 2014.01 0.00
1 RECORDS HAVE BEEN WRITTEN BACK.
WRITING TIME :3.00 ms.
SCRIPT RUNNING TIME IN TOTAL:5.00 s.
LOG END TIME:2015-09-06 19:31:13
Please suggest the solution