Skip to Content
author's profile photo Former Member
Former Member

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

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 05, 2014 at 08:59 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.