This website is not affiliated with, sponsored by, or approved by SAP AG.

Bulk Transport Script into Multiple Client

Basis (Basis Technology Modules: Basis Component/System Administration, GUIs)

Moderators: Snowy, thx4allthefish

Bulk Transport Script into Multiple Client

Postby Gamella » Sat Apr 08, 2017 9:03 am

Hello Basis Expert,

We created "Bulk Transport Script into Multiple Client". But it didn't work as expected.

What we did was as follows,

- Add to 3 TRs to buffer by script without specifying target client ---> Worked without problem
- Import 3 TRs by script specifying target client 100 ---> Worked without problem
- Import 1 of 3 TRs by script specifying target client 200 ---> Error happened

What we want to clarify is ----

Add to buffer was required before 2nd import into client 200, though it was importing of TR already added buffer before ?

Below error message came out.
-----------------------------------------------------------------------------------------------------------
The import of the transport request D99K910003 for system P99 was not performed.
Please check tp command. The buffer entry is printed out below

"will not be imported because of its target client".
-----------------------------------------------------------------------------------------------------------

Our understanding is that

ALL neccessary TRs were added to buffer and imported into client 100. Next we tried to import same TRs without add to buffer
because already they were added to buffer. Our understanding was wrong ?

Would you advise ? Below is our environment and script we provided.

Best Regards,
Gam

=========================================================================================
●Our client strategy is as follows,

Client 100 ( Workbench Master Client )
Client 200 ( Customizing Master Client )
Client 800 ( Productive Client ) --- End user work on this client.

●Workbench TR ( They should be imported into Client 100 )
D99K910001
D99K910002
D99K910003 ( It needed to be imported into both Workbench client(100) and customizing client ( 200).

●Customizing TR( They should be imported into 200 and 800 )
D99K910003

●Script we created
ADD_TO_BUFFER.sh
IMPORT_CL100.sh
IMPORT_CL200.sh
IMPORT_CL800.sh

●Execution Sequence
./ADD_TO_BUFFER.sh
./IMPORT_CL100.sh
./IMPORT_CL200.sh

============================
●Add to Buffer Script

#!/bin/bash
TPLIST=/usr/sap/trans/TRScript/ALL_TRS_LST.txt
TPSTATUS=${TPLIST}.log
for i in `cat ${TPLIST}`
do
/usr/sap/PRD/SYS/exe/run/tp addtobuffer $i P99 u1 pf=/usr/sap/trans/bin/TP_DOMAIN_D99.PFL
RC=$?
echo "`date`…Add to Buffer $i Status RC=${RC}" >> ${TPSTATUS}
echo "`date`…Add to Buffer $i Status RC=${RC}"
if [ $RC -ne 0 ] && [ $RC -ne 4 ]; then
break
fi
done
# End of script file

●Import into client 100 Script

#!/bin/bash
TPLIST=/usr/sap/trans/TRScript/TR100_LST.txt
TPSTATUS=${TPLIST}.log
for i in `cat ${TPLIST}`
do
/usr/sap/PRD/SYS/exe/run/tp import $i P99 client=100 u0126 pf=/usr/sap/trans/bin/TP_DOMAIN_D99.PFL
RC=$?
echo "`date`…Transport $i Status RC=${RC}"
echo "`date`…Transport $i Status RC=${RC}" >> ${TPSTATUS}
if [ $RC -ne 0 ] && [ $RC -ne 4 ]; then
break
fi
done
# End of script file

●Import into client 200 Script

#!/bin/bash
TPLIST=/usr/sap/trans/TRScript/TR200_LST.txt
TPSTATUS=${TPLIST}.log
for i in `cat ${TPLIST}`
do
/usr/sap/PRD/SYS/exe/run/tp import $i P99 client=200 u0126 pf=/usr/sap/trans/bin/TP_DOMAIN_D99.PFL
RC=$?
echo "`date`…Transport $i Status RC=${RC}"
echo "`date`…Transport $i Status RC=${RC}" >> ${TPSTATUS}
if [ $RC -ne 0 ] && [ $RC -ne 4 ]; then
break
fi
done
# End of script file

●ALL_TRS_LST.txt
D99K910001
D99K910002
D99K910003

●TR100_LST.txt
D99K910001
D99K910002
D99K910003

●TR200_LST.txt
D99K910003
Gamella
 
Posts: 63
Joined: Thu Dec 28, 2006 6:56 am

Re: Bulk Transport Script into Multiple Client

Postby Zavaros » Tue Apr 11, 2017 3:53 am

Hello,

The 2nd addtobuffer is not required if you trigger the import command with "keep in buffer" U-mode (I do not know the code).

I would suggest to use 2 addtobuffer commands with target client definition.

Regards,
Zav
Zavaros
 
Posts: 756
Joined: Thu Oct 24, 2002 10:50 pm
Location: Hungary


Return to Basis

Who is online

Users browsing this forum: Google Adsense [Bot] and 7 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.