24 Replies Latest reply: Jan 22, 2014 4:42 PM by Dheen AJ RSS

Export and Import RFCs for a system refresh

Jacob P George
Currently Being Moderated

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

  • Re: Export and Import RFCs for a system refresh
    Ranjith Jacob
    Currently Being Moderated

    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

  • Re: Export and Import RFCs for a system refresh
    Reagan Benjamin
    Currently Being Moderated

    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

    • Re: Export and Import RFCs for a system refresh
      Jacob P George
      Currently Being Moderated

      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

      • Re: Export and Import RFCs for a system refresh
        Venkat Raja
        Currently Being Moderated

        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

      • Re: Export and Import RFCs for a system refresh
        Reagan Benjamin
        Currently Being Moderated

        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

  • Re: Export and Import RFCs for a system refresh
    Steve SOUMAH
    Currently Being Moderated

    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.

  • Re: Export and Import RFCs for a system refresh
    Farkathulla Cikkanther
    Currently Being Moderated

    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

  • Re: Export and Import RFCs for a system refresh
    Steve SOUMAH
    Currently Being Moderated

    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.

    • Re: Export and Import RFCs for a system refresh
      S BASIS
      Currently Being Moderated

      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

    • Re: Export and Import RFCs for a system refresh
      Jürgen Hofmann
      Currently Being Moderated

      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

Actions