Skip to Content

At our CodeJam in Leipzig, Philipp Degler showed us a cool website – The Rosetta Code. It’s a good place to learn new program languages or to train your skills.

On a lazy friday afternoon I created this code – https://rosettacode.org/wiki/Execute_a_system_command#ABAP It’s fun to see how easy things are in some languages and how complicated ABAP can be.

It’s a wiki where you have lots of tasks, a task is described like https://rosettacode.org/wiki/RSA_code . You can browse through tasks and contribute by editting the wiki. You can even browse by tasks with missing implementations in your favorite language.

Rating: *****/***** 🙂

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Raphael Pacheco

    Cool share!

    Very cool to see several ways to perform the same calls in many different programming languages!

    I just let a caveat here that there are ways to reduce your code using the EXECUTE method of cl_gui_frontend_services class and passing the powershell application, for example, which also operates the LS command 🙂


    BR,


    Raphael Pacheco.

    (0) 
  2. Jelena Perfiljeva

    That ABAP code does much more than the examples for all the other codes. I believe that technically the FM  SXPG… is the only part that is relevant for such narrow comparison purposes. E.g. your code also has error handling (others don’t) and it analyzes the OS type. I doubt 100% of other code fragments can be executed in any OS. So this gives ABAP bad rep. 🙂

    Anyway, thanks for sharing, it was quite interesting.

    (0) 
    1. Suhas Saha

      Totally agree with Jelena here… +1

      ABAP is a business programming language and doesn’t have the fancy, cool features of other programming languages. Having said that, the advances SAP has made in the ABAP language since 740 are really cool 😎

      (0) 
  3. Richard Harper

    Hi,

    The point behind the SXPG_* modules is that they create the ability to code O/S independent commands.  Try that in any of your other languages……

    You use transactions SM69 and another (which I forget SM6 something) to define your command and it’s various versions then SXPG_Command_Execute will execute the relevant command with the right args automagically.

    Rich

    (0) 

Leave a Reply