Skip to Content

Data preview error in CDS view 'C_MaterialStockActual'

I try to activate CDS view 'C_MaterialStockActual' in HANA Studio.

When I confirm data in data preview (right click > Open With > Data Preview), parameter value is required about 'P_LANGUAGE'.

I want to type value like "JA" or "EN", but error message "Enter a valid value; P_Language value cannot exceed more than the specified limit of 1." is displayed (see Capture).
As a result, I can't acquire data and no data is displayed in data preview.

Please give me advice to void this error.

Regards.

==========================================================

Capture: Screen shot about 'Enter Parameter Values'

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 28, 2020 at 03:26 AM

    Hi,

    This is a bit complicated. It is true that you can see the data from SE16N(through SQL view "CMATSTOCKACT"), and cannot see it from ABAP Development Tools(through CDS view "C_MaterialStockActual").

    The reason why this happens is that CDS access control by DCL(Data Control Language) is applied to C_MaterialStockActual when you access from ABAP Development Tools(in your words, HANA Studio). You could see the data on SE16N because it is accessed through SQL View CMATSTOCKACT, where CDS access control does not work.

    For the datails of DCL, please check the following SAP Blog post:

    All About Data Control Language (DCLs)

    Let's search and check the DCL artifact from ABAP Development Tools.

    1. Open ABAP Develpment Object

    2. Search "C_MaterialStockActual" and select the object with "Access Control" tag

    3. You can see the CDS access control by DCL is defined here, virtually saying that every user cannot see the data directly from C_Materialstockactual.

    It says that "Query view must only be called by analytical engine" in the comment area. For example, you can see the data directly from C_MATERIALSTOCKACTUAL when you use Query Browser(Fiori app), which uses analytical engine. In that case, analytical engine automatically identifies that "C_MATERIALSTOCKACTUAL is a query," and selects data from source of the query - I_MaterialStock.

    This is the generic specification for Analytic Query, which is with Annotation "@Analytics.query: true".

    Hope it helps.


    18hwd.png (21.8 kB)
    qrra5.png (43.2 kB)
    oopzf.png (51.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded