03-02-2008 4:41 PM
Hi,
I am calling a report with 'SUBMIT' statement... (Submit and Return), the called program has some error message ( MESSAGE e001 ....) and some write statement (WRITE 'Error' Exit. ) so the control is getting stopped there itself without coming back to calling program.
How can I get back the control to calling program even the called program has error in it???
Correct answers will be greatly appreciated!!
03-02-2008 5:36 PM
Hi Mouna,
there is no way to catch the error messages except from submit scheduling a job.
But you can get the List created using the addition
... EXPORTING LIST TO MEMORY
Effect
Does not display the output list of the called report, but saves it in ABAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT. You can process this list further with the function modules 'WRITE_LIST', 'DISPLAY_LIST' ... of the function group "SLST".
And, of course, still need AND RETURN.
If you want error messages, u have to use CALL TRANSACTION ... MESSAGES INTO itab.
Regards,
Clemens
05-11-2013 12:50 PM
Hi All,
Any body having any great idea..??
I got stucked here itself
Thanking You All.
05-11-2013 1:31 PM
Copy the Called program to another custom program and make changes in the error message and remove write statement.
This thread can help also:
http://scn.sap.com/message/2047299#2047299
-Satya
05-13-2013 12:32 PM
Hi Satyabrata,
Thanks for the help.
But I would not like to copy the program, maintenance will be nightmare then.....
Thanking You All.