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

Mail is not send by function module SO_NEW_DOCUMENT_SEND_API1

Former Member
0 Likes
424

Hi Expart,

In BADI HRPAD00INFTY I AM USING A FUNCTION MODULE SO_NEW_DOCUMENT_SEND_API1 but It is triggering a exception DOCUMENT_NOT_SENT = 2.

What may be the reason is that it is because I took the RECEIVER table as itab without header line but in object oriented contents

I can not use table with header line give the solution .

Kindly give me soulation asap.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
392

Hi ,

You can check the entries in the Reciever Table in the function module or might be debugg the function module to find the reason why it is giving the exception

Thanks

Jatender

2 REPLIES 2
Read only

Former Member
0 Likes
393

Hi ,

You can check the entries in the Reciever Table in the function module or might be debugg the function module to find the reason why it is giving the exception

Thanks

Jatender

Read only

Former Member
0 Likes
392
it_objtxt     TYPE STANDARD TABLE OF solisti1   ,
          it_objpack    TYPE STANDARD TABLE OF sopcklsti1 ,
          it_objbin     TYPE STANDARD TABLE OF solisti1   ,
          it_objhead    TYPE STANDARD TABLE OF solisti1   ,
          it_reclist    TYPE STANDARD TABLE OF somlreci1  .

DATA l_sender TYPE soextreci1-receiver.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      document_data              = v_emailattr
      put_in_outbox              = 'X'
      sender_address             = l_sender
      sender_address_type        = 'INT'
      commit_work                = 'X'
    TABLES
      packing_list               = it_objpack
      object_header              = it_objhead
      contents_bin               = it_objbin
      contents_txt               = it_objtxt
      receivers                  = it_reclist
    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.