Can I make a Java function call in SAP -- either in an RFC, a BAPI or BADI -- and pass parameters?
I believe you are referring to outbound Java connectivity from SAP to a Java object. The answer is yes, and the mechanism is fairly straightforward. You would need to the JCo connector to build a Java RFC server. This RFC server registers itself as a server program with SAP, and allows you to define an RFC destination to it.
Check out my article A Brief Introduction to the JCo Server. You can also find a full sample application in my book Enterprise Java for SAP.
Dig Deeper on SAP Java and J2EE
How to provide an SAP R/3 4.5B application server with a Web service interface
A reader wants to know how to consume a Web service from an SAP 4.6c R/3 application server.
Are you a Java/J2EE developer interested in SAP? This expert tip lists the most relevant SAP modules and technologies for you.