2018 Jan 11 7:40 PM
Dear Gurus,
I need to populate few error messages in table format as Pop Up window on a custom screen based on few fields input. The best form of display I opted for is 'BAL_DSP_LOG_DISPLAY' since other FMs like 'C14Z_MESSAGES_SHOW_AS_POPUP' had spacing issue and kind of weird display.
But my issue is, when I call the FM 'BAL_DSP_LOG_DISPLAY' in PAI event, I see messages are getting duplicated on every call of the PAI event. The Pop up will appear multiple times unless are the errors are rectified in the screen and when this happens I see lot of duplicate records in the popup. Any idea of how to clear the old logs or some sort of refresh options. I tried 'BAL_LOG_MSG_DELETE' but I get the exception Log not found. Any help.
Thanks.

2018 Jan 11 8:30 PM
Please verify if you cal Clear some / All LogMsg via any of the Following FM's :
Personally I would opt for the use of FM "FB_MESSAGES_DISPLAY_POPUP" because you can use a "BAPIRET2"-Table to gather your Messages, possibly sort / delete for Duplicates, and then Show the Results via the FM. Also, any SystemMsg ('SY-MSGNO' / 'SY-MSGTY') can Easily be added to your "BAPIRET2"-Table via FM "ALM_ME_MESSAGE_TO_RETURN" ...
"Fetch any SY-SUBRC Msg or MESSAGE ... into BAPIRET2-Table ...
MESSAGE e005(00) INTO DATA(msg).
CALL FUNCTION 'ALM_ME_MESSAGE_TO_RETURN'
TABLES
return = bapiret2table[].
IF bapiret2table[] IS NOT INITIAL.
"Call Popup
CALL FUNCTION 'FB_MESSAGES_DISPLAY_POPUP'
EXPORTING
* IT_SMESG = IT_SMESG
* ID_SMESG_ZEILE = ID_SMESG_ZEILE
it_return = bapiret2table[]
* ID_SEND_IF_ONE = ID_SEND_IF_ONE
EXCEPTIONS
no_messages = 1
popup_cancelled = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
2018 Jan 12 4:11 AM
Hi Nic, Thanks for replying. I tried with this FM as well. But the popup looks weird. Please refer the screenshot. Many of the Popups have the same issue. For long messages, they are truncated for display and full message is not seen. Its not even of Grid type of display so that you can scroll and see the rest of the message.

2018 Jan 12 4:26 AM
Thanks Nic, the issue got resolved after using FM 'BAL_LOG_REFRESH'.
2018 Jan 12 7:40 AM