‎2008 Jan 17 7:28 AM
Hi all,
I am executing a report in background mode and based on some conditions i need to show an error log to the user.
My code looks like following -
if pa_upda = 'X'. " If report running in background mode
loop at t_final into w_final.
CALL METHOD CL_EMMA_CASE_FUNCTIONS=>CANCEL_NO_DIALOG
EXPORTING
IV_CASENR = w_final-casenr
IV_CURRPROC = SY-UNAME
IV_CANCODE = c_canccode
IV_TESTRUN = ' '
EXCEPTIONS
CANCEL_FAILED = 1
others = 2.
*logic to show the log
IF SY-SUBRC <> 0.
case sy-subrc.
when '1'.
w_final-message = text-002.
write:/ w_final-casenr,20 w_final-anlage,40 w_final-message.
when '2'.
w_final-message = text-003.
write:/ w_final-casenr,20 w_final-anlage,40 w_final-message.
endcase.
endif.
clear w_final.
endloop.
else.
But when i go to SM37 and see the job log i am not able to see the contents of my write statement.Can anyone help me out with these or suggest me some alternate solution..
Regards,
Arun
Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:31 PM
‎2008 Jan 17 7:30 AM
Hi,
There will a list button on the application custom tool bar then u can see ur write statements on the list in se37.
<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Jan 8, 2009 4:32 PM
‎2008 Jan 17 7:32 AM
Hi Arun,
If you want to show your messages in the job log you have to use the MESSAGE statement. In case you use WRITE statements an output list be created which can be found in the spool (there is an icon to go to the spool directly).
Regards,
John.
‎2009 Jan 08 9:23 PM