# Connecting to sap in ruby

**URL:** <https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935>\
**Category:** Ruby\
**Created:** [July 26, 2006, 9:43am UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935 "2006-07-26T09:43:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [July 26, 2006, 9:43am UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935/1 "2006-07-26T09:43:38Z")

</div>

Hello guys,

I am researching on how to connect to sap using ruby scripting. Well, I  
have found some websites that talks about connecting ruby to sap and  
most of their idea is to use SAP::RFC to connect to sap in ruby. I have  
tried connecting to sap in ruby using SAP::RFC and all things went  
right.

My question is is there any other way to connect to sap in ruby w/o  
using SAP::RFC? Additionally, is it possible to manipulate the objects  
inside sap (like clicking buttons, adding text to textbox inside the  
sap)?

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [July 27, 2006, 12:29pm UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935/2 "2006-07-27T12:29:15Z")

</div>

I’ve been watching with interest to see if anyone replied to this, but  
it doesn’t look as though they’re going to :-(. I’m afraid I can’t  
answer your question: I’m also working on Ruby to SAP, but have settled  
on the RFC route. I’m intruiged by your application,though: my interest  
is in providing a web interface to the R/3 system, but it sounds as  
though you’re planning to replace the SAP screens entirely… Would be  
very interested to hear what you’re doing and how you get on.

Good luck!

Catherine

-----Original Message-----  
From: removed\_email\_address@domain.invalid  
To: removed\_email\_address@domain.invalid  
Sent: Wed, 26 Jul 2006 8.43AM  
Subject: connecting to sap in ruby

Hello guys,

I am researching on how to connect to sap using ruby scripting. Well, I

have found some websites that talks about connecting ruby to sap and

most of their idea is to use SAP::RFC to connect to sap in ruby. I have

tried connecting to sap in ruby using SAP::RFC and all things went

right.

My question is is there any other way to connect to sap in ruby w/o

using SAP::RFC? Additionally, is it possible to manipulate the objects

inside sap (like clicking buttons, adding text to textbox inside the

sap)?

–

Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [July 30, 2006, 11:42am UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935/3 "2006-07-30T11:42:42Z")

</div>

Sorry for my late reply.

I am trying to look for a ruby gem that will connect to sap (aside from  
saprfc gem). My idea of integrating ruby with sap is just like using  
watir to make a test script for a web page. If you’ve already seen watir  
drived websites, well that’s what I want to do (manipulate objecs inside  
a program).

Currently, i’m doing scripts in watir for process automation in the  
websites that I am handling. This process automation is what I wanted to  
do in sap, using ruby (to make a script for automating the reports that  
I generate in sap).

As for now, i’m still exploring if my idea is possible…  
If anyone has an idea about how to solve my problem, your help is highly  
appreciated.

unknown wrote:

> I’ve been watching with interest to see if anyone replied to this, but  
> it doesn’t look as though they’re going to :-(. I’m afraid I can’t  
> answer your question: I’m also working on Ruby to SAP, but have settled  
> on the RFC route. I’m intruiged by your application,though: my interest  
> is in providing a web interface to the R/3 system, but it sounds as  
> though you’re planning to replace the SAP screens entirely… Would be  
> very interested to hear what you’re doing and how you get on.
> 
> Good luck!
> 
> Catherine
> 
> -----Original Message-----  
> From: removed\_email\_address@domain.invalid  
> To: removed\_email\_address@domain.invalid  
> Sent: Wed, 26 Jul 2006 8.43AM  
> Subject: connecting to sap in ruby
> 
> Hello guys,
> 
> I am researching on how to connect to sap using ruby scripting. Well, I
> 
> have found some websites that talks about connecting ruby to sap and
> 
> most of their idea is to use SAP::RFC to connect to sap in ruby. I have
> 
> tried connecting to sap in ruby using SAP::RFC and all things went
> 
> right.
> 
> My question is is there any other way to connect to sap in ruby w/o
> 
> using SAP::RFC? Additionally, is it possible to manipulate the objects
> 
> inside sap (like clicking buttons, adding text to textbox inside the
> 
> sap)?
> 
> –
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [July 28, 2006, 3:53am UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935/4 "2006-07-28T03:53:44Z")

</div>

# to SAP, but have settled on the RFC route. I’m intruiged by

# your application,though: my interest is in providing a web

# interface to the R/3 system, but it sounds as though you’re

i think piers harding also frequents this list. you might try  
[https://weblogs.sdn.sap.com/pub/u/8630](https://weblogs.sdn.sap.com/pub/u/8630). he has interesting blogs on  
rails/ruby w sap. of course, piers make saprfc libs  
[http://raa.ruby-lang.org/owner.rhtml?id=1644](http://raa.ruby-lang.org/owner.rhtml?id=1644). his blog on  
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2111](https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2111) shows that  
even the sap hacker djadams uses ruby…  
btw, i myself, would prefer web access to sap just because of its  
ubiquitousness. and besides, who needs fat clients when you’ve got  
ajax/rails/nitro 🙂  
kind regards -botp

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [August 3, 2006, 7:34pm UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935/5 "2006-08-03T19:34:39Z")

</div>

Hi - is this an OLE automation type thing that you are thinking of?

If it is - then there are drivers for the SAP GUI, but then again I  
maybe completely missunderstanding what you want?

Cheers,

Piers H…

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [August 13, 2006, 7:56am UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935/6 "2006-08-13T07:56:27Z")

</div>

I’m sorry for my late reply (again).

Hi Piers and thanks for your reply.

Yes, this is an OLE automation.

I was hoping if i can manipulate the objects inside sap (clicking gui  
buttons, entering text in textboxes etc in sap). Like what watir (web  
application testing in ruby) can do to a html webpage (clicking buttons  
and entering text in textboxes automatically), this is what i want to do  
in sap. Are there any ruby gems/libraries (aside from your sap::rfc)?  
Could you please give me the website where I can download these/this  
ruby gem(s)?

Again, thanks for your reply.

Piers H. wrote:

> Hi - is this an OLE automation type thing that you are thinking of?
> 
> If it is - then there are drivers for the SAP GUI, but then again I  
> maybe completely missunderstanding what you want?
> 
> Cheers,
> 
> Piers H…

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [May 17, 2007, 1:55pm UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935/7 "2007-05-17T13:55:13Z")

</div>

Piers H. wrote:

> Hi - is this an OLE automation type thing that you are thinking of?
> 
> If it is - then there are drivers for the SAP GUI, but then again I  
> maybe completely missunderstanding what you want?
> 
> Cheers,
> 
> Piers H…

I was searching for a similar functionality and come across this post.  
It will be of great help if some one can direct me on SAP OLE  
interfacing using ruby.

Regards

SOumya
