Each Smart Form can trigger a number of exceptions during its execution. To limit this number of exceptions, you can bundle the occurring errors in error classes and store them in an error log in the composer.This documentation covers the details of Runtime Errors, exceptions in Smart Forms
For each error, you store an internal error number and (if possible)
a message from table T100 (work area, message number, message text and
parameters) in addition to the error class. To each error class,
you assign an exception, which means that if the recognized error teminates the form processing,
the system triggers exactly this exception. When an exception occurs, the
caller of the Smart Form can use predefined function modules to read the error log and then decide which
reaction is appropriate in the respective error context.
Possible exceptions for the
generated function module are:
- FORMATTING_ERROR
- INTERNAL_ERROR
- SEND_ERROR
- USER_CANCELED
In addition, you can define your own
exceptions.
If an error (or a warning) occurs,
the system internally fills an error table. The application can now read this table as soon as the
function module for the form is processed to the end. To read the table that contains all errors and
warnings that occurred, call function module SSF_READ_ERRORS. The table has
structure SSFERROR. The fields in the table are the number of the document within the
job, the form name, an error number, a message class, a message type, a message number and
four additional message variables. If processing is terminated, the application can
dynamically display a message. The error numbers are defined in the include SSF_ERROR.
If you want to trigger your own exception in the free coding of the Smart Form, you can use one of the following methods:
- Use the macro user_exception
, which triggers the exception and fills the above tables. After the termination additional system variables for the error (symsgno, sy-msgtyp, and so on) do not contain the values required for your own exception.
- If you want to access the system variables sy-msgno, sy-msgtyp, and so on for your exception directly, proceed as follows: Call function module SSF_MESSAGE and trigger your exception yourself using the RAISE statement.
Related 10 SmartForms Tutorials
Most readed SAP Tutorials
- WRITE - Output to a list ( SAP ABAP Keyword)
WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - List of SAP HR TABLES and Infotypes tables
Detailed full list of tables and infotypes used in SAP HR module. - List of SAP MM Transaction codes
This documentation covers the details of SAP MM Transaction codes - SELECT-OPTIONS ( SAP ABAP Keyword)
SELECT-OPTIONS is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - FI Accounts Receivable and Accounts Payable | SAP FI PDF manual
The following topics are an introduction to the Accounts Receivable and Accounts Payable application components. - SAP MM Process Flow
The typical procurement cycle for a service or material consists of the following phases: - SELECT clause ( SAP ABAP Keyword)
SELECT clause is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details.
Latest Added SAP documents
- 9KE9 Transaction code
Details about SAP transaction code 9KE9 - 9KE8 Transaction code
Details about SAP transaction code 9KE8 - 9KE7 Transaction code
Details about SAP transaction code 9KE7 - 9KE6 Transaction code
Details about SAP transaction code 9KE6 - 9KE5 Transaction code
Details about SAP transaction code 9KE5 - 9KE4 Transaction code
Details about SAP transaction code 9KE4 - 9KE3 Transaction code
Details about SAP transaction code 9KE3 - 9KE2 Transaction code
Details about SAP transaction code 9KE2 - 9KE1 Transaction code
Details about SAP transaction code 9KE1 - 9KE0 Transaction code
Details about SAP transaction code 9KE0