cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Error in user exit and stay on the tcode in edit mode

Former Member
0 Kudos


Hi,

I want to throw a error in EXIT_SAPLCNAU_004  but stay in the tcode in edit mode. 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.
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.
SAP_X_ACTVT
= ' '.
MESSAGE 'NWA can not be deleted. The Work is not zero' TYPE 'E'.
endif.
endif.
endif.
endif.
ENDIF

.

Accepted Solutions (1)

Accepted Solutions (1)

MTerence
Active Contributor
0 Kudos

Hi Prema,

I guess you can post similar in Abap community.

This is technically possible, i am not a technical consultant to provide an exact resolution.

Thanks

Terence

Answers (1)

Answers (1)

varshal_kachole3
Active Contributor
0 Kudos

Hi,

Please check if Change Profile Configuration (Transaction OPSG) fullfil your requirement without having to code the validation.

Hope it Helps!

Thanks and Regards,

Varshal Kachole