Spend Management Blogs by SAP
Stay current on SAP Ariba for direct and indirect spend, SAP Fieldglass for workforce management, and SAP Concur for travel and expense with blog posts by SAP.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jecky
Associate
Associate
760
Ariba is a cloud-based procurement and supply chain management solution provided by SAP. It is designed to help organizations streamline their procurement processes, manage supplier relationships, and control spending. One of the essential functions in a procurement system is creating requisitions, which are requests for goods or services needed by an organization.

The "Requisition Import with Attachments Using Web Services" feature in Ariba refers to functionality that allows users to create requisitions in the Ariba system through web services while also attaching relevant documents or files to those requisitions.

In the Documentation (https://help.sap.com/docs/buying-invoicing/procurement-data-import-and-administration-guide/import-o...), is possible to find the following important notes:

Customers are able to import requisitions with attachments at the header-level or at the line-level, add new attachments, update existing attachments, or delete previous attachments and the functionality also supports attaching multiple attachments.

 

Keep in mind:

  • The maximum size of the attachments and the type of attachments that can be sent depends on your site configuration.
    Relevant parameters in Ariba are:

    • - Application.Approvable.MaxAttachmentSize (determines maximum size of the attachments)

    • - Application.Approvable.AllowedAttachmentExtensions (determines the validity of the attachments)





  • Necessary to enable MTOM (Message Transmission Optimization Mechanism), screenshot is present later in this article


 

Prerequisites for PR Import with Attachments

  • Your administrator must enable the following parameters:

    • Enable attachment support in data import web services(Messaging.Channels.WS.SupportAttachmentsInWSImports)

    • Import requisitions with attachments using web services(Procure.ImportRequisitionsWithAttachmentsUsingWebServices).

    • Import requisitions using OriginatingSystemLineNumber with attachments using web service(Procure.ImportRequisitionsUsingOSLNWithAttachmentsUsingWebServices). This parameter must be enabled if you plan to use the OriginatingSystemLineNumber while importing requisitions with attachments.



  • A member of the Integration Admin group must review and accept the data definition changes for this feature. Disabling the feature after accepting the data definition changes will cause requisition import failures. You must revert the data definition changes manually.


Code Sample:


My posted WS message with the Attachments section looks like this:




In my case, I used the SoapUI application for testing.
During Project creation, is really good practice to load “WSDL” for Requisition Import, then a lot of configurations will be automatically populated. Information from WSDL Attachment section fields, which I posted:

<xsd:element minOccurs="0" name="Filename" nillable="true" type="xsd:string">

<xsd:annotation>

<xsd:documentation>The file name of the attachment. Requisition attachments can be imported using web services only. Attachments cannot be imported using CSV or Excel files.</xsd:documentation>

<xsd:documentation>Class name java.lang.String, group name RequisitionAttachmentDetails, variant vrealm_3493.</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element minOccurs="0" name="StoredFilename" nillable="true" type="xsd:string">

<xsd:annotation>

<xsd:documentation>The file path and name of the stored file. This value is automatically populated and users do not need to enter this value. Requisition attachments can be imported using web services only. Attachments cannot be imported using CSV or Excel files.</xsd:documentation>

<xsd:documentation>Class name java.lang.String, group name RequisitionAttachmentDetails, variant vrealm_3493.</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element minOccurs="0" name="ContentType" nillable="true" type="xsd:string">

<xsd:annotation>

<xsd:documentation>The content type of the attachment. Requisition attachments can be imported using web services only. Attachments cannot be imported using CSV or Excel files.</xsd:documentation>

<xsd:documentation>Class name java.lang.String, group name RequisitionAttachmentDetails, variant vrealm_3493.</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element minOccurs="1" name="UniqueName" nillable="true" type="xsd:string">

<xsd:annotation>

<xsd:documentation>The unique internal identifier of a user. Requisition attachments can be imported using web services only. Attachments cannot be imported using CSV or Excel files.</xsd:documentation>

<xsd:documentation>Class name java.lang.String, group name RequisitionAttachmentDetails, variant vrealm_3493.</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element minOccurs="0" name="PasswordAdapter" nillable="true" type="xsd:string">

<xsd:annotation>

<xsd:documentation>The password adapter for the user specified in the UniqueName field. Requisition attachments can be imported using web services only. Attachments cannot be imported using CSV or Excel files.</xsd:documentation>

<xsd:documentation>Class name java.lang.String, group name RequisitionAttachmentDetails, variant vrealm_3493.</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element minOccurs="0" name="Date" nillable="true" type="xsd:dateTime">

<xsd:annotation>

<xsd:documentation>The creation date of the attachment. Requisition attachments can be imported using web services only. Attachments cannot be imported using CSV or Excel files.</xsd:documentation>

<xsd:documentation>Class name ariba.util.core.Date, group name RequisitionAttachmentDetails, variant vrealm_3493.</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element minOccurs="0" name="MappedFilename" nillable="true" type="xsd:base64Binary">

<xsd:annotation>

<xsd:documentation>The reference name for the actual file attachment. Requisition attachments can be imported using web services only. Attachments cannot be imported using CSV or Excel files.</xsd:documentation>

<xsd:documentation>Class name java.io.File, group name RequisitionAttachmentDetails, variant vrealm_3493.</xsd:documentation>

</xsd:annotation>

</xsd:element>

 

MTOM functionality is a prerequisite for Requisition Import with Attachments functionality.
Please follow the next steps for MTOM enablement:
1. select SOAP request in the SoapUI application
2. In the Request Properties table just enable MTOM functionality


 

 

 

 

 

 

 

 

 

Do not forget to add an attachment, which can be Uploaded in the following way:



Authorization for Requisition posting is defined via Headers like:

 


Authorization Value (Password) is encoded in Base64 format.


If you properly Submitted Requisition, the response from Ariba will looks like:


Screenshot from Ariba Requisition: