Skip to Content

Duplicate records using FM 'BAL_DSP_LOG_DISPLAY' in PAI

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.


capture1.jpg (116.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • 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).
        return = bapiret2table[].
    IF bapiret2table[] IS NOT INITIAL.
      "Call Popup
    *     IT_SMESG        = IT_SMESG
          it_return       = bapiret2table[]
          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.
  • 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.

    capture2.jpg (56.1 kB)
  • Get RSS Feed

1 Answer

  • Jan 12, 2018 at 04:26 AM

    Thanks Nic, the issue got resolved after using FM 'BAL_LOG_REFRESH'.

    Add comment
    10|10000 characters needed characters exceeded