‎2010 Nov 30 7:53 AM
I am trying to flash the error message when inspection lot not found but it is not flashing the hard coded error message.
Then I tried to use function module MRM_ERRMSG_COLLECT and used the below code
CLEAR wa.
wa-MSGTY = sy-msgty." 'E'.
wa-MSGID = sy-msgid."'00'.
wa-MSGNO = sy-msgno."'001'.
wa-MSGV1 = 'QA acceptance is not made for the inspection lot'.
MSGV2 =
MSGV3 =
MSGV4 =
wa-SOURCE = 'P'.
wa-RBLGP = '000000'.
SHOWN =
APPEND wa to error_tab.
CALL FUNCTION 'MRM_ERRMSG_COLLECT'
EXPORTING
i_xcustom = 'X'
I_XCOLLECT = 'X'
i_msgid = wa-MSGID
i_msgty = wa-MSGty
i_msgno = wa-MSGno
I_MSGV1 =
I_MSGV2 =
I_MSGV3 =
I_MSGV4 =
I_SOURCE = ' '
I_RBLGP = 0
tables
t_errprot = error_tab
CHANGING
X_ERROR = ' '
In this case it isllowing the document to save.
Please help
‎2010 Nov 30 11:25 AM
Thasnks All,
I have found a solution to it.
We need to add the messages in FI message class.
and pass it in the exit like this.
MESSAGE id wa-MSGID TYPE wa-MSGty number wa-msgno .
change wa-msgno to the message number you have goven to your nes message