Load the calendar from SAP if possible. If that's not an option then create the calendar in an excel file and then load the excel file into qlikview. You will waste a lot more time if you're trying to create a script to generate such a calendar.
The SAP Table provides different data. I need to build the Calendar to reflect the different Posting Periods and Year Change. I found a script that calculates Pay Periods but still different from what I'm trying to achieve.
The Excel option is viable but with a lot of data entry.
PP 1 is the Posting Period (12 in total for each fiscal year. The hard part is that as you can see, the first posting period starts on the 23 Dec 2013 and finishes on the 22 of Jan 2014. Same happens when changing year from 2014 to 2015.