Quantcast
Channel: SCN : Unanswered Discussions - SAP for Mobile
Viewing all articles
Browse latest Browse all 5512

Error in extending PhysicalInventoryFetchBAPI in SAP IM 3.2

$
0
0

Hi All,

 

I am extending PhysicalInventoryFetchBAPI.java but I am getting an error in getItems() method as shown in the below screenshot.

 

In below screenshot, for ArrayList<Material> here Material is the custom class which extends the super class.

 

 

PIFetchBAPI.PNG

 

Below is my getItems() method:

 

protected ArrayList<Material> getItems(String docID, Logger log) throws AgentryException

  {

  int cnt = 1;

  int numItems = 0;

  Material mat = null;

  try

  {

 

  JCO.Table items = _tables.getTable("ET_ITEMS");

  log.info("rows returned:" + items.getNumRows());    

  numItems = items.getNumRows();

  ArrayList<Material> materials = new ArrayList<Material>(numItems);

  for (int i = 0; i < items.getNumRows(); i++)

  {

  items.setRow(i);

  String thisDocID = items.getString("IBLNR");

  if (docID.equalsIgnoreCase(thisDocID))

  {

  log.trace(cnt + " MATERIAL=" + items.getString("MATNR"));

  cnt++;

  mat = (Material) SAPObjectFactory.create("Material");

  mat.init(_mmUser, items, returnUpdateDT);

  mat.setProperties(items, this);

  String deleteInd = items.getString("XLOEK");

  if (deleteInd.equals("X"))

  {

  //do not bring down if flag set to deleted

  } else

  {

  //item is not deleted, add to collection

  materials.remove(mat);

  materials.add(mat);

  }

 

  }

  }

  return materials;

  } catch (Exception e)

  {

  _mmUser.rethrowException(e, true);

  }

  return null;

  }

 

 

Please help me in resolving this issue.

 

--Shyam


Viewing all articles
Browse latest Browse all 5512

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>