05 April, 2016

Useful scripts for SAP, Database and others

SAP TMS :
adding the transports to the buffer / import queue:
trans_<SID>.txt contains the transport numbers in a sequential order one by one. 

eg: 
ECDK924430
ECDK925404
ECDK926018
ECDK926085
ECDK925741

#!/bin/ksh
for i in `cat /usr/sap/transecc/bin/trans_ECB.txt`
do
echo "Transport Add to buffer $i" | tee -a /usr/sap/transecc/bin/trans_ECB_add2buff.log 2>&1
tp addtobuffer $i ECB CLIENT800 pf=/usr/sap/transecc/bin/TP_DOMAIN_ECD.PFL  | tee -a /usr/sap/transecc/bin/trans_ECB_add2buff.log 2>&1
done

Importing the transports from the queue:

#!/bin/ksh
for i in `cat trans_ECB.txt`
do
echo "Transport IMPORT $i" | tee -a trans_imp_ecb.log 2>&1
tp import $i ECB u12689 CLIENT=800 pf=TP_DOMAIN_ECD.PFL  | tee -a trans_imp_ecb.log 2>&1
done

No comments:

Post a Comment