‎2009 May 07 2:38 PM
Hi SDN.
I have a requirement that i have 2 collect the XML file from application server send it
as a mail attachment.
can this FM "SO_DOCUMENT_REPOSITORY_MANAGER " be useful to do so.
it is reading the file from Presentation server but not from Application server.
can it be achieved ? also how to hide the popup for send mail.
i tried with classes and FM "SO_NEW_DOCUMENT_ATT_SEND_API1".
but the XML file is not opening in the attachment.
It gives the error message :
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button,
can u please guide me.
Regards,
Suman.
‎2009 Oct 21 4:22 PM
Try FM SO_OBJECT_SEND with folder_id and object_id from structure document of FM SO_DOCUMENT_REPOSITORY_MANAGER.
but first attach the attachments bij applying the following code several times:
File from the pc to send...
gv_method = 'ATTCREATEFROMPC'.
gi_files-text = p_file.
append gi_files.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = gv_method
office_user = gv_owner
ref_document = gs_ref_document
new_parent = gs_new_parent
IMPORTING
authority = gv_authority
TABLES
objcont = gi_objcnt
objhead = gi_objhead
objpara = gi_objpara
objparb = gi_objparb
recipients = gi_receivers
attachments = gi_attachm
references = gi_references
files = gi_files
CHANGING
document = gs_document
header_data = gs_header.
Regards, Léon Hoeneveld
‎2009 Oct 21 7:24 PM
This link will solve your problem link:[mail a file in app server|https://wiki.sdn.sap.com/wiki/display/Snippets/SendingApplicationServerfileviaemialas+attachement] is the exact solution for your post
Other reference
Also try this,
You can read the xml file from Application server in your program
check link:[http://abapreports.blogspot.com/2008/09/upload-xml-file-from-application-server.html]
and then send the mail in xml format
for sending mail you can refer program BCS_EXAMPLE_7 and link:[send mail|http://www.liveabap.com/index.php?abapid=51]
‎2009 Oct 21 7:38 PM
‎2009 Oct 22 10:13 AM
There are a lot of similar questions still unanswered. I think the program in your link will solve all the problems.