11-03-2015 10:27 PM
I am currently developing a new report program and would like to use a parameterized CDS view. However, I am having some difficulty activating the new view with parameters.
Here are the particulars...
I have created the CDS view with two tables and one association, without the parameter for language. It activates without issue and I can use the Data Preview to view a sample from the view.
If I add a single parameter for language I cannot get the view to activate. The dialog states is completed successfully, but the icon states that it is not active and I am unable to use the data preview, it short dumps with an error that it cannot find the table.
I am perplexed. I have met all the requirements for using a CDS view with parameters yet, I cannot seem to make it work. What am I missing?
Any thoughts are appreciated.
Thank you.
11-04-2015 8:39 AM
Hi Justin,
is there any useful information in the Activation Log? You can view the activation log in AiE via the menu: Navigate > Open Activation Log. Use CTRL and click on the hyperlink to get further details. Search the activation log for errors using the search functionality. If the search box is not visible at the bottom of the view, activate it in the view's menu bar with the button "Show Search Toolbar".
Kind regards
Chris
11-04-2015 8:03 AM
Did you change the structure on the underlying table, too, so that it is not active?
In this case we encountered also problems: activiation not possible.
Best Regards,
Tobias
11-04-2015 8:39 AM
Hi Justin,
is there any useful information in the Activation Log? You can view the activation log in AiE via the menu: Navigate > Open Activation Log. Use CTRL and click on the hyperlink to get further details. Search the activation log for errors using the search functionality. If the search box is not visible at the bottom of the view, activate it in the view's menu bar with the button "Show Search Toolbar".
Kind regards
Chris
11-04-2015 1:48 PM
Danke Christiaan, this led me to the issue.
Before I got stuck, I had been deleting and recreating the view trying to get it coded correctly. I then added the "with parameters.." after creating/activating the view without it. When I add the parameters, does it then have to delete the existing view and recreate it as part of the activation? Could that be part of my issue?
Anyway, I completely deleted the DDL source and recreated using different names, with parameters, and it activated just as I hoped for. I am now able to preview the data as well.
KR,
Justin
11-04-2015 2:13 PM
Hi Justin,
in general the activation will drop and re-create the database object when the DDL source has been modified. In your case this wasn't successful and you had to delete the view manually (by deleting the DDL source) .
As Daniel mentioned below (thanks Daniel), this issue has been corrected in SAP NetWeaver AS ABAP 7.4 SP12 and a SAP Note has been provided for SP8 through SP11 (2160038 - Error message during activation: View cannot be deleted from the database).
Cheers
Chris
11-04-2015 2:17 PM
Thank you again, to you and Daniel.
I will see about implementing the note.
Justin
11-04-2015 12:00 PM
Hi Justin,
we are facing the same problem in a non-HANA environment.
If you try to add a parameter to an existing CDS view, it will not activate. Another problem is, when you change the structure of the underlying database table, the CDS view with parameter will not activate too. That's what Tobias was writing about.
Try the following notes:
Cheers,
Daniel
11-04-2015 2:31 PM
Update:
Both notes doesn't help, when you change the structure of the database table...