SAP Knowledge Base Article - Public

3768361 - "User has no authorization for operation 01 on object" when using API_CV_ATTACHMENT_SRV for Purchase Requisitions

Symptom

  • Calling the OData service API_CV_ATTACHMENT_SRV, entity CreateUrlAsAttachment, to add a URL as an attachment to a Purchase Requisition returns an error.
  • Error message: "User has no authorization for operation 01 on object"
  • Error message variant: "User has no authorization for operation 01 on object BUS2105"

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Send a POST request to API_CV_ATTACHMENT_SRV/CreateUrlAsAttachment to create a URL attachment for a Purchase Requisition (SAPObjectType set for PR).
  2. Provide parameters including SAPObjectType='BUS2105', LinkedSAPObjectKey, Url, MIMEType, and optionally UrlDescription.
  3. Use a LinkedSAPObjectKey that does not match the expected internal Purchase Requisition key format.
  4. Observe the response: "User has no authorization for operation 01 on object".

Cause

An incorrect value was passed in parameter LinkedSAPObjectKey. The document key for the Purchase Requisition was not provided in the expected internal format, which led to the misleading authorization error.

Resolution

To resolve this issue and successfully save the document attachment, correct the format of the value passed to the LinkedSAPObjectKey parameter:

  1. Ensure the Purchase Requisition number passed to LinkedSAPObjectKey is strictly 10 digits (e.g., use '0010068096' instead of '000000010068096').

  2. Ensure that the parameter BusinessObjectTypeName='BUS2105' is also explicitly included in your query.

Example of a Corrected API Call: .../sap/opu/odata/sap/API_CV_ATTACHMENT_SRV/CreateUrlAsAttachment?SAPObjectType='BUS2105'&LinkedSAPObjectKey='0010068096'&Url='[Your_URL]'&MIMEType='text/url'&UrlDescription='[Your_Description]'&BusinessObjectTypeName='BUS2105'

Keywords

API_CV_ATTACHMENT_SRV, CreateUrlAsAttachment, LinkedSAPObjectKey, BUS2105, purchase requisition, GOS, URL attachment, authorization error, operation 01, CA-DMS, OData, attachment service, header-level attachment, BusinessObjectTypeName, SAPObjectType , KBA , MM-PUR-REQ-BAPI-2CL , BAPIs - Purchase requisition (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions