Highlights from the Figaf Blog 2018

So, here, at the beginning of 2019, I think it will be appropriate to take a look back on what happened on the blog on Figaf.com during 2018.

Last year, we published 35 posts on the blog. Some blogs post were about new releases on some of Figafs´s tools, some were about new insights or how I did see the future and some were about how you can use SAP PI/PO to optimize your workflow. To be honest, I had great fun making all the videos, slideshows and blog posts.  Still, after working with SAP in more than 15 years, I find it very interesting to develop new functions on the different tools, Figaf offers, so that users, in the end, will have a better experience working with  SAP PI/PO.

So, in this blog post, I will take a trip down memory lane and show you the three blog post from 2018, that I appreciate most. Not necessarily, because it was exactly these blogs which had most readers or got most shares or likes on the social media, but because they are still worth reading today in the very early stage of 2019.

Why our testing is different than most test systems for SAP PI

This first post, “Why our testing is different than most test systems for SAP PI“, was published March 24, 2018. This blog is still very interesting, because of two reasons. Firstly, testing is, and will always be, a very important part of working with SAP PI. Secondly, the blog follows up on a podcast with Mark Oshifeso, who is a customer of Figaf IRT.

It is always very interesting for me when customers take time to explain, which challenges they see when they are working with SAP PI. And maybe it will also be valuable for you to read.

SAP PI/PO support, why not learn from the errors

The second post, “SAP PI/PO support, why not learn from the errors“, was published on September 28, 2018. I think it is still worth a read because it is very important to learn from errors and bad created scenarios when you work with SAP/PO.

As you can read in the blog, there are two kinds  of errors in an SAP PI/PO context:

  1. Errors that repeat and solvable by actions like restart the message, refresh of the cache or send mail to the business user in charge.
  2. Errors that occur because a coding error that will be fixed and never occur again (hopefully.

In the blog, you will find a video, where I talked about how you can optimize your SAP PI/PO Support.

Optimize your SAP PI/CPI development

The last blog post I would like you to take a look at is called “Optimize your SAP PI/CPI development“, and was published November 21, 2018. SAP is always in progress, and it is important to set aside time to develop so that your scenarios and solutions always are up to date. In other words, I think it will be valuable for you to take a look at the blog.

In the blog post I talk about a process built on the following steps:

  • Scoping
  • Development
  • Testing
  • Document
  • Transport
  • Validation
  • Go live
  • Support

In the blog, I also talk about a webinar, I held, about how the Figaf tool allows you to optimize and automize the different steps in the process, so you don´t have to have all the manual paper tasks to fill in. You will get much greater visibility into what is developed of your SAP PI/CPI landscape.

I hope you liked the content, I have chosen for this blog post. If so, you might also like to see Highlights from the integration podcast 2018.

If you have questions to the three blogs or other topics regarding Figaf.com, do not hesitate to contact me.

Searching SAP PI/PO message content with module development

internet search conceptI was talking with a fried around searching content and how easy it would be to implement your own search solution.
After taking a look at search APIs, such as Amazon’s, and having long discussions with a friend, I came across this useful page: https://www.searchify.com/documentation/java-client
I thought it would be a good project to start my development and be able to develop better solutions for searching. It would be fun to see how easy it is be to integrate this with the SAP PI/PO/XI module framework.
Spoiler: It is way too easy. 
As a seasoned PI consultant, I wanted to create an archiving solution that would make a developer’s work easier. Specifically, I wanted to create an archiving module that would store a lot of metadata on the file, while also adding a useful search function to it. This is how www.piarchiving.com was born, it is no longer being maintained because there is other solutions. Some of the newer user-defined message search modules also have different search criteria for text and so does HANA.

After gathering my ideas, I had created a module. In only takes one hour to learn and implement the code in an SAP PI module.

To get started, you need to add the API URL that should be used. The next step is to create and add the Index. After these steps, the content should be put into the text field and uploaded. A step-by-step explanation is shown in my video, with examples on how to find message IDs after the completion of keyword-based searches.


This is an easy application for those who wish to search through all of their content using Searchify in a PI/PO context. It is good for scenarios where you don’t have a HANA instance to save and search through messages.

It is also quite inexpensive, at only $59 per month which will not let you run much servers.
If this was to be used in a real scenario, there should be a focus on creating more stable code and an asynchronous process. Obviously, a better front end would also be needed.

For a more in-depth explanation, watch my video at:
The code is the following
package com.figaf.po.module.search;

import java.rmi.RemoteException;
import java.util.HashMap;
import java.util.Map;

import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

import com.flaptor.indextank.apiclient.IndexTankClient;
import com.sap.aii.af.lib.mp.module.Module;
import com.sap.aii.af.lib.mp.module.ModuleContext;
import com.sap.aii.af.lib.mp.module.ModuleData;
import com.sap.aii.af.lib.mp.module.ModuleException;
import com.sap.engine.interfaces.messaging.api.Message;
import com.sap.engine.interfaces.messaging.api.Payload;

public class SearchModule implements SessionBean, Module {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -91519383171871089L;

	

	 public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
			throws ModuleException {

		   IndexTankClient client = new IndexTankClient(API_URL);
			  
		    try {
		    	com.flaptor.indextank.apiclient.IndexTankClient.Index index = client.getIndex("daniel");
		    	
		    	 Message msg = (Message) inputModuleData.getPrincipalData();
		 		Payload payload = msg.getMainPayload();
		 		byte[] contentString = payload.getContent();
		    
				String documentId = msg.getMessageId();
				Map<String, String> fields = new HashMap<String, String>();
				fields.put("text", new String(contentString));
				fields.put("timestamp", 
			            Long.toString(System.currentTimeMillis() / 1000L));
				index.addDocument(documentId, fields);
		    }catch(Exception e){
		    	throw new ModuleException("Unable to save msg to index "+e.getMessage(),e);
		    }
		    
		 return inputModuleData;
	 }

	  private final static String API_URL = 
		    "http://:9XKwGr18rQ7NVU@8tvnx.api.searchify.com";
	  
			@Override
		public void ejbActivate() throws EJBException, RemoteException {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void ejbPassivate() throws EJBException, RemoteException {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void ejbRemove() throws EJBException, RemoteException {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void setSessionContext(SessionContext arg0) throws EJBException,
				RemoteException {
			// TODO Auto-generated method stub
			
		}
}

The post Searching SAP PI/PO message content with module development appeared first on SAP PI course.