Skip to Content

React to /n command in sapgui

Hi guys,

I'd like to do some clean-up if the user ends the program by entering a new transaction code in the command field of sapgui with /n. I though module XXX at exit-command would help but alas no the code didn't seem to execute when leaving the program by /n.

Is it possible to react to that at all?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 23, 2017 at 08:04 AM

    You can't. The program must be written such a way (using the concept of SAP LUW) that the dialog session may stop at any time without doing any harm.

    What is your original issue?

    Add comment
    10|10000 characters needed characters exceeded

  • May 23, 2017 at 10:54 AM

    /n is specifically there to immediately abort whatever session/transaction you're in. Do not communicate to the running app, do not pass go, do not collect $200, just quit.

    In other words, you should handle it in the same way as the possibility your user might drop the network connection, go to lunch, close SAPGUI, or just bluescreen.

    Add comment
    10|10000 characters needed characters exceeded

    • yes, there was some reuse in some obscure part of my own code which was corrupting memory references (it's a moderately complex thing with 2 different types of controls - the HTML container was the problem - in GUI application). It was complicated but basically SAP is doing everything right and just have to know a bit better what the GUI controls do. But apparently decades of experience will still not suffice.