Application Development 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: 

Is it possible to create manually a dump?

Former Member
0 Kudos

Dear all,

I have a question about Dumps created in SAP while programs run with unpredicted errors.

I have a specific table defined in the dictionary which has two coloumns progId and path.

The first one is a unique identifier given to a program and the second column is an absolute path on the

unix server where SAP is installed.

For example


MyProg | /usr/tmpbatch/data/E200

Means that the ABAP program named 'MyProg' will run and its output file (the output of the program) and the

log file are created in /usr/tmpbatch/data/E200.

In each of my programs, first of all I check the content of this table in order to ensure that the path is defined for the

given program (and therefore I may be able to create avec success both output and log files). If there is no entry

in the table for the given program, I leave the program by calling the STOP instruction.

My programs run at night, so the next day the corresponding users read the content of the generated output/log files.

As a result, if the path is not defined properly for a given program in the table, the program is not run and therefore

there will be no output/logfile the next day.

My question is How can I inform the user who arrives the next day observing that one program has not been run? How

can I tell him by some kind of system message that the program exited because the path for the files had not been defined in

my table?

Each morning, we can analyse the dumps which were produced during the precedent day. So that we may know

(approximately) what went wrong. But as far as I know, dumps are generated automatically by the system. Is it possible

to generate a dump (by calling some fucntion) with an appropriate error message for my problem?

Thanks in advance,

Dariyoosh

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

If you really want to create dumps for such purpose, you could issue a MESSAGE of type X, which will lead to a short dump MESSAGE_TYPE_X that will also show the message text. Another way would be to use the statement ASSERT, which would create a dump ASSERTION_FAILED when the condition is false.

Check ABAP documentation for these statements.

But maybe there is a "softer" way to alert your users, like job logs, emails, ...

Thomas

5 REPLIES 5

ThomasZloch
Active Contributor
0 Kudos

If you really want to create dumps for such purpose, you could issue a MESSAGE of type X, which will lead to a short dump MESSAGE_TYPE_X that will also show the message text. Another way would be to use the statement ASSERT, which would create a dump ASSERTION_FAILED when the condition is false.

Check ABAP documentation for these statements.

But maybe there is a "softer" way to alert your users, like job logs, emails, ...

Thomas

0 Kudos

Hello again,

First of all I would like to thank everybody for their attention to my problem and

for spending time for answering my question. Thank you all very much.

Currently, Thomas' solution about MESSAGE_TYPE_X seems to work pretty well

for my problem. As all of you mentioned that, there should be softer methods to inform

users. One main problem is that the program which lanuches my programs during night

is not a sap user, it is a Unix scheduler (please forgive me I don't know these administration

details and how they work) so according to what the administrator told me it is not possible

to send email. As a result, I think I may go with MESSAGE_TYPE_X until I found another proper way.

Once again, thank you all for your help.

Kind Regards,

Dariyoosh

Former Member
0 Kudos

message A016(gr) with 'whatever text you want' should do it.... or select an appropriate message no and class, put the A in front and watch what happens..... but, as Thomas noted, a entry in the job log (at least prior to the dump) would be desirable.

brad_bohn
Active Contributor
0 Kudos

I don't understand WHY you would approach it that way. Dumps should be avoided, not forced, and dumps are not an 'error notification' system. They are provided to capture as much information as possible about an uncontrolled stoppage.

Don't you have a proper error notification system in place? Why don't you stop the job (or skip the procees in question and continue processing) and then send an email to the appropriate user or group with the details?

Edit: Ah, sorry Thomas, didn't see your entire post before replying...

Edited by: Brad Bohn on May 11, 2011 12:18 PM

Former Member
0 Kudos

hi

by my knowledge is that changes can be seen in the sy-repid in debuggung so that we can koe-wn the changes that are done