on 01-20-2016 1:20 PM
WEBDYNPRO OBJECT: HRESS_C_W4
Requirement is to validate Number of Allowances (PA0210-NBREX) .
If NBREX is greater than 10, then a custom message should trigger.
I have written logic in CL_HRESS_PER_OVERVIEW (Method: IF_FPM_GUIBB_LIST~GET_DATA)
LOGIC:
IF iv_eventid->mv_event_id = cl_fpm_event=>gc_event_save OR iv_eventid->mv_event_id = cl_fpm_event=>gc_event_goto_error_display.
ASSIGN COMPONENT 'NBREX' OF STRUCTURE <lt_ct_data1> to <nbrex>.
IF <nbrex> GT '10'.
lv_text = 'A maximum of ten (10) exemptions are allowed to be entered. To enter eleven (11) or more exemptions please contact SSC at 717-396-5300'.
APPEND plaintext_to_message( iv_text = lv_text iv_severity = if_fpm_guibb_constants=>gc_severity-error ) TO et_messages.
Even though I am passing an error, data is getting saved.
Kindly suggest some solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is there any code after below statement to save the data?
APPEND plaintext_to_message( iv_text = lv_text iv_severity = if_fpm_guibb_constants=>gc_severity-error ) TO et_messages.
<Is there any code here to save the data> ?
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is my code after the above lines.
DELETE et_messages WHERE severity = if_genil_message_container=>mt_warning OR severity = if_genil_message_container=>mt_info OR severity = if_genil_message_container=>mt_success.
IF et_messages IS NOT INITIAL.
cl_hress_fpm_msg_services=>set_message_context( CHANGING ct_message = et_messages ).
event = cl_fpm_event=>create_by_id( cl_fpm_event=>gc_event_goto_error_display ).
ev_data_changed = abap_false.
ENDIF.
After this code , the debugger is going to the CL_FPM class and checking the events, in the method RAISE_FPM_EVENT.
Should I modify the error message!
Please suggest.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.