On my way to SAP Code Jam and sitFRA I wanted to use the time to write a program. Unfortunately the internet connection via my build-in SIM card was not that stable. But since the Eclipse IDE stored the files off-line I could at least write the program – to some extend:

The ABAP in Eclipse permanently wants to do syntax check. But there was no connection, so I had stop typing again and again waiting for it to ready. Also when I did pretty printing or activation, I do so automatically not thinking of that this would block me as well.

I had connection again activated the program. Afterwards it changes to display mode. When I tried to change it again, it could not be unlocked, because there is no connection and I could not edit the program. Of course there are also no help files available.

What to do? My suggestion is to have some kind of off-line coding mode:

First the program is created and locked in the back-end. Then I switch on the off-line mode and no communication with the back-end takes place. When I am in off-line mode, I can unlock programs and change them. When the communication is back, it syncs the code. Great would be also, if the ABAP help file could be local accessible via the F1-help too.

To be able to create new objects as well as navigation between objects is not necessary from my point of view.

But what is you opinion to that subject? Do you also think, that such a feature would be nice to have? Do you agree with my suggestions regarting its functionality?

To report this post you need to login first.

26 Comments

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

  1. Jelena Perfiljeva

    I have an offline development tool – it’s called MS Word. 🙂

    Not a major selling point for Eclipse, oh boy… It might depend on what specific tasks one works on – for what I do most of the time I’d have to have access to dictionary, functions, etc. Rarely I get to just sit and write the whole ‘ABAP novel’. But it could definitely be useful to someone working on more “isolated” pieces. So I’d vote – “nice to have”.

    (0) 
    1. Joao Sousa

      It really depends on what you are doing. Most of the time people will be in your situation where they are integrating deeply in ECC and so they need a connection.

      But I’ve found myself in situations were I was developing a module where only a few methods actually interacted with ECC, and for those offline would be awesome. Especially if code completion worked for the classes local to your our project. And even more awesome, if you could take whole packages offline for code completion and syntax checks.

      I work a lot in Africa, and there the connections are not like in Europe or I imagine the US. Sometimes I’m connecting to SAP through a very unstable connection.

      (0) 
    2. Ryan Fleischmann

      Jelena Perfiljeva wrote:

      Not a major selling point for Eclipse, oh boy…

      The issue isn’t with Eclipse. Eclipse supports offline/local development.

      Local Editing – ABAP Workbench Tools – SAP Library

      I don’t think there’s a necessarily good way to test code you’re editing locally beyond a few syntax checks. But I that’s leagues ahead of MS word if you ask me!

      For SAP Java, there’s Netweaver Development Infrastructure that allows you to check in/check out code editing in Eclipse/Netweaver Developer Studio and build/test the application in a local and/or “offline” environment. I found this incredibly useful as a developer

      (0) 
  2. Lars Hvam

    Hi, the F1 help files can be downloaded via report ABAP_DOCU_FOR_ECLIPSE. The code mentions something about a plugin not sure how it works though.

    (0) 
    1. Peter Langner Post author

      HiLars,

      interesting report. I didn’t know that. May be Thomas Fiedler can tell us, if this can be used for off-line help. The challenge is, to have the right version according to the ABAP version of the back-end.

      Peter

      (0) 
    2. Horst Keller

      You guys find everything, don’t you?

      ABAP_DOCU_FOR_ECLIPSE is (of course) not released for public usage. It is more a kind of test program that was used for trying out if it is feasible to deliver the ABAP Keyword Documentation for ADT as Eclipse plugins. It produces HTML files and an XML tree that fits into Eclipse’s docu world. We tried it only once (it worked) but we decided to use the backend connection of the ADT instead. If you hit F1, the help page is requested from the backend (there is a program to test that too, ABAP_DOCU_HTTP_CALL). But that’s what you want to circumvent.

      So, if you know how the Eclipse help framework works, you might be able to embed the files producded by ABAP_DOCU_FOR_ECLIPSE into ADT. But F1 will not work from scratch. You must also program something that calls the appropriate help file after F1 (this is done at the backend normally). Or you must use the full text search of the Eclipse help framework.

      Therefore, why not using the “official” offline version of the ABAP Keyword Documentation besides Eclipse? In SAP GUI open TA ABAPDOCU, select the seventh icon from the left and your done ….

      Horst

      PS: You can download the full documentation in many files or whole subtrees in one file. The advantage of the latter is that it enables a full text search over all subnodes. It is up to you to program a full text search over the distributed files. Do it, publish it in SCN and it might become part of the portal version (which is nothing but the above mentioned offline version) …

      (0) 
  3. Bruno Lucattelli

    If we had a notation for importing/exporting ABAP code and dictionary objects, then MAYBE we could program ABAP while offline. But you would also need to “check-in” your changes back into the application server when you got online.

    This would be a hard challenge. And I would love to try make that work! 🙂

    (0) 
      1. Peter Langner Post author

        Hi Maxemilian,

        I think that SAP Link is not the right way to do it. The extracted code is wraped in to xml and can not that easily be edited. I’d rather copy and paste the code to a text file and edit it e.g. with jedit (see ABAP in jEdit – Offline ABAP Editor ).

        Or do you know any editor that can digest SAP Link format?

        Peter

        (0) 
        1. Maximilian Schaufler

          Not without some adjustments, right.

          But it wouldn’t be that hard adding some options to allow for “simple-txt-files” instead of XML in SAPlink.

          It’s an open project 🙂

          (0) 
          1. Bruno Lucattelli

            Hi Max! I know SAPlink for a while, and it’s a good solution for installing software in your stack. But Peter is right. When I say “notation”, I mean something more “plain-text-like”. A good analogy to that will be a Windows app. You can use Visual Studio to draw a window, add buttons, etc. But behind the beautiful UI, you still get plain-text-C++ code using the Windows API.

            The way I see it, you could create a service that can export an ABAP solution into plain-text files and a “project” file that puts it all together in Eclipce. Then, the same service could be used to import those files back. Think of it as something like a “git pull” and “git push”.

            When you think of many dev tracks (eg: day-to-day support and long-term projects), DVCS could help you stop tracking changes manually by commenting code here and there before transporting it to PRD environments.

            Of course, ABAP WB version control doesn’t work as a DVCS, but again: how fun would it be trying to create something that could do all that? 🙂

            (0) 
              1. Bruno Lucattelli

                Did you opened an issue for it? It is an OSS, so yourself (or someone watching the issuelist) could make a patch for it. 🙂 We all would benefit from it.

                In the other hand, there’s some objects that SAPlink cannot IMP/EXP. So, change requests are still needed sometimes (I know, it’s sad 🙁 ).

                (0) 
    1. Joao Sousa

      Some people hate Git but I don’t understand why. In a coordinated team why would two people be changing the same method at the same time? And even if it is necessary you have branches and pull requests.

      (0) 
      1. Bruno Lucattelli

        Joao, when you’re working on really small projects such as as BAdi or a single proxy, you may almost never need to apply a second change to an ABAP object before the first (and non-related to the second) goes live. But when you’re thinking of an entire custom solution, then things tend to get a little bit more complicated.

        Here I have some experience on that. You usually have at least two tracks happening at the same time. First is support, when bugs and security fixes must be shipped to PRD ASAP. Second, you have new features and improvements that takes more time to be developed, cannot be shipped to PRD until complete, but also cannot hold support back.

        If you’re adopting an Agile approach, your chances to use the same codebase for support and new features increase as you finish your sprints and ship code to PRD.

        (0) 
        1. Joao Sousa

          Second, you have new features and improvements that takes more time to be developed, cannot be shipped to PRD until complete, but also cannot hold support back.

          That’s why git branches are so adequate for SAP development. You would do your fixes on the master branch, and new funcionality on a paralel branch.

          I’ve lost count of the times I had to revert code, because a urgent fix needed to go to production. Wouldn’t happen with git.

          But when you’re thinking of an entire custom solution, then things tend to get a little bit more complicated.

          I’ve worked with some pretty large custom modules, and when trouble arose, it was because of bad encapsulation, programs with 500 or more lines of code. One of the advantages of methods over performs, is that multiple performs are usually created in a single program, and you can’t transport a single perform. With methods, you transport single methods.

          (0) 
          1. Bruno Lucattelli

            Than you really know what it feels like. Man, I had many bugs and even dumps because of this one-track-fits-all 🙁 . I was discussing with a friend the other day about the idea of using model classes instead of dictionary tables and function modules. Something ***like*** ActiveRecord. If we do this and if we had a notation, then MAYBE we could develop ABAP locally and then “push” it to the backend.

            Also, DVCS could be done outside, using git/mercurial/etc.

            What are your thoughts on this? 🙂

            (0) 
            1. Joao Sousa

              I’ll look into ActiveRecord. With SAPUI5 you ended up using Git for the UI. I do all the development outside SAP, and only use STMS when it’s ready for QA.

              (0) 
  4. Lars Hvam

    Talking about git, you might want to check out larshp/abapGit · GitHub

    It serializes to plain text files along with some xml files containing the metadata

    An offline scenario could be:

    1: upload code to git from abapGit

    2: download to PC

    3: edit files offline using your favorite editor

    4: push changes to git

    5: pull files to SAP system using abapGit

    though, I think its still easier just to copy paste the source code manually

    this also allows branches, however its not possible to develop, build and test the branches without having multiple ABAP systems

    (0) 
    1. Joao Sousa

      I see that more as a way to share code between different SAP developers that are not on the same site/project. You share the code, develop together but for different instances.

      (0) 
  5. Mike Pokraka

    Love this idea. I also use an offline editor to do some work, then paste my code back when online.

    All this talk around GIT, locking etc, is all good and well, but won’t happen for some time. As a “now” solution, SAP could use the existing temporary version feature. You know: if you write some code and hit F8 and it dumps. The next time you go back into the editor it asks you which version to retrieve.

    SAP could activate the same mechanism in Eclipse. If I enable offline edit on a program, it will generate a temp version, then ask whether to overwrite when I reconnect/resync. Far from perfect, but at least it gets the equivalent done that we do today with text editors at minimal effort from SAP.

    It’s up to the dev to determine if working on ‘at risk’ code. For myself I only use offline to write new code or update something I know nobody else is changing. Common sense is also an alternative form of version management…

    (0) 
    1. Mike Pokraka

      I’ve just thought of another quick fix alternative:

      An offline scratchpad in Eclipse with some of the offline-able language features (syntax hilighting, indenting, code completion, basic keywords – DO, LOOP, CLASS, METHOD etc.).

      We could then do what we do today by means of copy/paste into word/ultraedit/bbedit/whatever, but at least in the same environment with the same keyboard shortcuts (or at least a subset of), and a little bit nicer overall.

      (0) 

Leave a Reply