Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

save sent email in shared folder?

Former Member
0 Likes
571

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!

2 REPLIES 2
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
445

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.

Read only

Former Member
0 Likes
445

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

....................................................................................