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

Connect to R/3 with the connector framework


I am trying to call a RFC function from R/3 using the new connector framework instead of JCO.

However, I'm not quite sure how to create complex data type for the input parameters. I get the parameter structure but I don't know how to create the IRecordSet object to send in the input parameters record.

Any help would be appreciated.

Thank you.


Rui Gonçalves

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 21, 2003 at 06:37 PM

    Check the JCO examples.

    It is the same. Sap CF just offers the connection management.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member



      public static IConnection getConnection(String sapSystemAlias,

      IPortalComponentRequest componentRequest)

      throws IllegalArgumentException {

      // check if passed attributes are null

      if (componentRequest == null) { throw new IllegalArgumentException(

      "IComponentRequest object can not be null!"); }

      if (sapSystemAlias == null) {

      // use default system alias

      //sapSystemAlias = defaultSAPSystemAlias;


      ILogger logger = PortalLog.getLogger(); user = componentRequest.getUser();

      Locale locale = componentRequest.getLocale();

      ConnectionProperties properties = new ConnectionProperties(locale, user);

      IConnection connection = null;

      try {

      IConnectorGatewayService connectorGatewayService = (IConnectorGatewayService) PortalRuntime


      connection = connectorGatewayService.getConnection(sapSystemAlias,


      } catch (Exception e) {

      logger.severe(e, "Exception while creating a connection.");


      return connection;


      It makes also sense to have a central method to close connections...

      public static boolean closeConnection(IConnection connection) {

      boolean succesful = false;

      if (connection != null) {

      try {


      succesful = true;

      } catch (ResourceException re) {


      "Connection to SAP could not be closed!");



      return succesful;


      and interactions...

      public static boolean closeInteraction(IInteraction interaction) {

      boolean success = false;

      if (interaction != null) {

      try {

      interaction.close(); // close interaction

      success = true;

      } catch (Exception e) {

      String message = "Exception closing interaction.";

      PortalLog.getLogger().severe(e, message);



      return success;




      Message was edited by: Kai

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.