cancel
Showing results for 
Search instead for 
Did you mean: 

Automate Transport

Former Member
0 Kudos

I want help to develop a script so that i can automate production transport.

Below is my requirment

Suppose i have 5 transport request listed in a file /usr/sap/trans/list_<date>

Step 1. Add these requests in buffer

Step 2. Start import of these requests in fille list_<date> in parallel (What we normally do using F6 in STMS)

Can some body help me with script ?

P.S : I do not want sequential transport i want parallel transports. I have script for sequential transport.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182307
Contributor
0 Kudos

Hello,

Why don't you use the standard QA approval functionnality coupled with scheduled mass transport ?

Through QA approval, your TR are put in the production queue only once they are approved.

Then you schedule an "import all" in your production queue.

You should find all necessary information to perform this using help.sap.com or through SDN.

Best regards,

S.SOUMAH.

Edited by: steve_78 on Sep 30, 2011 9:09 AM

Edited by: steve_78 on Sep 30, 2011 9:09 AM

Former Member
0 Kudos

Steve, This indeed is a good solution but right now we do not have a really controllled environment.

That is the reason i was looking for a script.

Cheers !

Manish

Former Member
0 Kudos

Hi Manish,

The F6 functionality doesn't import in parallel, it just imports a block at a time. To do this with a script I suggest the following that I found a long time ago, I have forgotten the source.

Note: I suggest testing this method on your sandbox first with 1 transport

1) obtain the list of transports to import and put it in column A of an excel spreadsheet

2) input the following formular into column B, replacing "SID" and the client number. Check all details

="echo 'Importing "&A1&" into SID';"&"tp pf=/usr/sap/trans/bin/TP_DOMAIN_SID.PFL addtobuffer "&A1&" SID client=100;"&"tp pf=/usr/sap/trans/bin/TP_DOMAIN_SID.PFL import "&A1&" SID U0126 client=100;"

3) pull down the formula to complete it for all entries

4) Copy column B to a text file and then upload it to /usr/sap/trans/bin and set the permissions to 0744

5) Run the script, I suggest always outputing to a log file so you can go back over the results.

Regards,

Chris

Former Member
0 Kudos

Thanks Chris . That is indeed a good solution and i will try it out in my eval environment.

What will happen if one of the TR has not yet arrived in Prod buffer ? Will this script not import all the request or it will import all ther request except the one which has not arrived in buffer.

I am asking this question because many times our developer ask us to move transport in prd but that has not been imported in QTY (I understand not a right thing to do ). Normally we check manually if the transport has been importedin QTY or not.

But incase of mass transport it will not be possible for us to check manually.

Thanks for suggestion so far

Former Member
0 Kudos

Please be very careful with your migration process. All migrations should go through a strict development and testing cycle before being imported into production.

The script will actually add the transport to the buffer, then import it. The script requires all of the cofiles and datafiles to be available.

A breakdown of the script is below:

a) message indicating its importing

="echo 'Importing "&A1&" into SID';

b) Add the transport to the buffer

"&"tp pf=/usr/sap/trans/bin/TP_DOMAIN_SID.PFL addtobuffer "&A1&" SID client=100;

c) Import the transport

"&"tp pf=/usr/sap/trans/bin/TP_DOMAIN_SID.PFL import "&A1&" SID U0126 client=100;"

Regards,

Chris

Former Member
0 Kudos

Thanks Chris

Answers (1)

Answers (1)

Former Member
0 Kudos

We did automated Transport for our site too.

But I think you should serious do the script based on your system's landscape instead of looking for help on "on the rack" codes.

-Firstly you gotta code based on the OS of your SAP system. If it's Windows I'd recommend a combination of VBscript and batch scripting, or powershell scripting if you are using Win2008 and above. For Unix you can explore the standard Cshell or Kshell.

-You doing an automation from development server to production? You gotta settle the transport route beforehand (not neccesarily in STMS) You're script must be able to move the COFILE and DATA files from the dev system to your QAT and PRD server respectively.

- You can plan your list. perhaps a list containing the TR number, Client to transport? Read the list of the tr and their destinated client and process accordingly.

- use the TP commands with "addtobuffer" first, then "import". If you are talking about parallel import on different server, you can do it provided the cofile and data files are manually copied across the transport directories.

- try to use crontab or scheduler for your scripts.

- as mentioned, log your migrations.

hope these helps

Former Member
0 Kudos

Jansen

Suggestions you have mentioned are not unkown to many in Basis world.

I wanted actual script. Can you provide me that

BTW : I have common trans directory between dev to prd so i do not need to move cofile and datafile as they are already shared across.

Thanks for your suggestion so far.

Cheers !

Manish

Former Member
0 Kudos

Hi Mate,

If you have the route set up from Dev to Prod then you have to check the following :-

1) After relesing transport in DEV your transport is going to QA.

2) Schedule the transport hourly ( as per you convenient) from the queue --->start import then start at time .

Please let me know if it helps you.

Thanks

Former Member
0 Kudos

Hey Gaurav

Thanks for updating the message but No Actually that does not help.

Please look at my orignal question

Cheers !

Manish Jain