Node Red for ERP Integration

I have been doing a lot of integration at home with Node-Red some of them could be useful in my professional carrier. I work as a SAP consultant.
This is more of a thought process at the moment, but I was thinking about using Node-Red as a middleware between SAP and for example Telegram to provide chat integration for an SAP system.

Getting a new software environment in a corporate IT network is probably a challenge in itself, probably more than anything else, but I want to ask something similar.

SAP landscapes usually have a development, quality and production systems. If I would like to align Node Red with SAP, Ideally I would have 3 Node Red instances each connected to once of the layers in the landscape. This can be 3 separate Node Red instances, or could be just different tabs in the same Node Red. Can 3 separate Node Red instances run on the same server (e.g. on different ports?).
I am also thinking about what is a best way of moving flow changes in between different Node Red instances. Preferably without shutting down and restarting Node Red. Any solution other than manually copy and pasting flow via clipboard or file?

Let me know if you have any thoughs on these questions above.

This is very interesting. I too want to integrate node-red with SAP but I have no idea how to begin.

Partially because I don’t speak IT or SAP.

I’ve been shutdown before asking to pull data from SAP.

I don’t see why you would need three different instances of node-red running, unless you just want to for organization. Deploying changes to flows should not cause a restart unless an exception is thrown and not caught. The only other reason for restarting node-red is to add new nodes from the catalogue.

Even in "old" SAP systems you can expose RFC function modules as web services. With that it should be easy communicate using http requests, probably there are separate web service nodes as well, which I have not used before. I was thinking about integrate Telegram chat, but I would also like to use google actions at some point.

Morning Csongor,

I managed to survive the SAP hell for more than eight years, before I switched a few months ago to my current Java job. Don't ask me how I have survived it :rofl:

Not sure whether you are talking about a smaller SAP Business One solution or a large scale SAP setup (like in the company I'm working). Can only tell how an 'old' R3 landscape looked like (so no SAP Hanna unfortunately!):

  • You develop your code on a DEV system, and then it is transported (via transport routes) to TEST, ACCEPT and finally to the production system: see green 'trucks' in my drawing.
  • When you look at an environment (e.g. DEV) there are multiple SAP systems (ERP, CRM, ...) and other non-SAP systems. Normally these SAP sytems don't communicate directly to each other, but via a SAP PO system. SAP PO is an ESB (Enterprise Service Bus) system, that can handle all the major communication protocols, security, ... Remark: previously it was called the PI system, and in the very early days the XI system.
  • Between all these environments there are firewalls for security. You have to have a VERY good reason to allow traffic between two environments. This is the reason why all major (SAP and non-SAP) systems in our company had to have a DEV, TEST, ACCEPT and PRODUCTION server. Moreover the load in a production environment will be much higher (compared to the other environments), so there typicall will be more instances and load balancers and ...
  • All communication to external third-party systems also passed via the PO system, and the firewall needs to be opened for this traffic only. Of course not all third party suppliers have 4 environments. Most of the time it were smaller companies that e.g. didn't have a TEST system (i.e. only DEV,ACCEPT and PRODUCTION). In that case it had to be decided what to do: route our SAP PO TEST system to the third party DEV system (green dotted line in my diagram) or something else (e.g. create a dummy mock system).

Summarized: if you would advise in our company to put all your environments into a single Node-RED system (in separate tabsheets), then your head would be blown off most probably :joy:

I would expect a Node-RED system in every environment, to which you communicate via SAP PO...

Good luck!
Bart

2 Likes

Thanks Bart,

Old I mean ECC 6, CRM 7 not HANA. I was thinking about the same lines. I think in our setup there is no XI, but I may be wrong. And of course I don't know about the security landscape, but I was thinking if Node Red is running on the corporate network it should have less problem connection the SAP servers, whether it is XI or one of the system directly.
I find creating FM and exposing them as web services (via SOAMANAGER) is usually easy, our developer guys are quite familiar with them. And you can even use standard SAP calls for that.

And of course the issue around roles and authorisation. How do you link the Telegram accounts to SAP users. And the best would be to consume SAP services with the SAP credentials of the Telegram user.

If I were you, first thing I would do is talk with SAP Basis team about the setup of the environments and firewall rules. Just to make sure you know what is allowed in your company...
Because I my company all servers are also on the corporate network, but that doesn't mean they can all access each other. That would be a dream for both hackers and the developers :wink:

If that is the way you approach it, then yes indeed most probably you only use the PO system only for the minimal setup. Indeed it is possible to create direct communications between the systems …

And since you are not talking about Abap Proxy's (which are generated from PO in the backend SAP system via the SLD), that is another indication you don't use PO extensively …

If I'm not mistaken (but I may be wrong!!), some years ago SAP obligated their customers to install a PO system (since all SAP systems need to be upgraded via the PO system). But then of course it is your own decision whether you use the other functionality of the PO system or not …

But talk first to some people to see what is possible in your context and what not ...

2 Likes

I suppose the biggest question is, how do you ask an IT/SAP professional to setup a line of communication so that data can be retrieved from a SAP Production?

You start, as with any other business request, with an outline of a business need. In other words, what will get enhanced into a set of formal requirements if your proposal goes ahead.

You should honestly identify costs, timescales and risks along with the business benefits so that your business, risk, governance and security staff can make sensible decisions based on facts.

Business proposals don't need to be long, in fact just a few pages identifying the benefits, risks, codes and timescales will go a long way generally to you getting your way.

You should also pitch this proposal at the business leadership not any SAP experts because they may have (or at least feel) vested interests in locking you out and protecting their territory.

2 Likes

Well, in theory you could develop a Node-RED node that uses SAP RFC to communicate to SAP directly. See: https://help.sap.com/doc/PRODUCTION/saphelp_nwpi711/7.1.1/en-US/48/aa34478571356be10000000a421937/frameset.htm
for more information on SAP RFC

Alternatively you could publish SOAP/XML webservices on SAP WEBAS and consume them using Node-RED.

there is also this already - https://flows.nodered.org/node/node-red-contrib-saprfc

Thanks @TotallyInformation,

What would be considered a “cost”?
What do you mean by timescale? How long it should be supported?

How do I identify risks that they should already be aware of?

We are straying into professional IT here but ...

Cost of purchasing both hardware and software, cost of procuring people to do specialist work, cost of backfilling someone from the business to do requirements, testing, etc. Even if not getting anyone in, there is an equivalent cost for someone (you?) being taken out of their normal work to implement something.

There are very likely to be additional costs for SAP specialists who will need to be involved in the design, implementation and testing as well.

Then there are the support costs - who will support it? Do people need to be trained?

Though there may be no license costs for work like this, it most certainly is not without significant cost.

That, and how long will it take to design, implement and test? Will there be any impacts to the business during any of that time? Service downtime for example.

You don't, you get them to tell you those risks. You can identify the business risks of not doing the work. But you may also have some insight into the risks of connecting an open-source prototyping framework to an industrial scale ERP framework. After all, you most likely know more about Node-RED than they do.

1 Like

Forgive me, and I apologize for hijacking this thread. It’s just not everyday I can speak to someone with as much knowledge of IT/SAP. I capitalize on those opportunities.

2 Likes

No problem, I don't know SAP really but I do know IT. Actually, I always find it beneficial to me to explain things to others as it sharpens both my knowledge and my ability to explain things. I just didn't want us straying too far from the original question. Certainly I could bore you to tears with best practices for creating and selling IT proposals :slight_smile:

5 Likes

I have forgotten more SAP basis than most people will ever know. The best way to move the data is RFC and write (or find an existing) function module to use. ABAP is gravy, and you can use the ECC system's normal security stuff. Just ask for SAP_ALL and see what they say :wink: Really though, I don't know what you're trying to accomplish, but I suggest staying away from XI/PI and portal stuff if possible, it's a giant java hellhole. I am jaded, yes.

If you want to be really fancy about it you could move flow files between dev/test/prod systems using the TMS system exit program to kick off some kind of file transfers to keep everything in sync. Many ways to skin this cat, but it's possible.

1 Like

Won't deny that... But you forgot to mention the other side: the ABAP hell :rofl:
But don't understand me wrong: My advise was absolutely NOT to introduce PI/PO!!!!!!!!!!!!!! I just mean IF you are in a large company (with lots of consultants) that ALREADY has PI/PO, then it is not advised to start using RFC connections between individual Abap stack systems. Otherwise you disrupt the entire company architecture.
Bart

2 Likes

If I make any progress, I will let you know. I made a few inquiries and will see where it goes. I think somebody approving to use a new environment / software product will be equally challenging. But let's see.

3 Likes

Hey Guys, it is happening. I am getting a Debian 10 server installed at my client for Node-Red. Stay tuned.
Debian 10 should be fine, right?