Wednesday, June 11, 2014

Selection screens and error - Message DB655 - Place the cursor on a selection

Let me present to you small issue concerning behavior of Selection screens. Hopefully it could saves a time to some one else.

Sometime is necessary to use custom toolbar with icons in connection with Selection screens. OK, it's no problem. Just introduce within your program your own custom GUI status and link it in PBO like shown below.

AT SELECTION-SCREEN OUTPUT.

  " set your PF status
  DATA lt_exclude TYPE STANDARD TABLE OF rsexfcode.
  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  'BEC'
    TABLES
      p_exclude lt_exclude.



Everything is fine and works well except one small thing. Error message declared in a standard way starts to cause troubles.

        MESSAGE e000 WITH text-008.





Yes, error is displayed in proper place in proper time as expected. But in this case if you are not willing to change content of e.g. select option or parameter and you want to just leave transaction by icon in top menu, you are no longer allowed. Every click or key press you have to face another new error standard message "Place the cursor on a selection". There is almost no escape from this for end user!

For me small workaround worked. I changed declaration of error messages into this format:

        MESSAGE s000 WITH text-008 DISPLAY LIKE 'E'.
        EXIT.


Miracle is done, everything works now.

Do you know about any other solution how to prevent disconnection from GUI status functionality by such error message?