2023 Apr 06 8:47 AM
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.
2023 Apr 06 1:45 PM
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
2023 Apr 06 8:59 AM
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)?
2023 Apr 06 9:13 AM
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.
2023 Apr 06 1:45 PM
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
2023 Apr 06 4:28 PM
+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.
2023 Apr 10 10:08 AM
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.
2023 Apr 11 9:17 AM
2023 Apr 11 10:05 AM
2023 Apr 11 10:06 AM
while creating the database view all the fields are evaluated as key fields
2023 Apr 11 11:49 AM
As far as you do NOT try to modify its content, it's ok. Just remember: do NOT allow maintenance for that view EVER.