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: 

Submit: Error messages within called program

Former Member
0 Kudos

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!!

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi All,

Any body having any great idea..??

I got stucked here itself

Thanking You All.

satyabrata_sahoo3
Contributor
0 Kudos

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

0 Kudos

Hi Satyabrata,

Thanks for the help.

But I would not like to copy the program, maintenance will be nightmare then.....

Thanking You All.