Skip to Content
0
Former Member
Jul 24, 2007 at 03:15 AM

Exception message from FM

1568 Views

Hi all,

In my Function Module under Exception i defined Exception E01 and raise exception when there is no row found using SY-SUBRC.

And in my report i want to show error text.

CALL FUNCTION 'Z_FM_TEST1'

EXPORTING

MAT_TYPE = MAT_TYPE

TABLES

TAB_MARA = MARATABLE

EXCEPTIONS

E01 = 1

OTHERS = 2

.

IF SY-SUBRC = 1.

MESSAGE e0001(E01).

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

How to do it

Sachin