- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Connecting SAP in Ruby on Rails
Try downloading nwrfcsdk library from sap and follow instructions mentioned in Readme to perform the installation. Use function Module like ENQUEUE_READ to perform remote call as below −
#!/usr/bin/env ruby require 'sapnwrfc' require 'rubygems' conn = SAPNW::Base.rfc_connect(:client => '800', :sysnr => '01', :lang => 'EN', :ashost => 'hostname', :passwd => 'pw', :trace => 0, :user => 'username') sm12 = Hash.new # lookup the dictionary definition of an Function Module fds = conn.discover("ENQUEUE_READ") # create an instance of a Function call func = fds.new_function_call func.GUNAME = "" func.invoke cnt = func.NUMBER if 1000 < cnt puts "more than 1000 entries" end conn.close
In case you are running JRuby, you can use SAP Java Connector to connect to RFC enabled BAPI’s and Function module. Note down following points about SAP Java Connector SAP JCo −
- SAP Java Connector is a middleware component that can be used for the development of SAP-compatible components and applications in Java. Using SAP JCo, you can set up bidirectional calls to SAP server.
- You can use SAP Java Connector to connect to desktop applications and with Web server applications.
- SAP JCo can be used with SAP Business Connector to communicate with external Java applications.
- You can also use SAP JCo to integrate Java EE server with the ABAP environment.
You can refer to below link regarding SAP JCo configuration −
- Related Articles
- How To Setup and Configure Ruby on Rails with ‘rbenv’ on Ubuntu 16.04
- How to Setup and Configure Ruby on Rails with ‘RVM’ on Ubuntu 16.04
- Connecting to SAP HANA using odbc_connect() on PHP
- Connecting to SAP HANA server on Cloud using PHP
- Connecting SAP SOAP WebService with Android application
- Connecting PHP directly to SAP Business One
- Fetching list of products from SAP: connecting SAP database from .net application
- Performing different SAP logon check while connecting to HANA
- Connecting system with SAP system using a Web Service
- Connecting to MSSQL, MaxDB using SAP HANA Smart Data Access
- Connecting SAP system from C# application via .NET Connector 3.0
- Connecting SAP B1 via DI API takes too much time
- Error connecting SAP while sapjco3.jar file is in my library path
- Why there are gaps between the section of rails on the railway track?
- Connecting to SAP R/3 system via JCo client and JCo Server

Advertisements