Skip to Content
0
Former Member
Sep 19, 2006 at 06:57 AM

error catch of a function module exception in a method

74 Views

Hello,

how do you catch the error of a function module that is called from within a method. Presently the process terminates in case of an exceptions. Sy-subrc seems also not to work.

E.G.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

client = sy-mandt

date = SOURCE_FIELDS-xxx

foreign_amount = SOURCE_FIELDS-xxx

foreign_currency = SOURCE_FIELDS-xxx

local_currency = SOURCE_FIELDS-xxx

IMPORTING

local_amount = RESULT

  • EXCEPTIONS

  • NO_RATE_FOUND = 1

  • OVERFLOW = 2

  • NO_FACTORS_FOUND = 3

  • NO_SPREAD_FOUND = 4

  • DERIVED_2_TIMES = 5

  • OTHERS = 6.