Skip to Content
Technical Articles

Tip: How To Use eCATT Script with IRPA

A few month ago I wrote about the possibility to use eCATT vie HTTP requests. On the same way it is also possible to use eCATT in the context of IRPA. So you can combine consolidated eCATT scripts with IRPA options.

The code is very easy to understand. At first we create an object of the xmlhttp class. We set the get method and the url of the service with some information in the header. Last but not least the authorization. With the execution of the request we get the expected result.

Here the code how to call the eCATT test configuration from IRPA:

//-Begin----------------------------------------------------------------
		
var eCATT = ctx.activeX.create("MSXML2.XMLHTTP");
eCATT.open("GET", "http://nsp.localhost:8000/z_ecatt_ectc?sap-client=099", false);
eCATT.setRequestHeader("ectc_name", "Z_ECATT_ETCT");
eCATT.setRequestHeader("targetsystem", "NSP");
var base64Auth = ctx.base64.encode("BCUSER:secret");
eCATT.setRequestHeader("Authorization", "Basic " + base64Auth); 		
eCATT.send();
if (eCATT.status === 200) {
  var eCATTResult = eCATT.responseText;
}
ctx.log(eCATTResult);
				
//-End------------------------------------------------------------------

And here the result from the same example as in the linked post above:

Be the first to leave a comment
You must be Logged on to comment or reply to a post.