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

sending approve/reject in email

Hey experts,

i want to send a request approval process link through email. That is an employee submits a request ,and the higher official is notified via email . An when the higher official clicks a link in the email it must open the "requested submitted" screen of the user ,so that he can approve/reject it.

and i found a code in the wiki as follows,

* Data Declarations

DATA: lt_mailsubject TYPE sodocchgi1.

DATA: lt_mailrecipients TYPE STANDARD TABLE OF somlrec90 WITH HEADER LINE.

DATA: lt_mailtxt TYPE STANDARD TABLE OF soli WITH HEADER LINE.

* Recipients

lt_mailrecipients-rec_type = 'U'.

lt_mailrecipients-receiver = 'sheetal@gmail.com'.

APPEND lt_mailrecipients .

CLEAR lt_mailrecipients .

* Subject.

lt_mailsubject-obj_name = 'TEST'.

lt_mailsubject-obj_langu = sy-langu.

lt_mailsubject-obj_descr = 'Mail Subject'.

* Mail Contents

lt_mailtxt = 'This is a test mail'.

APPEND lt_mailtxt. CLEAR lt_mailtxt.

* Send Mail

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = lt_mailsubject

TABLES

object_content = lt_mailtxt

receivers = lt_mailrecipients

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

document_type_not_exist = 3

operation_no_authorization = 4

parameter_error = 5

x_error = 6

enqueue_error = 7

OTHERS = 8.

IF sy-subrc EQ 0.

COMMIT WORK.

* Push mail out from SAP outbox

SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.

ENDIF.

this saves the program rather than sending it ,any suggestions?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 14, 2012 at 06:37 AM

    Hello Marnush,

    You can very well achive this by sending a Shortcut of the Transaction in a email as an attachment .

    Please take a look at below link surely this will help you .

    http://wiki.sdn.sap.com/wiki/display/Snippets/Creating+a+SAP+shortcut+for+any+transaction+and+sending+it+by+mail

    Thanks and Regards,

    Anup Deshmukh

    Add a comment
    10|10000 characters needed characters exceeded

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.