cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger the approval action for service order by clicking a button in the user email

Former Member
0 Kudos

Now ,the scenario is: when  user approved service order in web ui, and the status changed, then ,an email notification with a hyperlink for the service order will be sent to the user. By clicking the hyperlink in the email ,user can be directly navigated to the business role selection screen , after  a certern business role was selected , the user will be lead to service order and he can approve the service order.

now ,a new user request comes . the user wants to directly approve the service order in the email either by clicking a newly added button or other way, so anybody can help to provide a solution for this  and i really appriciate it for your kind help, thanks.

Accepted Solutions (1)

Accepted Solutions (1)

dharmakasi
Active Contributor
0 Kudos

Hi,

You can add 2 hyperlinks in your approval email body saying approve and reject. when user clicks any of these buttons make open deafult mail with to address to some default mail ID. Configure an user exit(Custom Class) to default mail ID using Tcode SO50.

Add all the neccassary code in custom class.

Code to use provide hyperlink


     Concatenate 'APPROVE' iv_wi_id   INTO lv_text ."concatenating workItem ID,so that in exit class status of the work item.

     
CONCATENATE '<a href = "mailto:' lv_emailid '?Subject=' lv_text INTO lv_text.

      ls_message
-line = lv_text.

     
APPEND ls_message TO lt_message.

     
CONCATENATE '&body=IMPORTANT:%0D%0A%20%20%20%201)%20Send%20this%20mail%20to%20submit%20your%20decision.%0D%0A%20%20%20%202)%20Please%20do%20NOT%20edit%20the%20email%20subject.'

       
'%0D%0A%20%20%20%20Comments:%20(Please%20insert%20any%20comments%20on%20your%20decision):' INTO lv_text.



*      lv_text = '&body='..

      ls_message
-line = lv_text.

     
APPEND ls_message TO lt_message.

      lv_text
= '%0D%0A%0D%0A%20%20%20%20End%20of%20Comments"'.

      ls_message
-line = lv_text.

     
APPEND ls_message TO lt_message.

     ls_message-line 'target="_bottom">'.

     
APPEND ls_message TO lt_message.

      ls_message
-line = 'Approve</a>'.

     
APPEND ls_message TO lt_message.

custom exit class:

Create custom class in Se24 and add interface IF_INBOUND_EXIT_BCS.

use the method     IF_INBOUND_EXIT_BCS~PROCESS_INBOUND to add your custom logic.

Best  Regards

Dharmakasi.  

Former Member
0 Kudos

Hi Dharmakasi,

Thanks for your kind and quick response and i wil give it a try, also sorry for late response.

Best regards,

Steven

Former Member
0 Kudos

Hi Dharmakasi,

Following your kind suggestion , i am checking it these days , thouth not yet finished , but now i believe it should be the right solution and want to thank you in andvance  for your kind help .

Have a good day!

Best regards,

Steven

Answers (0)