Skip to Content

Did you know that you can run executable programs with F9 instead of F8 in recent versions of ADT (SAP NetWeaver Application Server ABAP 7.52)?

Running a program with F9 redirects WRITE outputs to an “ABAP Console” in ADT. No SAP GUI is needed any more.

But hello? Who who on earth is still willing to use WRITE?

Good to know, that CL_DEMO_OUTPUT also writes to the ABAP Console after F9!

 

You can also reach the console by implementing a special interface in your classes (from ABAP 7.51 on). But for small pieces of executable test code CL_DEMO_OUTPUT might be an option.

 

 

To report this post you need to login first.

11 Comments

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

  1. Fabian Lupa

    After having discovered this feature in the ADT release notes before 7.51 dev edition was out, I was really optimistic about it. I thought this would be a “java style”-console for ABAP (finally!).

    Unfortunately there are some things which disappointed me going in with that expectation:

    • The log output is transmitted only once after the program execution has finished (synchronously). So you cannot monitor things using log output while your program is running.
    • That also means there is no log output at all if the programm does not finish execution. Which makes it not very useful for an error log.
    • Separate log entries are forced to be separated by an empty line (because of some CALL TRANSFORMATION somewhere which replaces new-line with two new-lines).

    The last point is more annoying than deal breaking and I didn’t know about the WRITE redirection until now which might fix it (feels really weird to add write statements in global classes though, is that even syntactically allowed o0).

    I still had some fun with it 🙂

    https://github.com/flaiker/abap-log/blob/master/src/zcl_alog_adt_logger.clas.abap

    (3) 
  2. Peter Inotai

    Hi Horst,

    in recent versions of ADT

    Which ADT/backend version is exactly required? Just tested with ADT 2.83.1 and ABAP 7.40 and nothing happened when I pressed F9. I guess I need 7.5x, right?

    Thanks,

    Peter

     

    (0) 
      1. Former Member

        Hey Horst,

        How are the chances that those fancy new ABAP/ADT features are ported back to 7.50? Since we can’t just change the platform, we’re stuck to 7.50 for the foreseeable future. It’s unfortunate to see amazing new features come and not being able to use them.

        Cheers,

        Johannes

        (1) 
  3. Uwe Fetzer

    We are on 7.51 SP03 and ADT 2.83.0 (Exclipse Oxygene). Unfortnatelly after pressing <F9> nothing happens 🙁

    Shouldn’t there also be a context menu item? (or is there a newer ADT version already?)

    (0) 
      1. Fabian Lupa

        It definitely works on AS ABAP 7.51 SP1 developer edition. Though I saw some modifications in SPAU by SAP in the default installation of it regarding the exact REST endpoint for the ADT console integration, so maybe they backported it in afterwards?

        (0) 
        1. Christian Guenter

          Hm, not for me for programs. I’m on 7.51 SP02 developer edition.

          But it works for classes! There’s the entry in the context menu, for programs not. Strange…

           

          (1) 
          1. Fabian Lupa

            Ah thats it! I didn’t even notice that in this blog it’s a report.

            In the documentation I think it also clearly states you need a class and implement IF_OO_ADT_CLASSRUN for the logging and then use the out-parameter of the main method.

            (1) 
          2. Fabian Lupa

            Just having it implicitely done in a report seems to be a newer 7.52 only feature then.

            (cannot edit my previous comment “We are unable to complete your request. You may have been logged out from your session. Please re-login and try again.”)

            (1) 

Leave a Reply