You can use custom business object handlers with the BAPI module. Reasons for choosing to write custom business object handlers include the following:
There are two ways to create custom business object handlers: modifying a generated business object handler or writing a business object handler from scratch.
SAP ODA by default generates business object handlers when you generate business objects. In addition to compiled class files, the ODA generates Java source files for the business object handlers. You can customize the generated Java source and create with your own business object handler.
We do not recommend you to take this approach. If you still need to take this path please use the generated business object handler as a template because it provides calls to utility methods.
You can also use the following template to create a batch file for Windows platform to compile the custom business object handler:
REM @echo off
REM call "%CROSSWORLDS%"\bin\CWODAEnv.bat
setlocal
set WBIA="%CROSSWORLDS%"\lib\WBIA\4.2.0\WBIA.jar
set CWLIB="%CROSSWORLDS%"\lib\CrossWorlds.jar
set AGENT="%CROSSWORLDS%"\ODA\SAP\SAPODA.jar
set
JCO_JAR="%CROSSWORLDS%"\ODA\SAP\jCO.jar;"%CROSSWORLDS%"\ODA\SAP\sapjco.jar
set JCLASSES=%AGENT%;%JCO_JAR%;%CWLIB%;%WBIA%
echo classpath = %JCLASSES%
javac -classpath %JCLASSES% %1
endlocal
pause