cancel
Showing results for 
Search instead for 
Did you mean: 

Export and Import RFCs for a system refresh

Former Member
0 Kudos

Hello Experts,

I know this is a question  which is asked and answered a lot of times. Still I was not able to find a concrete answer.

My intention is to

(1) Export and import rfc for a system refresh

(2)Perform a test now with one single rfc in my present test system (assuming it will work for all rfcs)

Ok here is a result of my search (most of them assume answered)

I promise to close this thread either answered or unanswered.

http://scn.sap.com/thread/1622942

http://scn.sap.com/message/4682887

http://scn.sap.com/thread/2054202

http://scn.sap.com/thread/1603995

We can do in following ways

(1) using r3trans

(2)Using a transport of copies

(3)Using a task list

As a result of search I was never sure about the exact tables I will be looking into. Many people have different views about the name of tables.

A detailed procedure will be highly appreciated.

I would fancy point (2) , I would like to do a test with single rfc first

Suggestions and Procedures Welcome

Kind Regards,

Jacob

Accepted Solutions (1)

Accepted Solutions (1)

former_member182307
Contributor
0 Kudos

Hello,

In latest SAP releases you can find a report showing the tables you should save before performing a system copy :

SCTC_LIST_TABLES

If you perform a search on this report in the SAP online help, you'll find additionnal information about how to use it.

Best regards,

Steve.

Ranjith418
Contributor
0 Kudos

Hello Steve,

This report is awesome. I just tried it in an EHP6 system and it is great.

Thanks,
Ranjith

Former Member
0 Kudos

Hello Ranjith,

The docuemnt was great with Screen shots.

Can you tell me why you are not trying the TOC ...it looks good than scripting?

Also can you please tell do we have to delete the  rfcs before importing

Kind Regards,

Jacob

Ranjith418
Contributor
0 Kudos

Hello Jacob,

Scripting is one time work and then it is executing. TOC you need to add tables and create transport for each refresh(hate manual stuff). You need to clean up the entries in SECSTORE before importing or just truncate the tables I gave in earlier replies.

Please award points and close thread if answered

Thanks,
Ranjith

Ranjith418
Contributor
0 Kudos

This message was moderated.

Ranjith418
Contributor
0 Kudos

Hello Jacob,

Scripting is one time work and then it is executing. TOC you need to add tables and create transport for each refresh(hate manual stuff). You need to clean up the entries in SECSTORE before importing or just truncate the tables I gave in earlier replies.

Please award points and close thread if answered

Thanks,
Ranjith

Ranjith418
Contributor
0 Kudos

Hello Jacob,

Scripting is one time work and then it is executing. TOC you need to add tables and create transport for each refresh(hate manual stuff). You need to clean up the entries in SECSTORE before importing or just truncate the tables I gave in earlier replies.

Please award points and close thread if answered

Thanks,
Ranjith

Former Member
0 Kudos

Thanks for all the help and support

All of you give correct answer....

Kind Regards,

Jacob

Former Member
0 Kudos

Hi Steve,

can you please give what to select in component for report SCTS_LIST_TABLES?

Thanks.

Answers (4)

Answers (4)

former_member182307
Contributor
0 Kudos

Hello,

Based on SCTC_LIST_TABLES, I then use the following script to export the RFC data :

RFC_EXPORT.r3trans :

EXPORT

file = 'D:\PRE_REFRESH_EXPORT\DUMPS\RFC.r3dump'

delete from QIWKTAB

select * from QIWKTAB

delete from QSENDDEST

select * from QSENDDEST

delete from RFCATTRIB

select * from RFCATTRIB

delete from RFCCHECK

select * from RFCCHECK

delete from RFCDES

select * from RFCDES

delete from RFCDESSECU

select * from RFCDESSECU

delete from RFCDOC

select * from RFCDOC

delete from RFCSYSACL

select * from RFCSYSACL

delete from RFCTRUST

select * from RFCTRUST

delete from RSECACTB

select * from RSECACTB

delete from RSECTAB

select * from RSECTAB

Command line to export  :

R3trans -w D:\PRE_REFRESH_EXPORT\LOGS\RFC_EXPORT.log D:\PRE_REFRESH_EXPORT\SCRIPTS\RFC_EXPORT.r3trans

Once the refresh is done, I reimport the data in the rfc tables using the following script :

R3trans -w D:\POST_REFRESH_IMPORT\LOGS\RFC_IMPORT.log -i D:\PRE_REFRESH_EXPORT\DUMPS\RFC.r3dump'

One thing to notice is : in the RFCs where a user / password is specified, these won't work.

It seems like the following 3 tables need to be exported / reimported using database tools :

RSECTAB

RSECACHK

RSECACTB

Or maybe it only comes from the fact I miss the table RSECACHK in my "R3trans" script.

Feel free to give it a try and let me know !

Best regards,

Steve.

Former Member
0 Kudos

Hello Steve,

Export RSECTAB and RSECACTB  after having exported the rfc* tables and reimport them after having reimported the rfc* tables to avoid a user/password issue in RFCs

Very important : enable the option "consistent export" !!!

Regards

sumit

Former Member
0 Kudos

Hello Sumit,

Can you please give the detailed procedure.

Kind Regards,

Jacob

0 Kudos

Hello Steve,

I just did the export with your file RFC_EXPORT.r3trans and i noticed that only one row
for table RSECTAB was exported.

logfile:

-------

3 ETW678Xstart export of "R3TRCNTDRSECTAB" ...

4 ETW000 The corresponding TADIR entry was already selected before (R3TRCNTDRSECTAB).

4 ETW000   1 entry from RSECTAB exported (000).

4 ETW679 end export of "R3TRCNTDRSECTAB".

------

You should add a client=all to the file RFC_EXPORT.r3trans.

So it looks like this:

export

client=all

file="export_rfc.dump"

delete from rfcdes

select * from rfcdes

delete from rfcdoc

select * from rfcdoc

delete from rfcattrib

select * from rfcattrib

delete from rfccheck

select * from rfccheck

delete from rfcdessecu

select * from rfcdessecu

delete from rfcsysacl

select * from rfcsysacl

delete from rfctrust

select * from rfctrust

delete from rsecachk

select * from rsecachk

delete from rsecactb

select * from rsecactb

delete from rsectab

select * from rsectab

If you run it again you will see the following in the logfile:

3 ETW678Xstart export of "R3TRCNTDRSECTAB" ...

4 ETW000 The corresponding TADIR entry was already selected before (R3TRCNTDRSECTAB).

4 ETW000  42 entries from RSECTAB exported (   ).

4 ETW679 end export of "R3TRCNTDRSECTAB".

Best Regards

Juergen

farkathulla_cikkanther
Active Participant
0 Kudos

Hello Jacob,

For Export RFC destinations, fallow the below steps.

Create a Transport of copies type request on QA system which is going to be refreshed.
Specify the Target system
Once TR is created Double click on request
Go to Change mode, and then enter the below table values.

Program ID      Object      Type Object Name
R3tr                tabu           RFCDES
R3tr                tabu           RFCDOC
R3tr                tabu           RFCDESSECU
R3tr                tabu           RFCATTRIB
R3tr                tabu           RFCCHECK
R3tr                tabu           RFCGO
R3tr                tabu           RFCTA
R3tr                tabu           RFCCMC
R3tr                tabu           RFCSTXTAB
R3tr                tabu           RFCSYSACL
R3tr                tabu           RFCTRUST
R3tr                tabu           RFCTYPE

Enter the Table Keys as * for all the table entries
Save it.

Release the TR > TR will appear in QA import queue.
Once QA system is refreshed,Import the TR created for above task to get back the RFC destinations.

discussed by me in SDN before

http://scn.sap.com/thread/3266036

Regards,

Farkath C

Former Member
0 Kudos

Hello Farkath,

When we import the TR ...

(1)what happens to the existing RFC destinations in the system, does the TR overwrites it ?

(2)do we have to delete them manually?

(3)Assumign I have exported and imported all the user and passwords of the USER MASTER,

    the imported rfc work fine with credentials?

(4)Any actions to be performed on secstore transaction?

Kind Regards,

Jacob

Reagan
Advisor
Advisor
0 Kudos

Good Day

Here is the list of tables i use during a system copy.

You will need to create a file called RFC_export and add the below contents.

EXPORT

file = ' SID_RFC.dmp'

delete from RFCATTRIB

select * from RFCATTRIB

delete from RFCCHECK

select * from RFCCHECK

delete from RFCCMC

select * from RFCCMC

delete from RFCDES

select * from RFCDES

delete from RFCDESSECU

select * from RFCDESSECU

delete from RFCDOC

select * from RFCDOC

delete from RFCSYSACL

select * from RFCSYSACL

delete from RFCTRUST

select * from RFCTRUST

delete from LOGIC_DEST

select * from LOGIC_DEST

delete from RSECTAB

select * from RSECTAB

delete from RSECACTB

select * from RSECACTB

Cheers

RB

Former Member
0 Kudos

Ranjit, Thanks !

Assumption I have created a test rfc name test1

is your script can b modified as

select test1 from  RFCATTRIB

assuming i have to do a test with RFC named test1?

2 questions

(1)does the user credentials hols valid for the rfc ?

assuming i have exported and imported the all the rfc specific users?

(2)why do we have to do a delete.

my question because i am performing a test export/import of test1

Appreciate the script for import also.

Kind Regards,

Jacob


Kind Regards,

Jacob

Former Member
0 Kudos

Hi Jacob,

Here procedure to take backup of all RFC connections through Transport Of Copies.

  1. 1.       Create Transport of Copies request through SE10 transaction and make sure that target system has given while creating transport request.
  2. 2.       After creating request just double click on request and go to Objects tab and give all RFC Tables (RFCDES,RFCATTRIB,RFCDOC,RFCSYSACL,RFCTA,RFCDESSECU,RFCGO,RFCCHECK,RFCTRUST,RFCTYPE) as below and save it.
  3. 3.       Double click on each object name and give * for Table Keys.
  4. 4.       Release Request by clicking on Truck button (before releasing again make sure that target system has given)
  5. 5.       Check cofile and datafile at OS level to make sure that transport request released successfully.

Thanks,

Venkat

Reagan
Advisor
Advisor
0 Kudos

Hello

The delete statements in the R3trans control file are not really SQL statements. They wont be executed during the export of the table.

The import file will be created with those delete statements so when you do the import they will be executed.

Cheers

RB

anvardheen_jabarullah
Participant
0 Kudos

Hi Venkat,

Thanks for your step by step procedures for ding RFC Export.

I could find in another document that they started to do Transport of copies by using T-Code SE09.

Let me know what is the differnce when execute through SE09 and SE10.

Regards,

Dheen AJ

Ranjith418
Contributor
0 Kudos

Hello Jacob,

Below is procedure which works like charm for me.

create a scripts like below

:qasadm 25% more qas_rfc_export_new

Export

file '/usr/sap/trans/bin/qas_rfc_new'

select * from RFCATTRIB

select * from RFCDES

select * from RFCDOC

select * from RFCSYSACL

select * from RSECACHK

select * from RSECACTB

select * from RSECTAB

r3qz:qasadm 27% more before_qas_refresh_new.sh - execute this script to export RFC's

R3trans qas_rfc_export_new

r3qz:qasadm 28% more after_qas_refresh_new.sh - execute this script to import RFC's

R3trans qas_rfc_import_new

:qasadm> more qas_rfc_import_new

import

file='/usr/sap/trans/bin/qas_rfc_new'

I truncated the tables before importing RFC's .

truncate table sapr3.rfcdes;

truncate table sapr3.rfcsysacl;

truncate table sapr3.rfcattrib;

truncate table sapr3.rfcdoc;

truncate table sapr3.rsecachk;

truncate table sapr3.rsecactb;

truncate table sapr3.rsectab;

Thanks,

Ranjith

Former Member
0 Kudos

Hello Ranjith,

Very helpful .

Can you please be elaborate on more 25% and 28% ect and mine is a SQL database.

Also for example if the name of the rfc is test, how i have to modify the script.

Sorry I am naive in scripting.

Kind Regards,

Jacob

Ranjith418
Contributor
0 Kudos

Hello Jacob,

25,28% are os related which will change per system and need not be looked at. RFC data's are stored in all the tables I have given in previous reply and not sure how to export/import 1 rfc alone. probably you take screenshot for 1 rfc. you need not modify anything in the script. script will create a file when you export rfc at '/usr/sap/trans/bin/qas_rfc_new' if the path exist and then import the same file.

Thanks,
Ranjith

Ranjith418
Contributor
0 Kudos

Hello Jacob,

You can also add the table contents to a transport or TOC and try export /import method.

Thanks,
Ranjith

Former Member
0 Kudos

Thanks Ranjith ...I am looking at TOC...Do you know step by step procedure...?

Kind Regards,

Jacob

Ranjith418
Contributor
0 Kudos

Hello Jacob,

Please find doc to create TOC for export/import of RFC attached.

Note - change file extension to .doc

Thanks,
Ranjith