on 04-01-2009 8:24 AM
Hi All,
I am working on FPM framework . I am raising error message on click of the review button.
I have a requirement to stop the navigation further on error message.
User must click the flight details custom button before clicking the review button.unless the flight details button is not clicked user should not go to the next screen.
I hope I am clare
any inputs
Thanks
Santosh
Hi,
Check for the button click condition and raise the error message .....
get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
CALL METHOD lo_message_manager->if_wd_message_manager~report_error_message
EXPORTING
message_text = lis_message-message
is_permanent = ' '
scope_permanent_msg = 2
cancel_navigation = 'X'.
with cancel_navigation = 'X'.
Thanks,
Shailaja Ainala.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PROCESS_EVENT Implementation of your UIBB.
IF io_event->mv_event_is_validating = abap_true.
Do local checks and report messages if needed
ENDIF
CASE io_event->mv_event_id.
WHEN XYZ
Handle event and fill EV_RETURN accordingly with a value from IF_FPM_CONSTANTS~GC_EVENT_RESULT
ENDCASE.
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Santosh,
it just an idea...
1/ Set a flag (default abap_false) attribute to true when flightdetails is clicked in the controller of your component as Lekha said;
2/ If your review custom button is part of the FPM toolbar, as I suppose it is, you can trigger the event in the controller process_event method, check if flag is true else call the FPM message manager.
for example with a T100 msg:
CALL METHOD wd_this->mr_message_manager->report_T100_MESSAGE
EXPORTING
IV_MSGID = 'MSGID'
IV_MSGNO = 001
IO_COMPONENT = wd_this
IV_SEVERITY = if_fpm_message_manager=>GC_SEVERITY_ERROR
IV_LIFETIME = if_fpm_message_manager=>GC_LIFE_VISIBILITY_AUTOMATIC
* IV_PARAMETER_1 =
IO_ELEMENT = lo_el_sflight_selection
IV_ATTRIBUTE_NAME = 'CARRID'.
Where the mr_message_manager is a reference to of IF_FPM_MESSAGE_MANAGER.
Hope it can help you.
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhosh,
As you have 2 buttons flightdetails and review.
Cretae a context attribute for enabled property of type wdy_boolean and bind this to the review's button enabled property.
Now initially set this review button as disbaled.
When the flight button is clicked set the attribute of this attribute to true(enable).
In the modify view,
Get the review button reference and use the method set_enabled and pass this attribute value.
This way you can ensure the user to have the flight being clicked first to enable the review button.
Or
Take some flag vairble and set it accordingly when the flightbutton is clicked. And in the
review button handler based on this flag, decide the navigation to next screen.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.