Skip to Content
Jun 25, 2014 at 12:42 PM

Two internal tables are neither compatible nor convertible Agentry connect to SAP


Hello Gurus,

I try to create two Objects, PurchaseOrder and PurchaseItem. Each PurchaseOrder has a collection of PurchaseItems. I create a Items array in PurchaseOrder object and fetch the PurchaseOrders and PurchaseItems in fetchPurchaseOrder Bapi.

Then I face issue - Two internal tables are neither compatible nor convertible. |

2014 06 25 Runtime Worker Thread###Exception: 19:31:44 06/25/2014 : 20 (Agentry3), Java Business Logic Error (com.syclo.agentry.BusinessLogicException: POGetSteplet - Two internal tables are neither compatible nor convertible.),

I dont know the root cause of the error. Is it an error from ABAP code? Or from Agentry Java code?


he following is my code in processResult()


public ArrayList<SAPObject> processResults() throws Exception {

ArrayList<SAPObject> POTab = new ArrayList<SAPObject>();

JCO.Table _POTab = _tables.getTable("ET_PO_HEADER");

int rows = _POTab.getNumRows();

for(int i = 0; i<rows; i++){


PurchaseOrder POrow = new PurchaseOrder(_POTab);

String poNum=POrow.getID();

if (poNum.equals("")) {



ArrayList<PurchaseItem> poItems = getItems(poNum);

POrow.Items = poItems.toArray(POrow.Items);



return POTab;


public ArrayList<PurchaseItem> getItems(String poNum) throws AgentryException {

try {

JCO.Table _purchaseItems = _tables.getTable("ET_PO_ITEMS");

int numItems = _purchaseItems.getNumRows();

ArrayList<PurchaseItem> poItems = new ArrayList<PurchaseItem>(numItems);

for (int i = 0; i < numItems; i++) {


String itemPONum = _purchaseItems.getString("PONUMBER");

if (itemPONum.equalsIgnoreCase(poNum)) {

PurchaseItem item=new PurchaseItem(_purchaseItems);




return poItems;


catch (Exception e) {

user.rethrowException(e, true);


return null;


Please help me. Thank you very much.