on 04-29-2016 2:21 PM
Hello Ravi,
Try with below code, it will navigates to the respective field. For this, you need to pass the field name for "ref_name" option.
Sample code:
data: ls_messages type fpmgb_s_t100_message.
if ms_flight-PLANETYPE is initial. "ms_flight is an attribute of type sflight
ls_messages-msgid = 'MESSAGE CLASS NAME'.
ls_messages-msgno = 'XXX'.
ls_messages-severity = 'E'.
ls_messages-ref_name = 'PLANETYPE'.
append ls_messages to et_messages.
clear ls_messages.
endif.
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravikumar,
most probably the element reference and/or the field(attribute) name is not correct.
If you the input field belongs to a GUIBB you should double check this in the Feeder methods GET_DATA or PROCESS_EVENT.
In addition you set a breakpont at CL_WDR_MESSAGE_MANAGER->REPORT_MESSAGE, this is the place where all the messages have to go through ...
Best regards,
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravikumar,
o.k. now I understand, you want to have links also for the ones that refer to tabs that are not visible.
We provide this (out of the box) for all the floorplans, tabbed + composite from NW750 SAP_UI SP2
If you are on NW740, NW731, NW702 then you have to use the importing parameter IS_ENABLE_MESSAGE_NAVIGATION = ABAP_TRUE, when a message is reported using IF_FPM_MESSAGE_MANAGER. There is also an importing parameter IR_MESSAGE_USER_DATA that you can use for the assignment to the right tab.
The message is now rendered with a link during the runtime. Once the user clicks on the link, the FPM event ON_NAVIGATE is raised and you can control the switch of the tab with some AppCC coding.
E.g. if you implement the interface IF_FPM_TABBED_CONF_EXIT, then the coding at method OVERRIDE_CONFIG_TABBED may look like the one below.
Best regards,
Simon
METHOD override_config_tabbed .
DATA lv_msg_id TYPE string.
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
DATA ls_message TYPE if_wd_message_manager=>ty_s_message.
DATA lo_event_data TYPE REF TO if_fpm_parameter.
FIELD-SYMBOLS: <fs_dat> TYPE any,
<fs_msg_user_data> TYPE string.
CASE io_tabbed->mo_event->mv_event_id.
WHEN 'ON_NAVIGATE'.
lo_event_data = io_tabbed->mo_event->mo_event_data.
CALL METHOD lo_event_data->get_value
EXPORTING
iv_key = 'MESSAGE_ID'
IMPORTING
ev_value = lv_msg_id.
lo_api_controller ?= wd_this->wd_get_api( ).
lo_message_manager = lo_api_controller->get_message_manager( ).
ls_message = lo_message_manager->get_message_for_id( lv_msg_id ).
ASSIGN ls_message-msg_user_data TO <fs_dat>.
ASSIGN <fs_dat>->* TO <fs_msg_user_data>.
TRY.
IF <fs_msg_user_data> EQ '1'.
io_tabbed->set_selected_tab( iv_tab_id = 'TAB2' ).
ENDIF.
CATCH cx_fpm_floorplan.
ASSERT 1 EQ 0.
ENDTRY.
ENDCASE.
ENDMETHOD.
Hello Ravikumar,
the hyperlink will be shown as soon you set the flag IS_ENABLE_MESSAGE_NAVIGATION of the methods in IF_FPM_MESSAGE_MANAGER. Navigation and focus data have to be provided via IR_MESSAGE_USER_DATA.
Then navigation to the tab has to be implemented by you in the AppCC on basis of the evaluated MESSAGE_USER_DATA, also the focus handling should be based on this.
For NW 7.02 you need to implement SAP Note 2314215, it will be released next week.
Best regards,
Simon
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.