后台作业,Spool立即打印问题

今天在客户身边的同事,测试JOB作业打印report时发现report都还在spool中待机中,没有即时打印。 立即打印参数(http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba56d35c111d1829f0000e829fbfe/content.htm)已设,前台跑是没问题的。最后查出来,output device是非网络打印机。(SPAD)
有两条NOTE可以参考

Note 352739 - Dunning: Print immediately
Summary

Symptom
Even though the 'Print immediately' indicator is set for the dunning notice printout, immediate printing does not occur.
The following applies, irrespective of this correction: If the selected printer is a local printer, immediate printing is not possible from a background job.
For information about front-end printing, see Note 128105 also.
Note the difference between:
1. The 'Start immediately' indicator: this refers to the print program rather than the print output. The print program is either scheduled for a future point in time or started immediately.
2. The 'Print immediately' indicator in the spool control: If the indicator is set, the letters are printed immediately and a separate spool request is created for every letter. If the flag is not set, you have to start the print request, and only one spool request is created.

Note 128105 - Frontend printing (collective note)
Summary

Symptom
This note describes how frontend printing works.


Other terms
LOCL, frontend printing, PC print, control, control technology

Reason and Prerequisites
1. What does "Frontend printing" mean?
Frontend printing involves data, which needs to be printed, being sent using the GUI connection of the user to a printer that is installed on the frontend of the user. Usually, a default printer is involved.


Only a general printer definition is required in the backend system, since you are not required to define the names or IP addresses of the individual computers. You can use dynamic IP addresses (Dynamic Host Configuration Protocol) in frontend printing, unlike in network printing from the SAP System.


2. Availability
As of Basis Release 4. 6C, access method 'G' is available and replaces the previous method using access method 'F'. If you use access method 'G', frontend printing is also possible on non-Windows frontends. If you use a terminal server, no other settings are necessary. For more information, see Note 821519.


Access method 'F' is used in earlier releases (lower than 4.6C). As of Release 4.6C, access method 'F' is no longer developed, and no more corrections will be delivered.
Solution

1. Setting up frontend printing
To use access method 'G', see the prerequisites in Note 821519.

a) Definition of an output device
Define a general output device for frontend printing using transaction SPAD. You can use SAPWIN (or language-dependent SAPWIN versions) as a device type for Windows frontend computers. You can use any other device type, provided that all printers that you use can process the relevant format.
You cannot use SAPWIN on Non-Windows platforms, but you can use device type POST2 (for example), depending on the print administration setting.
On Windows platforms, enter __DEFAULT as the host printer, while on non-Windows platforms, enter a printer name that is standard on all frontend computers.


b) Authorizations
The following authorizations are required for frontend printing:
- Device authorization for the object S_SPO_DEV
(The following authorizations are only necessary for access method 'F':)
- Device authorization for device '%LOC' for the object S_SPO_DEV
- Authorization for the object S_RFC:
RFC_TYPE 'FUGR'
RFC_NAME 'LPRF'
ACTVT 16


c) Restrictions
Since frontend printing uses the local GUI connection, it is generally unsuitable for the output of large or particularly time-critical documents.

Frontend printing always requires an existing GUI connection. Therefore, you cannot use frontend printing to output the spool output of a background job.

Frontend printing is also impossible if you use RFC to go from your current mode into a process in which you first create the output request.


To print using the Windows Terminal Server (WTS), see Note 150533 also.

For further information about frontend printing using the SAPGUI for HTML, see Notes 351230 and 7721683.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是在SAP中创建后台作业的代码示例: ```abap REPORT ztest_job_create. DATA: jobname LIKE tbtcp-jobname, jobcount LIKE tbtcp-jobcount, jobclass LIKE tbtcp-jobclass, jobd AS tbtcp-jobdynpro, jobhead LIKE tbtcp-jobhead, jobselect LIKE tbtcp-jobselect, jobstep LIKE tbtcp-jobstep, jobevent LIKE tbtcp-jobevent, jobpara LIKE tbtcp-jobpara, jobtarget LIKE tbtcp-jobtarget, jobclose LIKE tbtcp-jobclose. * 设置作业名称和作业计数器 jobname = 'ZTEST_JOB'. jobcount = '001'. * 设置作业类别 jobclass = 'A'. * 设置作业头信息 jobhead-stepname = 'STEP_1'. jobhead-progname = 'ZTEST_PROGRAM'. jobhead-jobname = jobname. jobhead-jobcount = jobcount. jobhead-jobclass = jobclass. * 设置作业步骤 jobstep-stepname = 'STEP_1'. jobstep-progname = 'ZTEST_PROGRAM'. jobstep-jobname = jobname. jobstep-jobcount = jobcount. jobstep-jobclass = jobclass. * 设置作业关闭信息 jobclose-jobname = jobname. jobclose-jobcount = jobcount. jobclose-jobclass = jobclass. * 创建作业 CALL FUNCTION 'JOB_OPEN' EXPORTING jobname = jobname jobcount = jobcount jobclass = jobclass EXCEPTIONS cant_create_job = 1 invalid_job_data = 2 jobname_missing = 3 others = 4. * 提交作业 CALL FUNCTION 'SUBMIT' EXPORTING report = 'ZTEST_PROGRAM' variant = '' direct = 'X' jobname = jobname jobcount = jobcount jobclass = jobclass EXCEPTIONS bad_variant = 1 cant_create_job = 2 invalid_report = 3 no_authority = 4 no_batch = 5 no_spool = 6 operation_cancelled = 7 others = 8. * 关闭作业 CALL FUNCTION 'JOB_CLOSE' EXPORTING jobclose = jobclose EXCEPTIONS job_close_failed = 1 others = 2. ``` 这段ABAP代码将创建一个名为`ZTEST_JOB`的后台作业,并在其中运行`ZTEST_PROGRAM`程序。你可以根据自己的需求修改作业名称、作业类别、程序名称等参数。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值