Application Development 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: 

Class CL_BCS sending email

Former Member
0 Kudos

Hello,

I am using the below code for sending a email with PDF attachment using CL_BCS, once i get the email i am also getting 2 other emails saying your email delivered and your email read, is there a way for not getting those delivered and read emails,

TRY.

SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).

LP_PDF_SIZE = XSTRLEN( STRING ).

PDF_CONTENT = CL_DOCUMENT_BCS=>XSTRING_TO_SOLIX(

IP_XSTRING = STRING ).

CATCH CX_BCS INTO BCS_EXCEPTION.

RETURN-TYPE = 'E'.

RETURN-MESSAGE = BCS_EXCEPTION->ERROR_TYPE.

APPEND RETURN.

EXIT.

ENDTRY.

*

DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(

I_TYPE = 'RAW'

I_TEXT = L_BODY

  • i_hex = pdf_content

  • i_length = lp_pdf_size

I_SUBJECT = 'test' ).

*

CALL METHOD DOCUMENT->ADD_ATTACHMENT

EXPORTING

I_ATTACHMENT_TYPE = L_EXTENSION

I_ATTACHMENT_SUBJECT = 'test''

I_ATTACHMENT_SIZE = LP_PDF_SIZE

I_ATT_CONTENT_HEX = PDF_CONTENT.

SEND_REQUEST->SET_DOCUMENT( DOCUMENT ).

RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(

I_ADDRESS_STRING = 'emailid'' ).

SEND_REQUEST->ADD_RECIPIENT( I_RECIPIENT = RECIPIENT

I_EXPRESS = ' '

I_COPY = ' '

I_BLIND_COPY = ' '

I_NO_FORWARD = ' ' ).

SENT_TO_ALL = SEND_REQUEST->SEND(

I_WITH_ERROR_SCREEN = 'X' ).

COMMIT WORK AND WAIT.

1 ACCEPTED SOLUTION

brad_bohn
Active Contributor
0 Kudos

Transaction SCOT -> Settings -> Confirmation of receipt -> Set 'SAPConnect does not expect confirmation'

2 REPLIES 2

brad_bohn
Active Contributor
0 Kudos

Transaction SCOT -> Settings -> Confirmation of receipt -> Set 'SAPConnect does not expect confirmation'

Former Member
0 Kudos

Thanks