Application Development and Automation 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: 
Read only

table rename

Former Member
0 Likes
2,204

hi gurus....

how to rename a table?

hi gurus....

how to rename a table?

20 REPLIES 20
Read only

JozsefSzikszai
Active Contributor
0 Likes
2,162

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

Read only

matt
Active Contributor
0 Likes
2,162

>

> 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

Read only

Former Member
0 Likes
2,162

You cant rename a table .

Read only

Former Member
0 Likes
2,162

hi!

we can't rename a table after creating it

Read only

matt
Active Contributor
0 Likes
2,162

>

> hi!

>

> we can't rename a table after creating it

Yes you can. See my post above.

Read only

0 Likes
2,162

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

Read only

matt
Active Contributor
0 Likes
2,162

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

Read only

shadow
Participant
0 Likes
2,162

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.

Read only

Former Member
0 Likes
2,162

>

> 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

Read only

Former Member
0 Likes
2,162

hi,

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

Read only

0 Likes
2,162

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

pk

Read only

Former Member
0 Likes
2,162

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.

Read only

matt
Active Contributor
0 Likes
2,162

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

Read only

0 Likes
2,162

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

Read only

Former Member
0 Likes
2,162

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

Read only

Former Member
0 Likes
2,162

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

Read only

Former Member
0 Likes
2,162

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

Read only

Former Member
0 Likes
2,162

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

Read only

Former Member
0 Likes
2,162

Hi,

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

Read only

Former Member
0 Likes
2,162

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