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: 

table rename

Former Member
0 Kudos

hi gurus....

how to rename a table?

20 REPLIES 20

JozsefSzikszai
Active Contributor
0 Kudos

hi,

do you mean database table? No way... Only copy and delete the old one, but that will be another table, which means the data inside will be lost (you have to copy separately)

hope this helps

ec

matt
Active Contributor
0 Kudos

>

> hi,

>

> do you mean database table? No way... Only copy and delete the old one, but that will be another table, which means the data inside will be lost (you have to copy separately)

>

> hope this helps

> ec

Surely that is a way, rather a "no way". Copy the table. Write a program to copy data from one to the other. Delete the data from the first table. Delete the table.

job done

Former Member
0 Kudos

You cant rename a table .

Former Member
0 Kudos

hi!

we can't rename a table after creating it

matt
Active Contributor
0 Kudos

>

> hi!

>

> we can't rename a table after creating it

Yes you can. See my post above.

0 Kudos

> Matthew Billingham wrote:

> > prasanth kumar wrote:

> > hi!

> >

> > we can't rename a table after creating it

>

> Yes you can. See my post above.

Though that is strictly speaking "copy" and not "rename".

I know of a few places in SAP where one can "rename" data in certain key fields of tables. It's always a messy business I think.

@ Diane: In addition to Yes and No, is there also a 3rd option on the interview answer sheet called Hopefully not ?

matt
Active Contributor
0 Kudos

Ah but... "renames" are usually implemented as "copy/deletes" anyway!

shadow
Participant
0 Kudos

Hi diana,

if it is predefine table? No way ,Only copy and delete the old one, but that will be another table, which means the data inside will be lost (you have to copy separately)

With Regard's

shaik.

Former Member
0 Kudos

>

> Hi diana,

>

> if it is predefine table? No way ,Only copy and delete the old one, but that will be another table, which means the data inside will be lost (you have to copy separately)

>

>

> With Regard's

> shaik.

You liked Eric's answer so much that you wanted it to become your own as well?

Perhaps you should rather have posted something like:

> Damn... I wish I had said that...

???

Julius

Former Member
0 Kudos

hi,

its not possible to rename a table but you can copy the the table with your requried name.

0 Kudos

Two days hence the question been asked. I think this reply has the most value-addtion.

pk

Former Member
0 Kudos

Hi,

Do like this.

1.Go to se11 and copy the table zemp to zemp111.

2.Run the below report:

TABLES:

zemp,zemp111.

*SELECT **

FROM zemp

INTO zemp.

zemp111 = zemp.

INSERT zemp111 FROM zemp111.

delete zemp.

ENDSELECT.

Note:Now you will get the data from zemp to zemp111.

3.Delete the the table zemp.

4.Activate the zemp11 and see the table entries.

Hope this helps you.

Regards,

Rama.

matt
Active Contributor
0 Kudos

Ah, but what if the table contains a 100 million rows? SELECT... ENDSELECT won't work then - you'll run out of memory.

0 Kudos

rama.....

its good idea.... but only datas can be transfered and any how we have to create a new table with same existing field so i think ur also same like creating new table

Former Member
0 Kudos

Hi Diana,

here is your answer,

If the table is standard one, we cant change the name of the table, but if the table is user defined table we can easily change the name of the table by following the below procedure,

GOTO SE11 -> now type the table name in database

table field -> click dictionary obj from the menu bar -> now a new window will opens asking us to give a new name for our table -> type the name and then save it .

thus our table was renamed.

regards,

manju

Former Member
0 Kudos

hi,

if standard table then one can't rename or delete it....

if ztable then to rename it ,copy the contents of the table to be renamed to a new ztable and delete the old one .....

i think this is the only option.....

Former Member
0 Kudos

Hi Diana

Rename of Table is not possible...

you can make a copy of table with new name.

go to SE11

---in Database table option- give table name

and copy[option on the toolbar].... here u can give ur new name.

--- go inside ur new table and activate table.

Hope it willl help u!!!!!!!!!!!!

Regards,

Aparna

Former Member
0 Kudos

Hi Diane,

the fastest way: create a view on the table with the new name.

well, it's not really renaming but it may be sufficeint for some cases.

(i.e. I used the view to "rename" fields in a table to provide an interface layer

to a different application assuming slight different field names)

bye

yk

Former Member
0 Kudos

Hi,

You can rename a Ztable...Use Txn SE14 (Database Utility) for the same.

Former Member
0 Kudos

thinking to rename a table is not a good idea.

even if you manage to rename a table, the programs which were using the table will dump