Skip to Content
Technical Articles
Author's profile photo Gavin Barwell

Integrating SAP With The Ethereum Mainnet

SAP is a flexible system, and its recent implementation of Blockchain-as-a-Service is a refreshing new development. Blockchain is most well-known as the technology that was responsible for cryptocurrencies such as Bitcoin and Ethereum. However, the blockchain is more than just the backbone for cryptocurrencies, as the Ethereum network shows us. The Ethereum Mainnet is the public blockchain that all users have access to. In recent years, private blockchains have come about that allow users specific access to their resources based on permissions. The public Ethereum Mainnet is open to everyone. You don’t need to run your own node on the network to interact with it either. Thanks to SAP’s integration with blockchain, a user could use ABAP to create a program that allows the system to interact with the Ethereum Mainnet. Here’s how this works.

Step 1: Build the ABAP UI

We can develop a simple UI to interface with the Ethereum Mainnet through ABAP. There’s already a well-documented ABAP source code that’s readily available from Github. All you have to do is copy the contents of this report into a new BAP document and run it. You may want to change the report title to include a unique identifier. This identifier will be used in your ABAP UI as a semi-unique name.

Step 2: Set Up the Web API

The web API is how you are going to interact with the Ethereum node. The source code for this API is available in the main Github repo. The API uses a node provider called Infura and connects with the system automatically. You don’t need to set up anything to hop onto the public Ethereum Mainnet. The API comes with Azure, so you don’t really have to install anything. The interface allows you to spot all the available buy and sell orders on the network and the preferred prices for them.

Step 3: Prep the Smart Contract

The smart contract is written in Solidity; a language developed specifically for Ethereum. The agreement takes new buy offers, validates them based on parameters, and finds sellers with the right offer. The smart contract, in this case, is already pre-installed on the demo Ethereum network we’ll be using for the test.

Step 4: Run the Demo

To run the demo, all you have to do is run the ABAP code you copied earlier. Immediately, a window should pop up that has a bright yellow “Display offers” button. You can hop over to the other tab and develop your own order by entering the data for the raw material, the amount needed in kilos, and what you’re willing to pay per kilo. Once you hit the “Create Buy Offer” button, the system verifies the order and takes about fifteen seconds to post it up. If you go back to the main tab, you can refresh the list, and your order should pop up.

Other Considerations

Using the Mainnet is easy, but it’s also very public. All smart contracts are viewable by all individuals on the network. In this way, it’s similar to a Bitcoin blockchain as mentioned in this website, albeit the network can execute code as well. If you’re storing stuff on the Ethereum Mainnet, you should encrypt it. The ideal solution would be to keep sensitive information out of the public domain. That sounds like a challenging prospect, but new technology known as Zero-Knowledge Proof (ZKPs) can make that a reality without revealing details of the sensitive information. Using the Ethereum Mainnet is exciting, and since SAP allows you to utilize ABAP with it, it’s worth experimenting with the interaction. However, you should be wary of putting private information into the public domain.

Assigned tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.