.net/sap 混合系统有意义吗?
这可能是一个有点模糊的问题,但现实生活就是这样。
我们公司正在推出SAP系统。我知道他们现在做 Web 服务,这样我们就可以同时推出 .NET 来完成我们知道可以用 C# 做的任何事情。
SAP - .NET 集成过程中存在哪些陷阱?我知道SAP的逻辑与“标准”编程有很大不同,但我希望将“业务”部分与“演示”部分分开,用ASP.NET编写。
This might be a bit vague question, but real life is like this.
Our company is rolling out SAP system. I know they now do Web Services so we could simultaneously roll out the .NET thing for anything we know we can do in C#.
What are the pitfalls along the way of SAP - .NET integration? I understand that SAP's logic is quite different from "standard" programming, but I hope to separate "business" part from "presentation" part, to be written in ASP.NET.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我是 SAP ABAP 和 Microsoft.NET 开发人员。我在一家使用 SAP 和其他平台(例如 Microsoft.NET、Java 和 RoR)创建软件的公司工作。
由于您的公司正在部署 SAP,因此您应该获得 ECC 6.0 后端,它可以使用 RFC 或 Web 服务。
SAP 有一个标准 API,称为业务 API(又名 BAPI)。您可以在 BAPI 交易中尝试一下。
一个很好的例子是:
BAPI_USER_GET_DETAIL
。此 BAPI 负责返回有关任何 SAP 用户的信息。 BAPI 仅需要一个名为 USERNAME 的输入参数,并返回不同的数据结构以及有关用户的信息,例如电子邮件、名字和姓氏、用户配置文件等。
在 ABAP 内部,调用此 BAPI 的模板应该是像这样:
现在,每个 BAPI 也都启用了 RFC(远程函数调用)。这意味着,如果您在应用程序内实现 SAP RFC API,则可以调用 SAP 内设置为启用 RFC 的任何 BAPI 或其他函数。
在旧版本中,您可以使用标准 SAP RFC API,或使用 SAP 向导连接器,例如 SAP .NET Connector 或 SAP Java Connector。
在较新的版本中,SAP 已将 Web 服务器附加到其 ABAP 应用程序服务器,以便运行 ITS、BSP 和 WebDynpro for ABAP 等服务。通过使用此 Web 服务器,您可以将任何 RFC 发布为 Web 服务。
但是,从我的日常经验来看,SAP R/3 的性能并不是那么好。对将两个数字相加并返回结果的函数进行简单的 RFC 调用可能需要 1 到 5 秒的时间,具体取决于服务器的可用性。
发生这种情况的主要原因是,当您使用 SAP .NET Connector 或 WebServices 时,会出现许多抽象级别。
因此,如果您希望您的系统可用于日常交易(例如每天通过电子商务应用程序创建 5,000 个客户,或进行约 40,000 笔在线销售),我强烈建议您使用 Java Connector,或通过以下方式实现 RFC API:你自己的。
否则,如果您的应用程序将由较少的人在内部使用,我建议您使用 SAP .NET Connector 或 WebServices,因为它们完全面向 GTD。
希望这有帮助!
(请在下面的链接中添加 http:// 前缀,因为我没有足够的声誉来发布链接:( )
RFC API:help.sap.com/printdocu/core/Print46c/EN/data/pdf /BCFESDE4/BCFESDE4.pdf
SAP .NET 连接器:help.sap.com/saphelp_nw04/Helpdata/EN/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm
SAP Java 连接器:help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b2 8500508b5d5211/ content.htm
使用 ABAP 创建 Web 服务:wiki.sdn.sap.com/wiki/display/stage/Service+Enabling+in+ABAP
I'm a SAP ABAP and Microsoft.NET developer. I work for a company that creates software using SAP and other platforms, such as Microsoft.NET, Java and RoR.
Since your company is rolling out SAP, you should get the ECC 6.0 backend, which can use RFC or Webservices.
SAP has a standard API known as Business API's (aka BAPI's). You can try them out at BAPI transaction.
One good example is this:
BAPI_USER_GET_DETAIL
.This BAPI is responsible for returning information about any SAP user. The BAPI requires only a single input parameter, called USERNAME, and returns different data structures with information about the user, such as e-mail, First and Last name, user profiles, etc.
Inside ABAP, a template for calling this BAPI should be something like this:
Now, every BAPI is also RFC (Remote Function Call) enabled. This means that, if you implement the SAP RFC API inside your application, you can call any BAPI or other function inside SAP that is setup as RFC enabled.
In older versions, you could use the standard SAP RFC API, or use SAP Wizard Connectors, like SAP .NET Connector or SAP Java Connector.
On the newer versions, SAP has attached a webserver to it's ABAP Application Server, in order to run services such ITS, BSP and WebDynpro for ABAP. By using this webserver, you can publish any RFC as a WebService.
But, taken from my daily experience, the SAP R/3 performance isn't that good. A simple RFC call to a function that sum two numbers and returns the result may take from 1 to 5 seconds, depending on the avaliability of the server.
This happens mostly because of the many levels of abstraction that happens to get on the way when you are using SAP .NET Connector or WebServices.
So, if you want your system to be avaliable for daily transactions (such as creating 5.000 customers daily from your e-commerce application, or making about 40.000 sells online) I deeply recommend you to use Java Connector, or to implement the RFC API by your own.
Otherwise, if your app will be used internally by fewer people, I recommend you to use SAP .NET Connector or WebServices, just because they are completelly GTD oriented.
Hope this helps!
(please, add the http:// prefix to the links bellow, cause I don't have enough reputation to post links :( )
The RFC API: help.sap.com/printdocu/core/Print46c/EN/data/pdf/BCFESDE4/BCFESDE4.pdf
SAP .NET Connector: help.sap.com/saphelp_nw04/Helpdata/EN/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm
SAP Java Connector: help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm
Creating WebServices using ABAP: wiki.sdn.sap.com/wiki/display/stage/Service+Enabling+in+ABAP
如果您的应用程序不需要 SAP Portal 集成,并且您的客户不要求类似 SAP 的外观和感觉,那么您可以自由使用您喜欢的任何表示层。
我不同意当您选择进行 SAP 集成时必须使用 SAP 工具的立场。像 NWDI 或旧的 NWDS 这样的产品显然是一个令人头疼的问题(我不会在这里详细说明,这是一个很长的故事),在我看来,如果您不是 100% 专注的 SAP 集成商,那么培训人们学习 Webdynpro 是不值得花钱的。
If your apps dont require SAP Portal integration and your clients dont ask for SAP-like look and feel then you are free to use whatever presentation layer you like.
I disagree with the stance that you have to use sap tools when you choose to do a SAP integration. Products like NWDI or old NWDS are a clear headache (im not gonna elaborate on that here, its a long story), training people to learn Webdynpro is in my opinion not worth the money if you arent a 100% dedicated sap integrator.
很少有一般性建议。
对评论的回复:
首先我不认为报表不应该在sap中完成。报告本质上是丑陋的,并且在其中表现不佳。我正在考虑一些不是用户主要工作的小应用程序。诸如报告费用、管理层批准采购请求等。
关于在哪里可以找到有关上述障碍的材料。你不能。你必须首先用你的头脑找到它们。
Few general advices.
Response to comment:
First of all I don't think that reports shouldn't be done in sap. Reports are ugly by nature and sap excel in them. I was thinking of little applications that are not the main work of the users. Thing like reporting expenses, Management approving purchase request and so on.
About where can you find material on the said roadblocks. You can't. You have to find them with your head first.
不要对抗它。如果您正在实施 SAP,就实施 SAP 即可。几乎可以肯定,不值得费力去对抗它。
如果您不喜欢 GUI(BSP、WDJ、WDA),SAP 提供了处理演示的工具。我不会尝试实现第三方前端,除非你真的真的必须这样做。
Don't fight it. If you're implementing SAP, just implement SAP. It's almost guaranteed not to be worth the trouble to fight it.
SAP has tools to handle the presentation if you don't like the GUI (BSPs, WDJ, WDA). I wouldn't try to implement a 3rd party front end unless you REALLY REALLY have to.
仔细考虑使用 .NET 背后的原因:
Think well of the reasons behind using .NET:
我参与了许多.NET / SAP 实施。一方面,我建议不要使用 .NET,而不是只在 ABAP 中编写您想要的内容,但另一方面,它可以很好地工作。正如上面提到的,对于小型事务,Web 服务的开销可能会很高,因此请尝试进行设置,以便一次传递相当数量的数据(即填满整个屏幕)。这样做还意味着 SAP 可以在内部处理整个事务或更多事务,而不是一次传递少量内容并必须处理状态。业务逻辑应在 SAP 内部实现,.NET 部分仅处理数据的表示/交换。
我会附议有关费用界面的内容。大多数人都使用其他供应商的软件在外部执行此操作,但您不必使用花哨的实时 .NET 内容来导入费用数据,只需使用一个每天导入一次的简单批处理作业即可。有时最简单的方法就是最好的。
I have been involved in a number of .NET / SAP implementations. On the one hand, I recommend against using .NET instead of just writing what you want in ABAP, but on the other hand, it can be made to work reasonably well. As someone mentioned above, the overhead for web services can be high for small transactions, so try to set things up so that a fair amount of data is passed at once (i.e. a whole screen full). Doing that also means that SAP can process an entire transaction or more internally, instead of passing small amounts of stuff at a time and having to handle the state. The business logic should be implemented inside SAP, with the .NET part only handling presentation/exchange of data.
I'll second what was said about the Expenses interface. Most everyone does that externally with another vendor's software, but you don't have to use fancy real-time .NET stuff to import expense data, just have a simple batch job that imports it once a day. Sometimes the simplest way is the best.
在我的公司,我们也面临着同样的情况。我们正在使用 .NET 与 SAP 进行集成项目。
您可以通过直接从 .NET 执行 BAPI 函数来避免使用 Web 服务。今天我了解到标准 RFC 函数也可以公开为 BAPI 函数。
我们正在使用 theobald 软件中的 ERP Connect 来直接执行 bapi/RFC 函数,由于本次讨论中没有提及,我认为您可能会受益于了解。
它不是免费的,但我认为它会让开发人员的生活变得更加轻松。
请注意,我与 theobald 软件没有任何关系。
At my company we are in the same situation. We are carrying out integration projects with SAP using .NET
You can avoid avoid webservices by executing BAPI functions directly from .NET. Today I learned that standard RFC functions can be exposed as BAPI functions as well.
we are using ERP Connect from theobald software to execute bapi/RFC functions directly and since it not mentioned in this discussion, I thought you might benefit in knowing.
It is not free, but I think it will make a developers's life much easier.
Please note i am not affiliated in any way with theobald software.