SAP Knowledge Base Article - Public

3755530 - P_keydate not visible in custom analytical query and preview defaults to current date – SAP S/4HANA Cloud Public Edition

Symptom

 There is a parameter "P_KeyDate" defined in the custom analytical query but it does not show in the preview filter section, and the system defaults to the current date.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. In the Custom Analytical Queries application, select CDS view as the data source.
  2. Click Preview.
  3. Observe that the P_KeyDate parameter is not offered on the input parameter screen and the current date is used.

Cause

The parameter P_KeyDate is defined using the system field SY-DATE without derivation or default value annotations, so the system assigns the current date and treats the parameter as hidden at runtime.

Resolution

  1. Open the custom analytical query based on CDS view
  2. Go to the Parameters tab, select P_KeyDate, enable “Filter with Derivation Function,” and maintain the required (mandatory) derivation input.
  3. Use P_KeyDate in a dimension: open a relevant dimension, choose “Filter with Fixed Values,” in Included Fixed Values select Add, then Parameter, and choose P_KeyDate.
  4. In the Parameters tab, maintain a label for P_KeyDate so it is shown to users.
  5. Save the query and run Preview; the P_KeyDate input field should now be available at runtime.

See Also

KB1375252 - Parameter "P_KeyDate" Is Not Visible in the Filters of Custom Analytical Query Edit

Keywords

custom analytical queries, supplier aging, p_keydate, key date parameter, current date default, preview, filter with derivation function, fixed values filter, cds view, query runtime parameters , KBA , BC-SRV-APS-EXT-AQD , Fiori based Query Designer , Problem

Product

SAP S/4HANA Cloud Public Edition all versions