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

Documents from DMS to e-mail

Former Member
0 Likes
526

Hello,

I have a requirement to bundle a set of documents(could be .xls,.pdf) from DMS and send them in e-mail.Please help me on how i could achieve this.

Thanks,

Kalyan

Hello,

I have a requirement to bundle a set of documents(could be .xls,.pdf) from DMS and send them in e-mail.Please help me on how i could achieve this.

Thanks,

Kalyan

2 REPLIES 2
Read only

Former Member
0 Likes
468

For sending an email check the following code it may help u.

FORM send_mail USING p_y16m_rcp_par STRUCTURE y16m_rcp_par.

  • Have a subject for the mail

g_s_document_data-obj_name = text-t02.

g_s_document_data-obj_descr = text-t03.

  • Fill receiver information

g_s_receivers-rec_type = p_y16m_rcp_par-rec_type.

g_s_receivers-rec_id = p_y16m_rcp_par-rec_id.

g_s_receivers-express = 'X'.

APPEND g_s_receivers TO g_t_receivers.

  • Call function to send mail

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = g_s_document_data

document_type = 'RAW'

  • PUT_IN_OUTBOX = ' '

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

TABLES

  • OBJECT_HEADER =

object_content = g_t_object_content

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

receivers = g_t_receivers

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 <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDFORM. " SEND_MAIL

Regards

Read only

Former Member
0 Likes
468

Good day,

An alternative, and perhaps more effective way to do this in DMS would be to use Document Distribution functionality in DMS.

Regards,

Freddie Botha

www.documation.co.za

SAP DMS, CAD Integration, Data Archiving, Imaging & Scanning, Workflow

[email protected]

Please reward points for helpful answers