Hi,
I need to write a user exit for MSO14S (Issue Requision), which checks catalogue if the material is flagged as 'hazarduos' and if yes, displays a warning message, allowing the user to proceed.
MSO14S.Cbl as for MIMS 4.1
I have inserted my user exit at the end of 3100 paragraph (display item warnings). My code does not work as expected, I have 2 problems:
1. after issuing my warning, the program exits without creating the requisition, ie it handles the warning as an error; my guess was that the "W" flag on the 'ER' error code would tell the program how to handle the event (a warning as opposed to an error) but this does not appear to be the case. Any ideas what I need to do?
2. my warning is issued 2 times even if there is only one item on the screen; if I have 2 items, the first stock code is displayed twice in the warning - no warning for the sencond item. any ideas?
MSO14S PROCEDURE/3100-DISPLAY-ITEM-WARNINGS/3100EXIT//B OPG14SP1
here is my OPG14SP1 code (nutshell):
IF MSF100-HAZARD-MAT NOT = SPACES
EXEC ERROR-SCREEN
MAP (MSM14SA)
FIELD (PART-NO1 (W30-SUB))
*** Using standard error code 3649 which only says 'Warning'
*** and adding our own text to the message:
ERROR (3649)
ERRMESS-EXTRA ('Hazarduos Material. See MSDS:',
PART-NO1I (W30-SUB) )
ERROR-GOTO (3100-EXIT)
END-EXEC
END-IF.
I need to write a user exit for MSO14S (Issue Requision), which checks catalogue if the material is flagged as 'hazarduos' and if yes, displays a warning message, allowing the user to proceed.
MSO14S.Cbl as for MIMS 4.1
I have inserted my user exit at the end of 3100 paragraph (display item warnings). My code does not work as expected, I have 2 problems:
1. after issuing my warning, the program exits without creating the requisition, ie it handles the warning as an error; my guess was that the "W" flag on the 'ER' error code would tell the program how to handle the event (a warning as opposed to an error) but this does not appear to be the case. Any ideas what I need to do?
2. my warning is issued 2 times even if there is only one item on the screen; if I have 2 items, the first stock code is displayed twice in the warning - no warning for the sencond item. any ideas?
MSO14S PROCEDURE/3100-DISPLAY-ITEM-WARNINGS/3100EXIT//B OPG14SP1
here is my OPG14SP1 code (nutshell):
IF MSF100-HAZARD-MAT NOT = SPACES
EXEC ERROR-SCREEN
MAP (MSM14SA)
FIELD (PART-NO1 (W30-SUB))
*** Using standard error code 3649 which only says 'Warning'
*** and adding our own text to the message:
ERROR (3649)
ERRMESS-EXTRA ('Hazarduos Material. See MSDS:',
PART-NO1I (W30-SUB) )
ERROR-GOTO (3100-EXIT)
END-EXEC
END-IF.