‎2009 Apr 10 8:16 AM
hi,
Problem:I'm writing FM for the material plant details on inputs material and plant.
if material is not valied and i need to show error messages
if material is not in plant then it shows relevent Error messages
i need to handle all possiable error messages.
Requirement:I need standard FM to handle any type of error messages that will eraise,
that i need to show.
could anyone tel me any standard FM to handle any type Error messages.
Thanks in Advance.
sivakumar
‎2009 Apr 14 10:53 AM
Hi siva,
In the past I have used the following function modules to handle multiple error messages;
1.
CALL FUNCTION 'MESSAGES_INITIALIZE' "To initialise the storage table
EXPORTING
collect_and_send = ' '
reset = 'X'
line_from = ' '
line_to = ' '
i_store_duplicates = ' '
check_on_commit = 'X'
i_reset_line = ' '.
2.
CALL FUNCTION 'MESSAGE_STORE' " Use to store each message one by one as they occur
EXPORTING
arbgb = p_msid
msgty = p_tipo
msgv1 = p_var1
msgv2 = p_var2
msgv3 = p_var3
msgv4 = p_var4
txtnr = p_txtnr
EXCEPTIONS
message_type_not_valid = 1
not_active = 2
OTHERS = 3.
3.
CALL FUNCTION 'MESSAGES_SHOW' " Use at the end to finally display the messages
EXPORTING
object = text-004
send_if_one = 'X'
i_use_grid = 'X'
EXCEPTIONS
inconsistent_range = 1
no_messages = 2
OTHERS = 3.
I hope this will help you.
Regards,
Simon