Khi người dùng sử dụng DTW để thực hiện import dữ liệu vào hệ thống SAP B1, nhận được thông báo lỗi (error) sau: “Cannot access table. Please check it is listed in the allowed list. For more information, see SAP Note 3399053″.
Symptom
When accessing a database table via Data Interface (DI) API, you receive the following error message:
Cannot access table. Please check it is listed in the allowed list. For more information, see SAP Note 3399053.
Reproducing the issue
Prerequisites:
Enable Query Validation is enabled under Administration → System Initialization → General Settings → Services tab → DI API Configuration group.
Scenario:
For example, you use the following DI API script to access the database table OCRD:
var RecSet = (Recordset)oCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
string query = “select * from OCRD”;
RecSet.DoQuery(query);
However, the database table OCRD is not in the database table allowlist.
Expected behavior:
DoQuery is called successfully without any error.
Actual behavior:
The following error message is displayed:
Cannot access table. Please check it is listed in the allowed list. For more information, see SAP Note 3399053.
Solution
As of SAP Business One 10.0 FP 2405, you have the option to validate database tables. Go to Administration → System Initialization → General Settings → Services tab → DI API Configuration group, click the ‘…’ button next to Enable Query Validation, and append the database table to the allowlist.
For issues related to the Data Transfer Workbench, refer to KBA 3506941 – Data Transfer Workbench is not working with Enable Query Validation setting enabled