Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Systems, Applications, and Products (SAP) for data processing is an industry leading enterprise software solution that is widely used among product and process oriented enterprises for finance, operations, HR and many other aspects of a business. SAP ERP solutions provide reliable and efficient platforms to build and integrate enterprise or business-wide data and information systems with ease. One of the drawbacks however is vendor lock-in and the relative inflexibility of SAP solutions to align itself with the business model or customization required. Having understood these challenges, SAP software vendors are moving towards exposing their solutions to SOA.

...

To setup WSO2 ESB as a client to a SAP system you need to create the *.dest property file and define the relevant properties. The following table lists the properties and the description of each property that should be specified in the *.dest property file.

 

PropertyDescription

jco.client.client

Client logon

jco.client.user

User logon

jco.client.alias_user

Alias user name

jco.client.passwd

Logon password

jco.client.lang

Logon language

jco.client.sysnr

R/3 system number

jco.client.ashost

R/3 application server

jco.client.mshost

R/3 message server

jco.client.gwhost

Gateway host

jco.client.gwserv

Gateway service

jco.client.r3name

R/3 name
jco.client.groupGroup of application servers

jco.client.tpname

Program ID of external server program
jco.client.tphostHost of external server program

jco.client.type

Type of remote host (3=R/3, E=External)
jco.client.codepageInitial code page for logon

jco.client.use_sapgui

Use remote SAP graphical user interface

jco.client.mysapsso2

Use the specified SAP cookie version 2 as the logon ticket
jco.client.grt_dataAdditional data for GUI

jco.client.use_guihost

Host to which the remote GUI is redirected

jco.client.use_guiserv

Service to which the remote GUI is redirected
jco.client.use_guiprogidProgid of the server that starts the remote GUI
jco.client.snc_partnername

SNC partner name (for example, CN=B20, O=SAP-AG, C=DE\) snc_mode

jco.client.snc_mode

SNC mode (0 or 1)

jco.client.snc_qop

SNC level of security (1-9)

jco.client.snc_myname

SNC name; overrides default SNC partner
jco.client.snc_libPath to the library

jco.client.Dest

R/2 destination

jco.client.saplogon_id

SAPLOGON string on 32-bit Windows

jco.client.extiddata

Data for external application (PAS)

jco.client.extidtype

Type of external authentication (PAS)

jco.client.x509cert

Use the specified X509-certificate as the logon ticket

jco.client.msserv

R/3 port number of message server

jco.client.profile_name

Profile name used for shared memory communication

jco.client.idle_timeout

Idle timeout for the connection

jco.client.ice Ignore

RFC library character conversion errors (1 or 0)

jco.client.logon

Enable or disable logon check at open time (1 or 0)

jco.client.trace

Enable or disable RFC trace (1 or 0)

jco.client.abap_debug

Enable ABAP debugging (1 or 0)

jco.client.getsso2

Get or do not get a SSO ticket after logon (1 or 0)

jco.client.toupper

Enable or disable uppercase character conversions for logon
Info
titleNote

You can obtain the values for these properties from your SAP system administrator.

The *.dest property file should be named <SAP-GWHOST>.dest. For example, if the name of your SAP gateway is SAPSYS01 SAPSYS, the name of the file should be SAPSYS01SAPSYS.dest and the configuration can be as follows.

Following is a sample configuration for the *.dest property file:

Code Block
jco.client.client=900800
jco.client.user=spremote
jco.client.passwd=FILL_IN_YOUR_PASSWORD_HEREwso2_user
jco.client.langpasswd=enwso2pass14
jco.client.ashostlang=SAPSYS01en
jco.client.mshost=SAPSYS01
jco.client.gwhost=SAPSYS01ashost=/H/217.116.29.154/S/3299/H/10.100.5.120/S/3200
jco.client.gwserv=3300
jco.client.sysnr=00
jco.client.idle_timeout=300
jco.client.logon=0
jco.client.msserv=3600
jco.client.trace=0
jco.client.getsso2=0
jco.client.r3name=QCRCPT

Setting up the *.server property file

...

Info
titleNote

You can obtain the values for these properties from your SAP system administrator.

This file should be named <SAP-GWHOST>.server. For example, if the name of your SAP gateway is SAPSYS01 SAPSYS, the name of the file should be SAPSYS01.server and the configuration can be as follows SAPSYS.server.

Following is a sample configuration for the *.server property file:

Code Block
jco.server.gwhost=/H/203217.143116.1829.246154/S/3299/H/15510.56100.495.28120/HS/cpccr01 3200
jco.server.connection_countgwserv=3300
jco.server.progid=JCOSERVER01 
jco.server.gwserv=3326 IGS.CPT
jco.server.repository_destination=SAPSYS01 IGS.CPT
jco.server.name=JCOSERVER01 IGS.CPT
jco.server.unicode=1 

 

The table below summarises how you can define a SAP endpoint and a proxy service.

...

  • How to handle the Server unknown error

    An example of this error message is as follows:

    Code Block
    [2010-10-25 19:53:00,405] ERROR - DefaultErrorListener Exception occured on :
    JCOSERVER01 and connection : null
    com.sap.conn.jco.JCoException: (129) JCO_ERROR_SERVER_STARTUP: Server startup
    failed at Mon Oct 25 19:53:00 IST 2010.
    This is caused by either a) erroneous server settings, b) the backend system has been shutdown,
    c) network problems. Will try next startup in 1 seconds.
    Could not start server: Connect to SAP gateway failed
    Connect parameters: TPNAME=JCOSERVER01 GWHOST=cynthia GWSERV=sapgw00
    ERROR service 'sapgw00' unknown
    TIME Mon Oct 25 19:53:00 2010
    RELEASE 720
    COMPONENT NI (network interface)
    VERSION 40
    RC -3
    MODULE nixxsl.cpp
    LINE 184
    DETAIL NiSrvLGetServNo: service name cached as unknown
    COUNTER 2
    at com.sap.conn.jco.rt.DefaultServer.openConnection(DefaultServer.java:1168)
    at com.sap.conn.jco.rt.DefaultServer.openConnections(DefaultServer.java:1057)
    at com.sap.conn.jco.rt.DefaultServer.adjustConnectionCount(DefaultServer.java:1004)
    at
    com.sap.conn.jco.rt.DefaultServerManager$DispatcherWorker.run(DefaultServerManager.java:
    299)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: com.sap.conn.jco.JCoException: (129) JCO_ERROR_SERVER_STARTUP: Could
    not start server: Connect to SAP gateway failed
    Connect parameters: TPNAME=JCOSERVER01 GWHOST=cynthia GWSERV=sapgw00
    ERROR service 'sapgw00' unknown
    TIME Mon Oct 25 19:53:00 2010
    RELEASE 720
    COMPONENT NI (network interface)
    VERSION 40
    RC -3
    MODULE nixxsl.cpp
    LINE 184
    DETAIL NiSrvLGetServNo: service name cached as unknown
    COUNTER 2
    at
    com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.accept(MiddlewareJavaRfc.java:2135)
    at com.sap.conn.jco.rt.ServerConnection.accept(ServerConnection.java:380)
    at com.sap.conn.jco.rt.DefaultServer.openConnection(DefaultServer.java:1149)
    © 2012 WSO2
    .. 4 more
    Caused by: RfcException: [null]
    message: Connect to SAP gateway failed
    Connect parameters: TPNAME=JCOSERVER01 GWHOST=cynthia GWSERV=sapgw00
    ERROR service 'sapgw00' unknown
    TIME Mon Oct 25 19:53:00 2010
    RELEASE 720
    COMPONENT NI (network interface)
    VERSION 40
    RC -3
    MODULE nixxsl.cpp
    LINE 184
    DETAIL NiSrvLGetServNo: service name cached as unknown
    COUNTER 2
    Return code: RFC_FAILURE(1)
    error group: 102
    key: RFC_ERROR_COMMUNICATION
    at com.sap.conn.rfc.engine.RfcIoControl.error_end(RfcIoControl.java:255)
    at com.sap.conn.rfc.engine.RfcIoControl.ab_rfcaccept(RfcIoControl.java:43)
    at com.sap.conn.rfc.api.RfcApi.RfcAccept(RfcApi.java:41)
    at
    com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.accept(MiddlewareJavaRfc.java:2121)
    ... 6 more

     The solution to overcome this is to add your SAP server names to the the /etc/services file with the relevant ports. For example, the following lines can be added if we consider the example error given above.

    Code Block
    sapgw00 3300/tcp
    sapgw01 3301/tcp
     
Excerpt
hiddentrue

Information about enterprise integration with SAP and WSO2 ESB.