‎2009 Jul 07 10:55 AM
Hi experts,
I am calling a report from a function module using the statement "submit report1 and return".
Is it possible for the report not to return control to the function module ?
i.e. all statements below code "submit report1 and return" willl not be executed.
Then how do i capture errors generated in the report from the function module ?
Best Regards,
Daniel
‎2009 Jul 07 11:01 AM
Hi,
Yes you simply use SUBMIT report withouth any addition. It will then not return from calling program.
Where do you want to handle your errors in this case? If calling program ends up, there is no return. You need to take care of errors either in the program or leave the addtion and return and handle them in FM.
Regards
Marcin
‎2009 Jul 07 11:05 AM
remove the returm from submit statement.
****
To capture errors.
build the errors into a itab.
then use
EXPORT it_err TO MEMORY ID 'TD' .
in the program where u want get the errors use
IMPORT IT_ERR FROM MEMORY ID 'TD' .
‎2009 Jul 07 11:14 AM
Hi,
This is very simple......Dont use RETURN wih the submit......this wont return to the FM.
Moreover for handling the errors either handle in the Report itself as you are not returning to the FM or witht he Return handle in either place.
Pooja