cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Silly question about RFC for Ruby...

Former Member
0 Likes
453

I'm learning and loving Ruby, before I move to Rails....So I got a question....I haven't install RFC for Ruby yet....But....Can I connect to SAP from Ruby??? I mean....Just from Ruby, like a terminal server??? Maybe it's a silly question...but I just wanted to know that -:)

Greetings,

Blag.

View Entire Topic
Former Member
0 Likes

Hi - not sure that I fully understand your question -

You can write standalone scripts in Ruby to call RFC functions, such as:


require 'saprfc'

rfc = SAP::Rfc.new(...)
i = rfc.discover('RFC_READ_REPORT')
i.program.value = 'RSDBRUNT'
rfc.call(i)
i.qtab.hashRows{|r|
   puts r['LINE']
}
rfc.close

If need actual control via the diag protocol of the GUI then you need to look at OLE automation for Ruby + the GUI automation controls.

Cheers.