Hi Shaikh,
Try with below code...
DATA: ERR.
clear ERR.
loop at it_resb into wa_resb where matnr = i_mseg-matnr and erfmg GT i_mseg-erfmg .
if i_mseg-erfmg LT wa_resb-erfmg or i_mseg-erfmg < wa_resb-erfmg.
Err = 'X'.
Exit.
endif.
endloop.
If ERR 'X'.
message 'Quantity less then actual quantity can not be change' type 'E'.
ENDIF.
If still you are facing same problem, you can try with BADI - MB_CHECK_LINE_BADI.
Here you will get the parameters, what have got in ZXMBCU02.
Arivazhagan S