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

Capture shortdump

0 Likes
1,501

Please help me.

My source code is bolow.

DATA: l_amt TYPE komv-kbetr,

l_amt1(16) TYPE p DECIMALS 2,

g_amt TYPE komv-kbetr,

g_amt1(16) TYPE p DECIMALS 2.

CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 5.

l_amt = l_amt1 + '123456.12' * 10.

g_amt = g_amt1 + '123456789.12' * 10.

ENDCATCH.

IF sy-subrc EQ 5.

message s000(38) 'OverFlow'.

ENDIF.

How do I know which line is shortdump? Which function module or Method to identify?

Thank you.

17 REPLIES 17
Read only

alex_m
Active Contributor
0 Likes
1,468

Use ST22 and analys your dump.

Read only

0 Likes
1,468

I would like to capture at program runtime, No need to see at ST22.

Read only

Former Member
0 Likes
1,468

Just after U get the DUMP press the Debugging button U'll go to the debugging screen

where in U can even look at the values for the fields .. It is nothing but debug

screen ..

Read only

0 Likes
1,468

I do not need to shortdump, I need to identify which statement is shortdump only.

Read only

Former Member
0 Likes
1,468
Remove the quotes for the amounts and chekout if it works

l_amt = l_amt1 + 123456.12 * 10.
g_amt = g_amt1 + 123456789.12'* 10.
Read only

Former Member
0 Likes
1,468

To find out the line where the dump occured try debugging each line , and you can get the line where the dump occured

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,468

Hi,

The short dump you getting will tell you which line is the problem.Just go thro' the dump.It will put a arrow mark in that line.

Read only

0 Likes
1,468

I would like to capture at program runtime, No need to see at ST22.

Read only

Former Member
0 Likes
1,468

Hi,

first u have an erron in the message line... u hv missed with

message s000(38) with 'OverFlow'.

Read only

0 Likes
1,468

OK .

Revise again

DATA: l_amt TYPE komv-kbetr,

l_amt1(16) TYPE p DECIMALS 2,

g_amt TYPE komv-kbetr,

g_amt1(16) TYPE p DECIMALS 2.

CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 5.

l_amt = l_amt1 + '123456.12' * 10.

g_amt = g_amt1 + '123456789.12' * 10.

ENDCATCH.

IF sy-subrc EQ 5.

message s000(38) with 'OverFlow'.

ENDIF.

Read only

Former Member
0 Likes
1,468

actually the following line creates short dump.....

g_amt = g_amt1 + '123456789.12' * 10.

Read only

0 Likes
1,468

OK.

I would like to use function or method to identify.

Read only

Former Member
0 Likes
1,468

Hi,

Go to ST22 and select your user name double click on it and press F6.

There double click on no 7 there you will find at which line error happend

Pls.ark if useful

Read only

0 Likes
1,468

This method is ok.

But I would like to indenfy on program , Not need to see ST22.

Read only

0 Likes
1,468

I cannot say whether the piece of code what U wrote will give short dump

But the below statement will definitely give a short dump.

DIVIDE_By_ZERO error

B = 0.

C = A / B.

Read only

0 Likes
1,468

My source code is not shortdump, Because I insert statement CATCH ... ENDCATCH.

I do not need to shortdump, Which statement it's make sy-subrc = 5.