简体   繁体   English

直接从VB.NET访问SAP R / 3数据

[英]Access SAP R/3 data directly from VB.NET

We have an assignment to create some XML outputs from data in SAP R/3. 我们的任务是从SAP R / 3中的数据创建一些XML输出。 We are using SAP .NET Connector, for doing this. 我们正在使用SAP .NET Connector。 The problem we are facing is that there are some fields which are not exposed by any standard BAPI. 我们面临的问题是,某些标准BAPI没有公开某些字段。 Unfortunately we cannot create customized BAPI on this particular system. 不幸的是,我们无法在此特定系统上创建自定义的BAPI。

We are therefore restricted to whatever standard BAPI are available. 因此,我们只能使用任何可用的标准BAPI。 I have seen on internet that tools like ERPConnect can provide access to tables directly using RFC. 我在互联网上看到,诸如ERPConnect之类的工具可以使用RFC直接提供对表的访问。 How can this be performed in VB, without purchasing any such tool, using or without using .NET Connector. 如何在VB中使用或不使用.NET Connector在不购买任何此类工具的情况下执行此操作。

Take a look at the function module RFC_READ_TABLE. 看一下功能模块RFC_READ_TABLE。 Be sure to read the entire documentation - it has some limitations depending on the SAP R/3 release. 确保阅读整个文档-根据SAP R / 3版本,它有一些限制。

您可以直接访问连接到SAP并存储其数据的数据库系统。

You should use BBP_RFC_READ_TABLE instead of RFC_READ_TABLE, if you cannot use other tools. 如果无法使用其他工具,则应使用BBP_RFC_READ_TABLE而不是RFC_READ_TABLE。

BBP_RFC_READ_TABLE resolves one field length issue for negative decimal values as seen in RFC_READ_TABLE. BBP_RFC_READ_TABLE为RFC_READ_TABLE中看到的负十进制值解决了一个字段长度问题。 Basically, RFC_READ_TABLE does not handle the requirement for minus sign space and had to use asterisk instead when the value occupies the full length. 基本上,RFC_READ_TABLE不会处理负号空间的要求,并且当值占据全长时,必须使用星号。 BBP_RFC_READ_TABLE detects decimals type and pad it by 1. BBP_RFC_READ_TABLE检测小数类型并将其填充1。

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

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