Skip to Content
0
Jan 19, 2012 at 05:46 AM

Catching error messages triggered within a FORM subroutine

674 Views

Hello,

I've got a problem where:

a workflow task calls..

a Z BOR method, which calls

a Z function module ZREVERSE_WRITEOFFS, which calls

a SAP function module FKK_REVERSE_DOC, which calls

a SAP subroutine (FORM), which raises an error message:

MESSAGE E067 WITH I_ENQTAB-UNAME. "Account or business partner blocked by &1

My problem is this: once the error message is raised, the top-level BOR method

exits immediately with an error, and returns control to the workflow.

This means I don't get a chance to mark the error as 'temporary', so that the

workflow can retry it automatically.

My call to ZREVERSE_WRITEOFFS specifies exceptions (including 'OTHERS'), so

I was expecting any miscellaneous errors to be trapped there.

Is there a better approach?

thanks

Paul Bakker

    CALL FUNCTION 'ZREVERSE_WRITEOFFS'
      EXPORTING
        IV_FBNUM = LV_FBNUM
        IV_TEST = ' '
      IMPORTING
        ET_MESSAGE = lt_messages
    EXCEPTIONS
      NOTHING_TO_REVERSE = 9100
      NO_REC_KEY_FOUND = 9003
      INVALID_FBNUM = 9001
      REVERSAL_FAILED = 9005
      OTHERS = 05.