‎2008 Jul 22 8:48 PM
Hello friends,
I am able to open a file from the foreground mode.
However when i run the program in background am unable to open it.
OPEN DATASET fp_asfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
I have alos tried to change the user with the back groung user ID. but it again failed.
Can any one tell me why.
Ster
‎2008 Jul 22 9:06 PM
Hi,
Ok..go to SM51 in your system...and then check how many application servers are there..
if there are more than one..do the following..
In the background mode...the program might be running in a different application server....than the one which you used in the your foreground session..
check this..
1)
In your foreground session...go to system -> status...get the application server..
2)
when you define the job in SM36...there is a field in the initial screen.."Exec. Target"...which says in which application server you want to run this job...Give the application server that you got from step 1...Then release the job...now your program should work fine..
Thanks,
Naren
‎2008 Jul 22 8:50 PM
Hi,
Make sure the file is there in all the application servers of your system...as there might be more than one application server.
Thanks
Naren
‎2008 Jul 22 8:59 PM
Thanks Naren. I really didnt understand what you meant as it might not be there in all the application servers.
However I am able to open it in foreground mode.
Thanks,
Ster
‎2008 Jul 22 9:02 PM
What do you mean by foreground mode?
Are you running the same program with the same user in foreground and you are saying it work ok?
OR
do you mean you are able to access the file through AL11 in foreground?
‎2008 Jul 22 9:09 PM
You should check file permissions for read and modify in application server system. If you have a read-only, you can't open it for modifying.
‎2008 Jul 22 9:06 PM
Hi,
Ok..go to SM51 in your system...and then check how many application servers are there..
if there are more than one..do the following..
In the background mode...the program might be running in a different application server....than the one which you used in the your foreground session..
check this..
1)
In your foreground session...go to system -> status...get the application server..
2)
when you define the job in SM36...there is a field in the initial screen.."Exec. Target"...which says in which application server you want to run this job...Give the application server that you got from step 1...Then release the job...now your program should work fine..
Thanks,
Naren
‎2008 Jul 22 9:21 PM
Thanks Naren.
When I check in SM51 I see 3 active servers. I am using ECC 6.0.
tsdux07_TS6_03
tsdux09_TS6_03
tsdux09_TS6_04
System - Status - Server anem - tsdux09_TS6_03
But in SM36 when I do the F4 help down for EXEC target I see only tsdux07_TS6_03.
However when I try with tsdux09_TS6_03 it pops with error message
Target server tsdux09_TS6_03 is not configured for background processing
Thanks,
Ster.
‎2008 Jul 22 9:27 PM
If you are specifying the full path...and if all the app servers are mounted properly....i personally dont think foreground and background should make any difference...are you using the same user id in both case?..also how are u specifying the file path in both cases.
‎2008 Jul 22 9:32 PM
Thanks Aparna,
Everything is same in both the cases however I run.
I guess I have to look more in what Naren saaid. Multiple Application Servers.
Naren,
However when I wrote this files on the APP server i did it in foregroung mode
I will rewrite in the back ground mode and see if I can open those with a different program in Background.
Shreekant...
‎2008 Jul 22 9:43 PM
‎2008 Jul 22 10:23 PM
Can you add the MESSAGE addition in your open dataset statement and find out what is the error message. This will help you analyze the problem.
DATA mess TYPE STRING.
OPEN DATASET fp_asfile FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE mess.
if sy-subrc ne 0.
WRITE: / mess.
endif.
‎2008 Jul 24 4:55 PM
GO to SM51,
Look into the message. Double Click on the server that has a message to run in background.
Once you are in the server, Upload the files that you need to use them for background processing.
If UPloading from Local server run in foreground.
Once the files are there in this Application server, use them for your back ground mode.
Hope this will take care.
Shreekant....
‎2008 Jul 22 9:11 PM
hi the path you mention in fp_asfile is case sensitive.. make sure you are using the exact case for all the folders and the file names.
‎2008 Jul 22 9:26 PM
Hi,
do one thing...for the existing job that failed to open the file..check which application server it ran..you will get this information in the job details..
Now..go to SM51...double click on the application server which ran the job..create another session from that screen...now you will on that application server...you can check this by system -> status..
here in that new session run the program in foreground mode...check if you were to run the program..
Thanks
Naren
‎2008 Jul 22 9:45 PM
Hi,
check with your basis if the folder is there in all the application servers..and the application servers mounted..
Thanks,
Naren