The bell signal provides a bell sound upon receipt of an error message. In this section, you find information about how to set up the transmission from the SAP system side to the SAPConsole by any SAP screen.
...
1. Create inside the relevant screen a module inside the PBO, for example Module Bell_Signal.
PROCESS BEFORE OUTPUT.
MODULE BELL_SIGNAL.
* MODULE STATUS_SCREEN.
* MODULE SU_TEXT.
* MODULE DISABLE_PB_SAVE.
* MODULE SET_CURSOR.
PROCESS AFTER INPUT.
* MODULE EXIT_COMMANDS AT EXIT-COMMAND.
* FIELD OK_CODE MODULE USER_COMMANDS.
MODULE GET_CURSOR.
As you can see above in the demo, all other modules are marked with *
in order to emphasize the relevant module.
2. The Module should include the following code:
*&--------------------------------------------------*
& Module Bell_Signal OUTPUT
*&--------------------------------------------------*
* text
*---------------------------------------------------*
MODULE Bell_Signal OUTPUT.
DATA NOTIFY_BELL_SIGNAL(1) TYPE N.
NOTIFY_BELL_SIGNAL = '3'.
ENDMODULE. " Bell_Signal OUTPUT
The definition of the variable NOTIFY_BELL_SIGNAL is numeric with one position, which allows the programmer to enter values between 1-9 (the number of ”BEEP” sounds that you want to play). In this example, 3 has been assigned to the variable. This way you can send different numbers of bell signals and differentiate in the code between successes and errors.
You also need to define in the screen layout a field NOTIFY_BELL_SIGNAL
with the following characteristics:
○ Field length: one position.
○ Field format: NUMC.
○ The field is Output only.
○ The field is visible, although nothing will be shown on the run since the bell signal is captured on its way to the screen, and the "beep" sound is played instead by the SAPConsole.
In the following screenshot, you can see the last field in the screen, defined accordingly:
In the next screenshot, you can see the three different settings tabs for the relevant field: