Skip to Content
avatar image
Former Member

Default values for parameter in ABAP CDS view

Dear SCN-Community,

currently I´m playing with CDS Views and input parameters.

At view execution the parameter prompt appears without any value help or default value. Is there an option to setup such a LOV or default value that the user knows from BW?

Kind regards


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 12, 2016 at 09:35 AM

    Hi Andre,

    Value help \ default values won't work here as you are trying to get a data preview of the view that you created in the Eclipse IDE.

    Value help or default values works for consumption views that are interpreted either by the Analytical or UI engine.

    For example, you can create a CDS-based query on top of the cube that you created and assign the default values there. Something like this.

    @Analytics.query: true
    @VDM.viewType: #CONSUMPTION
    define view ZC_JOrdersQuery
       with parameters
       @Consumption.defaultValue: '<date_in_format_yyyymmdd>'
       p_keydate: abap.dats
       as select from ZAJ_C_ORDERS

    You can also default it to the system date using the below annotation.

    @Environment.systemField: #SYSTEM_DATE

    As for the value help, as these are ABAP CDS views, the value help corresponds to the data element assigned to the parameter.

    But again this works for consumption views which are interpreted either by an Analytical or UI engine.

    Let Me know if this answers your query.


    Sagar J.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 19, 2016 at 08:07 AM

    Hi André,

    I don't have an answer to your question, but the suggestion that you add "ABAP Development" as another secondary tag.

    -> This might bring it to the attention of more CDS-experts.

    After all, CDS-Views are no S/4HANA exclusives, but a general feature of modern ABAP.



    Add comment
    10|10000 characters needed characters exceeded