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: 

Can we move entire data from standard table to custom table ?

0 Kudos

Hi All,

is this possible to move entire VBAK table data with records to ZVBAK custom table.

I want to display the fields of VBAK-vbeln,erdat,erzet,vbtyp,auart,lifsk,faksk,vkorg,vtweg,spart,kalsm,vsbeo & VBUK-lfstk,fkstk in the table 'YVBAK'. when I am click on contents in the custom table 'YVBAK' these fields related documents will be displayed in this custom table. is this possible.

1 ACCEPTED SOLUTION

jmodaal
Active Contributor

Hello,

as it was already mentioned by others, you should really think about whether this is useful. However, assuming, that the definition of the target table is the same as the source table, you can copy data from one table to another using program RADBTCPY. The program offers also some mapping functionality (which I never tried). After copying the data you can use SE14 to delete the entries in the source table. Doing this with VBAK or any other 'core' table in the SAP system... have fun 😉

Kind regards

Jan

9 REPLIES 9

Tomas_Buryanek
Active Contributor

Yes it is possible. But it sounds like something not recommended to do. Why you can not use standard table (which is enhanceable with Z fields, using APPEND extension)?

-- Tomas --

VXLozano
Active Contributor

Let me try to expand Tomas' comment, but first, the answer to your question is "yes, it's possible". You just need to create the ZVBAK table by copying VBAK, and then a simple program with something like "insert into zvbak from (select * from vbak)" (or whatever).

BUT I'd rather shoot my own foot than to accept that task. In the short term it will hurt, but in the long it will be just a memory and if you do the thing you are asking for, you'll wish you did not.

It sounds like a very bad decision or requirement.

Why do you need the entire VBAK in two tables? Are you aware that that table will grow exponentially? Will those two tables will sync'ed? How do you plan to keep the information up to date? By copying/changing/deleting every row into the table via enhancement? A daily copy?

What about other related tables? VBAP? VBPA?

If you need just some updated information in a smaller table, it will be more advisable (and practical, easier, etc) to just to create a database view with the fields you need to keep at hand (although these days with HANA I don't see the point to do that).

So, your answer is "yes, it's possible", but I will never do it. If your salary depends on it, then go for it, but begin to seek for another job ASAP.

jmodaal
Active Contributor

Hello,

as it was already mentioned by others, you should really think about whether this is useful. However, assuming, that the definition of the target table is the same as the source table, you can copy data from one table to another using program RADBTCPY. The program offers also some mapping functionality (which I never tried). After copying the data you can use SE14 to delete the entries in the source table. Doing this with VBAK or any other 'core' table in the SAP system... have fun 😉

Kind regards

Jan

matt
Active Contributor

+1 to what vicen.lozano said.

WHY do you want to do this. WHAT are you trying to achieve? WHAT is the business requirement.

There may be far better ways of getting what you want.

0 Kudos

I want to display the fields of VBAK-vbeln,erdat,erzet,vbtyp,auart,lifsk,faksk,vkorg,vtweg,spart,kalsm,vsbeo & VBUK-lfstk,fkstk in the table 'YVBAK'. when I am click on contents in the custom table 'YVBAK' these fields related documents will be displayed in this custom table. is this possible.

VXLozano
Active Contributor

Then you need a VIEW, not a copy of the table.

0 Kudos

Thank You

0 Kudos

while creating the database view all the fields are evaluated as key fields

VXLozano
Active Contributor
0 Kudos

As far as you do NOT try to modify its content, it's ok. Just remember: do NOT allow maintenance for that view EVER.