on 07-03-2012 8:02 AM
Hi
I have also scheduled a background job. Through SE38 the program runs easily and save output to our ZTABLE. Problem is that when we scheduled this program in background. I have paste my code snippets and also the cases which I try before posting of my question.
Point1 :
OPEN DATASET file FOR INPUT IN BINARY MODE.
(i ahve also tried it by using OPEN DATASET FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT)
IF sy-subrc = 0.
DO.
READ DATASET file INTO l_line.
IF sy-subrc <> 0.
EXIT.
ELSE.
********store lines in an internal table.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET file.
Point2 : When I execute the program through SE38 then 'open dataset' gives sy-subrc = 0 and also read dataset gives sy-subrc = 0.
Our file which i accessed though open dataset, put at server (dir_home). I have full authorization on that directory and its folders and sub folders.
Point3: As the program executed through se38 so i think its not abap syntactical program. DIR_HOME is based on UNIX which I executed from R/3.
Point4: After scheduling the job, our program executed successfully once and after that its give dump.
**my question is that, is it possible if the program executed normally ( through SE38) then is there any disruption occurred during background scheduling.
Please tell me the logic behalf of your answer.
Regards
Swati
Hi Swati,
The OPEN DATASET statement checks the authorization of the executing user. Most probably, when executing the program in dialog you are using your own user that does have authorization, and the scheduled background job is executed on a different user that does not have the required authorization. You can try scheduling this background job on your username to confirm that:
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
for input is not mandatory
check this code sample for reading a server file without for input
http://help.sap.com/saphelp_45b/helpdata/en/34/55cad198482bc0e10000009b38f91f/content.htm
Regards,
Michal Krawczyk
Hi,
why do you open is for input if you only read from it ?
just open it without the "for input" and try again
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.