Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function module for Error list display

0 Kudos

Hi Experts ,

I have a table for error list , that have two fields 'msgtyp' and 'text'.and this is filled with msgtyp and text .

now in my module pool when user clickes the error list button then this table values should be displyed in the popub box .

there should be a function module which will take my internal tab and will display the values in the popup box .

but i m not able to find out that which Function Module will work ??

plz help me and suggest any solution..

Thanks in advance..

6 REPLIES 6

Former Member
0 Kudos

Hi,

There are standard functions for storing and displaying messages like this, look at the following example code.

call function 'MESSAGES_INITIALIZE'.

  loop at it_bapiret2 into ls_msg.
    call function 'MESSAGE_STORE'
      exporting
        arbgb                  = ls_msg-id
        msgty                  = ls_msg-type
        msgv1                  = ls_msg-message_v1
        msgv2                  = ls_msg-message_v2
        msgv3                  = ls_msg-message_v3
        msgv4                  = ls_msg-message_v4
        txtnr                  = ls_msg-number
      exceptions
        message_type_not_valid = 1
        not_active             = 2
        others                 = 3.
  endloop.

  call function 'MESSAGES_STOP'
    exceptions
      a_message = 1
      e_message = 2
      i_message = 3
      w_message = 4
      others    = 5.

  call function 'MESSAGES_SHOW'
    exporting
      show_linno         = ' '
    exceptions
      inconsistent_range = 1
      no_messages        = 2
      others             = 3.

Darren

Former Member
0 Kudos

hi,

try using FM POPUP_WITH_TABLE_DISPLAY

or POPUP_FOR_INFORMATION, POPUP_TO_DISPLAY_VALUE,

POPUP_WITH_TABLE.

Regards,

Amit

0 Kudos

Hi Amit ,

thanks for ur reply but these FM are not working

i have to display the error msges like ,

msg typ text

E erroneous UOM

E dhshdkh

suggest me if u have any other solution

0 Kudos

Hi swati,

My idea wud be to create a subscreen or dialog module , fetch the relevant data from ur 'z' table wrt msg id & type, and display them in ur subscreen in the form of classical report or ALV.

Regards,

Amit

0 Kudos

Hi,

The functions I mentioned above will do what you want, paste in the following code to see how they work..

report  zmsg_test.

data: begin of itab occurs 10,
        msgty type msgty,
        msg   type msgv1,
      end of itab.

data: gv_msgid type arbgb value 'FR'.

start-of-selection.

  call function 'MESSAGES_INITIALIZE'.

  itab-msgty = 'S'.
  itab-msg = 'Test message Success'.
  append itab.
  itab-msgty = 'E'.
  itab-msg = 'Test message Error'.
  append itab.
  itab-msgty = 'I'.
  itab-msg = 'Test message Info'.
  append itab.

  loop at itab.
    call function 'MESSAGE_STORE'
      exporting
        arbgb                  = gv_msgid
        msgty                  = itab-msgty
        msgv1                  = itab-msg
        txtnr                  = '600'
      exceptions
        message_type_not_valid = 1
        not_active             = 2
        others                 = 3.
  endloop.

  call function 'MESSAGES_STOP'
    exceptions
      a_message = 1
      e_message = 2
      i_message = 3
      w_message = 4
      others    = 5.

  call function 'MESSAGES_SHOW'
    exporting
      show_linno         = ' '
    exceptions
      inconsistent_range = 1
      no_messages        = 2
      others             = 3.

Regards,

Darren

Former Member
0 Kudos

Can we use the FM C_POPUP_WITH_TABLE in backround jobs?

Will it create a spool list which we can see it later?