Skip to Content
author's profile photo Former Member
Former Member

OBJECT_NOT_SENT - on second pass

Hi - I have created a custom transaction in which I send an email if the user changes a Service Master from my transaction. The first time the user enters my custom transaction and changes a Service Master, the email sends. If the user changes any subsequent Service Master from my transaction - the email does not send and I get the above exception.

I am using FM: SO_NEW_DOCUMENT_SEND_API1.

If I call the FM from a custom program multiple times it sends multiple emails - but in my transaction it throws the exception on the second call.

I started debugging SO_OBJECT_SEND from within the above FM - but have not yet found the inconsistency between the calls.

Any feedback is appreciated.

Dave

(see code and variable refs below)

-


The text elements text-011 thru -013 simply state SM Created, Changed, or Deleted.

c_language is 'EN'

c_doc_type is 'RAW'

p_v_dist is a distribution list

c_rec_type is 'C'

c_com_type is 'INT'

c_express is 'X'

i_content is populated with classification data for the changed Service Masters.

CODE

-


  • Create Distribution List - email prep

if p_v_dist = c_dist_create.

wa_doc_data-obj_descr = text-011.

wa_doc_data-obj_langu = c_language.

v_doc_type = c_doc_type.

i_receivers-receiver = p_v_dist.

i_receivers-rec_type = c_rec_type.

i_receivers-com_type = c_com_type.

i_receivers-express = c_express.

append i_receivers.

clear i_receivers.

  • Change Distribution List - email prep

elseif p_v_dist = c_dist_chng.

wa_doc_data-obj_descr = text-012.

wa_doc_data-obj_langu = c_language.

v_doc_type = c_doc_type.

i_receivers-receiver = p_v_dist.

i_receivers-rec_type = c_rec_type.

i_receivers-com_type = c_com_type.

i_receivers-express = c_express.

append i_receivers.

clear i_receivers.

  • Delete Distribution List - email prep

elseif p_v_dist = c_dist_del.

wa_doc_data-obj_descr = text-013.

wa_doc_data-obj_langu = c_language.

v_doc_type = c_doc_type.

i_receivers-receiver = p_v_dist.

i_receivers-rec_type = c_rec_type.

i_receivers-com_type = c_com_type.

i_receivers-express = c_express.

append i_receivers.

clear i_receivers.

endif.

  • Function to send the email - for all Create, Change,

  • or Delete SM actions in transaction

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_DATA = wa_doc_data

DOCUMENT_TYPE = c_doc_type

COMMIT_WORK = c_wait

TABLES

OBJECT_CONTENT = i_content

RECEIVERS = i_receivers

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

.

Again I appreciate any help you can provide letting me know why the email sends the first time I process a change in my transaction and only the first time. All other changes attempt to send the email but return the exception 'OBJECT_NOT_SENT'.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 02:33 AM

    Is it possible that the receivers table is empty?

    if p_v_dist had an invalid value, you don't create any entries...

    Good luck,

    John

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.