Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_schnell
Active Contributor
507
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:

Labels in this area