Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2740

All error message in the job log from the report executed in background

$
0
0

Hi All,

 

I execute the report in background with following code:

 

CALL FUNCTION 'JOB_OPEN'

     EXPORTING

       jobname  = l_jobname

     IMPORTING

       jobcount = l_jobcount.

 

SUBMIT z_my_report

       AND RETURN

       VIA JOB l_jobname NUMBER l_jobcount.

 

CALL FUNCTION 'JOB_CLOSE'

       EXPORTING

         jobcount  = l_jobcount

         jobname   = l_jobname

         strtimmed = abap_true.

 

The report of course issues a messages which appears in the job log. This is done with following code:

 

LOOP AT lt_message INTO ls_message.

   MESSAGE ID ls_message-msgty TYPE ls_message-msgty NUMBER ls_message-msgno

     WITH ls_message-msgv1 ls_message-msgv2 ls_message-msgv3 ls_message-msgv4.

ENDLOOP.

 

Once there is an error message, the report is finished with the status Canceled, which is expected.

 

The issues is that only the first error message appears in the job log (as the report is canceled). I would like to get all of the error message from the report in the job log. I can of course change the message type of the messages to 'I', but then the job will have status Finished, which is not intended.

 

Kind regards,

Radim


Viewing all articles
Browse latest Browse all 2740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>