Error HandlingErrors related to navigation can occur at the starting point of the navigation and on the navigation target side. With infotype navigation, there are two potential error sources:
Hook Classes
Launchpad Customizing (transaction LPD_CUST
)
In their method signatures MODIFY_NAVIGATION_TARGETS
and FINALIZE_TARGET_BEFORE_NAV
have a reference to the message handler as an importing parameter and to the flag EV_IS_OK
as an exporting parameter. Messages returned by these two methods via the message handler are reported directly to Floor Plan Manager (FPM) and are displayed on the UI for error messages when the value of flag EV_IS_OK
is ABAP_FALSE
, and for warning messages when the value of the flag is ABAP_TRUE
.
When FINALIZE_TARGET_BEFORE_NAV
sets the flag EV_IS_OK
to ABAP_FALSE
, then no navigation is started.
No severe errors are expected from hook classes. Therefore the hook methods are not designed to raise any exceptions. However, this also means that the hook classes have to catch possible exceptions caused by their own implementation and react appropriately to avoid an application dump due to an uncaught exception.
There might also be Customizing errors in the Launchpad.
One category of such errors is invalid business parameters. Due to the difficulty in determining all the parameters that target applications support, it is not possible to detect all errors resulting from invalid business partners. This is the reason for implementing only limited logic in the navigation UI component to cover the following single case for internal navigation:
Invalid operation: the parameter OPERATION
is assigned a value other than MODIFY
and INSERT
.
In this case, an error message is displayed when the user chooses a navigation target and no navigation will be started.
The FPM responds and handles all other kinds of Launchpad Customizing errors. On the navigation target side, target application handles possible errors. In this case, limited logic is implemented in the MDA to react to the following known errors during internal navigation:
No record found for MODIFY
or DELIMIT
: These operations are supposed to be executed at the navigation target side. However, no data record can be found for the corresponding filter values. If this is the case, a warning message is displayed and the operation is not executed.
ENDDA
unknown for DELIMIT
: A DELIMIT
operation is supposed to be executed on the navigation target side. However, no default value is provided for the delimit date. In this case, a warning message is displayed, and the operation is not executed.
Infotype subtype unknown for creation: An INSERT
operation is supposed to be executed on the navigation target side. However, the business parameter SUBTY
is not set, although the infotype supports subtypes. In this case, it is checked on the navigation target side, to see if this new button is configured as a single button with or without choices.
If it is configured as a single button without choices for subtypes, then it is assumed that the subtype field is available on the infotype detail form, and therefore a record is created with the first available subtype.
If it is configured as button choices, then it is assumed that the subtype of the new records must be determined before records can be created. In this case, the process of creating is stopped, and a warning message is displayed on the UI to notify user.
Default values cannot be set: Default values are provided in the Launchpad Customizing for MODIFY
and INSERT
operations. However, the fields cannot be found in the corresponding UI and P-structures. In this case, a generic message is displayed to inform the user that certain default values cannot be set and are consequently ignored.