如何从SAP服务获取数据?

时间:2015-01-20 10:15:45

标签: c# asp.net web-services

SAP服务有一个名为GetDataFromTable的方法,它接受where子句和列的字符串数组的参数。我有一个SAP表的快照,它只显示表的名称和字段。从那个快照我必须得到数据。我的代码如下所示:

string[] colForTable = new string[13];

colForTable [0] = "ABCD";
colForTable [1] = "EFGH";
colForTable [2] = "IJKL";
colForTable [3] = "MNOP";
colForTable [4] = "QRST";
colForTable [5] = "UVWX";
colForTable [6] = "YZCF";
colForTable [7] = "IOPH";
colForTable [8] = "TRSG";
colForTable [9] = "BKRAKT";
colForTable [10] = "TYDG";
colForTable [11] = "UYTE";
colForTable [12] = "IOPL";

string[] whereForTable = new string[1];

whereForTable [0] = "ABCD NE '0'";

DataSet T093CDataset = myService.GetDataFromTable(token, ref errorFlag, ref errorMsg, "TableName", colForTable, whereForTable , 1);

此方法适用于少数几个表但不适用于此表。有没有其他方法可以编写WHERE子句来获取数据。大多数字段都是varchar类型或SAP中的任何字段。

0 个答案:

没有答案