!--a11y-->
Use
In connection with the
SAP J2EE Engine, which represents a Java server, from SAP Web AS 6.20 you can call Enterprise Java Beans (EJBs) from ABAP.
Integration
An SAP system uses HTTP to connect to the SAP J2EE engine and calls a servlet. The bean to be called is determined from the parameters specified with the call. Once it has been converted to type string, the return parameter is sent back to the SAP system via XML.
Prerequisites
Functions
You can display a list of all beans by executing program
BSPJAVABEAN.List of all Beans

|
Column |
Explanation |
|
1 |
Name of the bean on the server All beans that are available are listed together with their parameters. |
|
2 |
Type of bean A bean can be stateful, stateless or it can be an entity bean. |
|
3 |
Name of the generated class (if available) and parameter name. |
See also:
Function group
EJB_CATALOGActivities
To generate a corresponding class, proceed as follows:
This creates a corresponding proxy in the SAP system.
The class name consists of the prefix

Ensure that all classes that are generated in this context start with
CL_EJB.Furthermore, you should ensure that the return parameter of a bean in the ABAP proxies that are generated is mapped to exporting parameters, due to technical restrictions.
For more information, refer to:
The FLUSH Method Possible Return ValuesExample
This example of a call generated an object, and then calls and sets parameters for methods:
|
data: mystring type ref to cl_ejb_simplestringbean, call method mystring->returnstring call method myinteger->returninteger call method cl_ejb_queue=>flush( ). |
