Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Background Scheduling

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

Hi

Let's know how u create the file, which stataments are u using?

Max

0 Kudos

open dataset datasetname for output in text mode encoding default.

e.g.

loop at itab.

transfer itab to dataset.

endloop.

close dataset.

0 Kudos

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

0 Kudos

do you using the same user (authorization issue) in forground and background processing ?

maybe the report is using another user in background !

Regards,

Gordon

0 Kudos

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.