Error Page in FPM

FPM allows to display error page in an application if required where the error page information can be retrieved from different sources i.e the message content may be from BAPITER2 structure or from T100 structure or simple the error text from the exception object or the error text from the OTR text as well.

A clear demo is provided by the FPM application FPM_TEST_OVP_ERROR_PAGE (packgae- APB_FPM_TEST) about the error page. The below post tries to show the details 

The interface IF_FPM provides the method DISPLAY_ERROR_PAGE which receives an reference of the IF_FPM_ERROR_DETAILS and displays the error page with error message details.

12

The CL_FPM_ERROR_FACTORY classes provides various methods from which an object of the IF_FPM_ERROR_DETAILS can be created and passed to the IF_FPM~DISPLAY_ERROR_PAGE method.

345

Create an OVP application and just added the toolbar elements.

8

Created 4 buttons with event id for each.

9101112

The application controller class is provided.

13

Test the application and we have 4 buttons.

14

We have the message class.

15

In the application controller class method IF_FPM_APP_CONTROLLER~AFTER_PROCESS_EVENT add the below code for error page arising form BAPIRET2 structure.

16

Test the application and click on the BAPIRET2 ERROR button.

17

So here we have the error page with message. Now click on the Display Help link.

18

A pop up appears with message text and the message class name with message number.

19

 

20

For the error page from T100 structure. Put the below code in method IF_FPM_APP_CONTROLLER~AFTER_PROCESS_EVENT of the application controller class.

21

 

22

Here we have the error page with message text from T100.

2324

error page can be build to display message text from OTR text.

25

Put the below code in IF_FPM_APP_CONTROLLER~AFTER_PROCESS_EVENT method for the error page form OTR text.

2627

And here we have the error page resulting from otr text.

28

Error page can be formed from the exception object. Put the code in the IF_FPM_APP_CONTROLLER~AFTER_PROCESS_EVENT method and test the application.

2930

Error page from the exception object.

3132


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s