I am facing the below issue when creating leave request from ESS
1. Selected a particular leave type and attached a document
2. Now changed the leave type to another value
It could be observed that the attachment is getting removed.
On analysis it could be observed that when changing the leave type event FPM_SET_DOCUMENT_DETAIL is called which clears the table MT_ATTACHMENTS_BUFFER inside method IF_FPM_GUIBB_FORM~PROCESS_EVENT of class CL_HRESS_PTARQ_LREQ_ATT_GUIBBL.
Is there any work around to prevent this , or is it a standard functionality.
I'm also getting the same issue. I too had debugged the standard code and found that, the attachment is not getting deleted from buffer table MT_ATTACHMENTS_BUFFER in class CL_HRESS_PTARQ_LREQ_GUIBBL Method DELETE_ATTACHMENT.
I tried to search OSS note but not succeed. So, I have refreshed the record from buffer table using custom code.
If you found any standard solution please let me know. So that, I will replicate the standard process.