简体   繁体   English

通过 c# 填充 SAP 表的最佳方法

[英]Best way to populate a SAP table via c#

I'm trying to create ac# that application does a simple insert into a newly created sap table.我正在尝试创建 ac#,该应用程序对新创建的 sap 表进行了简单的插入。

After a little bit of research I found out that I have two options:经过一番研究,我发现我有两个选择:

  • Using a CDS-View with @OData.publish: true and CRUD operations使用带有@OData.publish: true和 CRUD 操作的 CDS-View
  • or using a bapi with the SAP .NET Connector 3.0 .或使用带有SAP .NET Connector 3.0的 bapi。

Personally I think that the CDS view is much cleaner but I'm not getting the "create" operation to work.我个人认为 CDS 视图更清晰,但我没有让“创建”操作起作用。 I found out that the cud operations are disabled on ABAP 7.50.我发现 ABAP 7.50 上禁用了反刍操作。

What do you think?你怎么认为?

Thanks, Thomas谢谢,托马斯

There are more options.还有更多选择。 Use transaction SICF to create a REST endpoint.使用事务SICF创建 REST 端点。 POST it data in JSON format.以 JSON 格式发布它的数据。 Use the ID XML transformation to map the data to an internal table with the same format as the database table in question.使用ID XML 转换将数据映射到与所讨论的数据库表具有相同格式的内部表。 Use MODIFY or INSERT followed by COMMIT WORK to save the data.使用MODIFYINSERT后跟COMMIT WORK来保存数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM