cancel
Showing results for 
Search instead for 
Did you mean: 

Message handling in feeder class for component under FPM_FORM_UIBB

Former Member
0 Kudos

Hi,

I have created a component configuration under the component FPM_FORM_UIBB. The feeder class used is CL_HRESS_PER_DETAIL_0021_10. I have modified the method IF_FPM_GUIBB_FORM~GET_DATA to report an error message using the FPM message manager(code is hown below) if the field state is not filled.

The problem is that i get the error message below along with the standard success message that 'Data is Saved'.(and the data is actually saved on the back end)

Is there a way that i can stop additional processing after I report the error message? I

IF io_event->mv_event_id EQ 'FPM_SAVE'.

IF <lv_data_country> = 'US' AND <lv_data_state> IS INITIAL.

DATA: lv_message_manager TYPE REF TO if_fpm_message_manager,

lv_fpm TYPE REF TO if_fpm.

"Get handle to the IF_FPM interface

lv_fpm = cl_fpm_factory=>get_instance( ).

"Get handle to the FPM Message Manager

lv_message_manager = lv_fpm->mo_message_manager.

CALL METHOD lv_message_manager->report_message

EXPORTING

iv_message_text = 'State is mandatory'

io_component = me

iv_severity = 'E'.

ENDIF.

ENDIF.

Thanks in advance,

Reddy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hallo reddy,

i think you need to append the error message to the et_messages exporting parameter. Further you cannot stop the processing of the instructions followed by the your logic.

Runtime is not going to stop when it encounter report-error-message. You have to do it yourself using if ..else construct.

You can also program it in process_event method and return ev_result as failed. In this way the fpm event phase model stops further processing.

Former Member
0 Kudos

Baskaran,

Thanks a lot. It worked. I was initially not able to find a global variable which holds the data for my validation in PROCESS_EVENT. I have then reimplemented the FLUSH method and populated a global variable and then called it in the PROCESS_EVENT method to do my validation. (FLUSH is called before PROCESS_EVENT)

Thanks again,

Reddy

Former Member
0 Kudos

well done.

Former Member
0 Kudos

Hello Baskaran,

I am new to FPM. And I have the same requirement as you so please can you explain your solution in detail ?

Answers (0)