Skip to Content

Tasting the mix of Blue Ruby

Have you ever heard of Blue Ruby? No? Well…simply put, Blue Ruby let’s you run the Ruby Programming Language inside an NetWeaver ABAP Stack…good enough? It is for me of course -:)

Those who know me…virtually or personally, already know that I’m very passionate about Technologies and specially, Scripting Languages.

This week, thanks to Juergen Schmerder and The Blue Ruby Team, I  got early access to the WebGui based Blue Ruby IDE.

Of course, the first thing I did was log-in and tried to do some testing…mostly language related testing. Gladly I found that almost everything I could do on Ruby (Core Language) could be done on Blue Ruby.

So, next thing I do was to start working on my always to be example…an SE16 Emulator.

It was fairly easy because I have done a lot of SE16 example using Ruby, Camping, WxRuby, Sinatra, PHP, PHP/Flex.

Anyway…here’s the code. Just to let you know…there’s a way to make much smaller…almost 6 lines long…but I decided to go with the longer version for two simple reasons.

1.- I wanted to keep testing the language capabilities.

2.- Wanted to separate each field and format them invidually.

3.- Wanted to have fun by writing more code -:P



Now, some screenshots.





I’m sure you’re going to get amazed with this -:) I’m still amazed myself -:D

So…if you want to learn more about, here are some useful links:


Blue Ruby: A Ruby VM in ABAP (PDF)

New from SAP Research: Blue Ruby – a Ruby VM in ABAP

Blue Ruby Demo Video Part 1: How to get started

Blue Ruby Demo Video Part 2: How to call ABAP functions

SAP Mentor Webinar: Introduction to Blue Ruby Replay

You must be Logged on to comment or reply to a post.
  • Very cool, glad someone is able to get in and have a look at this!

    I assume the way to make it 6 lines would be to call some abap directly from ruby, and have it print the data set?

    • Hi Dan.

      Hi hope we'll be able to get the paperwork done and let more users on the system.

      The short version just takes advantage of the fact that the output of RFC_READ_TABLE is already pre-formatted:

      require 'rfc'
      $spfli = 'RFC_READ_TABLE'
      $spfli.query_table = 'SPFLI'
      $spfli.delimiter = '|'
      $ do |l| puts l.wa end

      But Blag's version is much better because it creates Ruby objects for the hits


    • Dan:

      Sure this is great -:) I was looking forward to the early access. Being able to call ABAP functions from Ruby without relying on a RFC Connector and straight from the ABAP stack is a dream come true -:)


  • BTW: there's a nice way to write

      $space = ""
      $len = ( $Fields_Length[i].to_i -   $Data_Split[i].length ) + 1
      $len.times do
      $space += "\s"

    a little shorter: Ruby lets you multiply Strings with Fixnums. So

      $space = "\s" * ( $Fields_Length[i].to_i - $Data_Split[i].length + 1 )

    has the same result. Comes in handy sometimes when ABAP functions expect fixed length codes...


    • Juergen:

      That's why I love Ruby -:) So many shorthands...actually I'm planning to re-learn my books and tutorials to find new tricks and apply them to my Blue Ruby developments -;)