How to Create a Copy of Column Table in HANA Database

You want to create a copy of column table in SAP HANA database. The requirement is to take from the existing column table in SAP HANA database. Please be noted that the copy is just copying the table structure without the data entries.

From the HANA studio, navigate to the following tree, Catalog > SAPABAP1 (your schema) > Table. We would advise you to use the filter function to search the table. In this example, we will be using table SNAP. Next, double click on the table.

From the right panel, click on Export SQL icon (yellow highlighted). This will prompt another window of Export SQL.

From the newly open window, you will see the SQL query to create column table SNAP. Copy the command and you can change the table name SNAP to other name to create a copy.

CREATE COLUMN TABLE "SAPABAP1"."SNAP_COPY" 
("DATUM" NVARCHAR(8) DEFAULT '00000000' NOT NULL ,
	 "UZEIT" NVARCHAR(6) DEFAULT '000000' NOT NULL ,
	 "AHOST" NVARCHAR(32) DEFAULT '' NOT NULL ,
	 "UNAME" NVARCHAR(12) DEFAULT '' NOT NULL ,
	 "MANDT" NVARCHAR(3) DEFAULT '000' NOT NULL ,
	 "MODNO" INTEGER CS_INT DEFAULT 0 NOT NULL ,
	 "SEQNO" NVARCHAR(3) DEFAULT '' NOT NULL ,
	 "XHOLD" NVARCHAR(1) DEFAULT '' NOT NULL ,
	 "FLIST" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 "FLIST02" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 "FLIST03" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 "FLIST04" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 "FLIST05" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 "FLIST06" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 "FLIST07" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 "FLIST08" NVARCHAR(200) DEFAULT '' NOT NULL ,
	 CONSTRAINT "SNAP^0" PRIMARY KEY ("DATUM",
	 "UZEIT",
	 "AHOST",
	 "UNAME",
	 "MANDT",
	 "MODNO",
	 "SEQNO")) UNLOAD PRIORITY 5 AUTO MERGE 

You May Also Like

1 Comment

  1. That’s Great! Thanks for helping us by sharing these kind of information. even i was looking for this. you described it well.
    Nice Post.

Leave a Reply?