How would you access SAP from a Servlet or a JSP? You can do it pretty much the same way from a portlet. Remember, a portlet is just a rendering tool, in its most basic sense. Connecting to back ends shouldn't be any different from a portlet than a Servlet.
Of course, service out as much as possible. If you can provide access to SAP through a web service, and then connect to the web service through the portlet, that's a bit more service oriented, and better than connecting directly from the portlet.
Of course, if your question is how to connect to SAP from a Servlet/JSP app as well, then, I guess my answer really isn't much help to you.
Joined: Dec 26, 2005
yeah ! basically the problem is connecting to SAP BW from outside the SAP Environment.
look for SAP JCO (Java Connector, available from SAP), download it, and learn how to use it.
We use it in WebSphere Portal (we wrapped it in a Resource Environment Provider). SAP also has a JCA resource adapter but I believe you can't use it outside of SAP's J2EE product (it's also just a wrapper to the SAP JCO).