Greeting to the community!
Following Code produces an empty table and I do not have any clue why this is happening!
BGRAD:
LOAD Distinct
// num#(PERNR) AS PERNR,
PERNR,
BSGRD,
Num(BEGDA) AS BStart,
Num(ENDDA) AS BEnd
FROM [..\DATA\00-08000000-90-100-PA0008.qvd](qvd);
Store [BGRAD] into [..\DATA\BGRAD.qvd](qvd); //25062 Records read
inner Join IntervalMatch (DATUM_SAP, PERNR)
LOAD distinct
BStart,
BEnd,
// num#(PERNR) AS PERNR
PERNR
Resident BGRAD;
Store [BGRAD] into [..\DATA\BGRAD1.qvd](qvd); // 0 records read
The results look like this (log file):
CAL-1 << 00-08000000-90-100-T528T (row-based qvd optimized) 8.752 Lines fetched
HRP1001 << 00-08000000-90-100-HRP1001 8.569 Lines fetched
HRP1001 311.680 Lines fetched
BASE << HRP1001 311.680 Lines fetched
...
BGRAD << 00-08000000-90-100-PA0008 25.063 Lines fetched
BGRAD-3 << BGRAD 0 Lines fetched
==================
DATUM_SAP is produced as follow:
For y=Year(Today()) to (Year(Today())+5)
For m=1 to 12
CAL:
LOAD
MakeDate($(y),$(m),1) AS DATUM_REAL,
Num(MakeDate($(y),$(m),1)) AS DATUM_SAP
AutoGenerate(1);
Next
Next
Left Join
LOAD Distinct
PLANS
FROM [..\DATA\00-08000000-90-100-T528T.qvd](qvd);
HRP1001:
LOAD
RSIGN,
RELAT,
BEGDA,
ENDDA,
SUBTY,
SCLAS,
SOBID,
PROZT,
Num(BEGDA) AS Start,
Num(ENDDA) AS End,
OBJID AS PLANS,
OBJID
FROM [..\DATA\00-08000000-90-100-HRP1001.qvd](qvd)
WHERE PLVAR = $(vPLVAR) and OTYPE='S';
Inner Join IntervalMatch (DATUM_SAP, PLANS)
// matchfield:DATUM_SAP contains the discrete numeric value to be linked to intervals
// keyfield: contains attribute that are to be matched in the transformation
LOAD Distinct
Start,
End,
PLANS
Resident HRP1001;
DROP Table CAL;
Alexandru Draghici
BICC at Komm.ONE