Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Activating CDS View With Parameters

jdloranger
Participant
0 Kudos

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...

  1. Developing on NW 7.4 SP11
  2. Using Eclipse Mars w/ADT 2.51
  3. HANA is our database

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.

1 ACCEPTED SOLUTION

former_member205436
Participant
0 Kudos

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

7 REPLIES 7

ttrapp
Active Contributor
0 Kudos

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

former_member205436
Participant
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

Thank you again, to you and Daniel.

I will see about implementing the note.

Justin

Former Member

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:


  • 2150018
  • 2160038

Cheers,

Daniel

0 Kudos

Update:

Both notes doesn't help, when you change the structure of the database table...