Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Empty System Fields after error creates a short dump

Former Member
0 Likes
942

Hello!

Could someone please help me?

After calling a function, I catch errors with sy-subrc NE 0.

Handling this error the "normal" way throws a short dump (I marked the row bold), because all the system fields are empty!

Could someone please give me a hint, how to handle this situation?

Many thanx in advance!

Perhaps some code:

CALL FUNCTION 'Z_CONFIRM'

EXPORTING

is_bdnum = is_bed-bdnum

TABLES

et_return = lt_return

EXCEPTIONS

error_occured = 1

lock_error = 2

OTHERS = 3.

IF sy-subrc NE 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

I get a short dump with this:

Content of the system fields

-


Name

Wert

-


SY-SUBRC

1

SY-INDEX

1

SY-TABIX

1

SY-DBCNT

0

SY-FDPOS

0

SY-LSIND

0

SY-PAGNO

0

SY-LINNO

1

SY-COLNO

1

SY-PFKEY

SY-UCOMM

SY-TITLE

HTTP-Steuerung

SY-MSGTY

SY-MSGID

SY-MSGNO

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4

SY-MODNO

0

SY-DATUM

20080117

SY-UZEIT

080907

SY-XPROG

SY-XFORM

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
634

Hi,

You need to capture the message like this way


IF sy-subrc eq 1.
   message e999(your mesage class) with 'Error Occured'.
endif.
IF sy-subrc eq 2.
   message e999(your mesage class) with 'Lock error'.
endif.
IF sy-subrc eq 3.
   message e999(your mesage class) with 'Other Errors'.
endif.

a®

5 REPLIES 5
Read only

Former Member
0 Likes
634

Hi,

Catch the errors with sy-subrc NE 0.

Thanks,

Sriram Ponna.

Read only

0 Likes
634

Thanks, but I catch it with NE 0.

Read only

Former Member
0 Likes
634

Hello,

I think you are not raising the exception.

If any error occured inseide ur FM. U need to raise the exception like this.

RAISE lock_error.

This will avoid the dump.

Thanks !!!

Vasanth

Read only

former_member194669
Active Contributor
0 Likes
635

Hi,

You need to capture the message like this way


IF sy-subrc eq 1.
   message e999(your mesage class) with 'Error Occured'.
endif.
IF sy-subrc eq 2.
   message e999(your mesage class) with 'Lock error'.
endif.
IF sy-subrc eq 3.
   message e999(your mesage class) with 'Other Errors'.
endif.

a®

Read only

0 Likes
634

Excellent. Sometimes I need a little hint.

Many thanks and best regards.