Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
GopisettySai
Explorer

Before walking through the solution, We will glide through How it started.

Addressing the Integration community, We have a lot of systems to connect and indeed as an integration consultant we will be having POs and CPI systems to access them we will be using bookmarks and find it difficult to remember and open them at first glance.

As an enthusiastic integration consultant, I wanted to access the systems with in single click. I built a webpage with the help of Chat-GPT and wanted to host it but was not sure to host it on the internet and expose the domains.

Discussed the same with teammates and one of the teammates came up with a solution why can’t we do this with CPI, We will host it through CPI.

How to achieve this?

  1. It is assumed that you have the HTML5 code in a single file already. You need to copy the HTML content and encode this to base64 (using an online tool) and copy the base64 encoded string to Notepad or any IDE of your choice.
  2. Please save the Base64 code in a header as below.Content ModifierContent Modifier
  3. COpy the below groovy script to decode the Base64 to HTML script.

 

import com.sap.gateway.ip.core.customdev.util.Message
import java.util.HashMap
import java.text.SimpleDateFormat
import java.util.Base64;
def Message processData(Message message) {
    
    def staticContent = message.getProperties().get("HTML_CONTENT");
    
    
    //Parse static content
    Base64.Decoder decoder = Base64.getDecoder();
	staticContent = new String(decoder.decode(staticContent));
   
    message.setBody(staticContent.getBytes("UTF-8"));
    message.setHeader("Content-Type", "text/html; charset=utf-8");
    return message
}​

 

 

 

        4.Deploy the iflow, copy the HTTPS URL, and hit it from the browser, you can access your webpage.Integration organizer webpage.png       5. In case you're getting a CORS error, Please use API management to surpass it.

 Let me know if you have any queries and please share your interesting findings as well! You can contact me on LinkedIn regarding the same! Until then stay tuned!

Labels in this area