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

Short Dump

Former Member
0 Likes
997

Hi Gurus,

I want to give one message before the program is going to dump. How to give the message before it is going to short dump.

Points will be awarded

Thanks

Ravi

7 REPLIES 7
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
956

Hi

The only way is : Go for debug mode and finf out where the program is going for dump and due to which statement/routine it's going for dump.

Place your message before that statement/routine encountered.

Regards,

Sree

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
956

Hi,

THe DUMP is something that is provided to you by ABAP runtime.

If you are say creating a DUMP with your code and know which part of code is going to dump you can make use of the MESSAGE statement which requires user action like an INFO messsage, message type 'I'. Then once the user interacts with the message you will get the dump.

Regards,

Sesh

Read only

Former Member
0 Likes
956

Hello,

Use the code

CHECK sy-subrc eq 0

and write the rest of the code.

Reward if found helpfull.

Rakesh.

Read only

Former Member
0 Likes
956

Hi Ravi,

May be one thing is possible - but not the perfect answer.

Use Try- Catch Statement to catch the error and then give your message.

Refer this -

http://help.sap.com/saphelp_nw04/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm

Reward if useful!

Read only

Former Member
0 Likes
956

hi Ravi

u can catch the exception to avoid short dupm aor give the message.

Exception will not lead to short dump

and if u mak use of Error Message then short dump wont be dispalyed

try the following code

data: obj type ref to <exception>,

text type string.

try.

code...

if sy-surc ne 0.

Message '001' (message class) raising <exception>.

endif.

catch <exception> into obj.

text = obj ->get_text( ).

write 😕 text.

endtry.

regards

ravish

<b>plz dont forget to reward points if helpful</b>

Read only

Former Member
0 Likes
956

Hi !

You can user the pretty good ST22 to analyze the dump.

Just start it and double-click on you dump.

Then press the "ABAP-Editor" button. The ST22 will then jump to the code that caused the dump.

Hope that helped a bit.... Reward points would be nice.

Read only

Former Member
0 Likes
956

hI,

Plz check the areas you having doubt tht this block will throw error...Try to put an error message by checking the condition...

REWARD IF USEFUL