‎2009 Oct 26 11:21 AM
I am trying to bespoke the correspondence output, so that when it send the invoice as a PDF attachement in an email I can alos include to text in the ody of the email. The below fucntion moudle is being used to send the email, but currently there is no text in the body of the email. X_OBJCONT continas the invocie in PDF format, so can someone tell me how I add text to the body of the email.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
OBJECT_TYPE = DOCUMENT_TYPE
ORIGINATOR = horiginator
ORIGINATOR_type = 'B'
IMPORTING
SENT_TO_ALL = X_SENT_TO_ALL
TABLES
OBJCONT = X_OBJCONT
OBJHEAD = X_OBJHEAD
RECEIVERS = X_RECEIVERS
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.Edited by: showthousand on Oct 26, 2009 7:30 AM
Edited by: showthousand on Oct 26, 2009 7:31 AM
‎2009 Oct 26 11:37 AM
Hi,
Are you calling this function module in some program ? or using some standard transaction for correspondance ?
Please give more details
‎2009 Oct 26 11:41 AM
It is getitng called in the program RFKORD50 - in include RFKORI90. The email sending of the PDF attachement works fine, but I just want to add some text to the email via this function, but I can't figure out how to add any text.
‎2009 Oct 26 11:55 AM
Hi,
Had a similar requirement few months back (for a different transaction) and solved it using Implicit enhancements
Here is thread
Create a implicit enhancement at start of function module SBCOMS_SEND_REQUEST_CREATE
You need to fill Tables parameter NOTE_TEXT to get the mail body
Also in the implicit enhancement you should make sure that RFKORI90 has triggered the output. (Otherwise the body of the mail will be added to all mails from your system)
Try this out and let me know if you need help
Thanks
‎2009 Oct 26 11:49 AM
Parameter Objcont - which is Internal Table to hold the body of the mail Line.(Text lines up to 255 characters)
This will be used to populate the text in the body of the mail.
Regards
Anand
‎2009 Oct 26 11:52 AM
Thanks, but this parameter is already filled with the PDF attachement.
‎2009 Oct 26 2:28 PM
I used the NOTE_TEXT parameter, but had to alos populate the receiver parameters in order for this to work: The receiver parameters require the note_num and note_start to be be populated