8 Replies Latest reply: Oct 28, 2015 5:50 AM by Sonia Fernández RSS

    Error reload FI QlikStart

    Sonia Fernández

      Good morning,

      I have a problema when I reload the 02_SAP-FI-GL_LAYOUT.QVW

      The error occurs when the script tries to generate the calendar.

      Not meeting how to fix it. Can you help me?


      Thank you


      Buenos días,

      Tengo un problema cuando recargo el qlikstart: 02_SAP-FI-GL_LAYOUT.QVW

      El error ocurre cuando el script intenta generar el calendario.

      No encuentro cómo solucionarlo. Pueden ayudarme?


      Muchas gracias.


      Attached log/Adjunto log:



      27/10/2015 12:45:48: 0121  Load

      27/10/2015 12:45:48: 0122    Date(-109936+(Iterno()-1),'YYYYMMDD') as [Posting Date_BUDAT]

      27/10/2015 12:45:48: 0123   

      27/10/2015 12:45:48: 0124   

      27/10/2015 12:45:48: 0125   Autogenerate 1

      27/10/2015 12:45:48: 0126   While Date(-109936+(Iterno()-1)) <=Date()

      27/10/2015 12:45:48: 0127  

      27/10/2015 12:45:48:       Error: Error in expression:

      27/10/2015 12:45:48:       Date takes 1-2 parameters

        • Re: Error reload FI QlikStart
          Sunny Talwar

          Can you share your script for this table?

          • Re: Error reload FI QlikStart
            Sonia Fernández


            My English is very basic. Sorry.


            //Get Max posting date

            max([Posting Date_BUDAT]) as MaxDate
            resident BSEG_Document_Segment;

            Let vEndDate = peek('MaxDate',-1,'MaxDate');

            Drop Table MaxDate;

            // Variables to set YTD and MTD

            Let vStartDate = num(date(YearStart(AddMonths(Today(),-5000,0)),'YYYYMMDD'));
            Let vCurrentDate=num(date(Today(),'YYYYMMDD'));
            Let vLY_YTD=num(AddMonths(Today(),-12,0));

            Year([Posting Date_BUDAT])&num(Month([Posting Date_BUDAT]),00) as [Posting Year Month],

            // YEAR
            if(InYear ([Posting Date_BUDAT], $(vCurrentDate), -1),1) as FLAG_LY, // All Dates Last Year

            if(InYear ([Posting Date_BUDAT], $(vCurrentDate), 0),1) as FLAG_TY, // All Dates This Year

            if(InYearToDate ([Posting Date_BUDAT], $(vCurrentDate), 0),1) as FLAG_YTD_TY// All Dates to Date this Year
            if(InYearToDate ([Posting Date_BUDAT], $(vCurrentDate), -1),1) as FLAG_YTD_LY// All Dates to Date Last Year

            // Quarter

            if(InQuarter ([Posting Date_BUDAT], $(vCurrentDate), 0),1) as FLAG_TQ_TY, // All Dates In Current Quarter this Year

            if(InQuarter ([Posting Date_BUDAT], $(vLY_YTD), 0),1) as FLAG_TQ_LY, // All Dates In Current Quarter Last Year

            // Month
            If( InMonth ([Posting Date_BUDAT], $(vCurrentDate),0),1) as FLAG_TM_TY, // All Dates This Month This Year

            If( InMonth ([Posting Date_BUDAT], $(vCurrentDate),-12),1) as FLAG_TM_LY, // All Dates This Month Last Year

            If( InMonth ([Posting Date_BUDAT], $(vCurrentDate), -1),1) as FLAG_PRM // All Dates Previous Month

            Date($(vStartDate)+(Iterno()-1),'YYYYMMDD') as [Posting Date_BUDAT]
            // Date, to be used as key field to transactions
            Autogenerate 1
            While Date($(vStartDate)+(Iterno()-1)) <=Date($(vEndDate))

            • Re: Error reload FI QlikStart
              Sonia Fernández

              El problema se debía a que BSEG_Document_Segment.qvd no se estaba cargando, debido a que no seleccioné correctamente el Plan contable en el frontal:


              Con lo que la variable vEndDate = NULL