2024 Nov 19 5:05 PM - edited 2024 Nov 19 5:07 PM
Hi everyone
I have a cds view that extracts some data from the swwflexproc, swwwihead and swwuserwi tables. I have already created the necessary service definition and binding for the view. However after activating and publishing the service binding, when I run the application using the fiori elements preview, the fields that display do not match up with those defined in my cds view. I am new to abap and followed the following tutorial: Create an ABAP Core Data Services (CDS) View in ABAP On-Premise | SAP Tutorials , https://developers.sap.com/tutorials/abap-environment-create-cds-view.html but cannot seem to figure out where I am going wrong. Any assistance would be greatly appreciated.
my cds view definition:
define view Z_Test_Report with parameters @Environment.systemField: #SYSTEM_DATE p_currdate: datum
as select from swwwihead as ihead
left outer join swwuserwi as userwi on ihead.wi_id = userwi.wi_id
left outer join swwflexproc as flex on ihead.wi_id = flex.wi_id
{
key flex.appl_obj_id as AppplicationObjectID,
ihead.wi_id as WorkItemID,
ihead.wi_cd as Date,
ihead.wi_aagent as Agent,
coalesce(ihead.wi_stat, 'In progress') as Status,
dats_days_between(ihead.wi_cd, :p_currdate) as Overdue,
ihead.wi_text as Comments,
}
Fields for selection in the fiori elements preview:
service definition:
@EndUserText.label: 'srvc definition exposing Z_Test_Report'
define service Z_CDS_DEFINITION {
expose Z_Test_Report as TR;
}
Request clarification before answering.
After some testing, I found that activating the view via the SAP GUI as well as the @EndUserText.Label annotation seemed to help with the field names.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess you need to annotate the fields of the CDS view to display them in the app.
This can be done with:
@ui.lineItem: [{ position: 10 }]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @MBartsch71 , I have already tried this but have not noticed a change in the fields displayed
User | Count |
---|---|
31 | |
15 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.