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

Reagrding SO_NEW_DOCUMENT_ATT_SEND_API

Former Member
0 Likes
814

Hi All,

I am trying to send the PDF attachment in mail using teh FM SO_NEW_DOCUMENT_ATT_SEND_API.

I am getting the return code SY_SUBRC = 4.(operation_no_authorization)

Can you please let me know on what conditions this error wilkl occur?

Please tell me how to resolve it.

Thanks & Regards,

Priyanka

Hi All,

I am trying to send the PDF attachment in mail using teh FM SO_NEW_DOCUMENT_ATT_SEND_API.

I am getting the return code SY_SUBRC = 4.(operation_no_authorization)

Can you please let me know on what conditions this error wilkl occur?

Please tell me how to resolve it.

Thanks & Regards,

Priyanka

4 REPLIES 4
Read only

Former Member
0 Likes
714

Hai Priyanka,

Goto SE37 type the FM name press F7 goto Funtion Module documentation(Details is given here).


OPERATION_NO_AUTHORIZATION

The document was not allowed to be sent, because one of the required authorizations did not exist.

check the same thing using some other user SAP ID.

Hope you need to open SM53 and check the authorixzation object for which you ned autorization. This is baiscally a BASIS problem.

Hope the above discussion was helpful.

Cheers,

Suvendu

Read only

former_member212005
Active Contributor
0 Likes
714

Use transaction SU53 to check which authorization has passed and which has failed.

Hope it helps!

Read only

saumya_govil
Active Contributor
0 Likes
714

Hi Priyanka,

This is an authorization issue.

Check in SU53 for the authorization object detail for which you need access on.

Send the details to your basis team to act upon.

Regards,

Saumya

Read only

Former Member
0 Likes
714

Hi,

check the following code

{ CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = doc_chng

put_in_outbox = 'X'

commit_work = 'X'

  • IMPORTING

  • SENT_TO_ALL

  • NEW_OBJECT_ID

TABLES

packing_list = objpack

object_header = objhead

contents_bin = objbin

contents_txt = objtxt

  • CONTENTS_HEX

  • object_para

  • object_parb

receivers = 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.

CASE sy-subrc.

WHEN 0.

WRITE: / 'Result of the send process:'.

ENDCASE. }

Thanks & Regards,

Sateesh.