Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sending amail (interface )

Former Member
0 Likes
431

Hi folks..

iam desiginging an interface.the requirement is requester send a requistion form to the supervisior, if the supervisior approvethe request in the mail itself then approved requistion form will go to HR.

functionality required is

a) how can i design the interface using dialog program?

a) how an automatic email should be genarated.

b) how it possible to supervior modify the mail( ex: click on approve button)

could please guide me or give an sample code onthis.

Note: iam not using workflow any where.

regards

sri

Message was edited by:

srinivas vancha

2 REPLIES 2
Read only

Former Member
0 Likes
399

Hi Srinivas,

I know you are not using workflow, but for such an application you should only use Workflow.

Regards,

Atish

Read only

Former Member
0 Likes
399

Here is a really simple example.

report zrich_0003 .

data: maildata type sodocchgi1.

data: mailtxt type table of solisti1 with header line.

data: mailrec type table of somlrec90 with header line.

start-of-selection.

clear: maildata, mailtxt, mailrec.

refresh: mailtxt, mailrec.

maildata-obj_name = 'TEST'.

maildata-obj_descr = 'Test'.

maildata-obj_langu = sy-langu.

mailtxt-line = 'This is a test'.

append mailtxt.

mailrec-receiver = 'you@yourcompany.com'.

mailrec-rec_type = 'U'.

append mailrec.

call function 'SO_NEW_DOCUMENT_SEND_API1'

exporting

document_data = maildata

document_type = 'RAW'

put_in_outbox = 'X'

tables

object_header = mailtxt

object_content = mailtxt

receivers = mailrec

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.

  • Start the send process with this code or go to transaction SCOT

  • submit rsconn01 with mode = 'INT' and return.