Background Job Processing Spool Retention period
Hi ,
In my program i am calling another ABAP program and sumitting the same as a background job(using Job_Submit,Close etc.)
In this case i can view the Spool generated by the called program(using sm37).
But this spool exists for a very less period in the system.Is it possible to specify a retention period,as 90 days in my case.?
Pls Help !!!
Answers will be rewarded.
Regards,
Rohan
hi Roahn,
You must set print parameters before the printing process starts.
When printing lists after creating them, the system uses the print format specified in the print parameters to split the completed list and fit it onto the print pages, truncating it if necessary.
When printing lists while creating them, the system uses the print format to actually format the list in the program.
Print parameters are set either interactively by the user or from within the program.
For each print process, the spool system needs a complete and consistent set of print parameters. In ABAP, the structure PRI_PARAMS (ABAP Dictionary) represent a set of print parameters.
When passing the print parameters interactively, the system displays a dialog box after starting the report, on which the user has to enter the most important print parameters.
It's shown below which input field of the Print List Output dialog window conform to which PRI_PARAMS component.
Input field----
Retention period
Component-------PEXPI
Meaning----
Number of days for which the system holds the spool request before deleting it. (Default value: 8).
Similar Messages
-
Background Job Processing/Spool List Recipient
When setting up a report to run as a background job and setting it up to e-mail the results via the Spool List Recipient button, it always sends the results in htm format. Is there a way it can be e-mailed in Excel?
hi swapna.
in scot it is not configured as excel how to do it.to get an attachment in excel format
thanks in advance -
How to set the spool retention period till 30 days(Printer Properties).
Hi SAP Experts
I need to setup a job which creates a spool. I want to set the spool retention period till 30 days(Printer Properties). But I have the option of keeping it only for 8 days or Do Not Delete at all. Can you please let me know how can I setup a job which creates a spool which wil be retained for 30 days and then will automatically get deleted?
Advanced Thanks
Thanks & Regards,
Kishore.Hello Kishore,
I can understand why you dont want to change the variant.
However may be a slight change in the variant might help your cause though I am not sure whether you will like this suggestion or not.
Create a dummy output device type to which all spools created for this report need to be assigned.
Once this is done make a small change in the variant for the field Output device in such a manner that all the spools belonging to this printer/output device are not deleted.
Then create a new variant for this output device ensuring that only spools belonging to this output device and older than 29 or 30 days are deleted.
While this will ensure that normal spool requests are deleted these ones are not.
Really dont if this solution is acceptable or not.
Regards.
Ruchit. -
Afer background job finished, spool was not generated
hi all
Afer background job finished, spool was not generated but all background jobs is not
soem background jobs was created spool.
even if same user and same backgorund job, sometime generated spool or not.
how can I solve??
thanksHi,
Spool will be generated only spool specification wil be defined for that job.
Select the job go to steps spool specification you can see the device assigned to it.
Regards
Ashok -
BackGround Job's Spool Request is having "Waiting" "Frontend unavailable"
Hello Friends,
I am facing one problem related to Spool Request, which is generated through Scheduled Background Jobs (scheduled by funcional people).
The Background Job is having status "completed" when analyzing it. But, its associated Spool Request is showing "waiting" Status, with "Frontend unavailable" as Status Text.
Here is the brief status of that Spool Request.
28448 1 300 USER1 00:00 LP01 X_65_80 Frontend unavailable
in Detail:
Description Value
Status: Frontend unavailable
Last event:
Message: Request on hold
Date: 01.07.2009
Time: 00:00:27
Job status: On hold
Error class: Delayed
Area: Data transfer
Printout: Not printed
The Setting of LP01 O/Device is as followed:
Output Device LP01
Device Type SWIN SWIN : Windows printing via SAPlpd
Device Class Standard Printer
Host Spool Access Method F F: Printing on Front End Computer
Host printer __DEFAULT
Moreover, the SAP User USER1 is allocated LP01 as Output Device with "Output Immediately" & "Delete After Output" checked status.
Some Background Jobs are showing the same status for this LP01.
I have a doubt on allocated O/P Device LP01.
Any Clue for this issue ?
Regards,
Bhavik G. ShroffHello Markus,
Here , in our Landscape , there is not Print Server. All are taking prints through, Networked Printer and their local connected Printers.
Can i configure "send to SAP Spooler for now" instead of "Print Immediately "in the Print Specification of those Background Jobs ?
Moreover, Some Background jobs are sending E-Mails with the processed Reports as an Attachments. They are showing sometime unexpected behavior, in sending emails, although there is no relation is with this Printing related issue.
When i am looking into "Overview of Send Orders" of SCOT, some Background Jobs are showing success for sending emails, and some are not showing success, even though All the recipients are same for the scheduled Background Jobs which are running on same time.
Regards,
Bhavik G. Shroff -
In Spool Retention Period adding - "Delete After 365 Days"? Is it possible?
Team,
rel 4.7
I have the following retention periods in the spool drop down:
Delete After 1 Days
Delete After 2 Days
Delete After 3 Days
Delete After 8 Days
Do Not Delete
Question: I want to add other periods like 365...
where can I maintain it.
Thanks
Naved
PS. These retention periods carry over to SAPinBOX and populate expiration date field
Message was edited by: SAPna2000
Message was edited by: SAPna2000Hi,
I know Job retention period by using T/code : SO16--> document org.
Check this may help.
Lanka -
After writing a report, I used this Function Module LIST_TO_ASCI to copy my report to an internal table (DOWNTAB) because Ill use that internal table to download a text file on the server using dataset.
Here is my code:
FORM DL_REP_SERVER.
DATA: ABAP_LIST LIKE ABAPLIST OCCURS 1,
MV_FILE2 LIKE RLGRAP-FILENAME.
DATA: BEGIN OF DOWNTAB OCCURS 1,
LINE(150),
END OF DOWNTAB.
CLEAR: MV_FILE2.
MV_FILE2 = J:/Downloads/Report.txt.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = SY-LSIND
TABLES
LISTASCI = DOWNTAB
LISTOBJECT = ABAP_LIST
EXCEPTIONS
LIST_INDEX_INVALID = 1
OTHERS = 2.
OPEN DATASET MV_FILE2 FOR OUTPUT IN TEXT MODE.
IF SY-SUBRC <> 0.
IF SY-SUBRC = 8.
MESSAGE E037 WITH 'File could not be opened'.
ELSE.
MESSAGE E037 WITH 'Error occurs in downloading the file'.
ENDIF.
ENDIF.
LOOP AT DOWNTAB.
TRANSFER DOWNTAB TO MV_FILE2.
ENDLOOP.
CLOSE DATASET MV_FILE2.
ENDFORM. " DL_REP_SERVER
My big problem is this, when Im running my program ordinarily (not as background job), Im getting all the pages downloaded correctly but when I run it as background job (using SM36), Im only getting the last page of my report being downloaded. Definitely, I cant debug it because its in background. I cant figure out why. Hope that I stated my problem clearly. Any help would be greatly appreciated. Thanks.You can debug batch jobs by going to 'SM37', type in 'JDBG' in the
command line ( no '/' ), put the cursor on the job and press enter - will
take you to the job in debug mode.
You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job also sy-batch will set to 'X'.
So type in the transaction code 'JDBG' and place your cursor on the job after It has finished. It will take you to a SAP program in debug mode. Step through this program which is about 10 lines, after this your program will be executed in the debug mode.
Steps
1. Create variant called BACKGROUND for program to be debugged.
2. Execute ZDEBUGBG (pgm code below) in background for immediate processing.
3. Execute transaction SM50.
4. Select process that runs ZDEBUGBG.
5. Goto 'Program/Session' 'Program' 'Debugging'.
A se80 debug session will open.
6. Change variable W_EXIT to 'E'.
7. Step thru (F6) until ZWBTEST comes up.
1. Go to Transaction SM66 and find your work porocess.
Select the line work process is on and click on the Debugging button.
If this is a custom program, you can put a wait statement in the code to buy yourself sometime.
2. Go to Transaction SM50. From the tool bar "Program/session"->Program->Debugging.
goto SM37 and from Program menu(not sure.. try other menu's)
-->Catchjob . it will goto the active job in debugging mode. -
Error in Background Job Processing.
Dear All,
I am using a background job for processing the outbound delivery.
In the user exit in delivery program I am checking for the combination of
ship to party, Material & Batch of outbound delivery in a ztable. If the combination exists in
Ztable I do not want to save & ignore this delivery creation and continue with the next
delivery order creation thru the batch job.
However I need to give an error / warning message for the delivery orders
which are not created so I am giving the error message as success message
in the below format :-
IF L_RETURN-TYPE = 'E'.
MESSAGE S000(Z64_I) WITH L_RETURN-MESSAGE_V1
L_RETURN-MESSAGE_V2
L_RETURN-MESSAGE_V3
L_RETURN-MESSAGE_V4
DISPLAY LIKE 'E'.
PERFORM FOLGE_GLEICHSETZEN(SAPLV00F).
FCODE = 'ENT1'.
SET SCREEN SYST-DYNNR.
LEAVE SCREEN.
ENDIF.
But my job is finished as soon as the above message is encountered and the
rest of the outbound deliveries are not created.
However if I execute the progarm in foreground the execution is working fine.
Could you please let me know what do I need to code / do corrections to make
the program run successfully in background.
Thanks & Regards
Jitendra GujarathiHello,
Check system log and also check work process trace, to know the error.
I feel that it could be Authorization issue, you don't have sufficient authorization to do.
Hope this helps.
Regards
venkata
Edited by: venkata emandi on Sep 12, 2011 8:13 AM -
Regarding the output of background job in spool
Hi Friends:
I have a report.When I run it in foreground, it displays an alv output.
I want to see the output when I run it in background. When I select the job & press on spool, it shows a message that no list available. Please help with the settings to see the output in spool.
Suitable points will be rewarded.
Regards:
GauravHi,
have a look at this thread:
Re: OO ALV in background job
Best regards. -
Continue background job processing.
Hi All,
How to handle the system error
MESSAGE E328 WITH MATNR RAISING CONVERSION_NOT_FOUND thrown by FM MATERIAL_UNIT_CONVERSION so that the background job continue processing.
Thanks and Regards,
Ashik K.Hi,
I just now checked with this FM and worked with these two options:
1. Runtime error type 'E' will stop the program if we COMMENT the EXCEPTIONS while calling FM
* EXCEPTIONS
* CONVERSION_NOT_FOUND = 1
* INPUT_INVALID = 2
* MATERIAL_NOT_FOUND = 3
* MEINH_NOT_FOUND = 4
* MEINS_MISSING = 5
* NO_MEINH = 6
* OUTPUT_INVALID = 7
* OVERFLOW = 8
* OTHERS = 9
2. Runtime error type 'E' (which stops the program) will not come in this case
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
INPUT_INVALID = 2
MATERIAL_NOT_FOUND = 3
MEINH_NOT_FOUND = 4
MEINS_MISSING = 5
NO_MEINH = 6
OUTPUT_INVALID = 7
OVERFLOW = 8
OTHERS = 9
Hope this helps.
Regards,
Amit Mittal. -
Background Jobs - Process Chains
Hello,
I want to schedule a background job for a process chain so that it triggers the process type and start executing...
Can anyone please let me know how i can do it?HI,
The background control options are available to directly schedule the start process. You can start the process chain immediately (when activating the process chain), at a specified time, or after a particular event. When you activate the process chain the start process is scheduled in the background, as defined in your selections.
If there are not sufficient options available, you can trigger the start of the process chain using API. You can use the SAP NetWeaver Scheduling Framework to start the chain and to have more extensive scheduling options.
You can also trigger the start of a process chain using a metachain. A metachain is a process chain, for which you determine this start condition, that is fixed to another process chain. The process chain is started directly by this metachain.
Tarak -
RSCRMBW_REPORT Background Jobs & Process Chain
Hello Everyone,
I have a program in a process chain that runs a query through rscrmbw_report. The program is the first step in the chain, followed by a DTP. When we have previously ran this program in our production box, we found that the we did not get all of the data from the query. We believe the fault is with the DTP running asynchronous to the background jobs of RSCRMBW_REPORT- In SM37, we believe we have found jobs from the report positioned before and after the DTP job.
I've made some slight changes and on a small volume of data (~1000), the chain works with no issue. However, I am concerned with dealing with a large number of records (~1,000,000+). As of now, I'm not sure I believe the analysis of the background jobs because there are still jobs that appear before and after the DTP, but the data is consistant between the destination of the DTP and the query.
Any advice on how to ensure those jobs run before my DTP? I've tried using commit work and wait, which I believe works because the DB should be open while the query jobs are running and I believe that the statement will wait for those jobs to finish before proceeding out of the code and to the DTP.
Thanks & Regards,
ChristianHI,
The background control options are available to directly schedule the start process. You can start the process chain immediately (when activating the process chain), at a specified time, or after a particular event. When you activate the process chain the start process is scheduled in the background, as defined in your selections.
If there are not sufficient options available, you can trigger the start of the process chain using API. You can use the SAP NetWeaver Scheduling Framework to start the chain and to have more extensive scheduling options.
You can also trigger the start of a process chain using a metachain. A metachain is a process chain, for which you determine this start condition, that is fixed to another process chain. The process chain is started directly by this metachain.
Tarak -
How to cancel the background job processing in ABAP programming?
Hi,
I have a requirement where i need to cancel the job depending on some constraint. My code is something like this:
Select some data from the table.
if sy-subrc = 0.
Do nothing.
Else
Cancel the job
call function 'BP_JOB_ABORT'
exporting
jobcount = number
jobname = name
EXCEPTIONS
CHECKING_OF_JOB_HAS_FAILED = 1
JOB_ABORT_HAS_FAILED = 2
JOB_DOES_NOT_EXIST = 3
JOB_IS_NOT_ACTIVE = 4
NO_ABORT_PRIVILEGE_GIVEN = 5
OTHERS = 6
The above code is cancelling the job but it is throwing an exception called CX_SY_DYN_CALL_PARAM_MISSING because i dint pass job count. How can we find the job count of next job that is going to run? Or How to handle the exception which it is throwing. Even if i try to handle that exception something like this:
TRY
call function 'BP_JOB_ABORT'
exporting
jobcount = number
jobname = name
EXCEPTIONS
CHECKING_OF_JOB_HAS_FAILED = 1
JOB_ABORT_HAS_FAILED = 2
JOB_DOES_NOT_EXIST = 3
JOB_IS_NOT_ACTIVE = 4
NO_ABORT_PRIVILEGE_GIVEN = 5
OTHERS = 6
RAISE EXCEPTION TYPE CX_SY_DYN_CALL_PARAM_MISSING.
CATCH
CX_SY_DYN_CALL_PARAM_MISSING.
ENDTRY.
It avoids the exception but it doesnt cancel the job. I even tried with function modules like JOB_OPEN
JOB_SUBMIT,BP_JOB_SELECT,BP_JOB_ABORT and tried to build some logic using status overview table (TBTCO) and TBTCP (Jobstep overview table).
Can someone suggest me the right way to write this program ?
Thanks in advance.
RashmiHi,
Problem is solved.
Create an background job with 2 steps. The first step in the background job calls the program ZBACKJOB_STEP1. In the variant we have a wrong material number
If the material number is not found in Mara, the next step in the job should not get executed and the job should get cancelled..
In the above posts i had asked how do I get the job count of the job that is currently triggering the program at the runtimeu2026..If u see the below code uu2019ll get to know.. We have to use the standard structure TBTCM which captures the properties/characteristics of the job.
REPORT ZBACKJOB_STEP1.
TABLES: MARA,TBTCM.
PARAMETERS : MATNR TYPE MATNR.
START-OF-SELECTION.
SELECT SINGLE * FROM MARA WHERE MATNR = MATNR.
IF SY-SUBRC IS INITIAL.
WRITE / : 'This is the material selected on the selection-screen' , MARA-MATNR.
ELSE.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = TBTCM-EVENTID
EVENTPARM = TBTCM-EVENTPARM
EXTERNAL_PROGRAM_ACTIVE = TBTCM-XPGACTIVE
JOBCOUNT = TBTCM-JOBCOUNT
JOBNAME = TBTCM-JOBNAME
STEPCOUNT = TBTCM-STEPCOUNT
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC = 0.
CALL FUNCTION 'BP_JOB_ABORT'
EXPORTING
JOBCOUNT = TBTCM-JOBCOUNT
JOBNAME = TBTCM-JOBNAME
EXCEPTIONS
CHECKING_OF_JOB_HAS_FAILED = 1
JOB_ABORT_HAS_FAILED = 2
JOB_DOES_NOT_EXIST = 3
JOB_IS_NOT_ACTIVE = 4
NO_ABORT_PRIVILEGE_GIVEN = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
ENDIF.
ENDIF.
ENDIF.
Regards,
Rashmi -
JOB_CLOSE and Background Job Process a FM
HI Guys,
I have my code like this:
data: jobname like tbtcjob-jobname value
'TESTJOB'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
data: lv_weekday type WEEK_DAY.
CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
DATE = sy-datum
IMPORTING
WEEKDAY = lv_weekday.
Close job
starttime-sdlstrtdt = sy-datum.
starttime-sdlstrttm = SY-UZEIT.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = 'X' "starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif.
This is the Program I want the Batch Job to Execute a BAPI Function Module in the Place of DATE_TO_DAY function module. Is it Possible ??????
And also I get an error at the JOB_CLOSE Function Module with SY-SUBRC = 5.
Can anyone know why this is happening and what should be done to overcome this.
Thanks & Regards,
YJR.Hi Ravi,
The below code which has an EXPORT and IMPORT commands
The IMPORT does'nt work in Background.
Do I need to do anything else.
REPORT ZTEST_LM22.
DATA: LV_NAME(10) TYPE C.
LV_NAME = 'HELLO'.
export lv_name to memory id 'ZNAM'.
submit ztest_lm22_a.
REPORT ZTEST_LM22_A.
DATA: GV_JOBNAME TYPE BTCJOB VALUE 'TEST_UNPACK',
GV_JOBCOUNT TYPE BTCJOBCNT.
data: lv_date type SYDATUM,
lv_time type SYUZEIT.
lv_date = SY-datum.
lv_time = sy-uzeit.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = GV_JOBNAME
SDLSTRTDT = lv_date
SDLSTRTTM = lv_time
IMPORTING
JOBCOUNT = GV_JOBCOUNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SUBMIT ztest_lm22_b AND RETURN
VIA JOB GV_JOBNAME
NUMBER GV_JOBCOUNT.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = GV_JOBCOUNT
JOBNAME = GV_JOBNAME
STRTIMMED = 'X'
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REPORT ZTEST_LM22_B.
DATA: LV_NAME(10) TYPE C,
GV_NAME(10) TYPE C.
IMPORT LV_NAME = GV_NAME FROM MEMORY ID 'ZNAM'.
WRITE: GV_NAME.
If you see in SM37 the Spool does'nt have this value.
Could you just run a quick test and see what else should be done...
Thanks & Regards,
YJR. -
Background job processing - SM36
Hi All,
I need to schedule a job in the background(using SM36) . The report should run in the night from the last day of the month to the first day of the next month. What are the stepts to be followed in SM36 to achieve this?
Thanks ,
VasukiHi,
>Go to transaction SM36, give job name and select job class.
> select start condition tab present at the left top corner. now select date and time tab. give start datae and time also end date and time. next select periodic values and select the period. check and save the
> select Step tab present at the left corner, give ABAP program name and variant for that program. check and save .
> fiinally Save the job.
Regards,
Lokeswari.
Maybe you are looking for
-
I bought Apple TV 3rd generation a couple days ago. It was no problem in the first day. I freshly installed iTunes on my computer and tried to learn about Home Share. Next day,it was locked this screen and I cannot move any other screen. The LED ligh
-
MapViewer base map image is not loading on OBIEE 11.1.1.6.4
Hi Experts , We are facing issue in OBIEE 11.1.1.6.4 and OBIEE 11.1.1.6.5. The background maps are not loading. The measure is getting plotted the as per postal code but the background map is not coming up. The Issue is only with External maps. It is
-
How can I create a fillabe form
I want to make a form fillable, in an E-Version. How do I do that?
-
Why are my mobileme galleries not showing up in the mobileme widget?
I've got this to work in the past. A few weeks back I deleted and/or changed most of my mobileme galleries. They are there, work fine, ect but in iWeb I cannot get them to show in the drop down menu for the widget! Is this due to any ilife '11 upgrad
-
Hi Experts, I am using the Crystal Reports Server V1 trial version. I want to display Xcelsius Dashboards through InfoView. Because the add-function for flash (swf) files isnt avaiable I choose the option to insert my swf files into Crystal Reports a