Skip to Content
Personal Insights
Author's profile photo Daniel Graversen

Steps to learn SAP CPI, what you must know before your first project

I wrote this post on my own blog, last week and it received a number of views so I thought it made sense to post it here also. 

SAP CPI is a complex system. There are some areas that you must understand what mean before you start creating your first real project. If not you are going to spend too much time on something that will not help your project. And it will be difficult to understand how to get started.

I’m all for learning why creating a new project, but I have also run into challenges that I did not know how to solve properly when I started doing SAP CPI projects.

I have tried to support some developers, that did not really understand important parts of what SAP CPI was about and then started to create their own projects. It is kind of hard to help in that situation, without taking on the full project. So instead of you spending time on understand something complex then this is your guide to get started with SAP CPI.

1) Get access to SAP CPI

The first step is to get an SAP CPI tenant. If you have one in your organization, great then just get access to it. Otherwise, you can signup for the trial tenant. You can see how to in my video guide or in this blog here.

2) Understand some examples

It is useful to understand some of the patterns in place in SAP CPI. I recommend the Cloud Integration – Exemplars package gives a lot of ideas on how to solve specific challenges with SAP CPI. Copy it to your tenant and play around with it.

3) Look at some more complicated real flow provided by SAP

Understand how real flows are created. I do like the SuccessFactors to AD but there is a lot of others out there. And if you are going to work with a specific solution then try to browse some of the Iflows used there.

4) Create your first simple flow

Create a simple flow for SAP CPI to see you can deploy and run it. You can also follow the beginner guide from SAP in the help pages. I an example video in my free course. You can create your own first flow without much help if you use the free trial, for now, it is best to start with a scheduler, some content modifier and then deploy it. View the trace of it.

5) Concepts that you must understand

There are some concepts that are vital to be able to deliver and work with SAP CPI. If you don’t understand them it will be difficult to build real iflows without banging your head agest the wall. Enhance the first iflow you created to understand the following. You can also take a course or read a book to get to understand them, see section 7.

There are or sure other concepts but they will depend on what you are trying to achieve and then you can dig into them.

  • The message structure used to run SAP CPI, what the difference between header, properties, and body are.
  • Content Modifiers including the Camel Simple Expression to be able to simply create messages and move around with payloads. How you can save payloads in properties and retrieve them later.
  • Request-Reply step to understand how you can call external services
    • How to use the authentication process from SAP CPI to save oauth or username/password
    • Use Local flows and Process Direct to make the flows easier to understand and modularize the CPI code
  • The different flow logic like Router, Splitter, Aggregator. It makes it easier to implement code with it, so you can
  • Groovy script. You don’t need to become an expert in Groovy Script. In most cases, you can handle the modifications with a few lines of java code.
  • XSLT is also useful for mapping XML content if the structure needs to be different.
  • External parameters that allow you to configure your integration, so you don’t need
  • How you can set messages to be easier searchable in the message monitor.
  • Fault handling. How you can set up alternative processing if something fails.
  • Naming of objects, so no standard names are used. It will be a lot easier to understand your code then.

6) Online help

The online help page does contain a large number of useful sections about the concepts above and provides a good reference to solving the problems you run into.

7) Courses and books

I will recommend going through some formal training, to ensure you know what is going on. The thing about the training is that the instructor has made thoughts about what should be learned.

I do recommend my course on CPICourse but the other option will give you other lessons at different prices.

  • SAP Training. There is the SAP Training CLD900 for SAP CPI where you get 3 days to work and learn the platform. I have not attended it or looked at the material.
  • CPICourse.com I have created a course that gives participants an idea about the different concepts in SAP CPI so they can get started with development and architecture.
  • Open SAP Course Application Integration Made Simple with SAP HANA Cloud Integration. This is a free course. This gives a good overview of what SAP CPI can do and how to design some elements. It is a little old, but it gives a good understanding of what is there. There is a new CPI Suite course that does contain some interesting segments but is at a higher level.
  • There is the book SAP Cloud Platform Integration: The Comprehensive Guide. I did have the first version which gave insights into how you can configure different things. It does serve as good reference material.

8) Create a real project

Now you are ready to create your own project in SAP CPI. They will probably not be easy to create and you will run into problems. It is called learning. Go thru blogs.sap.com/answers.sap.com, Exemplars package or the online help to find a solution to your problem.

You will by no means be an expert at this point, but you will have a good foundation to learn from and understand where to look.

Get a mentor to give you feedback on what you have developed, so you can improve it for the next project.

Anything missing

If there is anything missing please post a comment.

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Phil Cooley
      Phil Cooley

      Thanks Daniel Graversen for sharing this information. CPI is definitely complex. I've just recently been involved on a project that utilises this - basically calling an OData service in CPI from an application built using Mobile Services. Have you any additional information you could share around security aspects? Especially any best practices for Principal Propagation set up - i.e. logging in to a customer's iDP in the application built using Mobile services and then passing that through and using it for the OData service call.

      I've scanned heaps of blogs and found one or two blogs that touch on the subject but would be good if you could point to some additional material if possible.

      Thanks & Kind Regards

      Phil Cooley

      Author's profile photo Daniel Graversen
      Daniel Graversen
      Blog Post Author

      Hi Phil,

      Yes Oauth is a bit challenging.

      In some cases you will be able to use the standard CPI Oauth, but otherwise you must build your own oauth process. That can save keys.

      For one client we had to create a JWT token, and sent it to Salesforce. We ended up create a separate flow that could be called and that then saved the Authentication for a period of time.

       

      Author's profile photo Yee Loon Khoo
      Yee Loon Khoo

      On point 5) Concept that you must understand.

      Think should add CPI message mapping queue and context concept too. Although we have the flexibilities and power of groovy programming, many mapping in standard pre-packaged content iflow still is graphical mapping, no other choice but to maintain/enhance existing graphical mapping if not partial/total rewrite to groovy which took effort.

      From initially missing displayQueue feature, till recent latest enhancement, lot improvement to CPI message mapping including MM as artifact, referenced MM, Seem like graphical mappng still play a signifcant role and still will last and stay in CPI/CI.

      Here I won't hide my intention to promote a bit on my published SAP CPI course. :), because i believe my course will also bring values to CPI/CI community, including message mappng learning content. If anyone interested can check it out at this link.

      Author's profile photo Daniel Graversen
      Daniel Graversen
      Blog Post Author

      Hi Yee

      Yes a lot have changed with the mappings since 2019 and with migration going to be a major source of mappings. It is here to say.

      It is probably easy to create the first mappings but there will be times you will really need to understand mapping.

       

      Author's profile photo Yee Loon Khoo
      Yee Loon Khoo

      Hi Daniel,

      I had added Figaf SAP CPI course as one of SAP CPI learning resource in this LinkedIn article about SAP CPI concepts and SAP CPI learning steps. Hope this is ok for you 🙂