2005 Jul 15 10:30 AM
Hello!
Now I'll try to explain my situation.
I have report which generating two message errors:
MESSAGE E080(MM). "error N.1
MESSAGE S305(M3). "error N.2
Also, I have my own function module that submiting this report like this:
submit (REPNAME) with selection-table seltab
exporting list to memory
and return.
I'm using extended syntax(default exception ERROR_MESSAGE) of call function to catch message errors from submit:
call function FM
exceptions ERROR_MESSAGE.
if sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty " We have a message!
NUMBER sy-msgno
INTO msg_text.
write: 'Error', msg_txt.
endif.
After all of this, I can't really get what I want.
There are two problems:
1) The first error in report show me a report selection screen with error message of the type 'E' in a status bar, but I don't need this. Also, I caught this error with my FM and that is good.
2) The second error show me nothing, but I can't get the error message with my FM.
Can anybody help me with that?
2005 Jul 15 11:51 AM
Hi Vitaly,
and when you change your fm to submit report
in batch , so that you get all error in job log:
1) fm job_open
2) submit Z123...
USER 'XYZ'
with...
3) fm job_close
4) fm BP_JOBLOG_READ
regards Andreas
2005 Jul 15 10:53 AM
Hi,
If the report you have developed is a customized one then you can handle this problem very simply.
In your report when ever there is an error condition happens to occur then do populate it an internal table and before you come back export it to memory.
now in your FM import the same and check the contents of the internal table and if it is not initial then raise error_message exception.
now loop at the internal table outside the FM and display the message.
Regards,
Jagath.
2005 Jul 15 11:19 AM
Thank you for your suggestion, but this problem is not problem of one report. There are may be many no customized reports with different message errors and I have to catch all of them.
2005 Jul 15 11:51 AM
Hi Vitaly,
and when you change your fm to submit report
in batch , so that you get all error in job log:
1) fm job_open
2) submit Z123...
USER 'XYZ'
with...
3) fm job_close
4) fm BP_JOBLOG_READ
regards Andreas
2005 Jul 15 2:10 PM
to Andreas Mann
Thank you for your advise, but I still have one problem - everytime I get selection screen of the report with message error type 'E' even in the job mode.
2005 Jul 15 3:16 PM
As a continue for my last message:
I've tried to suppress report selection screen with error by next call:
submit (REPNAME) with selection-table seltab
to sap-spool
user 'USER_ND' via job 'SUBMIT_REPORT' number jc
and return.
USER_ND - is 'system' type of user, i.e. dialog-free user.
But I still have selection screen while 'E' error! What is it? What I'm doing wrong?
2005 Jul 15 11:53 AM
Hi,
If there are lot of places where in you might raise an error then it will be advisable to send a mail to SAP shared folder so that at each and every point where ever you raise error you can post a mail with a relevant message from the program being submitted.
Regards,
Jagath
2005 Jul 15 2:08 PM
to Jagathguru Chandrasekharan
You mean that I need to send mail every time I want to send an error in report? If so, I can't modify reports. I don't really know what report I will call next time.
2009 Nov 13 1:29 AM