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

pop up issue in SO_DOCUMENT_REPOSITORY_MANAGER function module

Former Member
0 Likes
922

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.

4 REPLIES 4
Read only

Former Member
0 Likes
750

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

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
750

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]

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
750

Old thread

Read only

0 Likes
750

There are a lot of similar questions still unanswered. I think the program in your link will solve all the problems.