‎2014 Aug 12 9:33 AM
Hi Colleague,
I created a batch job via t-code sm36 in SAP GUI, and added a report to this batch job, there is no problem to run this report directly, but fails to run the batch job. How can I do debugging for this batch job?
Kind Regards
Andie
‎2014 Aug 12 9:52 AM
‎2014 Aug 12 9:42 AM
Hi,
if you rin the programm directly its executed in foreground. When scheduling a batch job, its executed in background. This may cause the problem.
you can catch the batch-job in transaction SM50 / SM51 and jump into debugger.
regards
Stefan Seeburger
‎2014 Aug 12 9:42 AM
There are a number of ways to do this:
1. select active job in sm37.
2. type "jdbg" command in command field.
No need to type /n or /o .
3. Double click the job , it will go in debug mode.
OR
1. Go to sm50 .
2. place the cursor on active job.
3. goto program mode> Debugging
‎2014 Aug 12 9:52 AM
‎2014 Aug 12 11:29 AM
Hi Arun VS,
Now I can do debugging, when I invoke the following standard function module, there is a dialog box popped up for doing security check. How can I prevent it from being popped up in a batch job?
............................................................
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_full_path
filetype = 'ASC'
codepage = lv_codepage
write_bom = ip_bom
IMPORTING
filelength = lv_file_length
TABLES
data_tab = gt_xml
EXCEPTIONS
file_write_error = 1
no_batch = 2
............................................................
Kind Regards
Andie
‎2014 Aug 12 11:40 AM
Hi,
GUI-DOWNLOAD not working in background. Search forum, for further information.
If u need to do it in background, 1 way is to change the programm and read from appication server.
regards
Stefan Seeburger
‎2014 Aug 12 11:44 AM
Hi Andie,
You can't execute the presentation layer related task like what you doing the GUI_DOWNLOAD during background jobs. You have download or upload to application layer.
The popup is coming from GUI security which can be prevented by clicking remember me checkbox for one time and Allow or changing the GUI security parameter
Thanks & Regards,
Arun
‎2014 Aug 13 4:09 AM
Hi Stefan,
This function module is standard, I cannot change its coding. And I try to input several import parameters but no one can be used to prevent this dialog box from being popped up. Is there another way to run it in background?
Kind Regards
Andie
‎2014 Aug 13 9:09 AM
Hi Arun,
See my reply above. Is there another way to run it in background?
Kind Regards
Andie
‎2014 Aug 13 9:15 AM
‎2014 Aug 13 9:39 AM
Hi Andie,
GUI_DOWNLAOD will not work for background job , only in foreground and job is failing not because of the popup. GUI_DOWNLOAD needs GUI interaction.
As I told earlier, in GUI security some rule related to download file might have set as ASK.
Thanks & Regards,
Arun
‎2014 Aug 13 10:52 AM
Hi Arun VS,
How can I give my decision in background?
Kind Regards
Andie
‎2014 Aug 13 11:04 AM
Hi Arun,
When I run this report directly, there is no problem. But fails to run batch job, the popped up dialog box is the key diffferent point between them. Please see the error message as below after running report.
-------------------------------------------------------
Result(s): 6
2014-08-13T12:08:21Z
\\DWDF219.WDF.SAP.CORP\ICP_BACK_UP\P1C\RCA_P1C_BACKUP_20140813120821.xml
Error occurs when saving file.
msgid = FES
msgno = 022
sy-subrc = 21
-------------------------------------------------------
Kind Regards
Andie