SAP® Documentation

Single view

CL_APL_ECATT_LINE_INTERPRETER - eCATT Script Line Interpreter

General Material Data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

In class CL_APL_ECATT_LINE_INTERPRETER there are the methods:

1. LINE_EXECUTE

The caller (SCRIPT_EXECUTE) communicates with this via the interface:


Changing parameter ,,IF_FLAG ,,,,(ETONOFF = SPACE)

If IF_FLAG = OFF, script commands are processed
If IF_FLAG = ON, the only script command processed is ENDIF
Here the IF_FLAG is set to OFF.

With a positive condition or when the ELSE statement is executed, it must cause the next script command not to be executed in the current block, but in the subsequent script block that belongs to the statement.
Importing parameter ,,LOOP_COUNT,,,,(NUM8 = 0)

The content of the parameter value is put into CATT standard variable &LPC, so that a CATT command running in the block can use the current loop counter of the most inner loop.


Exporting parameter,,EXIT_FLAG,,,,(ETONOFF = SPACE)

In the script processing an EXIT statement with condition TRUE will set the EXIT-FLAG to ON. In this case the LINE_EXECUTE wil no longer be called for all subsequent instructions of the block.
Exporting parameter,,ABEND_FLAG,,,,(ETONOFF = SPACE)

In the script processing a check with error code > 0 or also a check for CHEVAR with condition FALSE will set the ABEND-FLAG to ON. In this case the EF and TESCASE of the LINE_EXECUTE will no longer be called for all previous blocks, if this is the result of handling the termination indicator.


Importing parameter: ,,SCR_LINE,,,,(Script data, etc)

Still to be defined.


IF - ELSEIF - ELSE - ENDIF- processing

Starting point: in the normal processing of a script block outside an IF processing.

IF_FLAG
,,OFF,,the IF statement is processed, that is, the condition is checked
,,,,result: TRUE
,,ON ,,,,a new block is opened, script processing
,,,,,,independent of current block up to
,,,,,,end of processing of IF block
,,,,Next statement in current Block after IF is ELSEIF.
,,,,,,Do not process, as IF_FLAG = ON
,,,,Next statement in current Block after IF is ELSE.
,,,,,,Do not process, as IF_FLAG = ON
,,,,Next statement in current Block after ENDIF.
,,,,,,ENDIF sets IF_FLAG = OFF
,,OFF
,,,,The IF statement is processed, that is, the condition is checked
,,,,Result: FALSE
,,OFF,,,,No script processing of IF block
,,,,Next statement in current block after IF is ELSEIF.
,,,,The ELSEIF statement is processed, that is, the condition is checked
,,,,Result: TRUE
,,ON ,,,,a new block is opened, script processing
,,,,,,independent of current block up to
,,,,,,End of processing of ELSEIF block
,,,,Next statement in current block after IF is ELSE.
,,,,,,Do nto process, as IF_FLAG = ON
,,,,Next statement in current block after IF is ENDIF.
,,,,,,ENDIF sets IF_FLAG = OFF
,,OFF

With a positive condition or when executing the ELSE case, the result must be that the subsequent script block belonging to the statement statement is executed and not the subsequent script command in the current block.

DO - ENDDO- processing

Starting point: in the normal processing of a script block outside a DO processing. LOOP_COUNT = 0. Also the EXIT_FLAG = OFF.

With the DO statement the LOOP_COUNT is increased by 1 and checked, if the maximum has been exceeded, or the EXIT_FLAG = ON.

If both is not the case, the DO loop is processed.

This results in the subsequent script block belonging to the DO statement being executed and the script command ENDO in the current block. The current LOOP_COUNT is out in the CATT standard variable &LPC. The attribute LOOP_COUNT required in the subsequent script for your own DO loops is initialized again.

In the script processsing an EXIT statement with condition TRUE results in the EXIT-FLAG being set to ON. In this case all subsequent statements of the block are no longer processed.

The DO statement is repeatedly processed until the specified maximum is exceeded or the EXIT_FLAG = ON, then the DO loop is ended and the EXIT-FLAG set to OFF.

No processing is done for the ENDDO statement that immediately follows the script block. Also no log entry is currently planned.

2. CHECK_CONDITION

The private method in the class CL_APL_ECATT_LINE_INTERPRETER is called from the LINE_EXECUTE for all functions that use a condition (IF, ELSEIF, EXIT, CHEVAR) via the following interface:


Importing parameter ,,SCR_LINE ,,,,TYPE ETSCR

Entire structure of an ECATT script line, internal format.
The script line contains the condition that has to be checked.
The required values are accessed via the current data container.

Exporting parameter ,,COND_FLAG ,,,,TYPE ETONOFF

If the condition is fulfilled, the CONT_FLAG is set to 'X' = TRUE.

Exporting parameter ,,ERRCD ,,,,TYPE ETLOG_ERCD

If the condition cannot be checked, for example, because of the

type inequalities, ERRCD is set to 203. The COND_FLAG is not set to TRUE.

3. SET_VARIABLE

The private method in class CL_APL_ECATT_LINE_INTERPRETER is called from the LINE_EXECUTE for function ASSIGNMENT that executes an assignment to a CATT variable or parameter via the following interface.


Importing parameter ,,SCR_LINE ,,,,TYPE ETSCR

Entire structure of an eCATT script line, internal format
The script line contains the assignment that is to be executed.
Required values are accessed via the current data container.

Exporting parameter ,,LOG_DATA ,,,,TYPE ETLOG_DATA

If the assignment desribed in the script is carried out, LOG_DATA contains the value in the form that can be stored with the variable name together in the log.
,,--- The exact form of the transfer is not yet specified ---

Exporting parameter ,,ERRCD ,,,,TYPE ETLOG_ERCD

If the assignment cannot be carried out, for example, because of type

inequalities or because a date is invalid as the result value, ERRCD is set to greater than zero. As the standard error ERRCD is set to 204, but others are possible. In this case, the assignment does not take place, ERG_VALUE is not assigned a value, the parameter or the variable does not receive a new value.

4. TRANSFORM_COMMAND

The private method in class CL_APL_ECATT_LINE_INTERPRETER from the LINE_EXECUTE is called for the function ASSIGNMENT that executes an assignment to a CATT variable or parameter via the following interface.


Importing parameter ,,ORIG_LINES ,,,,TYPE ETXML_LINE_TABTYPE

ECATT statement lines for a script line in the internal format with symbolicc Name.

Importing parameter ,,ASGN_TAB ,,,,ETARGASGN_TABTYPE

Conversion table for symbolic script names used by the user.

Exporting parameter ,,TARG_LINES ,,,,TYPE ETXML_LINE_TABTYPE

ECATT statement lines for a script line in the format used in the script editor with actual parameter and variable names.

5. GET_MESSAGE_TEXT

Die private method used in class CL_APL_ECATT_LINE_INTERPRETER called from the LINE_EXECUTE, if a script line has an error message to write to the log. Interface:


Importing parameter ,,ERRCD ,,,,TYPE ETLOG_ERCD

Error code, maximum 3 characters, used as an error number to read in table T100.

Exporting parameter ,,MESSAGE,,,,TYPE ETLOG_CONT

In table T100 the work area the ecatt message is first read via language, fixed with language E.

Relationships

Example

Notes

Further information






CL_GUI_FRONTEND_SERVICES - Frontend Services   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 8296 Date: 20190617 Time: 083741     sap01-206 ( 26 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.