cancel
Showing results for 
Search instead for 
Did you mean: 

Run SAP transaction from Java?

Former Member
0 Kudos

I'm looking for answers for two questions:

1) Can I run an SAP transaction from Java & capture the result either in a file or table.. or any such structure?

2) Can I run an ABAP report directly from Java? and then capture the result as well? I realise that I can use the JCO to run any RFC enabled function module..? But what about a report itself.? Can I run the report behind an SAP transaction directly from Java?

I need this information urgently, and would appreciate any help on this.

Accepted Solutions (1)

Accepted Solutions (1)

guru_subramanianb
Active Contributor
0 Kudos

Hi,

If you want to run a transactional within the Netweaver stack then running through a BAPI/RFC is the standard way of acheiving it.And the application development will be predominantly webdynpro which uses JCO to connect to R/3 backend.

Rdgs,

Guru

Former Member
0 Kudos

Hi Guru,

Thanks for that piece of additional info.

Cheers,

Deepika.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Deepika,

Yes that is most simple way to achieve what is required.

One more thing develope Function Modules for your requirement and make them Remote Enabled and this will serve your need. Thus we need not depend on the standard BAPI and RFC enabled function modules.

If your have some Function Modules that will be helpful then you can make JCo access them and get the data exported to other external applications. Once i tried this for getting host IP to my JCo /people/kathirvel.balakrishnan2/blog/2005/07/26/remote-enable-your-rfchosttoip-to-return-host-ip-to-jco

Check that webblog, might be helpful too.

Let me know if you need any more information.

Thanks & Regards,

Kathirve

Former Member
0 Kudos

Hi Kathir,

That was helpful. Thanks.

Deepika.

Former Member
0 Kudos

Hi Deepika,

Yes that is most simple way to achieve what is requierd.

One more thing develope Function Modules for your requirement and make them Remote Enabled and this will server your need. Thus we need not depend on the standard BAPI and RFC enabled function modules.

If your have some Function Modules that will be helpful then you can make JCo access them and get the data exported to other external applications. Once i tried this for getting host IP to my JCo /people/kathirvel.balakrishnan2/blog/2005/07/26/remote-enable-your-rfchosttoip-to-return-host-ip-to-jco

Check that block, might be helpful too.

Let me know if you need any more information.

Thanks & Regards,

Kathirvel

Former Member
0 Kudos

Hi Kathir,

That link was very helpful.. answered some questions I had in mind. Looks like the only way to get JCO to speak to SAP is through a RFC.

Now, I know I have to concentrate on getting a function module that will do the job. Thanks for your help.

Deepika.

Former Member
0 Kudos

Hi Deepika,

I think the requirement you have asked is quite complex and there is no solution as far as i have know.

You can use BAPI to run SAP Transactions for example BAPI_MATERIAL_DISPLAY will take you to MM03 transaction when you pass a valid material number to it.

When i searched for the same i ended up with no solution,

but got a good link which gave some idea

http://expertanswercenter.techtarget.com/eac/knowledgebaseCategory/0,295197,sid63_tax296869_idx25_of...

Go through that link that might be helpful.

Thanks & Regards,

Kathir~