This following is to get object service files, attached to the document and to send an e-mail with attachments.
Ex: Expense form has to be to submitted to the manger for approvals and along with the expense form all the corresponding bills ( ex: Hotel/air bills ) attached to the trip document need to send as attachemnts along with expense form along with the notification, for mangers's approvals. Manager could see the bills if require before approving the expense form.
This could be used for ex: custom portal developments and custom workflow development etc.The same logic could be used for any other object service files manipulated..
Please check the parameters details, source code and correspoding includes below
Function module Z_TR_PR05_MAIL_ATTACHMENT_N
RFC to get the object service files attached and to mail.
EMPLOYEENUMBER TYPE BAPIEMPL-PERNR Personnel Number
TRIPNUMBER TYPE FTPT_REQ_HEAD-REINR Trip Number
DOCUMENT_DATA TYPE SODOCCHGI1 Subject
IND_ATT TYPE CHAR1 Single-Character Indicator
OBJECT_HEADER LIKE SOLISTI1 SAPoffice: Single List with Column Length 255
CONTENTS_TXT LIKE SOLISTI1 SAPoffice: Single List with Column Length 255
RECEIVERS LIKE SOMLRECI1 SAPoffice: Structure of the API Recipient List