Hi Vinay,
Can you please try this code instead of normal error message display. And confirm if it is allowing you to edit fields after error message.
Replace
MESSAGE: 'You can not create Orders on Equipment types other than ''U''' TYPE 'E' DISPLAY LIKE'I'.
with below code:
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = 'Change Equipment types'
TXT1 = 'You can not create Orders on Equipment types other than ''U''.'
TXT2 = ' '.
SET PARAMETER ID 'AAI' FIELD CAUFVD-AUART.
SET PARAMETER ID 'PRIOK' FIELD CAUFVD-PRIOK.
SET PARAMETER ID 'IFL' FIELD CAUFVD-TPLNR.
SET PARAMETER ID 'EQN' FIELD CAUFVD-EQUNR.
SET PARAMETER ID 'MAT' FIELD CAUFVD-BAUTL.
SET PARAMETER ID 'IWK' FIELD CAUFVD-IWERK.
SET PARAMETER ID 'GSB' FIELD CAUFVD-GSBER.
*if you are gonna use reference order, then get it using GET or FM 'DYNP_VALUES_READ'
DATA: L_REFNR TYPE RC62C-REFNR.
GET PARAMETER ID 'ANV' FIELD L_REFNR.
SET PARAMETER ID 'ANV' FIELD L_REFNR.
CALL TRANSACTION 'IW31'.