on 07-06-2018 9:23 PM
Hello Gurus
My objective is to write a Consumption view on top of the CDS View 'fglv_faglflexa' and eventually consume it using Analysis for Excel (version AOFFICE25SP04P_1-80002421). We are on S4Hana 1610 with SAP_BW on 751 SP6.
I created an Interface View
@AbapCatalog.sqlViewName: 'YIFLGFLEXA'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Interface View on FGLVFLEXA CDS View'
define view Y_I_FGLVFLEXA as select from fglv_faglflexa { ryear , rldnr , rbukrs , rmvct , zzricode }
YIFLGFLEXA view is ACTIVATED without any error.
Then I created a Consumption View
@AbapCatalog.sqlViewName: 'YFGLVFAGLFLEXA' @AccessControl.authorizationCheck: #NOT_ALLOWED
@VDM.viewType: #CONSUMPTION
@Analytics: { dataExtraction.enabled: true, query: true } @AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE @ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MIXED
@EndUserText.label: 'Customize CDS view FGLV_FAGLFLEXA'
define view YFGLV_FAGLFLEXA as select from yiflgflexa {
@Consumption.filter:{ selectionType:#RANGE, multipleSelections: true, mandatory: false }
@AnalyticsDetails.query.axis: #ROWS rldnr,
@AnalyticsDetails.query.axis: #ROWS rmvct,
@AnalyticsDetails.query.axis: #ROWS zzricode
}
When I perform 'Check', YFGLVFAGLFLEXA does not throw any error. During ACTIVATION, it throws an error
Error reading infoprovider for CDS View YIFLGFLEXA [Analytics]
This error appears as a red cross on the left hand side of the line define view YFGLV_FAGLFLEXA
Any help will be highly appreciated.
Regards
Kalyan
Hi Nora
When I add @Analytics: { dataCategory: #DIMENSION }, it gives me compile time error, says "Annotation name ANALYTICS is used multiple times"
Here is my complete code:
@AbapCatalog.sqlViewName: 'YCBKPFFAGL'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@VDM.viewType: #CONSUMPTION
@Analytics: { dataExtraction.enabled: true, query: true }
@Analytics: { dataCategory: #DIMENSION }
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MIXED
@EndUserText.label: 'Consumption View on BKPF FAGLFLEXA'
define view Y_C_BKPF_FAGL as select from Y_I_BKPFFAGL {
@Consumption.filter:{selectionType:#RANGE, multipleSelections: true, mandatory: false}
@AnalyticsDetails.query.axis: #ROWS rclnt,
@AnalyticsDetails.query.axis: #ROWS Belnr,
@AnalyticsDetails.query.axis: #ROWS rbukrs,
@AnalyticsDetails.query.axis: #ROWS ryear,
ksl, wsl }
Pl help solve this issue.
Regards
Kalyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kalyan,
the error message is correct, you have now mixed these two statements in one CDS view:
@Analytics: { query: true } and @Analytics: { dataCategory: #DIMENSION } .
Keep in mind a Query CDS view can only read data from a InfoProvider CDS view.
Looking in to your definition above: ...
define view Y_C_BKPF_FAGL as select from Y_I_BKPFFAGL { ... }
Y_C_BKPF_FAGL seems to be used as the CDS query and can only use @Analytics: { query: true } if the source CDS view Y_I_BKPFFAGL has data category: @Analytics: { dataCategory: #DIMENSION, dataExtraction.enabled: true } or @Analytics: { dataCategory: #CUBE, dataExtraction.enabled: true }.
Again, check the Wiki links provided:
Cheers, Nora
Hi Nora
Thanks for your response. Please look at the blog URL
https://blogs.sap.com/2017/05/12/consumption-of-cds-views-in-analysis-for-office/
In its Consumption View Z_C_SFLIGHT_SCARR, it uses @AnalyticsDetails.query.axis annotation in a consumption view. Kindly educate me what will be the right code to display my Consumption view YFGLV_FAGLFLEXA. My intention is to expose this Consumption View using Analysis for Office for business users to slice & dice the data.
Best Regards
Kalyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kalyan,
sorry, I guess overlooked that you have actually set YFGLV_FAGLFLEXA to be a CDSquery with this:
@Analytics: { dataExtraction.enabled: true, query: true }
Now the source view also needs some data category #CUBE or #DIMENSION to be consumed as a infoprovider in a CDS query.
Something like this in the header:
"...
@AbapCatalog.sqlViewName:'YIFLGFLEXA'
@AbapCatalog.compiler.compareFilter:true
@AccessControl.authorizationCheck:#NOT_REQUIRED
@Analytics:{dataCategory:#CUBE}
@EndUserText.label:'Interface View on FGLVFLEXA CDS View'
..."
Afterwards, the CDS query should recognize it as an BW InfoProvider.
Cheers,
Nora
Hi Kalyan,
you are using the @AnalyticsDetails.query.axis annotation in a consumption view, this makes no sense and is not relevant for a view of type @Analytics: { dataExtraction.enabled: true, query: true }. It is sufficient if you just list you fields you want to use here.
See for some review the samples in the SAP Community Wiki:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.