cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using TP Import in Command Line

Former Member
0 Likes
44,305

Hi All,

I need to import number of transport requests in Quality Assurance System all at once so I decided to use TP Import in command line.

The main issue is I don't know how to handle Error and Warning. I don't want to continue import process if one transport request encounter Error or Warning. I don't know how to use TP return code to handle this situation

Any idea regarding this issue will be appreciated,

Sanaz.

View Entire Topic
Former Member
0 Likes

Hi all.

for Windows platforms you can do some testing on return codes of executed programs. TP does return error codes, so you can test for failure within your .cmd file.

An example command file which shows how to handle return codes from TP is shown below. Save it to test.cmd and run it in an opened command window.

For lots of transports, create a function in your command file and feed transport requests to this function. This will make the script more readable.

@echo off

echo.Execute tp help
tp help > mytp.log

if errorlevel 1 (
   echo.tp help executed NOT successful, result = %errorlevel%
   echo.aborting script
   pause
) else (
   echo.tp help executed successful, result = %errorlevel%
)

echo.
echo.Execute tp without arguments
tp  >> mytp.log
if errorlevel 1 (
   echo.tp without arguments executed NOT successful, result = %errorlevel%
   echo.Press Ctrl-C to abort, or enter to continue
   pause
) else (
   echo.tp without arguments executed successful, result = %errorlevel%
)

echo.
echo.Tp script succesfully

Hope this answers your question.

Best regards,

Edward

Former Member
0 Likes

Folks,

I know that there's a recommendation to use STMS instead of using Command Line, but I need to know If I do the same way Sanaz did, even with all return codes, what if I have any problem, will SAP support me? Is there any related document?

Thank you very much

Former Member
0 Likes

Hi Edward,

Where can we capture the tp return codes and validate them..?

Thanks,

Pavan