on 06-28-2012 8:44 AM
Hi Experts,
I have developed a simple 3 step GAF component. First step is an input form where user enters few data. Second step is the Review form where data is shown to user whatever entered in the first screen in display mode. Third step is the screen which displays confirmation message after data is saved.
The requirement is that when user presses the Next button (provided by FPM framework) in the second step, one validation is done and if true, I have to show a warning message and navigation to Third step should not happen. After reading the warning, if user still feels to proceed and presses the Next button once more, screen should navigate to Third step along with saving the data.
I wrote the below code using the IS_NAVIGATION_ALLOWED parameter but it does not work. I tested and found that it only works for Error messages.
CALL METHOD wd_this->mr_fpm_message_manager->report_t100_message
EXPORTING
iv_msgid = 'ZMSG_CLASS'
iv_msgno = 001
io_component = wd_this
iv_severity = if_fpm_message_manager=>gc_severity_warning
is_navigation_allowed = ''.
Please suggest how can I achieve this.
Regards
Arindam
You can handle this in the Process_event of the feeder class .
In the feeder class you can write a Case statement and add a method to the class .
the process event return's ET_MESSAGES and you can fill that as shown below.
CASE io_event->mv_event_id.
WHEN cl_fpm_event=>gc_event_next_step.
check_input_fields( IMPORTING ev_result = ev_result
et_messages = et_messages ).
ENDCASE.
Check_inpout_fields:
DATA: l_field_description TYPE fpmgb_s_formfield_descr,
l_message TYPE fpmgb_s_t100_message.
FIELD-SYMBOLS: <f1> TYPE any.
CHECK _read_only EQ abap_false.
LOOP AT _field_descriptions INTO l_field_description
WHERE mandatory = 'X'.
ASSIGN COMPONENT l_field_description-name OF STRUCTURE _equipment_data TO <f1>.
IF <f1> IS INITIAL.
ev_result = 'FAILED'.
l_message-severity = 'E'.
CONCATENATE 'Please fill out the required fields' l_field_description-label_text INTO l_message-plaintext SEPARATED BY space.
APPEND l_message TO et_messages.
ENDIF.
ENDLOOP.
Hope this helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.