2008 Apr 22 5:50 AM
hi
in my report i have a condition like this
if s_erdat > sy-datum.
xxxxxxxx
xxxxxxxxxxx
xxxxxxxxx
xxxxxxxx
endif.
if my selection screen date is grater than the system date i dont need to run the report at all
when i am running this report in back ground and i have given the erdat date greater than the system date my job status is finished.
but i dont want the job to be finished i want the job to be cancled. in this case how i need to modify the code
hi
in my report i have a condition like this
if s_erdat > sy-datum.
xxxxxxxx
xxxxxxxxxxx
xxxxxxxxx
xxxxxxxx
endif.
if my selection screen date is grater than the system date i dont need to run the report at all
when i am running this report in back ground and i have given the erdat date greater than the system date my job status is finished.
but i dont want the job to be finished i want the job to be cancled. in this case how i need to modify the code
2008 Apr 22 5:52 AM
if s_erdat > sy-datum.
xxxxxxxx
xxxxxxxxxxx
xxxxxxxxx
xxxxxxxx
else.
message e001 text-001. "date is lower than the current date.
endif.if you raise a error message background job will be cancelled with the text 001 in job spool..
Edited by: Jackandjay on Apr 22, 2008 12:57 AM
2008 Apr 22 5:55 AM
Hi,
The background job will show the status as finished because although ur output has not been generated ur report has been run .
since ur date condition is in the code the code is run so u cannot get a cancelled status.
Regards,
Mrunal
2008 Apr 22 5:55 AM
Hi
Put ELSE befor endif in ur coding.
i think this will solve ur problem.
Reward me point
By
Pari
2008 Apr 22 5:56 AM
Hello Ram-
If you dont want the background job to be created when s_date > sy-datum.
If s_date > sy-datum.
sy-batch EQ space. ***Hard code batch job to space.
<<<<<<
endif.
Cheers,
~Srini...