Skip to Content
Author's profile photo Horst Keller

ABAP Console Output in ADT

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.



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Fabian Lupa
      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 🙂

      Author's profile photo Peter Inotai
      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?




      Author's profile photo Horst Keller
      Horst Keller
      Blog Post Author


      Added in the blog.

      Author's profile photo Peter Inotai
      Peter Inotai


      Author's profile photo Former Member
      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.



      Author's profile photo Uwe Fetzer
      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?)

      Author's profile photo Christian Guenter
      Christian Guenter

      It seems that 7.52 is needed.

      Author's profile photo Fabian Lupa
      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?

      Author's profile photo Christian Guenter
      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...


      Author's profile photo Fabian Lupa
      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.

      Author's profile photo Fabian Lupa
      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.")

      Author's profile photo Daniel Manz
      Daniel Manz

      What about running ABAPUnit with Console Output?

      Basically everything I would like to see in the Console are variables returned frome my production code inside my unit tests.


      DATA(resulting_table) = create_resulting_table( pernr = default_entry-pernr para = para 
                              resumeable_infotypes = default_resumeable_infotypes ).
      cl_demo_output=>display( resulting_table ).
      cl_abap_unit_assert=>assert_equals( exp = 8 act = lines( resulting_table ) ).


      Is there a way to display an entire itab while running the unit tests?

      I currently use a method which loops over the itab and asserts it to '' using the quit = no flag.but thats quite an ugly hack.