如何在 Ruby on Rails 中连接到 SAP
I want to retrieve information from SAP to Ruby on Rails.
I found this one, but I'm confused how to install and use it, can someone explain about? It would be appreciated.
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我使用 Piers Harding 编写的库。您需要从 sap 下载 nwrfcsdk 库,然后按照 ruby-sapnwrfc 的 README 中所示的安装过程进行操作。
您可以调用远程启用的 sap 功能模块 - 例如 ENQUEUE_READ,如以下简单示例所示:
I use the library written by Piers Harding. You need to download the nwrfcsdk library from sap and then follow the installation process as shown in the README of ruby-sapnwrfc.
You can call remote enabled sap function modules - for example ENQUEUE_READ like in the following simple example:
您可以将肥皂与 sap 一起使用,尝试使用此库 Savon
You can use soap with sap, try using this library Savon
你正在运行 JRuby 吗?如果是这样,您可以轻松使用 SAP JCo (SAP Java Connector)< /a> 用于连接到支持 RFC 的功能模块(和 BAPI)。网络上有大量如何使用 SAP JCo 的示例,例如:http:// /www.vogella.de/articles/SAPJCo/article.html。
与使用 Savon 的 Web 服务调用相比,这应该简单得多
Are you running JRuby? If so, you can easily use SAP JCo (SAP Java Connector) for connecting to RFC-enabled function modules (and BAPIs). There are tons of examples on the web how to use SAP JCo, like this one: http://www.vogella.de/articles/SAPJCo/article.html.
Compared to a web service call using Savon, this should be much more simple
在我们的“Wer liefert was”公司,我们通过 AMQP 总线 使用 JSON REST API。
目标是,我们关闭夜间数据库导入并实现项目的即时更新。
SAP 没有向 AMQP 总线添加消息的本机方法,这一问题已通过 ruby 代理应用程序解决,该应用程序提供了 SAP 在保存项目后可以调用的 REST API。然后,代理应用程序将一条消息添加到 AMQP 总线,该消息由导入器脚本使用。
Rails 应用程序的连接也通过 SAP 系统提供的 REST API 解决。
At our company "Wer liefert was" we connected the SAP Plattform with our Ruby on Rails Stack through a AMQP Bus with JSON REST APIs.
The Goal was, that we switch off our nightly database import and make an instant update of the items possible.
The problem, that SAP has no native method for adding messages to the AMQP Bus, was solved by a ruby proxy app, which provided a REST API that could be called by SAP after a item was saved. The proxy app than added a message to the AMQP bus that was consumed by an importer script.
The connection from our Rails app was also solved with REST APIs that are provided by the SAP System.