Blog - Shortcut IT

Direkt zum Seiteninhalt

Saving system specific tables using R3trans

Shortcut IT
Veröffentlicht von in Sc4SAP · 24 September 2019
Here is a short description how to back up system specific tables with Sc4SAP (and how to restore them in case you need it).

We take the RFC connections for this example. In case they get lost you are in big trouble. Outgoing data can not be sent any longer, functions using RFC connections are not working any longer. Maybe in a very short time your system produces thousands of short dumps.

You don't have the possibility to get back this data from another system as every system has its own individual RFC connections. There is no way to import the data via transport request or similar. Without having a backup of the specific tables the only chance would be to set up a new system via system copy using a full backup of the concerned system. A huge effort, and very time consuming - time during which your SAP system is not working properly!
BTW, indeed we noticed complaints that during an SAP Upgrade the RFC connections got lost :-(  Thus, in front of an SAP upgrade saving the RFC connections might be a good idea.  

Ok, let's start:

1.: Determine the tables that are relevant. In general it is not really easy to get the knowledge about the related tables of a specific area, but here - for system specific tables - we have some help from the "PCA tool" (Post Copy Automation). Have a look into the function module SCTC_GET_WHITELIST. This function module gives information about the components managed by the PCA tool and their related tables, all listed in the source code of the function module.

BTW, you might get more ideas related to system copies and saving of system specific tables by viewing the components and their related tables in this function module. You can also use execute program SCTC_LIST_TABLES to show tables of a component. However, due to license issues (the use of the PCA tool requires some prerequesites) the program might deny your request. In that case you can try this program which is a modified copy of it, showing all components managed by the PCA tool and their related tables in one big list. And here is the output of the program taken from my local SAP system (NW AS ABAP 7.52).

2.: Use the "Process table data using R3trans" function to create a data file with all contents of all tables related to RFC connections. Some of the given tables are client-dependent (other than most of the RFC tables), therefore you have to specify a client. This points us to - in case we use multiple clients on the system - that we have to do this for every used resp. important client.
Depending on the release of your SAP systems maybe not all of them exist in your system. Sc4SAP checks this and indicates missing tables. Just leave them out.

As our purpose in this example is to create a backup of table contents we place the backup file on the application server. Of course you can also use the frontend for storing the data. In that case you have to use an SAP connection using a user with dialog capabilities because of the download of the data file to your computer. In this example storing the data on the application server seems to be a good idea, and DIR_HOME seems to be a suitable directory, but you can use any directory that is accessible by the server. As the user used in the connection is a system user we have to remove the flag in the "With SAPGUI" field.
Now let's start the export. As there is (usually) a small amount of data in the RFC tables it takes a few seconds only and the Messages / log area indicates finishing the task:

3.: Looking into the log file should definitely be done, especially when you do this a first time. If we would have used the Frontend as the location it would of the data file this could be done by a mouse click only, but in this case we used the server. So we use transaction AL11 for viewing the log file. Selecting DIR_HOME we can see the 2 files created:

The log file contains the information about the written data:

That's all for the moment. It took only some minutes to create a backup file of the RFC connections - and hopefully we don't need it, but in case the RFC connections would get lost (shit happens!) we can use this backup file to create them again. Let's assume we get into this trouble and want to restore the RFC connections...

Use the "Process table data using R3trans" again for restoring the data. In case the current RFC data in your system is corrupt and would not be overwritten by the data in the backup file you should first use the "Remove / Clientremove" option. Specify the tables to be deleted and it will be done. You don't have to use all tables that were written into the data file. In case you have to restore only few or a single table you can specify them / it in the text field and data of other tables will not be processed.
In our example we don't know if only one or few tables are concerned, therefore we take all RFC tables and import the data back into the system:

In DIR_HOME we now see also the log file for the import:

The data were imported, the RFC connections are restored and work properly. The operability of our system is given again, and it took only few minutes!

Kein Kommentar
Shortcut IT GmbH
Kreuzberger Straße 8
31226 Peine
Tel.: 0170/9377125
Zurück zum Seiteninhalt