cancel
Showing results for 
Search instead for 
Did you mean: 

Link in error Message

Former Member
0 Kudos

Hi Experts,

I have requirement like i have to show link along with error message

something like (if you want to enter more than 10 numbers please visit our site www.google.com) and

when the above link is clicked link should open in a new browser.

i want to know is it possible to do this.If yes can u please let me know

how can i achieve this.

Thanks,

Santosh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

For errors you ahev different msg area right

Create 2 transparanet containers..one for msg area and other for links . .show them adjacent to each other

or

else

create a table with columns one for messages and other for linktourl for that correspoinding one..

Former Member
0 Kudos

hi ,

for opening the new browser , u can use the LinkToURL UI

in the TEXT property oof UI , write ur error message

but what if you want to use and ACTION to perform some ABAP functionality first ( say on clck of Button )

and then call the URL. thn write this code in OnAction of tht button


data:  lo_window_manager type ref to if_wd_window_manager. 
data:  lo_api_component  type ref to if_wd_component. 
data:  lo_window         type ref to if_wd_window. 
data:  ld_url type string. 
lo_api_component  = wd_comp_controller->wd_get_api( ). 
lo_window_manager = lo_api_component->get_window_manager( ). 
ld_url = ' ' .  // ur URL here
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW      
 EXPORTING     URL                = ld_url            
     RECEIVING     WINDOW         = lo_window.  
lo_window->open( ).

u can generate error messages using message manager using report_error_message method

go to control wizard ( CNTRL + F7) , press button generate 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
    .
 
* report message
CALL METHOD lo_message_manager->report_error_message
  EXPORTING
    message_text              =   'Error_Text' " Give your error text here.

regards,

amit