- Overview
- Technical Details
- Prerequisites
- Register a Partner Flow Extension Application
- Build and Deploy the Application on SAP Cloud Platform
- Configure The Application
- Start the India Localization Application
- Additional Information
India Localization is a sample extension application for SAP Ariba that runs on SAP Cloud Platform. The purpose of the application is to allow a buyer to attach documents to Advance Ship Notices (ASNs).
In India (and in other countries such as Brasil as well), whenever goods travel from the supplier to the buyer across different states, the supplier needs a waybill document. The waybill document is issued to the buyer by the government upon request. The buyer have to send the document to the supplier in some way, so that the supplier can give it to the truck drivers responsible for delivering the goods. This is where the India Localization application comes in use. The extension application intercepts the creation of cross-state Advance Ship Notices in SAP Ariba and displays information about them to the buyer. The buyer can request waybill documents from the government and attach them to the ASNs using the extension application. As a result, the waybill documents are available as an ASN attachment for both the buyer and supplier.
The application uses the Partner Flow Extension API. You can run it either on enterprise, or trial SAP Cloud Platform account in the Neo environment.
These are the SAP Cloud Platform services and features in use:
- Connectivity Service - the application uses the Connectivity Service to obtain connection to SAP Ariba Open API.
- SAP HANA / SAP ASE Service.
- Identity Service - the application uses the Identity Service to manage its security.
- Document Service - the application uses the Document Service to save waybill documents.
The India Localization extension is a Java application that calls SAP Ariba's Partner Flow Extension API and fetches all intercepted ASN events. The events are persisted in a database and displayed in a SAPUI5 front-end. The application user can upload document attachments to the intercepted ASN events. Once an attachment is being uploaded, the application resumes the related ASN.
To use this extension application, you need to:
- Register an SAP Ariba Open APIs application in SAP Ariba Developer Portal.
- Promote your registered application for production access.
- Build and deploy the Java extension application on SAP Cloud Platform.
- Configure the Java application connectivity.
- Start the Java extension application.
You need to:
- have an account for SAP Ariba Developer Portal
- have an SAP Cloud Platform developer account
- download or clone the project with Git
- have set up Maven 3.0.x
You already have an account for SAP Ariba Developer Portal. Open the guide and follow the steps to register a new SAP Ariba Open APIs application that will be used against SAP Ariba Open APIs. At the end, you should have an application key related to the SAP Ariba Open APIs application.
As a next step, promote your application for production access. At the end, besides the application key, you will have a set of credentials (Service Provider user and Service Provider password) related to the registered SAP Ariba Open APIs application. You need them in order to call the Partner Flow Extension API production environment.
You will need the following Group Condition to intercept only ASNs with delivery across different states:
<GroupConditions>
<Condition>ariba:not(ariba:string-compare( $src/cXML/Request/ShipNoticeRequest/ShipNoticeHeader/Contact[@role='shipFrom'][1]/PostalAddress/State, $src/cXML/Request/ShipNoticeRequest/ShipNoticeHeader/Contact[@role='shipTo'][1]/PostalAddress/State) )</Condition>
</GroupConditions>
You have already downloaded or cloned the India Localization extension application. Now you have to build the application and deploy it on the SAP Cloud Platform. There are two paths you can choose from:
- using the SAP Cloud Platform Cockpit
- using the Eclipse IDE
-
Go to the
cloud-ariba-partner-flow-extension-ext
folder. -
Build the project with:
mvn clean install
The produced WAR file ROOT.war
under target sub-folder cloud-ariba-partner-flow-extension-ext\target
is ready to be deployed.
You have to deploy the ROOT.war
file as a Java application via SAP Cloud Platform Cockpit. Use Java Web Tomcat 8 as a runtime option.
When using the Eclipse IDE you can take a look at the structure and code of the application. You have to import the application as an existing Maven project and build it with Maven using clean install
. You also have to choose Java Web Tomcat 8 as a runtime option.
-
You have to clone the
cloud-ariba-partner-flow-extension-ext
project.- Оpen the Git Perspective. Choose Windows > Open Perspective > Other. Select Git and choose OK.
- Choose Clone a Git repository.
- Enter
https://github.com/SAP/cloud-ariba-partner-flow-extension-ext.git
in the URI field and choose Next. - Set the Directory field and choose Finish.
-
You have to import the
cloud-ariba-partner-flow-extension-ext
project as an existing Maven project and then build it.- In the Java EE perspective, choose File > Import > Maven > Existing Maven Project.
- Browse and select the folder where you have cloned the Git repository and choose Finish. Wait for the project to load.
- From the project context menu, choose Run As > Maven Build.
- Enter
clean install
in the Goals field and choose Run. The build should pass successfully.
To deploy the application from Eclipse IDE, follow these steps:
- Set the context path to
/
- In the Project Explorer view right-click on the project and choose Properties > Web Project Settings.
- For
Context root
enter/
- In the Servers view right-click on the white field and choose New > Server.
- Select SAP Cloud Platform and choose Next.
- Select Java Web Tomcat 8 as a runtime option.
- Add the application to the Configured field and choose Finish.
You need to create an HTTP destination on the SAP Cloud Platform.
Use the following required properties:
Type: HTTP
Name: ariba-india-localization
URL: <SAP Ariba OpenAPIs production environment URL>
Authentication: BasicAuthentication
User: <SAP Ariba Open APIs Service Provider User>
Password: <SAP Ariba Open APIs Service Provider Password>
And add four additional properties:
FlowExtensionId: <The unique flow extension id>
ApiKey: <SAP Ariba Open APIs application API key>
If you want to configure how often will the Partner Flow Extension API be called, add an additional property:
JobIntervalInSeconds: <Not mandatory. How often will the Partner Flow Extension API be called>
Note: There is a sample destination in the project's resources folder.
After creating the destination, start (or restart in case the application is already started) the application via the Cloud Cockpit.
Create PO and ASN with delivery across different states. It should be intercepted by the extension application.
- SAP Cloud Documentation - https://help.hana.ondemand.com/
- SAP Ariba OpenAPIs - https://developer.ariba.com/api
Copyright © 2017-2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.