08-30-2007 8:50 AM
Dear Freinds
Can Anyone of you tell me if an ecatt script can be called inside an r/3 function module.
if yes, please explaion me how it can be done.
If you have any example code it will be quite useful for me.
Points will be rewarded for suitable answers.
With Warm Regards
Ravishankar Vembu
08-30-2007 8:57 AM
Hello Ravishankar
Function group ECATT_EXECUTE contains the RFC-enabled function module <b>ECATT_EXECUTE</b> which should allow you to execute eCATT scripts.
I believe it should be not too difficult to find out how to execute this function module properly.
Regards
Uwe
08-30-2007 9:26 AM
Hi Ravishankar,
Yes you can call it but there's no standard way defined.
I am suggesting a workaround to this. What you can do is make a BDC recording for the execution of your ECATT script from SECATT transaction and then
using 'Call Trasaction' in the function module call the BDC program to execute the script in function module.
This I belive would do the purpose.
Hope this helps and revert for more clarifications if any.
OFcourse the above mentioned function module ECATT_EXECUTE would be useful in this case .
<b>Always reward points for useful suggestions.</b>
regards,
Vikas
null
08-30-2007 3:59 PM
Hello Ravishankar
The following sample report <b>ZUS_SDN_ECATT_EXECUTE</b> shows how to execute an eCATT testcript using its default parameter values.
*&---------------------------------------------------------------------*
*& Report ZUS_SDN_ECATT_EXECUTE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZUS_SDN_ECATT_EXECUTE.
data:
gt_execute type ETEXE_OBJ_TABTYPE,
gs_execute type etexe_obj.
start-of-selection.
gs_execute-start_lnr = '1'.
gs_execute-obj_lnr = '1'.
gs_execute-obj_type = 'ECSC'. " test script
gs_execute-obj_name = '<name of your testscript>'.
gs_execute-obj_ver = '1'.
gs_execute-sysdata = '<name of system data container>'.
gs_execute-testsystem = '<test system>'.
append gs_execute to gt_execute.
CALL FUNCTION 'ECATT_EXECUTE'
EXPORTING
TO_EXECUTE = gt_execute
DISPLAY_LOG = 'X'
* LOG_TXT = ' '
* DISPLAY_START_POPUP = ' '
* START_PROFIL =
* START_PROFIL_X =
* WBMANAGER_ACTIVE = ' '
* EXIT_STATUS_UPDATE = ' '
* HTTP_TRANSID = ' '
* I_SUPRESS_OUTPUT = ' '
* IT_VAR_TO_EXEC =
* I_PAR_VAR_DISPLAYED =
* IT_VAR_EXT =
* IT_CALLER =
* IS_TZEXECDATA =
* IMPORTING
* EXECUTED =
* LOGID =
* LOG_DISPLAYED =
* TRACE_PROT =
* E_RESULT_XML =
* ET_RESULT_XML_ERR_MESSAGES =
EXCEPTIONS
NOTHING_TO_DO = 1
TOO_MANY_SCRIPTS_CALLED = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
end-of-selection.
Regards
Uwe
03-18-2010 11:30 AM
Hi, the above method was very useful for executing a script with default values. But if I have to pass a single parameter to my script, which will change during every run, is there any way to do it?
09-11-2019 8:51 PM
There is another option. Secatt can run in SHDB. so, create an SHDB to start Test Configuration.
In SapGui processing, this can be done in foreground, so it is perfect
The result can be found by other way , debuging where log is.
Att.