2023 Jul 21 10:06 AM
Hello SAP and abap experts, could anybody answer have i am an opportunity to display only messages W and E, and hide S(green) messages while to pass some parameter to function, like this when user push button with green massages and they being hiding.
I found parameter i_s_msg_filter but when i pass excluding 'S' messages, user dont have opportunity to display green messages.
How can i solve this problem?
2023 Jul 21 10:37 AM
Reading the FM documentation can be useful:
Try like this:
DATA: s_msg_filter TYPE BAL_S_MFIL.
s_msg_filter-msgty = value bal_r_msty( sign = 'I' option = 'EQ' ( low = 'E' ) ( low = 'W' ) ).
2023 Jul 21 11:30 AM
Thank you
Thorsten Kolz, of course, I read the documentation, and in the first message I wrote that I tried to pass the message type S to the BAL_S_MFIL type parameter in order to exclude them from the display, and it does not matter whether I exclude the S message type or include W and E in the display.
As result user don't have opportunity to display messages S (green),
But i exactly know, that messages exists, and understand that filter remove it from display at all, but i need to have this messages.
In other words, I need to emulate the user pressing a button to turn off the green messages, and leave only the red and yellow ones.
2023 Jul 21 11:34 AM
Or maybe there is a way to enable the ability to save the display format and, when calling FM, transmit the format with green messages turned off
2023 Jul 21 1:49 PM
Maybe it also helps to not show the messages at the beginning:
DATA:
l_s_display_profile TYPE bal_s_prof.
* get variant which creates hierarchy according to field DETLEVEL
CALL FUNCTION 'BAL_DSP_PROFILE_DETLEVEL_GET'
IMPORTING
e_s_display_profile = l_s_display_profile
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
l_s_display_profile-show_all = abap_false.
You can also have a look at the SBAL_DEMO_* reports.