9 Replies Latest reply: Jan 16, 2011 11:12 AM by Pratap Kumar Bathula RSS

script for multiple tp addtobuffer and tp import in windows OS

rommel de guia
Currently Being Moderated

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?

  • Re: script for multiple tp addtobuffer and tp import in windows OS
    Anil Bhandary
    Currently Being Moderated

    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

  • Re: script for multiple tp addtobuffer and tp import in windows OS
    purna chender
    Currently Being Moderated

    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

  • Re: script for multiple tp addtobuffer and tp import in windows OS
    rommel de guia
    Currently Being Moderated

    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.

  • Re: script for multiple tp addtobuffer and tp import in windows OS
    Pratap Kumar Bathula
    Currently Being Moderated

    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

Actions