Skip to Content
0
Former Member
Dec 03, 2008 at 04:45 PM

SO_DOCUMENT_SEND_API1 and Business Workplace

146 Views

Hello gurus,

I'm using the FM SO_DOCUMENT_SEND_API1 to send emails (massively) with a pdf file as attachment. Unfortunately, I can't see the email in the outbox of my business workplace . Nevertheless all the recipients get the emails without problems. The sy-subrc after calling the FM is 0. Everything seems to go fine except for the missing entries in my outbox .

Any help will be appreciated.

Thank you,

Jaime

P.D. This is the way how I'm calling the FM:


  call function 'SO_DOCUMENT_SEND_API1'
    exporting
      document_data              = wa_doc_data
      put_in_outbox              = 'X'
      sender_address             = in_sender_address
      sender_address_type        = in_sender_addres_type
      commit_work                = 'X'
    importing
      sent_to_all                = w_sent_all
    tables
      packing_list               = it_packing_list
      contents_bin               = it_attachment_int
      contents_txt               = it_message_body_int
      receivers                  = it_email_receivers_int
    exceptions
      too_many_receivers         = 1
      document_not_sent          = 2
      document_type_not_exist    = 3
      operation_no_authorization = 4
      parameter_error            = 5
      x_error                    = 6
      enqueue_error              = 7
      others                     = 8.
  case sy-subrc.
    when 0.
*     Todo bien!
    when 1.
      raise too_many_receivers.
    when 2.
      raise document_not_sent.
    when 3.
      raise document_type_not_exist.
    when 4.
      raise operation_no_authorization.
    when 5.
      raise parameter_error.
    when 6.
      raise x_error.
    when 7.
      raise enqueue_error.
    when others.
      raise unknown_error.
  endcase.