cancel
Showing results for 
Search instead for 
Did you mean: 

SAP RF error screen logoff

volker_bock
Participant
0 Kudos

Hi,

I encounter a little problem. I set up an RF menu which consist partly of standard transactions like LM05 or LM50. On the other hand there are also custom functions. I created all HTML templates and published the services, so far it seemed ok. Screen look ok. But navigating through the functions or menu entries I had a weird phenomenon.

E.g. when I get an error message and leave it pressing "OK" in a standard transaction or if I press F3 in the entry screen of a standard transaction, then the system performs a complete logoff! I'd like to have that, when pressing F3 in the uppermost menu level, but nowhere else.

In my custom transactions it will work fine, as I do not use the standard error screen (If i would, I expect the same problems as with standard transactions); if I leave the entry screen using F3 it will return to the menu.

As I could see, the difference is:

  • the custom transactions end with "leave program" when I press F3
  • the standard transactions end (in form "BACK_TO_PROGRAM") with "leave to transaction MMENU", where MMENU = LM01.

Is there a possibility to make the error screen or the standard entry screen to perform a "leave program" instead of "leave to transactions" or do I do something wrong?

This is only when calling it as an ITS service in a web browser, in SAPGUI transactions work fine.

My service settings are:

on the logoff-tab I have entered a URL, consisting of the logoff-service combined with the service itself:

....logoff?erdirecturl = <my service>

In another system, where I use only custom transactions I use the very same service settings and it works fine. If you need more information, feel free to ask.

Thx in advance

Volker

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Volker,

Leave to transaction will trigger the kernel to terminated the session in case ~singletransaction is active. Normally I would not expect to have this parameter in an ITSMobile application because there is no navigation menu that the user can use to jump to other transactions. Even if he could there will be no templates and therefore he would get a dump about missing templates.

If you are on release >= 7.31 and you use the ICF logoff service to delete the http security cookie you don't need to specifiy the sever and port. Please change it to

/sap/public/bc/icf/logoff?redirecturl=/sap/bc/gui/sap/its/<yourService>

Regards,

Dieter

Answers (2)

Answers (2)

volker_bock
Participant
0 Kudos

Hello everybody,

now I will try to share the solution I found to my "requirements". I will not do it in too much detail, but I believe, it will still be understandable. Procedures may be adapted to find other / similar solutions.

  1. the "flaws", which I did not like were (as described above):
    1. pressing F3 on top level menu leads to the Logon Screen (Transaction LM00), which may be confusing for some users
      --> I'd prefer an immediate logout here
    2. pressing F8 anywhere in the menu leads to a logout confirmation screen ("Unsaved data will be lost ..."). This screen (SAPLSPO1 0100) is not a genuine RF screen and has no F-Key mapping also
      --> I'd also prefer an immediate logout here

As I use a mix of standard and custom transactions in my service, an important setting in the SICF-Service is to have ~SINGLETRANSACTION deactivated, which allows the correct return from standard RF transactions by "leave to transaction"; my own transactions do a "leave program". Necessary also is a custom JS-File processed by ~ITSMOBILEJSINCLUDE = <myfile> in SICF GUI Parameters.

What did I do:

I acvtivated Userexit MWMRF888. On the one hand I had then the chance to change the layout. More important: I put an output field G_PREV_MENU on the menu screens, which was populated with the value from parameter ID "PREV_MENU". The field was then hidden in the HTML template by changing the output width of this field to zero:               

`style="`width("15", "12.300em"); align("G_PREV_MENU", 1); style("G_PREV_MENU", 1)`" `
`style="`width("15", "0.000em"); align("G_PREV_MENU", 1); style("G_PREV_MENU", 1)`" `
if ( 'G_PREV_MENU'[1].highlighted == "X" )
    `class="MobileEditHighlightedDisabled `class("G_PREV_MENU", 1)`" `
else;
     `class="MobileEditDisabled `class("G_PREV_MENU", 1)`" `
end;

at another part of the HTML coding I replaced the original coding for handling the F8 button being pressed (--> immediate logout):

...

else
    `onclick="setOkCode('`'ZVZ_TIPPE_RLMOB-PMLGF'[1].okcode`');" `
    `onclick="setOkCode('/nex');" `
end;

...


Also, in PBO coding, if being in the top level menu, the F3 is hidden (to prevent it from being pressed):

IF g_prev_menu = 'MAIN00'.
   IF screen-name = 'ZVZ_TIPPE_RLMOB-PBACK'.
        screen-invisible = 1.
        screen-active    = 0.
        MODIFY SCREEN.
    ENDIF.
ENDIF.

Then I copied the file MOBILE.JS from the service ITSMOBILE to my own service and renamed it. in the function "function processKeyEvent(event)"  I inserted a part, which controls the F-Keys F3 and F8 depending on the value of G_PREV_MENU:

...

  else if ( (event.keyCode >= 112) && (event.keyCode <= 123) )
  {
    if ( event.shiftKey == true )
    {
      /* F13 to F24 */
      setFKey(event.keyCode - 111 + 12);
      eventdone = true;
    }
    else
    {
/*  ----------------------------- begin insert ------------------------------------------- */
      /* Logoff via F8, only in menu screens (g_prev_menu must be defined) */
      if ( (event.keyCode == 119) &&
           ( typeof(document.forms["mobileform"]["g_prev_menu[1]"]) != "undefined" )
         )
      {
      setOkCode("/nex");
      eventdone = true;
      }
      /* Logoff via F3, only in top level menu */
      else if ( ( typeof(document.forms["mobileform"]["g_prev_menu[1]"]) != "undefined" )  &&
                (event.keyCode == 114) &&
                ( (document.forms["mobileform"]["g_prev_menu[1]"].value == "MAIN00") )
              )
      {
      setOkCode("/nex");
      eventdone = true;
      }
      else
      {
      /* F1 to F12, in other cases */
      setFKey(event.keyCode - 111);
      eventdone = true;
      }
/*  ----------------------------- end insert ----------------------------------------- */
    }
  }
  else if (event.keyCode == 33)

...

I know, it looks a bit complicated, but once its done ... it works. I learnt much finding that solution :-).

Volker

volker_bock
Participant
0 Kudos

Hi all,

I found out, that if the parameter "~SINGLETRANSACTION" is the problem, see also

http://scn.sap.com/thread/1878054

which I found through a google search with this keyword .

Removing this parameter stops the logout after F3 or after error messages.

But I have 2 additional questions then:

  • Pressing F3 in the uppermost main menu level leads to:

    Confirmation with "OK" logs out the user finally. Can I get rid of that intermediate screen (may be with custom Menu screens?)
    this is only, if the user is logged on in another session
  • pressing F3 having no other logons active leads to:
  • Pressing F8 in the menu screen leads to screen SAPLSPO1 0100 (for which I also had created an HTML template):

    which does not really fit to my screen format. Can I suppress this message or modify the screen?

Additional questions:

  1. I found out how to change the F8 popup from SAPLSPO1 0100 (I copied the screen into a Z-Program, changed the format to 20x16, created a "dummy" HTML template from it and overwrote the original SAPLSPO1 0100 HTML with the "Dummy" HTML code).
    BUT: is there a possibility to suppress this popup completely without a modification or copying the complete RLMENU code to a ZRLMENU?
  2. Is there a possibility to suppress the jump to LM00 (logon parameters) when pressing F3 (see bullet point 2) and to logout instead?
  3. Any OSS hints out there for those 2 questions?

Thx again

Volker

Message was edited by: Volker Bock bullet point 2 was inserted

Message was edited by: Volker Bock: Additional questions were added at the end