Skip to Content
author's profile photo Former Member
Former Member

windows script to auto import sap request

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 "

)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2015 at 12:46 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.