Show TOC Entering content frame

ExampleExceptions Locate the document in its SAP Library structure

Raising Exceptions from Within an Action

IOITF provides an exception class, CX_COM_IOITF_ACTION, that can be used to raise an exception from within an action. This exception class provides attributes in addition to those that come from the root exception class, CX_ROOT.

Below is a list of attributes that you can populate from within your action when you want to raise an exception.

Attributes for Raising Exceptions from Within an Action

Attribute

Description

EXCEPTION

This attribute is of type SEOSCONAME. If you choose to give your exception a name (recommended), this attribute is used to hold that name. It is a good practice to name your exceptions so that you can keep track of them.

EX_METHOD

This attribute is of type SEOCPDNAME. It is used to hold name of the method in your action class where the exception occurs. It is a good practice to populate it so that you know exactly where the exception occurred without having to debug all over.

EX_CLASS

This attribute is of type SEOCLSNAME. It is used to hold name of the action class in whose method the exception occurs. It is a good practice to populate it so that you know exactly where the exception occurred without having to debug all over.

BAPI_CORU_RETURN

This attribute is of type COMT_IOITF_BAPI_CORU_RETURN_T. It can be used to hold messages.

OBJECT_FAMILY

This attribute is of type COMT_PRODUCT_OBJECT_FAMILY. It is used to hold the object family. It is a good practice to populate it. You can get the object family from the application context within your action.

 

Note

If you need to create your own action exception classes, they should extend (inherit from) IOITF’s action exception class CX_COM_IOITF_ACTION.

Raising Exceptions from Within a Guard Condition

IOITF provides an exception class, CX_COM_IOITF_GC_EVALUATION, that can be used to raise an exception from within a guard condition. This exception class provides attributes in addition to those that come from the root exception class, CX_ROOT.

Below is a list of the attributes that you can populate from within your guard condition when you want to raise an exception.

Attributes for Raising Exceptions from Within a Guard Condition

Attribute

Description

EXCEPTION

This attribute is of type SEOSCONAME. If you choose to give your exception a name (recommended), this attribute is used to hold that name. It is a good practice to name your exceptions so that you can keep track of them.

EX_METHOD

This attribute is of type SEOCPDNAME. It is used to hold name of the method in your guard condition class where the exception occurs. It is a good practice to populate it so that you  know exactly where the exception occurred without having to debug all over.

EX_CLASS

This attribute is of type SEOCLSNAME. It is used to hold name of the guard condition class in whose method the exception occurs. It is a good practice to populate it so that you know exactly where the exception occurred without having to debug all over.

BAPI_CORU_RETURN

This attribute is of type COMT_IOITF_BAPI_CORU_RETURN_T. It can be used to hold messages.

OBJECT_FAMILY

This attribute is of type COMT_PRODUCT_OBJECT_FAMILY. It is used to hold the object family. It is a good practice to populate it. You can get object family from the application context within your guard condition.

EVENT_NAME

This attribute is of type COMT_EVENT_NAME. It is used to hold the event name. It is a good practice to populate it. You can get the event name from  the application context within your guard condition.

Note

 

If you need to create your own guard condition exception classes (for whatever reason), they should extend (inherit from) IOITF’s guard condition exception class CX_COM_IOITF_GC_EVALUATION.

 

High Tech Software Entitlement Demo

A sample application is delivered with IOITF to illustrate its usage. The whole demo application is contained in package COM_IOITF_DEMO_MODEL_HIGH_TECH.

Leaving content frame