Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_schnell
Active Contributor
SAPs Extended Computer Aided Test Tool (eCATT) offers in its language two interesting commands - TCD and SAPGUI - to executes some recorded activities. In this blog post I describe how the commands works, from the recorded XML file to the BCD respectively to the OLE interface of the SAP GUI Scripting.

 

TCD


You can with the TCD eCATT command record very easily activities and executes it as batch data communication.



Press the pattern button of the toolbar and choose UI Control with TCD (Record), define the TAC and the interface name. Now your TAC is open and you can do your activities. When you are done quit the TAC and you will get a request.



If you say yes your script looks e.g. like this and you can execute it.



But what happens in the background?



The eCATT line interpreter executes your script and calls the method EXECUTE_TCD, which calls the function CAT_TCD_CAL and this runs your activities as batch data communication CALL TRANSACTION command.

 

SAPGUI


Batch data communication offers not all possibilties. In this case you can use the SAPGUI command. It records your activities also easily and executes it via the SAP GUI Scripting interface.



Press also the pattern button and choose SAPGUI (record).



Define your transaction code and start the recording. Now an additional dialog pops up.



If you are ready with your activities press stop recording and your script looks like this.



Here we see now very good the difference between BDC and SAP GUI Scripting. But much more interesting is the background processing.

 



The eCATT line interpreter executes your script and calls the method EXEC_SETGUI. The REPLAY_SAPGUI method calls the SAPGUI_INTERNAL_REPLAY method which starts the transaction code. After the methods SAPGUI_REPLAY_PROCESSED_SCREEN and SAPGUI_REPLAY_USERCHANGES shares the methods SAPGUI_THROW_COMMAND and SAPGUI_THROW_GUI_ELEMENT. Both use last but not least the OLE commands GET and SET PROPERTY as well as CALL METHOD.



With this knowledge is it now very easy follow the process from the eCATT script to the final OLE command call.

 

The eCATT script files itself are stored as XML files, here an example section:



 

Last but not least a tiny hint to SAP note 2382576: eCATT uses only the SAPGUI entry from the running object table (ROT), so it is not possible to use it with NWBC or ADT.