Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Managed to create a master calendar but i get loop..any help would be appreciated.
See the attached for the datamodel
My script for this looks like:
let vStartDate= num(MakeDate(2010));
cal1:
load Date($(vStartDate)+RowNo()-1) as Date
AutoGenerate(num(today())- $(vStartDate)+1);
cal2:
load
*,
year(Date) as [Year],
Month(Date) as [Month],
Day(Date) as Day,
dual((Month(Date) &'-'&Year(Date)),num(MakeDate(year(Date),month(Date)))) as Monthyear
Resident cal1;
drop table cal1;
CalendarLinkage:
LOAD
%InvoiceBillingDocument_Key,
'Open Date' as DataType,
Date(DateValueSales) as Date//CalendarDate
FROM data\SAPMM\Projects\BSID_OpenItems_Header.qvd (qvd);
CONCATENATE (CalendarLinkage)
LOAD
%InvoiceBillingDocument_Key ,
'Close Date' as DataType,
Date(DateValueSales_C) as Date//CalendarDate
FROM data\SAPMM\Projects\BSAD_ClosedItems_Header.qvd (qvd);
CONCATENATE (CalendarLinkage)
LOAD
%KEY_BELNR_BUZEI_KOKRS_MANDT,
'COVP Date' as DataType,
Date([Posting Date]) as Date
From Data\SAPMM\Projects\COVP.qvd(Qvd) WHERE Year_Pur>2010 and Year_Pur<=Year(today()) and Month_Pur<NUM(Month(today(1)));