Web 应用程序和 SAP 之间交互的最简单方法
我花了一些时间研究如何从 PHP Web 应用程序与 SAP 进行通信,但文档并不多。我发现的方法是:
- 创建 IDoc 文件,某种专有的纯文本格式。但是,当它们在 Web 服务器上创建时,如何将它们粘贴到 SAP 中?
- 使用 SAP BAPI 编码 Windows 应用程序。这样,您就可以完全控制和访问 - 但也会带来很多痛苦。
- 最好通过 SOAP 访问 RFC(远程函数调用)。这将是连接到网络应用程序的最佳方式。
我无法找到的是:最简单的连接方式是什么?哪些版本的 SAP 支持 SOAP?我错过了什么吗?
感谢您的帮助!
I've spent some time researching how to communicate with SAP from a PHP web application, but the documentation is more than spare. The ways I found are:
- Creating IDoc files, some sort of proprietary plain-text format. But how do I stick them in SAP when they are created on the webserver?
- Coding a Windows Application using the SAP BAPI. This way, you have full control and access - but also a lot of pain.
- Accessing the RFC (Remote Function Calls), preferrably via SOAP. This would be the best way to connect to a web app.
What I could not find out is: what is the easiest way to connect? Which versions of SAP support SOAP? Anything I've missed?
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
连接到 SAP 的方式取决于 SAP 的版本、您的 SAP 许可证以及您要连接的内容以及您尝试执行的操作。
如果您尝试访问 SAP 标准功能 - 即读取或更新 SAP 服务订单,标准 BAPI 应该允许您执行您需要的操作。 (请注意,BAPI 只是带有标准 API 的 RFC,由 SAP 发布供客户使用)。
SAP 有各种连接器,但对于较新版本的 SAP(2004 年及更高版本),许多 RFC 功能模块都作为 Web 服务公开,这应该非常适合您的目的。
您可能需要询问 ABAP 开发人员(甚至是具有 SAP 经验的非开发人员)来帮助您查找哪些 RFC 可用以及它们是否作为 Web 服务公开。 (如果不是,ABAP 开发人员应该能够将 BAPI 包装为具有简化界面的 Web 服务)。
如果您尝试执行 SAP 之前未提供的功能,或者可能访问自定义开发的对象,您肯定需要 ABAP 开发人员的帮助来向您公开 RFC。
根据您的系统设置,可能需要完成一些系统管理任务才能访问 SAP 系统。无论是通过 RFC 还是其他方式。 (可搜索的有用事务是 SICF 和 SOAMANAGER)。 SAP Basis 管理员可能还需要为您设置一些 RFC 连接。
如果您的公司使用 SAP PI/XI 或非 SAP 集成引擎,连接可能会更容易,但这种情况仅限于非常有限的情况。
我之前曾使用 IDOC 进行单消息传输,但我不确定它对于任何业务类型事务是否比 BAPI 或 Web 服务有任何优势。尽管 IDOC 已经存在了一段时间,并且如果存在标准的话,可能会相当稳定。
我必须承认我只触及了连接 SAP 的表面,但我希望这有用。
How you connect to SAP is dependent on what version of SAP, your SAP license and what you're connecting with and what you are trying to do.
If you are trying to access SAP standard functionality - i.e. Read or Update a SAP Service Order, the standard BAPI should allow you to do what you need. (Note that a BAPI is just an RFC with a standard API, which is released for customer use by SAP).
There are various connectors to SAP, but for newer releases of SAP (2004s and later) many RFC function modules are exposed as webservices, which should be ideal for your purposes.
You may have to ask an ABAP developer (or even a non-developer with SAP experience) to help you find which RFC's are available and whether they are exposed as webservices. (If not an ABAP developer should be able to wrap BAPI as a webservice with a simplified interface).
If you are trying to do something that SAP have not provided prior functionality for, or perhaps access custom developed objects you will definitely need the assistance of an ABAP developer to exposes an RFC to you.
Depending on your system setup there may be some system administration tasks to be done in order to allow you to access the SAP system. Whether by RFC or otherwise. (Useful transactions to search for are SICF and SOAMANAGER). The SAP Basis administrator may also need to set up some RFC connections for you.
If your company uses SAP PI/XI or a non-SAP integration engine, it may be easier to connect but that would be in very limited cases.
I've used IDOCs before for single message transfer, but I'm not sure that it would have any advantage over BAPI's or webservices for any Business Type transactions. Although IDOCs have been around for a while and may be quite stable if standard ones exist.
I have to admit that I've only scratched the surface around connecting to SAP, but I hope this is useful.
第三种选择是最简单的。
The third option is the easiest.