cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos
118

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

com.syclo.sap.mm.steplet.POGetSteplet::throwExceptionToClient::506::POGetSteplet - Two internal tables are neither compatible nor convertible. |

2014 06 25 19:31:44#+0700#ERROR#com.sap.mobile.platform.server.agentry.console##anonymous#Agentry 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?

T

he following is my code in processResult()


@Override

  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++){

  _POTab.setRow(i);

  PurchaseOrder POrow = new PurchaseOrder(_POTab);

  String poNum=POrow.getID();

  if (poNum.equals("")) {

  continue;

  }

   ArrayList<PurchaseItem> poItems = getItems(poNum);

 

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

  POTab.add(POrow);

  }

  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++) {

  _purchaseItems.setRow(i);

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

  if (itemPONum.equalsIgnoreCase(poNum)) {

  PurchaseItem item=new PurchaseItem(_purchaseItems);

  poItems.add(item);

  }

  }

  return poItems;

  }

  catch (Exception e) {

  user.rethrowException(e, true);

  }

  return null;

  }

Please help me. Thank you very much.

Accepted Solutions (1)

Accepted Solutions (1)

i834235
Product and Topic Expert
Product and Topic Expert
0 Kudos

Looking at the error messageit looks like exception is thrown on the SAP side.  One of the posssible reason is that in the BAPI Output table reference for PO header or PO items  and internal table referenced within the class handler for PO object are not the same.  One could be structure and another could be an internal table.

Options to troubleshoot further.

1) By  putting break in your class handler on SAP side.

2) Turn on detailed logging on SMP Server.

3) Check for short dumps on SAP side

Thanks

Manju  - SAP CEG

Former Member
0 Kudos


Hi Manju,

Thank you very much for your quick reply.

The abap code runs well and results in two tables with data of POs and Items on SAP. Is there any posibility that the bapi runs correctly but still throws exception to Agentry clients?

notes: i didnt write the abap code and dont know anything about how to write ít. However, i saw my mate excute the bapi successfully and generate data.

by the way, please let me know how to turn on the detail log in smp3.0. Thank you very much.

Answers (0)