I was trying to use SAPGUI recording for VAP1(Contact Person Creation for Customer) transaction.
I recorded it successfully. Before execution of eCATT script, I removed the customer number value which is mandatory. So in the output of execution, I got error message in log saying Mandatory field is missing.
This I wanted to overcome by proper usage of eCATT commands as the recoring is correct but the proper data is missing which is not the problem of script. Hence script should not fail. It is mentioned in SAP 4.7 Help that with the help of message-endmessage, the errors can be handled for successful execution. But I coudln't achieve this.
Can anyone please help in handling this.
I achieved this for TCD (Record) pattern using ON_LAST_MESSAGE_CHECK command before the transaction call in script as follows - -
&----
On any kind of error
ON_LAST_MESSAGE_CHECK( * ).
&----
TCD ( VAP1 , VAP1_1 ).
&----
For SAPGUI, I tried following option -
MESSAGE ( MSG_1 ).
SAPGUI ( SESSION_MANAGER_100_STEP_1 ).
SAPGUI ( VAP1_36_STEP_1 ).
&----
The following eCATT command doesn't work here
ON_LAST_MESSAGE_CHECK ( 055 ).
&----
Error comes in the following screen
SAPGUI ( VAP1_1361_STEP_1 ).
&----
Following code not working
LOG ( MSG_1[1]-MODE ).
CHEVAR ( MSG_1[1]-MODE = 'F' ).
IF ( &SUBRC = 0 ).
EXIT.
ENDIF.
&----
SAPGUI ( VAP1_1361_STEP_2 ).
SAPGUI ( VAP1_36_STEP_2 ).
SAPGUI ( SESSION_MANAGER_100_STEP_2 ).
ENDMESSAGE ( E_MSG_1 ).
&----
LOG ( E_MSG_1 ).
LOG ( E_MSG_1[1]-MODE ).
If error message has occured, exit
CHEVAR ( E_MSG_1[1]-MODE = 'F' ).
IF ( &SUBRC = 0 ).
EXIT.
ENDIF.
&----
Again, how to make any screen optional in SAPGUI recording pattern.
Thanks & Regards.