Copyright 2023 - BV TallVision IT

The most commonly used statements in eCatt, with a short explanation: For a full list of available statements, go to the editor on a Test script and select button "Pattern". F4 on the "Command" field will list all available commands. Last time I checked this was: REF, REFCATT, TCD, SAPGUI, FUN, GETTAB, SETTAB, CHETAB, RESTAB, SETVAR, CHEVAR, LOG, DO..ENDDO, IF..ELSEIF..ELSE..ENDIF, EXIT, IF .. ELSE .. ENDIF and ABAP..ENDABAP

REF - Call Test script



The test script being called (in the example Z_CHECK_VENDOR) will always require a command interface (Z_CHECK_VENDOR_1) which is created in the test script functionality (above the editor).

EXIT - Exit the test script


EXIT ( SUBRC <> 0 ).

Where it makes no sense to continue the test script, the EXIT will interrupt the test script execution. Usually where information is gathered

WAIT - Pause the processing of a test script


WAIT 60. 

Pauses the execution of a test script, to e.g. allow SAP to finalize saving a document, or respond to an action from workflow.

ABAP - Execute ABAP source code (embedded)


  select * from ekpo into table i_ekpo. 

The statements between ABAP. and ENDABAP. are regular ABAP/4 statements, which are not syntax checked when the Test script is checked (!). Variables that needed inside the ABAP block must be defined as test script parameter type "V". So Import (I) and Export (E) varables will have to be read/set outside the ABAP block.

Note the parameters on the test script are 3-fold: p_mara is of type Import (I) and v_mara and v_subrc are of type Variabale (V). P_subrc is of type Export (E).

v_mara = p_mara.

  tables: mara. 

* Check material master (MARA)
  select single * from mara where matnr eq v_mara-matnr.
  v_subrc = sy-subrc. 

p_subrc   = v_subrc.

TCD - Run through a (recorded) BDC session


TCD ( ME59 , ME59_1 ).

The TCD is about calling a recorded a BDC session. TCD sessions are recorded by selecting the pattern for "TCD REC", which will prompt you with a popup on relevant info - the transaction code you want to record and so on. TCD sessions can be run fully in the background, however ALV reports and desktop communucation functions (upload/download) cannot be covered by a TCD - use SAPGUI for these.

SAPGUI - Call a (recorded) SapGui session


SAPGUI ( ME59 , ME59_2 ).

Where the TCD cannot cover the work you need to do, the SAPGUI can be attempted. SAPGUI is a way of recording actions based on Windows moves, rather than SAP moves (the BDC/Batch Input sessions). Hence SAPGUI is an alternative TCD, and works in much the same way. SAPGUI sessions are recorded and the recorded results can be maintained, e.g. variables can be assigned. SAPGUI will not run in the background and thus requires it's toll on the computer that runs the eCatt test script. Only use SAPGUI if it cannot be covered with a TCD.

LOG - Log a variabele



Logs a variabele which is shown in the log of a Test configuration run, or Test script run. Logged entries will appear where (and when) they are called in the test script.