Hello Lucille,
To complete my reply in terms of user-exit IEQM0003, I am giving the code to be put here, which produces the error message shown below when user flags an Equipment with DLFL and then tries to Save. Means he will not be able to set DLFL for an Equipment with ESTO status.
Error pop-up
The code to be put in the include ZXEQMU02
DATA: BEGIN OF I_STAT OCCURS 100. INCLUDE STRUCTURE BAPI_ITOB_STATUS. DATA:END OF I_STAT. DATA: BEGIN OF I_STAT1 OCCURS 100. INCLUDE STRUCTURE BAPI_ITOB_STATUS. DATA:END OF I_STAT1. CALL FUNCTION 'BAPI_EQUI_GETSTATUS' EXPORTING EQUIPMENT = DATA_EQUI-EQUNR TABLES SYSTEM_STATUS = I_STAT USER_STATUS = I_STAT1. I_STAT1[] = I_STAT[]. LOOP AT I_STAT. IF I_STAT-TEXT = 'DLFL'. LOOP AT I_STAT1. IF I_STAT1-TEXT = 'ESTO'. MESSAGE: 'Equipment with status ''ESTO'' can not be ''DLFL'' flagged.' TYPE 'E' DISPLAY LIKE 'I'. ENDIF. ENDLOOP. ENDIF. ENDLOOP.
KJogeswaraRao