Generate Test data for your Groovy scripts in CPI

I wanted to develop some Groovy scripts but it is a little cumbersome to do it in CPI because you need to deploy, activate the script and the look at the trace. This takes quite a bit of time. I found Eng Swee Yeoh blog (How) do you test your Groovy Scripts. Here he shows how you can create a script to run your Groovy Scripts as on CPI, so you can do it in Eclipse or IntelliJ.

I just hate the manual job about setting up the correct content for a test case. So because we had the content needed in Figaf IRT we could automate the process.

We have added an implementation of the SAP CPI Camel Message class so users could create it. We have included it into the script, so you only need the public Camel Core. The implementation may not be fully complete but it is a lot faster than downloading all the required jar files as is described in Yeoh’s blog .

To view a demo of how this works check the following video

 

Download the libraries required:

  • Camel  and download the latest release of Camel to get the Apache Core, this contains the Camel Attachment
  • CPI APIs download the Generic API and the Scripting API.
  • Groovy JSON parser

If you use Eclipse you can create a Groovy Project, then add the above jars.  Then add the current groovy script and the generated to the project. You will need to change the location of the CPI grovy script so it matches. Once you save the payload in an Expression use the command ${bodyAs(String)}, then you will get access to the payload.

 

If you have ideas for improvement please share. 

Known limitations: For some headers/properties that are saved in org.apache.camel.converter.stream.InputStreamCache IRT cannot access the payload. You need to convert the payload to String before adding it as an attribute if it is binary.

Download the IRT application and try it out with your system. It is free for 10 Interfaces.

How to make a moderen EDI landscape with SAP S/4 HANA

I had a great talk with an old colleague this Friday. The topic was how to build a new EDI platform.  They did not have any EDI yet on the SAP platform since they used an old platform for it. So they had to start over with SAP as the backend.

I have been doing EDIFACT and X12 implement since I started with SAP XI using the Seeburger tool and lately seen on how to use the B2B Add-on from SAP to handle the EDI part on SAP PO. The tool has a difference in structure and how they work, but they work the same way. The can take some XML and convert it to the EDIFACT/X12 files and the other way. SAPs platform has been focused on how to make it native in SAP PI/PO, where SeeBurger was a new way of the building the platform.

I have created a video that shows some of my questions concerns on the topic of creating EDI with S/4 Hana.

I was starting to talk about the different IDOCs and which EDIFACT documents they referred to. Then we got a talk about they were doing a new S/4 HANA on-premise implementation. S/4 HANA cloud,  which is the premier SAP product, is where all development is going on. There is only a few whitelisted IDOC’s for some scearnios like syncronize data with your existing SAP ERP system and some warehouse. The EDI IDOCs is supposedly not available, so you cannot use them.

Since all development in on S/4 Cloud and the on-premise version will get the updates after a few months/years, there is not going to be any development going on the EDI Idocs. There has probably not been developed much on them over the last 10-15 years. SAP would like to move their customers to the cloud version to make it faster for them, and customers cannot live with out their flexibility. So we will have to see where it will end.

An option was to use the Enterprise Services (E-SOA) that also worked on the process. I have hear about a few organization using it, but it requires a strong leadership and some skills to go use them. Since Enterprise Services is a dead topic now, i guess it does not make sense to focus on it. It seems as it has been inpsiring the new SOAP APIs from SAP so it is not in vain, and you probalby have an easier option to migrate them.

API is a big focus area for SAP for some reasons.

  • In S/4 Cloud you cannot develop so you have to use APIs to extract and use data
  • It is easier to explain APIs to non SAP developers, because they have a common form of documenting
  • You can expose them online and secure them

All the APIs SAP has created is on api.sap.com, which is SAPs API portal.  On the portal, you can find all SAP apis on the different systems and you can easy try them out there. I did find an SOAP service for sending Purchase Orders from S4, but is currently not able to find it. One of the document you can find is the Scope Item 2EJ, which is covering the purchasing process on how to configure it and steps involved in configuration. So it is fairly easy to get started with.

So it is possible to use the APIs to expose the purchase process for EDI.

EDI from the new APIs

So it is possible to create an EDI solution based on the new APIs. Then what does it require.

A good place to start would be to use the Integration Content Advisor, which is SAP way to make the B2B Mapping faster based on Machine Learning. I have not seen or use the tool yet, but it the idea is pretty cool. It could speed up the mapping of data with the EDI formats. It requires you have the Enterprise Edition of SAP Cloud Platform Integration. You can though run the flow on your local PI. The alternative approve is to use the normal EDI Mapping on SAP PI/PO and use the B2B Add-on in connection with the Trading Partner Management (TPM).  If the Content Advisor works it is probably the fasts way to deal with things.

It still brings up the question about is the new APIs strong enough to be able to handle the processing. And how will the errors be resolved since they cannot be handled in BD87.  S/4 will come with AIF (SAP Application Interface Framework) for some scenarios, which is a tool that enable different kinds of error handling and mapping. It may be suited to some of the normal EDI error that you will see like customer try to send an invalid material number or delivery data. It will require some training to enable users to use it. AIF is more powerful soluction then BD87 since it allow you to add rules and validations.

My recommendation would be to give the new interfaces an attempt to get the process working on it. It would give freedom to upgrade to S4 Cloud and just have one interface for the integration process. I would also imagine that the new interfaces is easier to extent or you can make lookups to get information that is missing.

Have you tried the new S4 way of integration and does it work?

Update to testing on SAP Cloud Platform Integration (CPI)

We just released IRT 2.3. That had two big additions. One was our ability to monitor your full SAP PI/PO/CPI development process. In this post, I’ll share the other which is much better support for cloud integration.

In 2.2 we add the first option to run cloud integration tests. We were able to use the new trace functionality for cloud integration to get messages at all stages. This made our test easy to perform without any changes to the setup.

In this, we have added some more functionality

  • We can run regression test for both HTTP and now SOAP adapter. This means that it will use your existing iflow to process the test message in.
  • If you use other adapters or scheduled tasks IRT is able to create a new flow that looks like the original one, except it starts with an HTTP adapter. IRT can record the message from the existing flow.

We have an oss note with SAP that the latest release meant we were getting some problem when setting an iflow into Trace mode.

You can watch the demo video here.

It is pretty simple to setup. Just signup at http://figaf.com/irt then login with the password you will get. Here you can also find the manual. Download the jar file, start it. In the configuration enter your host url, Suser and password, then you can synchronize the list of iflows and start setting up test cases.

 

 

SAPPHIRENOW 2017 from an integration perspective

SAPPHIRENOW and the ASUG annual conference is just around the corner. I’m looking forward to packing my bags and get on the way to the event. To see what is going on in the SAP ecosystem.

I normally do a short preview of the session that I’m planning to attend at the conference so you also can follow along in what is happening. So this blog is about that.

As something new I’ll try to create Facebook live videos from the conference if it possible. I guess there is a lot of things that can go wrong like wifi and location. I’ll give it a try so you can follow along.

I recorded a video on the agenda that I have put together and my thought about it. You can view it here on facebook please comment if there is a session that you think I should add to my agenda.

If you want to meet, I’m planning to see the keynotes at the remote theater DS425. I do hope it is a place where they will stream the keynotes otherwise I may go to find a different location

Here is my list of integration topics. If you are looking at IoT/SAP Leonardo and API there is also many sessions on those. I do hope to be able to attend some of them.   

session

Title

Time

BITI8502

Roundtable: Tackling Your Cloud Integration Challenges

Tue
12:30 p.m. – 01:30 p.m. 

S320 Roundtable Corridor – Roundtable #4

DP44055

Apply the Best Strategies for Cloud Integration

Tue
02:00 p.m. – 02:40 p.m.

Data, Analytics, and Cloud Platform DP532

BA49329

Become a Driving Force for Digital Business with SAP Leonardo IoT

Wed
01:00 p.m. – 01:20 p.m.
Live Business Theater

BITI6663

Best Practices to Migrate from SAP Process Integration 7.1 to SAP Process Orchestration 7.4

Best Practices to Migrate from SAP Process Integration 7.1 to SAP Process Orchestration 7.4

BITI7809

Enterprise Integration Consolidation and Business-to-Business Collaboration with SAP Process Orchestration

Thu
11:00 a.m. – 12:00 p.m.
S310G (South Concourse, Level 3)

SAP Integration Landscape and Emerging Complexity

The field of process integration is changing quickly, setting new challenges for Integration professionals, and I think a good understanding of the available tools is key.

When we talk about paradigms in process integration, there have been 3 major phases:

  • Mainframes: Back in the day, most companies had one mainframe or two. The good thing about the mainframe was that it was fairly simple to integrate what were essentially internal programs – even if you had to work across mainframe platforms.
  • Client-server: With the emergence of client-servers and SAP R/3, the number of application servers was growing quickly. Suddenly, as an Integration Department, you had to figure out how to integrate the applications in your landscape so that you could create a new interface. In SAP terms, it may have been a Business Connector or eXchange Infrastructure (XI). You only had one tool to use.
  • The Cloud: Today, cloud integration is the norm, and the goal is to be able to quickly and easily leverage new cloud capabilities from existing development. A couple of examples of existing cloud capabilities are Hybris Cloud for Customer (e-commerce solutions) and SuccessFactor (human capital management).  There are also a number of non-SAP cloud applications. In fact, you most likely have some of them in your landscape already. As the integration expert, your job requires you to make them all play together seamlessly. Some come with prebuild content others you have to create for yourself.

As I said earlier, it used to be that you had integration consolidation that mostly worked in XI/PI. Now, Integration departments are faced with a very different landscape, driven by the need for new integration capabilities, and need to be looking outside of their space at the tools that are already available in other areas of process development. If we understand what’s out there, we can choose the right tool for the job.

I’m talking about tools like the HANA Cloud Platform – integration services (HCP-IS)/HCI, Process Orchestration (PRO), API Management, and Data Services to do bigger data ETL. We’ve also got the Application Integration Framework Overview (AIF), for when you want to do any integration with backend services. There are also SAP Gateway solutions available for exposing OData. Those are the SAP integration technologies that I can think of off the top of my head, other vendors have similar offerings that may be relevant.

I did this exercise with a customer and we spend 6 hours on the different topics and when it did fit into their architecture.

The big problem for the integration manager/architect is that you need to know the tools, and know when it makes sense to use one and how to select one over another. You also need to be able to train your team to use them. As you learn more, you’ll find a lot of overlap between the capabilities of the various tools, and knowing what each one can do will allow you to streamline your process when you have complex situations.

The challenge with all these tools is that it is both labor-intensive and potentially expensive to try them out. Say you have a situation where you want to expose some data to the user. First, you will have to figure out the logic and the capabilities of the various tools to find the best one to combine the elements so your API management will call  PRO or Gateway — to get or expose some data. Then you’ll need to acquire the tools and start using them, in order to really understand where they fit and what you can do with them. Once you get that down, you will need to work out how to leverage the technology internally. So, a lot of work is involved whenever you introduce new technology like this. You also have to keep in mind that you will be paying for licensing to use the tool, even if you don’t end up implementing it.

So as integration experts and enterprise architects, working in a rapidly changing field, we want to do our homework and really understand any tool and how we can leverage it before we place it in our systems.

What is your strategy for landscape integration? How do you cope with training problems?