SAP Knowledge Base Article - Public

2949807 - Filter on Custom Data Source using Month element returns Error or Incorrect Results


You have a Custom Data Source with a an element of data type Month. When trying to filter by this element on the Data Source you get incorrect results or see the below errors:

"Value ABC not valid for variable XYZ"

"Check your variable selections"


  • SAP Cloud for Customer
  • SAP Business ByDesign
  • SAP Cloud Application Studio

Reproducing the Issue


  • You have a Custom or Extension Business Object.
  • You have created a Custom element of data type Month.
  • You have created a Custom or Extension Data Source for the Business Object.

Steps to reproduce:

  1. Open View Design Data Sources under Business Analytics Work Center.
  2. Search fro your Custom Data Source.
  3. Click Preview.
  4. Enter a value (for example, 6, 06, 0006) for the Month element.


The data type Month has a maximum character limit of four characters. When searching in the Data Source, the system expects a basic number (1 through 12). The Data Source then converts the value to four characters by appending "--0" or "--" in the case of 10, 11, 12.

Also an issue with another data type YearMonth - it will raise a similar error when querying through data source.

The data type YearMonth has a maximum character limit of 7 with format YYYY-MM. Any other format will prevent effective querying by this element.


You need to store the variable as the converted value (for example, --06) in the back end and use the basic number (for example, 6) in the Data Source filter. This is how the Month data type works in conjunction with Data Sources.

The other option would be to use another data type.

See Also

See SAP Knowledge Based Articles:

2535152 - Inconsistencies in Report Selections / Filters in Custom Reports

2679456 - Report Filters Not Working: Value Not Valid For Variable

2534002 - Filtering a Report Throws Error Message 'Value not Valid for Variable'

2541093 - Error in embedded report: Value not Valid for Variable


PDI, SDK, datasource, datatype, design, report, analytics, APC_V_MONTH , KBA , AP-RC-BDS-ANA , ByDesign Studio Analytics , Problem


SAP Business ByDesign all versions ; SAP Cloud Applications Studio all versions ; SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions