‎2012 Feb 09 4:54 PM
Hello,
I have a Z program that uses open dataset stmts that writes the file out into a specified directory in the appl server path.
The prgram runs fine in foreground. But when scheduled in background it fails.
The job logs are :
Dierctory does not exist
Job cancelled after system exception ERROR_MESSAGE
The destination path can read, write and edit files in the directory.
i tried to create .txt file & also without any extension.
Can someone suggest me what i am doing wrong.
Thanks
Ricky
‎2012 Feb 09 10:48 PM
Hi Rick,
May be you are not doing anything wrong, check the path in APP server, use T-Code AL11 for the same ensure program is picking the correct path. If that is there, check "authority-check dataset" this checks whether your user id have authorization to write to application server.
Note : DATA SET works both on foreground and background, so you should not worry about that.
Best Regards,
Tapodipta Khan.
‎2012 Feb 09 5:13 PM
Goto SM37,
select the job and type JDBG in teh command box on top left. this will take you to debug mode, debug you program here.
‎2012 Feb 09 8:36 PM
Hi Tarla,
What is the tcode ? JDBG does not exist it seems.
If not, what is the sequence to execute this .
Thanks
Ricky
‎2012 Feb 10 10:07 AM
Hi Tarla,
> What is the tcode ? JDBG does not exist it seems.
> If not, what is the sequence to execute this .
>
> Thanks
> Ricky
check this wiki on how to use jdbg
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=156697598
‎2012 Feb 13 11:02 PM
Hi Tarla,
I am still unable to get the tcode JDBG.
It gives me the msg "Transaction JDBG does not exist" on the status bar.
Thanks
Ricky
‎2012 Feb 14 7:16 AM
Hi
JDBG is not Transaction, It will work in below process.
1. GOTO t-code SM37 And give your JOB Details like name.. then Click on Execute.
2. Now YOur in Job Overview Screen Select your Job (any one check Box) and Now Enter JDBG in Command Field(Transaction field) , then Program automatically start in Debugging Mode.
3. Actually JDBG is used to DEbug Bacground job.
-Ganesh
‎2012 Feb 09 5:48 PM
Based on your error message, one would ask what is the directory (folder) named supplied in background, since it does not exist? How is this directory path different from what is supplied when the program executes in foreground?
‎2012 Feb 09 10:48 PM
Hi Rick,
May be you are not doing anything wrong, check the path in APP server, use T-Code AL11 for the same ensure program is picking the correct path. If that is there, check "authority-check dataset" this checks whether your user id have authorization to write to application server.
Note : DATA SET works both on foreground and background, so you should not worry about that.
Best Regards,
Tapodipta Khan.
‎2012 Feb 14 9:06 AM
If you issue message type E in a background job, then the job is cancelled. Obviously, the directory your writing to doesn't exist. Change your program, so that just before you open the dataset, use a message type I with the dataset name. That way, you'll be able to see in the log what dataset you're attempting to write to. Also, the OPEN DATASET has a an addition to trap the message from the operating system. Look at the syntax through F1 help, and use that addition. ( MESSAGE msg )
My guess would be the user you're running the background job under has insufficient privilege.
‎2013 Nov 28 1:19 PM
Hi,
Has anyone got any solution to this problem. I'm able to create forlder and write some files using ABAP program in foreground process and also in background with JDBG but the same doesnt happen when run in backgroud.
The user id used to run the program has SAP ALL access so doesnt seem to be an authorisation issue.
I'm using function module TMP_GUI_CREATE_DIRECTORY to create folder and
GUI_DOWNLOAD to write files in designated folders. The program doesnt have any BDC
Help would be appreciated.
Regards,