cancel
Showing results for 
Search instead for 
Did you mean: 

In Eclipse CDS view C_RevenueFromInvoiceQry is not displaying data in Data preview.

0 Kudos
202

Dear Experts,

I am analyzing CDS views for creating Sales Reports I found, I_BillingDocumentItemCube and C_RevenueFromInvoiceQry. When I execute first view in Eclipse ( I_BillingDocumentItemCube ) this view is fetching data.

But when I am executing C_RevenueFromInvoiceQry in Eclipse it is displaying blank records for same input parameter.

Please guide.

Thanks and Regards,

Narayansingh Bhandari

View Entire Topic
tobias_grimm_ksg
Explorer
0 Kudos

This is an old question, but maybe someone else comes across the same problem.

When running a SELECT statement from Eclipse or ABAP, the following condition will be appended to the WHERE clause: 

AND N'CDS_Access_Control' != N'PRIVILEGED_ONLY'

This will trigger the access control for this view, wich is defined as:

define role C_RevenueFromInvoiceQry{
  grant select on C_RevenueFromInvoiceQry where
    BillingDocument is null and BillingDocument is not null;
}

This basically means you can't select any rows. Apparently SAP does not intent for this view to be querried directly and this is their way to block direct access.

The solution would be to modify the view or update all developments that use this view directly to use the underlying Cube View I_BillingDocumentItemCube instead.