Hi,
I want to throw a error in EXIT_SAPLCNAU_004 but stay in the tcode in edit mode withought saving. how do i achive this?
when user is trying to do NWA deletion flag set (DLFL) i want to stop user based on condtion. i have below line of code which is not working as expected.
IF SAP_ACTVT = '02'. "check if user is changing
select single * from AFVC into t_AFVC where OBJNR = SAP_AFVGD-objnr.
if sy-subrc = 0.
if t_AFVC-PRKST NE 0. "cost is not zero
SAP_X_ACTVT = ' '.
MESSAGE 'NWA can not be deleted. The Amount is not zero' TYPE 'E'.
else.
select single * from AFVV into t_AFVV where AUFPL = t_AFVC-AUFPL and APLZL = t_AFVC-APLZL.
if sy-subrc = 0.
if t_AFVV-ARBEI NE 0. "work is not zero.
SAP_X_ACTVT = ' '.
MESSAGE 'NWA can not be deleted. The Work is not zero' TYPE 'E'.
endif.
endif.
endif.
endif.
ENDIF