on 04-12-2011 2:10 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.