cancel
Showing results for 
Search instead for 
Did you mean: 

Error message with a hyperlink attached to it

Former Member
0 Kudos

Hi Friends

I have a requirement wherein I need to display a hyperlink along with the error message in webui.

Example...

Please enter a valid currency Details

Here Details should appear as a Hyperlink and on clicking on this hyperlink it should navigate to a portal screen.

Infact it is not actually a portal screen, it can be any URL.

Could you please let me know how to add the hyperlink and how to navigate to portal screen on clicking on this hyperlink

where do we need to write the code.

Best Regards

Anil

Edited by: ANILKUMAR M on Mar 3, 2011 7:23 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

ajaya_kumar
Active Participant
0 Kudos

Hi Anil,

This is very simple....what you need to do is what ever error/information message you are displaying you just need to attach long text to that and system will automatically show you the Details word with hyper link and when you click on it you would see the long text that you attach to the message...

Please follow these steps:

1. Goto se91 specify your message and no and click on display

2. Uncheck the Self explainatry check box

3. Select the message and in the menu bar click on GOTO->Documentation->Long Text

4. Here you can define what ever you want to display when user will click on Detais in the error message.

I hope this would resolve you issue if yes plaease award the points:)

Regards

Ajay

Former Member
0 Kudos

Hi Ajay

This option I'm aware of. If we use this option system will throw a popup with the long text which has been maintained

in SE91 however i want to navigate to a particular URL on clicking on the link.

Please let me know if you need some more details.

Best Regards

Anil

Former Member
0 Kudos

HI

Can anyone help me out...

Regards

Annil

arunprakash_karuppanan
Active Contributor
0 Kudos

Hi Anil,

Along with long text maintenance, try subscribing to the message class(cl_bsp_wd_message_service->subscribe_message_class) and handle navigation in controller's "IF_BSP_WD_MESSAGE_HANDLER~HANDLE_MESSAGE" method.

Regards,

Arun Prakash

Former Member
0 Kudos

Hi Arun

Could you please elloborate more on this.How to do this? if you can provide me any sample code that is really helpful.

Also for your info. all the error messages are in the BADI 'OREDER_SAVE'.

Best Regards

Anil

VishnAndr
Active Contributor
0 Kudos

Hi Anil.

According to SAP Help you can always get a link in a message for:

. Fields that are defined as mandatory in the UI Configuration Tool

. Fields that are defined as mandatory in the business object layer (BOL)

Also it's possible with additional coding. The example is:

lr_msg_service = view_manager->get_message_service( ).
lr_msg_service->add_message_mapping( iv_message_class = 'CRM_BRC_MESSAGES'
iv_message_number = '013'
iv_binding_string = '//BRCBUSINESSROLE/STRUCT.CRMUI_NAVBAR'
iv_page_id = component_id ).

Check this [link|http://help.sap.com/saphelp_crm700_ehp01/helpdata/EN/cb/659ebfc880493baad66896518a55a1/content.htm] for details. Look at "Navigation to Field That Issued a Message" section and related link for "Enabling Links in Messages".

Another option, which mentioned Arun and according [to this book|http://www.sap-press.com/products/SAP-CRM-Web-Client-Customizing-and-Development.html], is the global message service. The global message service enables you to register callback methods so that you can output navigable messages, that is, you can initiate a navigation to another view (or do whatever you want ) by clicking the message. Registration of the message service for a message looks like:

DATA: lr_service TYPE REF TO cl_bsp_wd_message_service.
lr_service = me->view_manager->get_message_service( ).
TRY.
  lr_service->subscribe_message(
                  iv_message_class = 'CRM_IC_PPL_UI_BDC'
                  iv_message_number = '114'
                  iv_subscriber = me
                  iv_activation = abap_true ).
  CATCH cx_bsp_wd_dupl_mess_subscr.
ENDTRY.

where is the ME self reference points to a view controller that implements the IF_BSP_WD_MESSAGE_HANDLER interface, including HANDLE_MESSAGE method.

suchita_phulkar
Active Contributor
0 Kudos

Thanks to Arun and Andrey !!

You both guys have explained the solution perfectly and I was just looking for the same to give a link and navigate to another view.

Its really unfortunate that the person who raised the thread did not even reply with a Thanks !!

I really feel sorry that I can not give 10 to Arun and Andrey for giving the solution, because its not my thread, but i hope moderator may give.

The thread raiser did not implement the solution may be but that does not mean that the solution proposed by Arun and Andrey is not useful !!

Once again thanks.

Regards

Suchita

Former Member
0 Kudos

Hi Andrei,

     We have implemented the same logic what you have suggested to add a hyperlink below an error message and link the message to the particular field, and it is working perfect for standard fields. But when i try to do the same for AET fields, it is adding the hyper link but unable to navigate to the field.

We suspect some problem with the binding string we are passing. And the format which we are using is as follows:

CONCATENATE '//BTADMINI[' lv_index ']/ ZZFLD00003V'  INTO lv_bind_string.

Also we have tried adding EXT.ZZFLD00003V' in place of the attribute name.But that didnt help us.

Please suggest us on this.

Thanks in Advance....!!!!!!

Best Regards,

Amarendra.

Former Member
0 Kudos

Hi Andrei,

     We have this requirement in priority and we need to close it ASAP. So can you please suggest on the above query.

Thanks,

Amarendra.

0 Kudos

Hi Amarendra,

I've met the same situation as you. Hyperlink enabled, but navigation failed. Have you found the solution?

Thanks,

Julia