Java IDoc API
Software AG suggests that you replace any usage of the classes from com.wm.pkg.sap.idoc Java package in your custom application code with the corresponding classes from com.wm.adapter.sap.idoc package. For more information about these classes, see webMethods Adapter for SAP IDoc Java API which is available on Adapter for SAP 10.1 home page.
As described in the previous section, the com.wm.adapter.sap.idoc package is changed from Adapter for SAP 6.5 to Adapter for SAP 10.1 as a result of changes in the SAP IDoc Library 3. Therefore, you must modify all Java application code based on the com.wm.adapter.sap.idoc package of Adapter for SAP 6.5 to compile and run properly with Adapter for SAP 10.1. Do the following:
![*](chapterTOC_bullet.png)
Replace any references to
com.sap.mw.idoc with
com.sap.conn.idoc.
![*](chapterTOC_bullet.png)
Replace old SAP IDoc Class Library 2 classes with their IDoc Class Library 3 equivalents described in the table above.
![*](chapterTOC_bullet.png)
Rename all
IDataRecord.setField(..) calls to
IDataRecord.setValue(..).
![*](chapterTOC_bullet.png)
Place calls to the
IDataDocumentList.addDocument(..) methods in a try/catch-block to avoid
IDocExceptions when the IDoc type of the new IDoc document is different from the IDoc type of the other IDocs in the list.
![*](chapterTOC_bullet.png)
Substitute
addDocument(..) methods with calls to the
add(..) or
addNew(..) methods because the
addDocument(..) methods have been removed from the
IDocDocumentList class.