Skip to Content
author's profile photo Former Member
Former Member

SAP R/3 Connection in WEB AS 6.40

Hello,

I am currently in the process of <i>migrating our enterprise application from Jboss to SAPWAS 6.40</i>. One of the tasks is to get the SAP R/3 connectivity happening in SAP WAS server. We connect to the SAP R/3 system from our java classes and realise we have to use JCO to do this.

is there a set of steps outlined anywhere which might tell me what is required to achieve the above? As in how do i go about setting the Connector Factory, getting hold of the relevant jars and dlls (if rquired)

Any help is much appreciated and <b>promise to reward the person with any useful information</b>.

Thanks

Dushy

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Sep 28, 2005 at 08:12 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Eddy De Clercq

      Precisely, i wanted to know <b>how to connect my J2EE application running inside SAP WAS to a SAP R/3 server</b>. once again i am not using any WebDynpro or Sap Portal.

      As mentioned earlier in Jboss you can do this by deploying a *-ds.xml file and a rar file which defines the JCA connection (example in my previous post).

      My apologies if this is still confusing.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 08:42 AM

    Hi Dushyant,

    You will get sample programs for connecting to SAP from java classes. These sample programs come with the SAPJCO.jar file. You can download this whole package from service.sap.com (SAP market place).

    Or you can go through following link, from where you can get ssample code.

    jcostructure-nullpointerexception

    Regards,

    Bhavik

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Bhavik, Much appreciate your response. At this stage I am not too concerned about how to call the RFC from our Java classes as we already had that in Place in Jboss. I am more concerned about how to go about declaring the JCO adapter. Here is an example from a *-ds.xml file in Jboss that we used to basically deploy our adapter into Jboss. Do we need a similar thing in Netweaver??

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ==================================================================== -->

      <!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->

      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->

      <!-- ==================================================================== -->

      <service>

      <mbean code="org.jboss.resource.connectionmanager.XATxConnectionManager" name="jboss.jca:service=XaTxCM,name=SAPConnectorFactory">

      <! make the rar deploy - A BIG HACK till xslt based deployment is written >

      <depends>jboss.jca:service=RARDeployer</depends>

      <depends optional-attribute-name="ManagedConnectionFactoryName">

      <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=XaTxDS,name=SAPConnectorFactory">

      <! more hack >

      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=SAPConnectorFactory</depends>

      <attribute name="ManagedConnectionFactoryProperties">

      <properties>

      <config-property>

      <description>The client-number of the R/3 system</description>

      <config-property-name>ClientNumber</config-property-name>

      <config-property-type>java.lang.String</config-property-type>

      <config-property-value>100</config-property-value>

      </config-property>

      <config-property>

      <description>The name of the user, with which to logon to the system</description>

      <config-property-name>UserName</config-property-name>

      <config-property-type>java.lang.String</config-property-type>

      <config-property-value>MDROVER</config-property-value>

      </config-property>

      </config-property>

      <config-property>

      <description>The name of the message-server (hostname or ip-address) for the R/3 system</description>

      <config-property-name>MessageServerName</config-property-name>

      <config-property-type>java.lang.String</config-property-type>

      <config-property-value></config-property-value>

      </config-property>

      <config-property>

      <description>The system-name of the R/3 system</description>

      <config-property-name>SystemName</config-property-name>

      <config-property-type>java.lang.String</config-property-type>

      <config-property-value></config-property-value>

      </config-property>

      <config-property>

      <description>The name of the group of application servers</description>

      <config-property-name>GroupName</config-property-name>

      <config-property-type>java.lang.String</config-property-type>

      <config-property-value></config-property-value>

      </config-property>

      </properties>

      </attribute>

      <attribute name="JndiName">R3ConnectionFactory</attribute>

      </mbean>

      </depends>

      <depends optional-attribute-name="ManagedConnectionPool">

      <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=XaTxPool,name=SAPConnectorFactory">

      <attribute name="MinSize">0</attribute>

      <attribute name="MaxSize">50</attribute>

      <attribute name="BlockingTimeoutMillis">5000</attribute>

      <attribute name="IdleTimeoutMinutes">15</attribute>

      <!--criteria indicates if Subject (from security domain) or app supplied

      parameters (such as from getConnection(user, pw)) are used to distinguish

      connections in the pool. Choices are

      ByContainerAndApplication (use both),

      ByContainer (use Subject),

      ByApplication (use app supplied params only),

      ByNothing (all connections are equivalent, usually if adapter supports

      reauthentication)-->

      <attribute name="Criteria">ByContainer</attribute>

      </mbean>

      </depends>

      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>

      <!-- Include a login module configuration named SAPR3Realm.

      Update your login-conf.xml, here is an example for a

      ConfiguredIdentityLoginModule:

      <application-policy name = "SAPR3Realm">

      <authentication>

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">

      <module-option name = "principal">MDROVER</module-option>

      <module-option name = "userName">MDROVER</module-option>

      <module-option name = "password">BAPIRFC1</module-option>

      <module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=SAPConnectorFactory</module-option>

      </login-module>

      </authentication>

      </application-policy>

      NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the

      module-option name = "managedConnectionFactoryName"

      must match the object name of the ConnectionManager you are configuring here.

      -->

      <!--comment out this line if you want component managed security or want

      to use the default values in the ManagedConnectionFactoryProperties -->

      <attribute name="SecurityDomainJndiName">SAPR3Realm</attribute>

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>

      <attribute name="TransactionManager">java:/TransactionManager</attribute>

      </mbean>

      </service>

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.