‎2009 May 19 12:16 PM
Hi,
I've created a program that sends out an email with an attachment, using the function so_new_document_att_send_api1.
Now this sent email should also be stored in a shared folder in the business workplace.
Is this possible? How?
Thx!
‎2009 May 19 12:31 PM
Yes , check the parameter PUT_IN_OUTBOX
If this flag is activated ('X'), the newly created document is also placed in the outbox of the active user when it is sent.
‎2009 Sep 22 4:35 PM
Hi,
It is possible to send to shared folder. You have to copy the function group SOI1into customer name space(ZD_SOI1) and delete all the functions except the functions ZD_SO_NEW_DOCUMENT_ATT_SEND_API1 (copy of SO_NEW_DOCUMENT_ATT_SEND_API1) and zd_SO_DOCUMENT_SEND_API1( copy of SO_DOCUMENT_SEND_API1 ) .
Add the import parameter FOLDER_ID (type SOODK) to both functions. Modifyt the source code of the function zd_SO_DOCUMENT_SEND_API1.
Before modification:
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
EXTERN_ADDRESS = ' '
FOLDER_ID =
After modification:
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
EXTERN_ADDRESS = ' '
FOLDER_ID = FOLDER_ID
Now call the function ZD_SO_NEW_DOCUMENT_ATT_SEND_API1 instead of SO_NEW_DOCUMENT_ATT_SEND_API1 with the added parameter folder_id.
eg.
data folder_id like SOODK.
folder_id-objtp = 'FOL'.
folder_id-objyr = '34'.
folder_id-objno = '000000026820'.
CALL FUNCTION 'ZDFI_SO_NEW_DOCUMENT_SEND_API1'
..................................................................................
folder_id = folder_id
....................................................................................