cancel
Showing results for 
Search instead for 
Did you mean: 

windows script to auto import sap request

Former Member
0 Kudos

Dear Experts,

I want to automate th transport of sap request in windows batch file, i have created this one :

tp cleanbuffer MBL pf=C:\usr\sap\trans\bin\TP_DOMAIN_MBL.PFL

tp showbuffer  MBL pf=C:\usr\sap\trans\bin\TP_DOMAIN_MBL.PFL > liste_OTs.txt

for /F "tokens=*" %%A in (liste_OTs.txt) do (

ECHO Processing  OT  %%A

echo "tp import %%A MBL pf=E:\usr\sap\trans\bin\TP_DOMAIN_MBL.PFL "

)

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The problem with showbuffer command is it will take all the request that in buffer regardless of whether there are imported or not.

You can have the list of TRs that needs to imported copied in text file manually.

Also the correct For loop would be like...

for /F "tokens=*" %%A in (liste_OTs.txt) do (

ECHO Processing  OT  %%A

cdexe

tp import %%A MBL client=100 u0 pf=E:\usr\sap\trans\bin\TP_DOMAIN_MBL.PFL"

)

Regards,

Prithviraj.

Former Member
0 Kudos

The problem with showbuffer command is it will take all the request that in buffer regardless of whether there are imported or not.

if

     tp cleanbuffer

is executed before

     tp showbuffer

the buffer should only contain not yet or unsuccessfull imported requests.

but to be honest

echo "tp import %%A MBL pf=E:\usr\sap\trans\bin\TP_DOMAIN_MBL.PFL "

is performs nothing except producing output. tp will not be called.

regards

Peter