Monday, 29 July 2019 17:53

SAP XI/PI – ARIBA Invoice Attachments Sent to S/4HANA through PI

Written by https://sapyard.com/sap-xi-pi-ariba-invoice-attachments-sent-to-sap-through-pi/
Rate this item
(0 votes)

With Ariba, Workday, Concur, Successfactors, Fieldglass, Hybris and other satellite cloud solution providers knocking everyday, integration with SAP system has never been more interesting. ? Recently, I got

an opportunity to work in one ARIBA to SAP integration using SAP PI. We can also integrate Ariba to SAP without the need of SAP PI. But today, we will check how PI helps in the middle.

I have divided the topic into following sections: Introduction, PI Mappings and UDF’s Used, S4 HANA Configurations and BADI Implementation.

As part of ARIBA Supplier Invoice process the documents attached to the Invoice from ARIBA supplier system should be sent to the S/4HANA system through PI integration and able to open it from MIR4 transaction.

Invoices file format might be drawings, images or documents of any format attached by the supplier in ARIBA network. These attachments would enable him to supply products/materials/services accurately. From cloud integration version CI9 onwards ARIBA has introduced the document transfer feature. ARIBA sends and accepts BASE64 Encoded data.

Also Check How to Update Certificates in SAP PI 7.5

Please find the below PI mappings for each field in IDOC attachment segments.

Also Check How I Created My first SAP OData Service?

UDFs used in PI mappings

Let us now check some of the UDFs used in this interface. By the way, UDF is abbreviation of User Defined Function

  • GETATTACHMENTATTRIBUTES
  • GETATTACHMENTCONTENT
  • SPLITATTACHMENTCONTENT

Also Read: SAP S/4HANA Technical. Part 1 – Overview

Below are the detailed configuration steps to be followed toenable the document transfer feature.

Step 1: Go to t-code OAC2 and create custom document types as shown below:

Step 2: Then go to t-code OAC3 and link these custom document types to Business object BUS2081 as per ARIBA guide lines mentioned in page no 142.

Object Type:BUS2081
Document Type: Z_DOC/Z_PDF/Z_XLS
Link Status: X
Storage System: Z1 (It is ‘MA’ as per guide lines might change client to client, Basis created storage system name as Z1)
Link: TOA01
Retention per: Blank or zero

BASIS will perform above steps, but technical team need to provide inputs to BASIS.

Step 3: To handle invoice attachments there is one standard IDOC extension /ARBA/INVOICE provided by ARIBA.

Configure extension /ARBA/INVOICE in WE81 against message type INVOIC

Also WatchEnd to End Free Video Course on New Syntax in ABAP

Implement the code in BADI INVOICE_UPDATE method CHANGE_BEFORE_UPDATE

Use standard ARIBA FM /ARBA/ARCHIVE_IDOC_ATTACH to get the invoice attachment content from archive link.

IDOC will be generated with attachment content as shown below:

You can check the attachments in MIR4 transaction.

I have tried to put all details. If you still have any issue, please feel free to put your questions in the comments section below. I will get back to you.

Join Telegram SAP Technical Discuss Group. Install Telegram App first. Click the link from your mobile.

Please SUBSCRIBE to SAPYard’s Youtube Channel for Free End to End SAP Video Course and Training.

Check SAP XI/PI Tutorials

Check SAP Ariba Tutorials

Also Check HANA-ABAP Tutorials

Read 312 times

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.