Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Body is not coming in send a smartform output to Email as PDF attachment

Hai experts,

Using this code, only 'Material Data as a PDF attachment' came as subject and file name of PDF file.

Body is not coming . what is the problem. very urgent

w_doc_chng-obj_name = 'TEST_ALI'.

w_doc_chng-obj_descr = 'Material Data as a PDF attachment'.

  • Main Text

i_objtxt = 'Test Document.'.

append i_objtxt.

i_objtxt = 'You will find an PDF attachment in this message.'.

append i_objtxt.

i_objtxt = 'Have a nice day.'.

append i_objtxt.

  • Send Message

call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'

exporting

document_data = w_doc_chng

put_in_outbox = 'X'

commit_work = 'X' "used from rel. 6.10

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

tables

packing_list = i_objpack

*object_header = w_objhead

contents_bin = i_objbin

contents_txt = i_objtxt

  • CONTENTS_HEX = objhex

  • OBJECT_PARA =

  • OBJECT_PARB =

receivers = i_reclist

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.

Former Member
Not what you were looking for? View more on this topic or Ask a question