02-09-2006 7:25 PM
Hi,
Does anyone know if there is a way to turn off the 'print immediately' option temporary for call transaction that will be executed in background? We do not want to update the batch user setting. The main program will be executed in background which will call a transaction which the bdc has a sy-ucomm = '=SJOB'.
Thus, by using FM SET_PRINT_PARAMATER will not work in this case since the call transaction resets to the user print parameter again when call in background.
Can the BDC screens turns off the print immeidately option? Tried this BDC screen sequence but did not work.
SAPLSPRI 0100 X
BDC_OKCODE =EXPT
PRI_PARAMS-PDEST <printer ID>
SAPLSPRI 0300 X
BDC_OKCODE =%_GC 115 22
SAPLSPRI 0300 X
BDC_OKCODE =PTON
BDC_CURSOR PRIPAR_DYN-PRIMM2
PRIPAR_DYN-PRIMM2
SAPLSPRI 0100 X
BDC_OKCODE =SAVE
Please help!!
02-09-2006 7:34 PM
Hi,
Just call table NAST & update the field DIMME,which is print immediately field.
02-09-2006 7:59 PM
Isn't the NAST populated after the spool request is already created and sent to the printer if the print immediately field is on? So that would be too late in our scenario.
02-09-2006 8:10 PM
Ok..Call table USR01 ,where you have a field for the print immediately.change that value before the call transaction & stry it out.
02-09-2006 9:55 PM
Yes by changing user setting table USR01 will turn off the print immediately indicator but we do not want to change the USR01 setting since a generic user ID will be use to run the batch job and the same user ID will be used to run other batch program as well so the user setting cannot be changed in our scenario.
02-09-2006 10:15 PM
Are you creating a job that is running the transaction? If so, you can turn off the 'print immediately' at that time.
Rob
02-09-2006 10:28 PM
I am creating a job that run the <b>Main program</b> which then <b>Call</b> different <b>Transaction</b> based on the selection. Each transaction (e.g. CK64) will be executed in background. This will generate two background jobs and two spools, one from the main program and the second for the transaction itself. When I turn off the 'print immediately' option for the job, it will only turn off for the spool generated from the main program but the <u>spool from the transaction itself still uses the user setting parameter</u>.
02-09-2006 11:58 PM
Hi,
Just before calling the transaction,change the value in USR01 & then after the call transaction ,update back the USR01.
02-10-2006 12:19 AM
Hi all,
Can I join this Post.
Minami--> You want to turn off the 'print immediately' of a schdule job.
You can set the print settings while defining you schedule job .
While Schedule your job through T/code SM36>Setp1>Print Specifications> enter Output device Name> Properties> General Attributes> time of printing--> Select Print Later.
Hope this may help you.
Lanka
02-10-2006 1:05 AM
Since I am scheduling the job to run the main program which will then call another transaction and execute that in background, changing the print specification while scheduling the job will only change the spool generated by the main program (the 1st spool), but not he spool generated by the called transaction (the 2nd spool).
02-10-2006 2:20 AM
Hello. I am trying to understand your requirement. You have a MAIN program that is running in background. From what I've read, you are spawning 2 additional background jobs from the first MAIN job.
How are you spawning off the additional background jobs? You could have the option of calling the function modules for creating and submitting jobs, where you can define the print parameters.
Hope this helps.
02-10-2006 7:32 PM
Thanks for the advice but my second background job is a 'call-transaction' with BDC screen that the final SY-UCOMM is "=SJOB" so it actually starts a second background job. It is standard transaction that every run will need to have different parameters....so I cannot use the job submit technic.
The most preferable way is to be able to let the BDC to change the 'print immediately' checkbox for the second job but the BDC does not seem to take what is recorded in the recorder (tcode: SHDB)
02-11-2006 12:55 AM
Hi all,
I was able to get a satisfied output by using
submit <program> with selection-table <seltab>
to sap-spool without sap dynpro
destination <printer ID>
immediately ' '
keep in spool 'X'.
This will execute the transaction with all the selection paramters filled into the selection-table <seltab> and then send all the message and output to the spool directly but without outputing to the printer. So the problem is solved. For anybody interested in more details on the submit command, here is the thread:
02-11-2006 1:23 AM
Hi,
If you extend the statement with 'AND RETURN' it will return to your program after executing the submitted program.
Message was edited by: Phani Kiran Nudurupati
09-16-2014 7:17 AM