cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a table using hdbtable

former_member205400
Active Participant
0 Kudos
662

Friends,

We are moving towards creating tables using the hdbtable syntax and I was looking at this link:

http://help.sap.com/saphelp_hanaplatform/helpdata/en/89/cbf999e6004be3a5324b8f9ef0c53f/content.htm?f...

and I can't seem to find the "Team | Activate"

What am I doing wrong here I thought I followed the example.

Mike

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

It looks like the project isn't part of a repository workspace - if you look closely, you'll see that it's missing the little gold cylinder (present on some of your other projects there) that signifies repository. To solve this, you can click on the top level folder, navigate to the Team link, and click the "Share Project" link (it's greyed out in your screenshot as you have clicked on a file rather than the folder). From there, you should be able to add it to an existing repository workspace, or create a new one for it. (See here for some info on doing that, in case I'm not clear enough!) Then you should be able to activate.

I hope this helps!

Jen

former_member205400
Active Participant
0 Kudos

Jennifer,

I got back to looking at this and I probably wasn't clear with what I did and what I want to do.

I went to the Development Perspective and then r-clicked on the Repository and created a new repository.

I created a new package called "ddl" and then using the wizard a .hdbtable file with some table properties like you see in this image

I want to use the dll package to place table definitions in to move up the landscape using HALM.

I'd like this table to be called "test_hillmw" and be in the schema "HILLMW". When I r-click in the test_hillmw.hdbtable file and select Activate I get this error:

A SQL error occurred while creating the table in the schema "HILLMW"

I see that red x in the package hierarchy and I think that is hindering me.

Thanks for your review.

Mike

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi Michael,

Look at Col4 on your hdbtable: that's set to precision 2, scale 3. That will not work.The table wont be created due to that.

Have you looked into my reply earlier? Did changing that to precision 3, scale 2 worked?

Cheers,

Lucas de Oliveira

former_member205400
Active Participant
0 Kudos

Lucas,

Perfect .. except .... that it creates a table called edw.dll::test_hillmw as shown

The table should be called "test_hillmw" and not edw.ddl::test_hillmw

Is there something I need to do to the hdbtable definition?

Thanks,

Mike

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi Mike,

If you defined your hdbtable under edw.ddl folder then the table name is correct. Nothing wrong here.

BRs,

Lucas de Oliveira

former_member205400
Active Participant
0 Kudos

Lucas,

I want to create the table in schema "HILLMW" as "test_hillmw" and not edw.ddl::test_hillmw but I still want to use .hdbtable because I want to collect the DDL and use it in my transports up the landscape.

Can I 1) change the properties in .hdbtable, or 2) what is another way I should be capturing this create statement and running it in with my transports?

Mike

SergioG_TX
Active Contributor
0 Kudos

Mike,

the reason why the name of the table is like that is because of the fully qualified name as mentioned by Lucas. I do not think you can specify the design time object without the fully qualified name. Even if you create the table using hdbtable or hdbdd (CDS) your table name will always contain the fully qualified name. if you created the table as a run time object then 1) you wont have the fully qualified name  2) you cant transport it as a design time object as you want

former_member205400
Active Participant
0 Kudos

Serge,

Is there another object or method we can create for handling "miscellaneous sql" then like .hdbdll or something?

We can't be using objects like that in our env and it would be good to capture other DDL statements and be able to apply them sequentially with the objects as they move up the landscape.

Today we handle any table create or change or procedure outside the transport process.

Mike

SergioG_TX
Active Contributor
0 Kudos

Mike,

There are only the hdbdd files (CDS) or hdbtable as you already use. what you could is to create some CDS tables (inside a pre-release context)  and once you are ready to move them up the environments, then you would have to rename them to the context you need them in.

Keep in mind the fully qualified name, including the context of the CDS file is used on the name of the design time object. If you are using Change Recording, then you can include that file (pre-release context) or omit it as it would be your dev objects that live there so that you do not migrate them before they are ready.

hope this helps!

Former Member
0 Kudos

Hi,

you can just create a SYNONYM to the FQN of the table:

    CREATE PUBLIC SYNONYM

       myTable

    FOR

      "SCHEMA"."com.myApp.1_0_0.data::mytable"

    ;

Answers (1)

Answers (1)

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi Mike,

You probably want to look into the indexserver trace files and see what are the errors for component tableruntime. You'll probably bump into something like:

[43185]{301910}[41/4717481] 2016-04-20 17:22:57.265751 e tableruntime     TableRuntime.cpp(00344) : activationID 49: Errornous statement: CREATE COLUMN TABLE "DEVSANDBOX"."i829138.sandbox.domainTests::MyTab" ("Col1" VARCHAR(20) NOT NULL, "Col4" DECIMAL(2, 3) NOT NULL)

[43185]{301910}[41/4717481] 2016-04-20 17:22:57.265759 e tableruntime     TableRuntime.cpp(00345) : activationID 49: decimal scale specifier is out of range

So Col4 is trying to use a scale bigger than the precision. That's not going to work since the scale needs to be as big as the precision established. I think we have a typo in the doc page you referred.

BRs,

Lucas de Oliveira