cancel
Showing results for 
Search instead for 
Did you mean: 

Call BAPI from EJB Stateless Session Bean using JCO Connections

Former Member
0 Kudos

Hi,

I am developing a EJB Module project. I have created a session bean. I want to make a call to SAP R/3 ( BAPI - 'BAPI_USER_GETDETAIL' from one of the methods of EJB . For this purpose I have created JCO Connections (One of type application data and other meta data). I do not know how to use JCO connections in this EJB method and make the call. can some one provide me the code needed for this. Or any tutorial or reference document which says how it is done will be of great help.

Thanks,

Rashmi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rashmi,

You can call SAP FM from EJB (java) using the following sample code

<a href="http://www.sapdevelopment.co.uk/java/jco/jco_callfunc.htm">Sample code for JCo</a>

Regards

Smruti

Former Member
0 Kudos

Hi Smruti,

I went through the code but i dont think this is what i wanted. I have created 2 JCO destinations and i want to use those JCO connections in my EJB application to make a call to R/3. Is this possible?

Thanks,

Rashmi

Former Member
0 Kudos

Hi Rashmi,

You can go through the below presentation which gives you a clear picture of how to use Adaptive RFC Model.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202f1dfb-74db-2910-e48e-a7430c31...

Thanks & Regards,

Suvarna.

Message was edited by:

Armin Reichert

Former Member
0 Kudos

Hi Suvarna,

I went throught the presentation , but it talks about using Adaptive RFc model from Web Dynpro Application. I want to call JCO Connections from a EJB Module Project and not getting Web Dynpro applications in between. Anyaways, thanks a lot for your help.

Regards,

Rashmi