Hello,
Im faced with an issue when I want to show messages in my little popup.
The calling component is BT111H_OPPT.
Whenever I want to show the message in my popup that the mandatory fields are not filled with information the systems only shows them on the view of BT111H_OPPT when I closed my popup.
Ive implemented an own check method for that issue. See the following Code:
IF me->check_mandatory_fields( 'CREATE' ) = abap_true.
lr_window ?= me->view_manager->get_window_controller( ).
lr_window->call_outbound_plug( 'CREATE' ). "#EC NOTEXT
ELSE.
DATA: lr_service TYPE REF TO cl_bsp_wd_message_service.
lr_service = me->view_manager->get_message_service( ).
+ TESTED THAT CODE FIRST TIME, BUT NOTHING APPEARS ANYWHERE!!!!+*
* CALL METHOD me->messages->add_message
* EXPORTING
* condition = co_mandatory_field_empty
* message = 'Test'
** otr_alias =
* severity = cl_bsp_messages=>co_severity_error
** dummy = me->component_id
** p1 =
** p2 =
** p3 =
** p4 =
* .
+ SO I TRIED THAT ONE. NOW, THE MESSAGE APPEARS IN THE CALLING COMPONENT!+*
TRY.
lr_service->add_message(
iv_msg_type = 'W'
iv_msg_id = 'ZICRM'
iv_msg_number = '050'
iv_msg_v1 = 'lv_text'
).
CATCH cx_bsp_wd_dupl_mess_subscr.
ENDTRY.
ENDIF.
THANK you for an answer...
Regards,
marcus