Skip to Content
author's profile photo Former Member
Former Member

Creating views and procedures

Hello friends,

I have few ECC tables replicated onto HANA system. Now I need to create views and procedures for those tables.

I am familiar with one method i.e to right click on table and choose to "CREATE VIEW" or right click on procedures inside schema and choose "NEW Procedure" .

But now, I would like to know how I could accomplish the same with the way exaplined by @Thomas_Jung in the tutorial on OpenSap. I tried this for example:


schema = "SYSTEM";

query = "SELECT T0.\"REFID\", T0.\"LIFNR\", from

\"SYSTEM\".\"Tables::_ETRAG\" T0 ";

Please do not mock if this incredibly wrong, but it was just a try which did not work as expected. Normally we declare something like this:

\"SAP_HANA_EPM_DEMO\".\"sap.hana.democontent.epm.data::purchaseOrder\"

But for the tables which I have are not defined and dont exist in the repository. They are replicated using BODS.

Do anyone have ideas how I could go with the following.

Any help would be appreciated. Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jan 06, 2014 at 10:12 PM

    If you are building a view on catalog tables (as opposed to repository tables), then you don't need the namespace part at all. Just supply the schema.table_name. If your table name is _ETRAG and its really in schema SYSTEM (which seems a bit odd) then the syntax would be:

    query = "SELECT REFID, LIFNR FROM SYSTEM._ETRAG ";

    If you just have one table, you don't need the table alias of T0. Of course if you just have one table, do you really need a view? Also you don't have to quote the field names, table names or schema if they are all upper case and don't contain any special characters. This is generally the case with replicated tables from ERP.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Thomas,

      Thanks fory our quick reply. You are right, I should not use the namespace at all. I used T0 because I copy pasted it from an example and I accept that I was too lazy to make the necessary formatting.

      Thanks you so much. That was really helpful.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.