Code Generation for Business Objects and RFC Functions 

Use

To make it easier for you to program external applications that use R/3 business objects and remote function calls, the SAP Assistant can generate code for:

The code generated for business objects comprises proxy classes for individual business objects along with their methods. The code generator allows you to choose which R/3 business objects and which of their methods to generate code for. It even allows you to specify which of the parameters of each of the methods to include in the generated code.

The code generated for RFC functions comprises RFC proxy classes for individual RFC functions. The code generator allows you to choose the functions to generate code for. It then generates code for the selected function(s) with all of their parameters.

The SAP Assistant can generate code for object-oriented languages such as C++ and Java. You can also create templates and macros to enable code generation for another programming language.

After generating the code with the Sap Assistant, you can use the generated code to create your application, creating instances of the objects defined in the generated code's classes.

For example, for the business object SaleOrder, the code generated for Java is the Java class jboSalesOrder and for C++ the class CBoSalesOrder. These proxy classes, in turn, can be instantiated to represent a SalesOrder instance that exists in R/3.

In addition, these classes have member function that you can implement to make remote calls to the BAPI methods of the business object. For example, from the business object SalesOrder, you can make remote calls to such BAPI methods as SalesOrder.Createfromdata, SalesOrder.Getlist, and SalesOrder.Getdetail.

See Also

See the topic Generating Code for the detailed steps of generating code. Also see The C++ BAPI Proxy Classes and The Java BAPI Proxy Classes topics for the details of the generated proxy classes.