Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Call a Java file from ABAP

Former Member
0 Likes
638

Hi,

I would like your help in identifying a mechanism in calling a Java Program from an ABAP program. The requirement is that I need to pass enough parameters(possibly in a single object like a <i>table</i>) and fetch that in a Java Program residing in a jar in the J2EE engine. The possibility of this java file interpreting this incoming object and also be able to return something to ABAP which can eventually be printed on the screen needs to be known.

I also would like to validate an assumption of mine which is that, the jar(the receipient java file) file needs to be put under the directory

"\usr\sap\<i>SystemID</i>\<i>instancenumber</i>j2ee\deploying\lib"

Appreciate your time and effort in helping me with this.

Regards,

Sam.

4 REPLIES 4
Read only

athavanraja
Active Contributor
0 Likes
574

i am not sure about

I also would like to validate an assumption of mine which is that, the jar(the receipient java file) file needs to be put under the directory

"\usr\sap\SystemID\instancenumberj2ee\deploying\lib"

but for your case what you could do is, on the java side get developed a jsp page which will receive data and use the jar to proces and return the results as xml. once thats done.

from abap you can use cl_http_client class to call this jsp page to pass parameters and get the processed results from jsp page.

Raja

Read only

0 Likes
574

Hi Raja,

Thank you for the help. Can you help me with some sample code as to how to call this jsp. And in case this is not a jsp and a normal java file, how does it work? I am asking you this question bcos, the java file is provided by the client and we have access to only add/edit methods and not change the behavior to a jsp.

Hope I am clear and thanks again for the help.

Regards,

Sam

Read only

Former Member
0 Likes
574

HI SAM,

check this link,it ma help u.

/people/puru.govind/blog/2006/12/20/let-abap-speak

Regards

Gaurav

Read only

0 Likes
574

Hi Gaurav,

I had seen this link, but this does not clearly say as to how to pass multiple parameters and receive a return parameter back in ABAP.

Thank you for the help.

Regards,

Manesh