on 04-26-2011 11:19 PM
We have implemented a generic object in cFolder for Transmittals using the cFolders Generic object functionality. Basically a transmittal is a document structure of documents stored in cFolders along with metadata information. In a single folder there can be multiple transmittals.
We have a requirement that upon creating a notification for a transmittal object , the document structure contained in the transmittal should be captured in the body of the notification email generated as a list of documents. This is for audit purposes where there is requirement to maintain an email record of which documents were sent along with time and date details.
We are trying to achieve through an enhancement point in the method SEND_NOTIFICATION_EMAIL of class CL_CFX_NOTIFICATION. The issue is that although we can identify the transmittal we cannot read the names of the documents contained in that transmittal in order to put them in the body of the email. We tried the various available function modules such as CFX_API_DOC_GEN_OBJECT_READ, CFX_API_DOC_VERSION_GETDETAIL, etc. Are there any additional function modules available to read the contents of generic objects or any other method to get this information?
Thanks,
Jeff
Hi All,
I'm too late here but I had the same problem and solved it using standard new BADI implementation
/SAPPSSRM/BD_TENDERING_MAIL
Method: ~MAIL_TNDR_OPEN
There you have the option to change the content of the email using your own logic based on the inbound GUID parameter.
Best regards
Sebastian Garofalo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jeff
Try this form:
FORM get_doc_name USING value(v_doc_id) TYPE sysuuid_c
CHANGING c_fol_id TYPE sysuuid_c
c_version_id TYPE sysuuid_c
c_doc_name TYPE string
c_subrc TYPE sysubrc.
DATA: ls_fault TYPE cfx_api_ts_fault,
l_fault TYPE cfx_api_t_faultstring,
l_v1 TYPE symsgv,
l_v2 TYPE symsgv.
CLEAR: c_fol_id, c_version_id, c_doc_name, c_subrc.
IF v_doc_id IS INITIAL. ADD 4 TO c_subrc. RETURN. ENDIF.
CALL FUNCTION 'CFX_API_DOC_GETDETAIL'
EXPORTING
i_doc_id = v_doc_id
IMPORTING
e_folder_id = c_fol_id
es_fault = ls_fault
e_faultstring = l_fault
e_current_version_id = c_version_id.
IF ls_fault IS NOT INITIAL OR l_fault IS NOT INITIAL.
ADD 4 TO c_subrc. RETURN.
ENDIF.
CALL FUNCTION 'CFX_API_DOC_VERSION_GETDETAIL'
EXPORTING
i_doc_version_id = c_version_id
IMPORTING
es_fault = ls_fault
e_faultstring = l_fault
e_file_path = c_doc_name.
IF ls_fault IS NOT INITIAL OR l_fault IS NOT INITIAL.
ADD 4 TO c_subrc. RETURN.
ENDIF.
ENDFORM. " get_doc_name
Regards,
Fabrizio Gemma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi jeff,
this is just a smple code to get the name of the uploaded document corresponding to a single document id: you have to adapt the code to your needs.
To change the email content, in the method
SEND_NOTIFICATION_EMAIL
you have to change the content of the internal table
lt_mail_body
before the method
cl_cfx_email_util=>send_email
is called.
For example you can define your own custom email text (via transaction se61 or via smartform) containing the docuement name and replace completely the contentent of the email body.
Regards,
Fabrizio Gemma
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.