Hi,
i need some help plz,
i'm working in a user exit for transaction va41, the goal is to right an error message if the user tries to create more than one OTP element in the same Order of sale. Here is my program:
DATA : BEGIN OF EOTP OCCURS 0,
OTP TYPE vbap-PS_PSP_PNR,
END OF EOTP.
DATA : BEGIN OF NOTP OCCURS 0,
OTP TYPE vbap-PS_PSP_PNR,
END OF NOTP.
LOOP AT xvbap.
APPEND xvbap-PS_PSP_PNR TO EOTP.
APPEND xvbap-PS_PSP_PNR TO NOTP.
delete ADJACENT DUPLICATES FROM notp.
describe table eotp lines no_lines.
describe table notp lines n_lines.
if no_lines <> n_lines.
MESSAGE W011(zmap) DISPLAY LIKE 'W'.
endif.
The problem is: when it writes the error message in the va41, it throws me out of the transaction.
How can i avoid that? i would like to be able to change the OTP without having to set again the order of sale.
thanks,