尝试使用RFCDestination.Repository.GetTableMetadata(string tablename)时出现2个错误 [英] 2 errors when trying to use RFCDestination.Repository.GetTableMetadata(string tablename)

查看:483
本文介绍了尝试使用RFCDestination.Repository.GetTableMetadata(string tablename)时出现2个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以使用函数 RFCDestination.Repository.GetTableMetadata(string tablename)获取SAP Server中表的数据。不幸的是,当我尝试执行命令时出现错误。奇怪的是,当我给出一个现有表时,当我尝试将某些随机值作为表名时会出现另一个错误。

I know that you can get the data of a table in a SAP Server with the function RFCDestination.Repository.GetTableMetadata(string tablename). Unfortunately I get an error when I try to execute the command. The weird thing is when I give a exisiting table I get a different error when I try something random as a tablename.

现有表:

var x = dest.Repository.GetTableMetadata("TFTIT");

错误:


SAP.Middleware.Connector.RfcInvalidStateException:找不到TFTIT指定的表

SAP.Middleware.Connector.RfcInvalidStateException: "cannot find TABLE specified by TFTIT"

随机表名:

var x = dest.Repository.GetTableMetadata("Test123");

错误:


SAP.Middleware.Connector.RfcInvalidStateException: TableOnly TEST123的元数据不可用:NOT_FOUND:TEST123的活动名称标签不存在

SAP.Middleware.Connector.RfcInvalidStateException: "metadata for TableOnly TEST123 not available: NOT_FOUND: No active nametab exists for TEST123"

我知道有一种方法可以借助功能模块来获取表的数据,但是我需要使用GetTableMetadata函数。

I know there is a way to get the data of a table with the help of a function module but I need to use the GetTableMetadata function.

推荐答案

调用 RfcRepository.GetTableMetadata(string)时不会犯太多错误。如SAP note 460089 <中所述,您使用的用户ID是否具有存储库查询所需的RFC授权。 / a>(方案3)?如果是,这可能是NCo3库甚至ABAP后端中的错误。您是否使用NCo的最新补丁程序级别?当前是NCo 3.0.20。
如果不是,请尝试首先更新库。
否则,我建议为第一个错误消息创建一个SAP支持票证。当指定的表名不存在时,第二个错误是正常的。

One cannot do so much wrong when calling RfcRepository.GetTableMetadata(string). Does your used user ID has the required RFC authorizations for repository queries as listed in SAP note 460089 (scenario 3)? If yes, this is maybe a bug in the NCo3 library or even in the ABAP backend. Do you use NCo's latest patch level? This is currently NCo 3.0.20. If not, try updating the library first. Otherwise I recommend to create an SAP support ticket for the first error message. The second error is normal when the specified table name does not exist.

或者,您也可以尝试调用 RfcRepository.GetStructureMetadata(string)会发生什么情况。 代替此表。表和结构的元数据非常相似,并且相同的远程功能模块用于DDIC查询。也许这可行。但是,我认为首先应该在这里起作用。

Alternatively you may also try what happens if calling RfcRepository.GetStructureMetadata(string) for this table instead. The meta data for tables and structures is quite similar and the same remote function modules are used for the DDIC queries. Maybe this works. However, I think in the first place RfcRepository.GetTableMetadata(string) should work here.

我希望这会有所帮助

这篇关于尝试使用RFCDestination.Repository.GetTableMetadata(string tablename)时出现2个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆