cancel
Showing results for 
Search instead for 
Did you mean: 

How to build an external Java Client for SAP?

Former Member
0 Kudos

Hi!

I need to realize the following Application as an external Java Client which have to be started out of SAP:

The application needs to have access to database tables of SAP. It has to read a lot of values out of the tables, combine them with values entered by a user, do some really freaky calculation with them and then create some files with the result. It also has to create some SAP objects like documents or MaterialMasters in between. The values entered by the user must be stored in the SAP DB as well to allow the user to reload his settings, change and recalculate them again. So, each run must be stored the reload it.

So the requirements are:

- Technology must be Java as an external client

- Start out of SAP

- Access to the SAP DB (read and write; great would be direct access with SQL)

- Create SAP Objects (I guess via BAPIs)

- Create files on the local harddrive

After all this, what technology can be used? Is JCo a way to implement this? I'm out of the ABAP world and do not have a lot of experience with JAVA and SAP. I know how to use JCo to run a BAPI and so on but I do not know if JCo is able to access DB tables directly. If not JCo, what else could I use?

Thanks for every hint,

Konrad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes, JCO could be the right choice is you are developing STANDALONE JAVA APPLICATION, without J2EE container.

You should write your application logic in ABAP RFC enabled function module, and call this RFC using JCO. Accessing SAP tables directly is not recommended and should not be practiced. The layer of ABAP is the best way to handle such applications.

If your external Java client is going to reside in J2EE container, then use connection pooling mechanism given in JCO.

If you can use WAS, then definitely you can go for adaptive RFC model in web dynpro application which is very efficient.

Hope it helps!

Abhijeet

Former Member
0 Kudos

Thanks for your answer!

This means that if I use JCo it is necessary to write some parts of the application in ABAP, right? Should not be a problem...

What exactly do you mean with "J2EE container"? I have read something about JRA and J2EE. Can you tell me something about this technology? Is it necessary to have SAP Netweaver for it? Is it only running in the WEB or as standalone application as well?

Sorry for the amount of questions but this is very important for me

Thanks again,

Konrad

Former Member
0 Kudos

Konrad,

A J2EE container is a Application server (SAP WebAS,WebSphere , Weblogic etc) which implements J2EE specifications.You can deploy your EJBs / Web applications etc inside it and make use of the security, transaction, application management features offered by the App server.

Read more about J2EE at

http://java.sun.com/javaee/index.jsp

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

Your J2EE applications can run inside any J2EE complaint application server.

Hope this helps.

~ amol

Former Member
0 Kudos

You do not need to use netweaver products compulsorily. They will support this JCO mechanism strongly and efficiently as compared to others.

In your case you can go ahead developing stand alone Java program to access business logic in R/3.

Regards!

Abhijeet

P.S.: Plz reward points for every useful answer!

Former Member
0 Kudos

Ok, so let's focus on these two possibilities:

1) JCo

I now how to implement and run at least a small application with JCo and how to work with ABAP. So I now what I can expect out of it.

Question:

Can I start this application out of SAP let's say by clicking on a special entry in a SAP menu?

2) J2EE...

So my application the runs on the J2EE server and the users can start it and gets the GUI from it, right. How is the handling with database tables then? Still necessary to use ABAP functionality or can I access the tables directly? Has this something to do with this JRA stuff? Is there a documentation about this available and what do I need to develop (IDE...) an application by using this technology?

Thanks a lot,

Konrad

Former Member
0 Kudos

Hi Konrad,

I can answer your 1st question..

You can start a java application by clicking on a special entry in a SAP menu..

This will require you to call remote java function via ABAP.

I have some documents on JCO which shall be beneficial to you.

Let me know your email id.

Regards,

Tanveer.

Please mark helpful answers.

Former Member
0 Kudos

Hi!

It would be great if could provide me this information!

Please send it to konrad.hammerer@tesis.de

Thanks,

Konrad

Former Member
0 Kudos

As far as Triggering a J2EE application from SAP is concerned,

There are various ways, one of them is setting the HTTP Destination.

i.e. Use transaction code SM59 to set the destination.

Set the path prefix and port information.

Test the connection, this would trigger the J2EE application.

For further information, please refer the below article.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4943f2b7-0a01-0010-37af-faf...

Answers (0)