Hello community,
I have a question: How is it possible to get specific error messages after an BOPF operation?
In my case I modify data and I want to get only the lock error messages, I mean the errors which arise if the record is locked.
Here my code snippet:
CALL METHOD mo_servman->modify
EXPORTING
it_modification = lt_changes
IMPORTING
eo_change = lr_changesmade
eo_message = lr_errormsg.
IF lr_errormsg IS BOUND.
lr_errormsg->get_messages( IMPORTING et_message = lt_errormsg ).
IF lt_errormsg IS NOT INITIAL.
LOOP AT lt_errormsg ASSIGNING <ls_errormsg>.
ENDLOOP.
ENDIF.
ENDIF.
Thanks for tips and hints.
Cheers
Stefan