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

Custom iView Connecting to SAP R/3 system using JCA !!

I did not get any response on the Portal forum so posting it again in the WebAs forum ...

Environment : SAP Portal : EP 6.p SP2

I am using JCA to connect to the SAP backend systems.

The following code connects to the backend ...

IConnectionFactory connectionFactory = (IConnectionFactory) ctx.lookup("EISConnections/SAPFactory");

IConnectionSpec spec = connectionFactory.getConnectionSpec();

((Map) spec).put("client", "CLIENT_NUMBER");

((Map) spec).put("UserName", "YOUR_LOGIN_ID");

((Map) spec).put("Password", "YOUR_PASSSWORD");

((Map) spec).put("logonmethod", "UIDPW"); // or SAPLOGONTICKET

((Map) spec).put("Language", "YOUR_LOGIN_LANGUAGE");

((Map) spec).put("ashost", "YOUR_APPLICTION_SERVER_NAME");

((Map) spec).put("sysnr", "YOUR_SYSTEM_NUMBER");

IConnection client = connectionFactory.getConnectionEx(spec);

I want to use the message server for load balancing. Is there a way to specify the message server and logon group ??

These is the code to get the BAPI information ...

// Create interaction

IInteraction interaction = client.createInteractionEx();

IInteractionSpec interactionSpec = interaction.getInteractionSpec();

interactionSpec.setPropertyValue("Name", "REMOTE_FUNCTION_MODULE_NAME");

// Create IFunction instance

IFunctionsMetaData functionsMetaData = client.getFunctionsMetaData();

IFunction function

= functionsMetaData.getFunction("REMOTE_FUNCTION_MODULE_NAME");

// CCI api only has one datatype: Record

RecordFactory recordFactory = interaction.getRecordFactory();

MappedRecord importParams

= recordFactory.createMappedRecord("CONTAINER_OF_IMPORT_PARAMS"

and the following code populates the input table parameters ...

IStructureFactory structureFactory

= interaction.retrieveStructureFactory();

IRecordSet table

= (IRecordSet) structureFactory.getStructure(

function.getParameter("TABLE_NAME").getStructure());

table.insertRow();

table.setString("COLUMN_NAME_1", "VALUE_1");

table.setString("COLUMN_NAME_2", "VALUE_2");

table.insertRow();

table.setString("COLUMN_NAME_1", "VALUE_1");

table.setString("COLUMN_NAME_2", "VALUE_2");

importParams.put("TABLE_NAME", table);

The above code causes performance issues in the SAP system because the code is calling the following other BAPI through the JCA java api ...

1) RFC_GET_FUNCTION_INTERFACE

2) DDIF_FIELDINFO_GET

Looks like, the JCA library is not caching the metadata information for the BAPI instead for each call, it is calling other BAPI's to get the BAPI metadata information. Also, if I reuse the same IFunction class instance for all connections (Using Singleton Class), it seems to make less "RFC_GET_FUNCTION_INTERFACE" bapi calls.

The problem is with the input table structure which I need to populate for the BAPI. Every time the structure is populated, the internal BAPI's are getting called and it takes more time to populate the structure as number of users increases.

I am looking answers to the following questions ...

1) Specify message and logon group in JCA

2) Provide a way to cache the metadata for the BAPI's

More details about JCA can be found here ...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bc9baf90-0201-0010-479a-b49b25598ebf

I appreciate your help !!

Thanks

Bhabesh Patel

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2005 at 07:58 PM

    we updated JCO to the latest version for EP 6 SP2 Patch 8 and it fixed the issue.

    Add a comment
    10|10000 characters needed characters exceeded

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.