1 Reply Latest reply: Aug 3, 2015 11:39 AM by Simon Hogg RSS

    SAP BW not accepting Characteristic Restriction on query

    Simon Hogg

      I am looping through months and years to get a MONTH.YEAR restriction on a BW query;

       

      For vYear = 2010 to 2015

      For vMonth = 1 to 12

      vMonth = NUM(vMonth,'00')&'.'&vYear

       

      <QUERY GOES HERE>

       

      WHERE{[0CALMONTH].[$(vMonth)]};

      Next vMonth

      Next vYear

       

      This fails on the first iteration with the error;

      ErrorSource: MDrmSap.2, ErrorMsg: Value 01.2010 for characteristic 0CALMONTH unknown

      ...

      FROM [0ACCOUNT/Y_ACCOUNT_QUERY] WHERE {[0CALMONTH].[01.2010]}

       

      But this is exactly the correct format (I think).

       

      Has anyone else had this problem and knows how to overcome it?  I wonder if I need some quote marks somewhere?