cancel
Showing results for 
Search instead for 
Did you mean: 

script for multiple tp addtobuffer and tp import in windows OS

Former Member
0 Kudos

Hi Gurus,

Can someone extend some asssitance? I need to transport 5000 transport request in OS level (window). I wanted to create a script that will enable me to addtobuffer and tp import all this 5000 request and will show the error code of the particular TPs that encountered an error.

Need your immediate assistance please?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

it may help you

 

#!/usr/bin/sh
# Program: To use "tp" to transport to <SID>

echo "This program will transport from list"
echo "Do you want to continue? [Y/N]"
read input

if [ $input = "Y" ]; then
echo "Transporting $list"

echo "Adding $list to buffer"
tp addtobuffer $list <SID>
echo "Importing $list"
tp import $list <SID> client<090>
elif [ $input = "N" ]; then
echo "Transport for $list is cancel"
else
echo "Input $input not a valid option"
echo "Program Tranport ended due to invalid input"
exit
fi

Note:

list is a file with all the TR list

SID : system ID

Regards,

Pratap

Edited by: Pratap Kumar Bathula on Jan 16, 2011 11:11 AM

Former Member
0 Kudos

Hi purnachender,

Thanks for your input. Item number 1 and 2 are clear, also i understand that i need to put the .cmd or .bat file containing the final list of transport in /usr/sap/Trans/bin and then execute. However, i also need to see the RC of the errors if a certain transport in the list encountered an error. Do you know how to do this? can this be included in the .cmd or .bat file which contains the tp list? Can you please elaborate on what you said on item 3, to quote "and redirect this file to one more file (error.txt) for checking the errors

./transports.bat >> error.txt".

Appreciate your assistance.

Former Member
0 Kudos

Hi,

I have tried it in a unix, and i hope the same will be applicable in windows also for redirecting the output from bat executable.you can try test once with some sample requests before executing the original one.

Thanks and Regards

Purna

Former Member
0 Kudos

Ok, so in the command prompt in windows, should it look as below?

C:
usr\sap\trans\bin\ ./transports.bat >> error.txt

Former Member
0 Kudos

Hi ,

You can try execute like the following with some sample requests

C:
usr\sap\trans\bin\ transports.bat >> error.txt

error.txt can be seen at the same place

Thanks and Regards

Purna

Former Member
0 Kudos

Hi,

Could you suggest what should be the filemname for the mass transports to be addeed at os level.. like u said fr windows it can be transports.bat...

wat could be for unix to run as script from /usr/sap/trans/bin/... ./transports.<extension filename ?? > ... to run...

Regardsm,

Ashish R

JPReyes
Active Contributor
0 Kudos

You can use extention .sh

Now this is very basic so please do some research before posting and read the "Rules of Engagement"

Former Member
0 Kudos

Hi,

You can do the following

1. Compose all the requests in the given specified format.

tp addtobuffer REQUEST SID client=XXX pf= Transport domain profile Using excel sheet.

We should have following things

a. Request IDs such as <SID>K9XXXXX

b. SID of the system for which these requests are to be imported.

c. Specific client no.

d. Transport domain profile.

The final format of the excel sheet with all the transport requests should look like this.

This format needs to be pasted on to the text file. (transports.txt), in windows you can save as .cmd or bat format may be.

tp addtobuffer <SID>K9XXXXX <target SID> client=XXX pf=TP_DOMAIN_SID.PFL

tp addtobuffer <SID>K9XXXXX <target SID> client=XXX pf=TP_DOMAIN_SID.PFL

tp addtobuffer <SID>K9XXXXX <target SID> client=XXX pf=TP_DOMAIN_SID.PFL

tp addtobuffer <SID>K9XXXXX <target SID> client=XXX pf=TP_DOMAIN_SID.PFL

u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026

u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026.

2. Once the text file or cmd file with all the requests are made, place it on to the target system transport directory.

/usr/sap/Trans/bin.

3. Execute this file (./transports.bat) and redirect this file to one more file (error.txt) for checking the errors

./transports.bat >> error.txt

Once all the transports are attached into buffer, you can do the mass import from STMS

Thanks and Regards

Purna

Edited by: purnachender on Mar 17, 2010 7:11 AM

former_member227283
Active Contributor
0 Kudos

Hi,

In this case your OS administrator can help you to create the scrpit with your assitance how should and what command to maintain in script.

Thanks

Anil