cancel
Showing results for 
Search instead for 
Did you mean: 

Access the BAPI directly through Struts/JSP/HTML

Former Member
0 Kudos

Hi All,

My current situation is, I have a webdynpro setup and well working. However, I like to get rid of the use of Webdynpro design and use the normal Java only. e.g. Strusts, JSP, HTML.....

Therefore, is there any way I can call the BAPI and use the Model (M) part of Webdynpro only. And all the Business Logic is still handle in the R/3 BAPI side and JSP/Struts View+Controller (VC) doing the presentation layer? wihtout accessing the Table directly.

My Jco, Webdynpro, BAPI are already well setup.

Thanks All.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can make use of JRA which is a recommended way of connecting to SAP systems from your J2EE applications.

in addition to that, another way is to expose your BAPI as a web service ( depends which WebAS version you have on R/3 side)...then create a deployable proxy from the WSDL of the web service and the consuming the deployable proxy as a POJO library like manner....i prefer this one due to the simplicity

so...from your struts based application....

let your action classes be the consumer of either JRA or Deployable proxy and you are done....

JRA --> possible to use on app servers other than SAP WebAS too..

Deployable proxy :- is SAP WebAS sepcific.

Former Member
0 Kudos

Thansk for all your support.

>> JRA --> possible to use on app servers other than SAP WebAS too..

I have read "Accessing BAPIs Using the SAP Java Resource Adapter"

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933...

However, just don't want to invented another wheel (JRA) and wish keep using current wheel (Jco, If possible).

>> another way is to expose your BAPI as a web servic, Deployable proxy

As my current application is heavily depend on the BAPI, I cannot modify anything in the server side.

So, simply saying, in order to use normal struts/html/jsp access bapi. The fowlloing are the logic I have go through.

a. Cannot use Deployable proxy. Because there is a lots of existing application depend on the BAPI.

b. Cannot use Jco as this is not support.

c. Answer is I must use JRA. Although I haven't investigate any server side modification need.

Thanks All,

Any webblog/article/link describe about it is welcome.

null

Former Member
0 Kudos

Hi Amol Joshi,

Just like to confirm, in order to use BAPI with the traditional Java. I have no choice but to use the JRA right?

Thanks,

Former Member
0 Kudos

Hi Nicholes ,

what exactly do you mean by Traditional Java?

Former Member
0 Kudos

Thansk Amol Joshi,

Traditional Java like Servlet, Struts, EJB, JSP, POJO.... things user normally do with Tomcat/Jboss.

Anything but Webdynpro specify like OVS/EVS. So, after I retrieve the data, I can use my own design of HTML and JSP.

By the way, do you think it can call the T-code directly too throught JRA?

Thanks,

Former Member
0 Kudos

AFAIK...what you can do with JRA is probably the invocation of Function modules...

Answers (1)

Answers (1)

dhawal_joshi
Employee
Employee
0 Kudos

Hi,

There is no standard way in which you could call the BAPI or functionality from JSP , HTML . Although to support BAPI calls other than Web Dynpro via model , there is a support for SAP Enterprise Connector, which produces the proxies required to connect to BAPI in a java project .

To use this , Check File >> New >> Others >> SAP Enterprise Connector .

If you are using Development component, you could create such proxies in a java dc and expose them via public part as well.

I will personally would not recommand the use of this as you loose out the complete flexibility of modelling and you have to again deal with Java classes and proxy files , but as of now this is the only way to consume / access BAPI out side Web Dynpro.

regards

Dhawal