cancel
Showing results for 
Search instead for 
Did you mean: 

Hyperlink of all Error messages

Former Member
0 Kudos

Hi,

I have an issue where I need to make all messages hyperlink which takes the user to the respective field.

we are successful to make hyperlink of the messages on the specific tab view & remaining messages are not get hyperlinked.

request some support.

regards,

ravikumar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

simon_hoeg
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Hi Simon,

I was able to keep the error messages as hyperlink, but the issue is messages are getting hyperlinked for the specific tab data, I am trying for all messages hyperlinked irrespective of tabs.  Appreciate if you have solution for this.

regards,

ravikumar

Former Member
0 Kudos

Hi Simon,

Please find attached..

we are able to link to specific fields in specific tabs.

but we are looking into the hyperlinking of all messages at one go, where user can click on the link and do the desired requirement.

regards,

ravikumar

simon_hoeg
Advisor
Advisor
0 Kudos

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.



Former Member
0 Kudos

Hi Simon,

Please be informed we are on EHP 5 with 7.02, I believe the code which was provided you is how to navigate between the tabs with hyperlink, but question is how hyperlink the messages which does not have view of particular data field.

regards,

ravikumar

simon_hoeg
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Hi Simon,

Thank you for your support.

regards,

ravi