09-22-2008 11:16 AM
Hi All,
I have written one program which download data on application server in a directory.
The program works fine when I run the program in Foreground
mode but when I schedule the program in Background mode
it does not place the output file in desired directory but creates
a spool.
I am not able to understand what could be the reason.
Kindly give me relevant answers only, no crap pl.
Thanks,
Pradeep
09-22-2008 11:25 AM
Hi
Let's know how u create the file, which stataments are u using?
Max
09-22-2008 11:34 AM
open dataset datasetname for output in text mode encoding default.
e.g.
loop at itab.
transfer itab to dataset.
endloop.
close dataset.
09-23-2008 6:25 PM
Hello Pradeep,
Will you be able to copy and paste the whole code so that we will get an idea on the issue.
Regards
Farzan
09-23-2008 6:29 PM
do you using the same user (authorization issue) in forground and background processing ?
maybe the report is using another user in background !
Regards,
Gordon
09-24-2008 10:49 AM
DATA : filename TYPE string.
CONCATENATE '
chexeald01\datainput\' 'xoneid' sy-datlo sy-timlo '.txt' INTO filename.
OPEN DATASET filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE i075(zzhr_peoplsoft_int).
LEAVE LIST-PROCESSING.
ENDIF.
TRY.
LOOP AT %g01.
CLEAR line.
CONCATENATE %g01-p0000-pernr %g01-text_p0000_pernr %g01-p0105-usrid
INTO line SEPARATED BY comma.
TRANSFER line TO filename.
CLEAR %g01.
ENDLOOP.
CATCH cx_root INTO oref.
text = oref->get_text( ).
ENDTRY.
IF text IS INITIAL.
MESSAGE i074(zzhr_peoplsoft_int).
ENDIF.
CLOSE DATASET filename.