{panel:title=On This Page}
{toc:type=list|style=none|indent=2em|separator=pipe}
{panel}
h1. Overview
The [sap2java open source project|http://sourceforge.net/projects/eclipsesap2java] provides a developer-friendly API for working with the Open Enterprise Foundation's [SAP Java Connector|http://www.huihoo.org/openweb/jco_api]. The project also includes a useful tool for the automatic generation of Java data object classes from an SAP remote-enabled function (RFC) interface. The iJAG group has modified the sap2java source code to expand its functionality to include handling of more complex RFC interfaces than the original project allowed. The source code requires occasional enhancement as additional SAP data types not currently accommodated are used by SAP RFC developers.
h1. Generate Java Data Object Classes from an SAP Remote-enabled Function Interface
# Check out or update the sap2java Eclipse project. If needed, refer to the [iJAG FAQ|Frequently Asked Questions] for instructions on checking out an Eclipse project.
# In the sap2java project, open package src/com/sap/bapi/mapper. Right-click on class, testSAP2Java, and select "Run As..." from the context menu.
# Create a new Java Application run profile for testSAP2Java or open its previously created profile, then select the "Arguments" tab.
# In the "Program arguments" text area, add the following lines:
{code}
"${workspace_loc}/<myProject>/src"
edu.mit.<myProject>.proxy
<rfcName>workspace_location package_name rfc_name
{code}
where <myProject>
#* workspace_location is the name of the target Eclipse project's andsource <rfcName>code is the name of the RFC for which you are generating Java data object classes.
\\
# Add 3 params in the box:
* The directory in your project where proxies need to godirectory (wrapped in double-quotes), e.g.
, "${workspace-dir_loc}
/vpismyproject/src"
#* The package_name is the package nameinto ofwhich the generated proxies classes will be written, e.g., edu.mit.vpismyproject.proxy
#* The rfc_name is the name of the rfc
RFC for which Java data object classes will be generated, e.g., Z_UT_MY_RFC
# Click run
This will generate proxies in your actual app directory, which you the "Run" button. The requested Java data object classes are generated. You may need to refresh your project (to see the them)change.
h1. Revision History
(latest on top)
|| Date || Documentation Updated By \\ || Description of Change \\ ||
| 16-Aug-2007 | Amy King \\ | Original Version | |