Skip to Content

SAP Java Connector (SAP JCo) is a middleware component that enables the development of SAP-compatible components and applications in Java. SAP JCo supports communication with the SAP Server in both directions: inbound calls (Java calls ABAP) and outbound calls (ABAP calls Java).

<u>Using Jco connection in Web dynpro</u></p><p>There are 3 ways to logon to Jco destination</p><ul><li>Start NWDS and open web dynpro perspective</li></ul><p>!|height=114|alt=image|width=509|src=|border=0! </p><ul><li>Logon http://<host>:<port> -> Web Dynpro -> content administrator</li><li>Logon http://<host>:<port>/irj/portal ->Content Administration->Web Dynpro</li></ul><p>!|height=192|alt=image|width=321|src=|border=0!</p><p>Normally you can create logical system in the Web Dynpro Java(WDJ) first, but I would like to create the Jco destination before it is used as logical system, like that I can test and ping the connection of SLD and ABAP backend system, after the Jco destination runs successfully, then I use it in the WDJ, there is another reason I did it first is when calling adaptive RFC in WDJ, it’s possible to create the ABAP backend system in preference of WDJ directly as long as I installed the SAP Gui logon on my PC, I can still use the Adaptive RFC, but when another user who doesn’t install SAP Gui for this system, then he wouldn’t run this Web Dynpro correctly.</p><p>In the Jco Destination ->create JCo Destination</p><p>Step 1</p><p>!|height=218|alt=image|width=446|src=|border=0!</p><p>When you define Jco Destination name, never use the system name and DEV,  The same Jco Destination should have 2 names: one for application data and one for destination data, when WDJ wants to access the data of  ABAP backend system, it needs the metadata for example structure also.</p><p>Maximum Pool Size: The parameter Maximum is used to specify how many connections should be left open for the current user, even if they are not being used actively. A pooled RFC connection is allocated much faster than a new connection, therefore, increasing the pool size will optimize the time needed to get a new connection. On the other hand, if a connection is pooled, it is not available for other users.</p><p>Maximum Connections: Maximum amount of connections per user. This needs to be determined for each Application Data destination (also called logical system).</p><p>Connection Timeout: Defines how long the pool waits (in seconds) before a destination, which is in the range between 1 and the maximum pool size, is closed by the pool. This allows closing pooled connections after a certain amount of time, if the user is no longer active. A typical value here is 10 – 30 seconds.</p><p>Maximum Wait Time: Defines how long you can wait (in seconds) before you get an exception after trying to get an destination although the maximum destinations are open. In a high user load scenario, it makes sense to increase this number appropriately (20-60), in low user load scenarios, this number can typically be reduced to a very low number (1-5 seconds).</p><p>Step 2:</p><p>!|height=136|alt=image|width=464|src=|border=0!</p><p>Select which J2EE cluster I wish the Jco destination to be assigned.</p><p>Step 3:</p><p>!|height=177|alt=image|width=390|src=|border=0!</p><p>Select the connection type – Application Data or Dictionary Meta Data.  The connection type should match the name of step 1 I had just created. </p><p>When Application Data is selected, I can choose between direct connection to a distinct application server of the technical system or using load balancing.</p><p>When Dictionary Meta Data is selected, load balancing is pre-selected and can not be changed.</p><p>Step 4:</p><p>!|height=227|alt=image|width=372|src=|border=0!</p><p>I may only select Servers and / or Logon Groups from the drop down list that have first been defined as technical Systems in the SLD.</p><p>Step 5:</p><p>!|height=252|alt=image|width=400|src=|border=0!</p><p>Application Data: If I select a connection type of Application Data, then when I get to the Security screen, I will have a choice of 4 different user authentication techniques: User/Password, Client Certificate (X.509), Ticket (SSO2 Cookie), User Mapping (Requires the use of the User Mapping Engine in the J2EE engine)</p><p>For development and testing scenarios, it is acceptable to use the User/Password authentication method. However, for productive use, you should always choose a method that allows user specific authorizations to be employed within SAP. This will help provide an application level audit trail of user activity.</p><p>If you select User/Password for you productive system, then all users using this JCo connection will appear to be the same user within SAP. Thus, you will loose any audit trail capability.</p><p>Dictionary Meta Data: If I select a connection type of Dictionary Metadata, then when I get to the Security screen, I will only be able to use a named user id and password for connection to the SAP system. This is because no audit trail is required for the transfer of metadata. Therefore, the same user id (SAP user is of type SYSTEM) can be used irrespective of the identity of the end user.</p><p>Step 6:</p><p>Check my configuration data on the Summary screen.->finish</p><p>!|height=210|alt=image|width=432|src=|border=0!</p><p>The icon next to the JCo destination now turns green.</p><p>Finally, press the Test button to ensure that my JCO connection works. I scroll to the bottom of the browser window to see the success/failure message.</p><p>Important: I repeat this process for the second JCo destination!</p><p>Once both JCo destinations have been successfully created, I am ready to use it in my Web Dynpro application.</p><p>Start  NWDS, open the web dynpro perspective, open the web dynpro I want to use, create model</p><p>!|height=212|alt=image|width=433|src=|border=0!</p><p>!|height=230|alt=image|width=391|src=|border=0! !|height=303|alt=image|width=242|src=|border=0!</body>

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member
    As iam working on sapjco3. jar files the connectivity concept is little bit different .
    1. import packages are diff.
    2.Destination manager interface working procedure is diff.
    3.DestinationDataProvider a new interface .
    4.After the Properties are being passed to the function which is responsible to connect to the different mode of connectivity ie. pooled and direct so   need help in that regard as well .

    Connectivity issues are the phase1 problem scenario. thus urjent soln. is required.

    sanjay sharma

  2. Former Member
    Hi Wu,

    Maybe you could also post this to the Web Dynpro Area as this is a common question that WD developers would wanna ask ;o)

    Thanks and Regards,

  3. Former Member
    i am tring to config the Jco destination but i failed. I following the setps:

    1. Choose Maintain JCo Destinations. The four JCo destinations already exist but have the status Red. (The JCo destinations appear after the application has been deployed.)
    2. Choose Create in one of the destinations.
    3. Define the configuration of the JCo pool for the JCo destination.
    4. Assign the JCo destination to a J2EE Engine cluster.
    5. Select the data type for the JCo destination and the corresponding connection type. The BI_METADATA and WD_ALV_METADATA_DEST JCo destinations have the connection type Dictionary Meta Data; BI_MODELDATA and WD_ALV_MODELDATA_DEST have the connection type Application Data.
    6. Determine the application server or message server.
    7. Choose the authentication method you want to use to authenticate users. For the BI_METADATA destination, you have to enter user/password as an authentication method.
    8. Complete the definition by choosing Finish.
    when i test the connection,the error is:$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM  TYPE=B MSHOST=sujuan GROUP=PUBLIC R3NAME=ECC MSSERV=sapmsECC PCS=1 ERROR       Group PUBLIC not found TIME        Sun Jul 18 20:16:15 2010 RELEASE     700 COMPONENT   LG VERSION     5 RC          -6 MODULE      lgxx.c LINE        4288 DETAIL      LgIGroupX COUNTER     1 
    i want to know how to check the connection!

    1. Former Member Post author
      The error message you got indicated that the message server is not correct, which means the configuration of ABAP application system in SLD is not correct, so go back to SLD to check the parameter of ABAP application system, some time the application server and message server is not the same parameters.

Leave a Reply