`
Jack Wu
  • 浏览: 877672 次
  • 来自: ...
社区版块
存档分类
最新评论

如何在sap里设置打印机参数

阅读更多

1、关于打印函数参见sap的函数模块SPRI,对于打印参数常用函数有:
GET_PRINT_PARAMETERS
SET_PRINT_PARAMETERS

2、申明变量
       begin of g_ty_s_tests,
         select_amount            type i,
         only_db_info             type char1,
         excp_condense            type char1,
         layo_title               type lvc_s_layo-grid_title,
         layo_zebra               type char1,
         layo_no_vert_lines       type char1,
         layo_no_horiz_lines      type char1,
         layo_cell_merge          type char1,
         layo_count               type char1,
         layo_no_colhead          type char1,
         layo_column_optimize     type char1,
         layo_keys_hotspot        type char1,
         layo_no_keyfix           type char1,
         layo_hotspot_field       type slis_fieldname,
         layo_no_hotspot          type char1,
         layo_no_scrolling        type char1,
         layo_no_authcheck        type char1,
         layo_no_min_linesize     type char1,
         layo_min_linesize        type sylinsz,
         layo_max_linesize        type sylinsz,
         layo_group_change_edit   type char1,
         layo_get_selinfo         type char1,
         layo_confirmation_prompt type char1,
         layo_f2code              type syucomm,
         layo_reprep              type char1,
         sum_before               type char1,
         sum_no_sumline           type char1,
         sum_no_sumchoice         type char1,
         sum_numc                 type char1,
         sum_no_unitsplit         type char1,
         sum_totals_only          type char1,
         sum_totals_text          type symsgli,
         sum_no_subtotals         type char1,
         sum_no_subchoice         type char1,
         sum_subtotals_text       type symsgli,
         vari_none                type char1,
         vari_save                type char1,
         vari_default             type char1,
         vari_layout              type disvariant-variant,
         prnt_print               type char1,
         prnt_reserve_lines       type lvc_s_prnt-reservelns,
         prnt_no_listinfo         type char1,
         prnt_no_selinfo          type char1,
         prnt_with_title          type char1,
         prnt_footline            type lvc_s_prnt-footline,
         prnt_printinfo           type char1,
         prnt_no_coverpage        type char1,
         prnt_no_new_page         type char1,
         prnt_no_change_print_params type char1,
         pri_params_set           type char1,
         pri_archive_id           type arc_params-archiv_id,
         pri_archive_info         type arc_params-info,
         pri_archive_mode         type pri_params-armod,
         pri_archive_text         type arc_params-arctext,
         pri_archive_object       type arc_params-ar_object,
         pri_authority            type pri_params-prber,
         pri_copy                 type pri_params-prcop,
         pri_coverpage            type pri_params-prbig,
         pri_dataset              type pri_params-prdsn,
         pri_department           type pri_params-prabt,
         pri_destination          type pri_params-pdest,
         pri_expiration           type pri_params-pexpi,
         pri_immediatly           type pri_params-primm,
         pri_layout               type pri_params-paart,
         pri_line_count           type pri_params-linct,
         pri_line_size            type pri_params-linsz,
         pri_list_name            type pri_params-plist,
         pri_list_text            type pri_params-prtxt,
         pri_new_list_id          type pri_params-prnew,
         pri_receiver             type pri_params-prrec,
         pri_release              type pri_params-prrel,
         pri_sap_coverpage        type pri_params-prsap,
         pri_host_coverpage       type pri_params-prunx,
         pri_priority             type pri_params-priot,
         pri_sap_object           type arc_params-sap_object,
         pri_type                 type pri_params-ptype,
         pri_footline             type pri_params-footl,
         buffer_active            type char1,
         bypassing_buffer         type char1,
         current_display          type i,
         current_page             type i,
       end   of g_ty_s_tests.
gs_test     type g_ty_s_tests.

3、调用'SET_PRINT_PARAMETERS'函数设置打印参数
  call function 'SET_PRINT_PARAMETERS'
   exporting
       archive_id                  = gs_test-pri_archive_id
       archive_info                = gs_test-pri_archive_info
       archive_mode                = gs_test-pri_archive_mode
       archive_text                = gs_test-pri_archive_text
       ar_object                   = gs_test-pri_archive_object
       authority                   = gs_test-pri_authority
       copies                      = gs_test-pri_copy
       cover_page                  = gs_test-pri_coverpage
       data_set                    = gs_test-pri_dataset
       department                  = gs_test-pri_department
       destination                 = gs_test-pri_destination
       expiration                  = gs_test-pri_expiration
       immediately                 = gs_test-pri_immediatly
*     IN_ARCHIVE_PARAMETERS       = ' '
*     IN_PARAMETERS               = ' '
       layout                      = gs_test-pri_layout
       line_count                  = gs_test-pri_line_count
       line_size                   = gs_test-pri_line_size
       list_name                   = gs_test-pri_list_name
       list_text                   = gs_test-pri_list_text
       new_list_id                 = gs_test-pri_new_list_id
       receiver                    = gs_test-pri_receiver
       release                     = gs_test-pri_release
       sap_cover_page              = gs_test-pri_sap_coverpage
       host_cover_page             = gs_test-pri_host_coverpage
       priority                    = gs_test-pri_priority
       sap_object                  = gs_test-pri_sap_object
       type                        = gs_test-pri_type
       foot_line                   = gs_test-pri_footline. 

4、调用GET_PRINT_PARAMETERS函数读取打印参数
  data: ls_arc_params type arc_params,
        ls_pri_params type pri_params,
        l_valid       type char1.                           "#EC NEEDED

  call function 'GET_PRINT_PARAMETERS'
    exporting
         archive_id                  = gs_test-pri_archive_id
         archive_info                = gs_test-pri_archive_info
         archive_mode                = gs_test-pri_archive_mode
         archive_text                = gs_test-pri_archive_text
         ar_object                   = gs_test-pri_archive_object
*        ARCHIVE_REPORT              = C_CHAR_UNKNOWN
         authority                   = gs_test-pri_authority
         copies                      = gs_test-pri_copy
         cover_page                  = gs_test-pri_coverpage
         data_set                    = gs_test-pri_dataset
         department                  = gs_test-pri_department
         destination                 = gs_test-pri_destination
         expiration                  = gs_test-pri_expiration
         immediately                 = gs_test-pri_immediatly
*        IN_ARCHIVE_PARAMETERS       = ' '
*        IN_PARAMETERS               = ' '
         layout                      = gs_test-pri_layout
         line_count                  = gs_test-pri_line_count
         line_size                   = gs_test-pri_line_size
         list_name                   = gs_test-pri_list_name
         list_text                   = gs_test-pri_list_text
*        MODE                        = ' '
         new_list_id                 = gs_test-pri_new_list_id
*        PROTECT_LIST                = C_CHAR_UNKNOWN
*        NO_DIALOG                   = C_FALSE
         receiver                    = gs_test-pri_receiver
         release                     = gs_test-pri_release
*        REPORT                      = C_CHAR_UNKNOWN
         sap_cover_page              = gs_test-pri_sap_coverpage
         host_cover_page             = gs_test-pri_host_coverpage
         priority                    = gs_test-pri_priority
         sap_object                  = gs_test-pri_sap_object
         type                        = gs_test-pri_type
*        USER                        = SY-UNAME
*        USE_OLD_LAYOUT              = ' '
   importing
         out_archive_parameters       = ls_arc_params
         out_parameters               = ls_pri_params
         valid                        = l_valid
   exceptions
         archive_info_not_found       = 1
         invalid_print_params         = 2
         invalid_archive_params       = 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.

  move-corresponding ls_arc_params to gs_test.
  move-corresponding ls_pri_params to gs_test.

分享到:
评论

相关推荐

    SAP 打印机设置(Print Configuration)

    本文将详细阐述如何在 SAP 中设置本地打印机,以及如何调整输出设备的决策顺序。 首先,添加本地打印机到 SAP 的过程是通过执行事务代码 SPAD 来实现的。进入 SAP 后,输入 SPAD 并回车,这将打开打印机设置界面。...

    SAP自定义纸张打印设置技巧

    本文将深入探讨"SAP自定义纸张打印设置技巧",包括如何进行SAP打印机自定义纸张设置、本地打印机配置、解决打印池满的问题以及在SMARTFORMS中调整超大字体大小。 首先,SAP打印机自定义纸张设置是确保企业能够根据...

    如何在sap里设置二维条码

    如果在设置过程中遇到问题,例如二维条码无法打印,可能需要检查以下几个方面: - 条码生成库是否已正确安装和激活。 - SAP 打印服务器和打印机驱动是否支持二维条码。 - 条码相关的 SAP 参数设置是否正确。 - ...

    在sap系统设置纸张打印格式

    在 SAP 系统中,设置纸张打印格式是创建有效报表的关键步骤,特别是当需要针对特定类型的纸张,如针孔纸,进行定制打印时。本文将详细解释如何在 SAP 中进行这一设置。 首先,要启动事务代码 SPAD,这是 SAP 打印和...

    sap abap 报表格式设置方法

    3. **设备类型**:在保存了格式设置后,你需要指定一个设备类型,比如“CNSAPWINR”,这是SAP默认的Windows打印机设备类型。 4. **定义打印格式**:在格式部分,添加你刚才创建的新格式,并对其进行详细设置。这...

    sap消息输出及打印

    1. transaction codes如SPAD(打印机参数维护)、SPRO(系统配置)等,用于设置打印和消息相关参数。 2. SE80(ABAP开发工具)用于编写和调试ABAP代码。 3. Adobe Lifecycle Designer用于设计SMARTFORMS。 4. SAPGui...

    pb 11.5 获取打印机列表

    例如,我们可以先设置`Level`为2,因为这样可以获取到打印机的详细信息(`PRINTER_INFO_2`结构体)。 4. **解析返回信息**:`EnumPrinters`函数成功执行后,返回的信息需要解析。在PowerBuilder中,可以使用`Struct...

    SAP 4.6 Basic Skills Self-Study.pdf

    这部分内容展示了如何设置SAP系统的默认参数,比如打印机名称、日期格式、电话号码和个人地址等。 - **设置打印机名称**:用户可以指定默认打印机。 - **设置日期格式**:根据个人习惯设置日期显示格式。 - **电话...

    Sap9.0安装操作说明

    在本篇《SAP Business One 9.0 安装操作说明》中,我们将深入探讨如何成功地在您的系统上安装和配置SAP Business One 9.0版本。该指南适用于管理员,旨在提供详细的步骤和指导,确保安装过程顺利进行。 ### 1. 安装...

    SAP 条码打印技术

    此外,配置SAP打印机通常涉及使用SPAD工具。例如,安装一个名为LOCL的打印机,访问模式设为'F',表示前端打印,主机为"__DEFAULT",并在主机假脱机接受方法中选择计算机前台打印。 SAP提供多种打印方式,包括C、E、...

    SAP 打印入门

    配置包括设置打印机类型、端口、纸张大小和方向等参数。 2. **输出类型与设备类型**:SAP中的输出类型定义了数据如何被转换为可打印格式,而设备类型则定义了这些输出将如何发送到特定的硬件设备,如激光打印机、...

    sap90 Dos Version

    2. **配置文件**:`Config.csi`可能是SAP90的配置文件,用于设置系统参数和用户环境。在DOS系统中,这样的配置文件通常包含用户定义的路径、系统变量或者启动选项。 3. **驱动程序**:IBMGRP.DRV、LQ1000.DRV、...

    SAP打印输出输出设置说明.doc

    在设置时,如果已有条件表满足需求,通常无需创建新的。如果现有条件表无法满足特定业务需求,用户可以自定义新的条件表。在选择时,系统会提供预设的条件表供用户参考。 2. **选择输出类型**: SAP允许用户根据...

    SAP命令列表

    它帮助管理员了解用户的访问级别及其在 SAP 系统内的操作权限。 - **操作步骤**: - 输入要查询的用户名; - 查看该用户的所有权限对象; - 分析权限设置是否符合安全策略和业务需求。 #### St22:查看 Dump ...

    SAP初级技能自学教程

    - 关键内容:设置打印机名称、日期格式、联系信息等。 - **第8课(选修):最终用户自定义** - 学习目标:掌握在Macintosh和Windows平台上对SAP屏幕进行一定程度的自定义。 - 实现方式:调整字段显示顺序、添加...

    SAP BC460 课程中文自学笔记

    - **发展**: 随着技术进步,SAPScript 也在不断进化,引入更多现代化特性以适应新的需求。 - **趋势**: - 支持更多的媒体类型,如图像、PDF 等; - 更好的跨平台兼容性; - 更丰富的样式和布局选项。 #### 八、...

    PP和WM接口配置及主数据设置

    在SAP系统中,PP(Production Planning)和WM(Warehouse Management)模块的接口配置与主数据设置对于实现高效的生产流程至关重要。本操作手册提供了一套详细的步骤,旨在帮助用户理解和实施这一过程。以下是对相关...

    sap系统管理员操作手册

    - **操作**: 使用RZ11调整参数设置。 - **目的**: 调整系统行为。 - **角色定义** - **操作**: 使用PFCG定义角色。 - **目的**: 实现基于角色的访问控制。 - **传输系统管理** - **传输系统定义** - **...

    SAP系统管理技术概述.pptx

    SAP打印管理涉及到报表和文档的输出配置,包括打印机设置、打印格式和逻辑打印队列的管理。 在实施SAP系统管理时,企业应遵循最佳实践,持续更新和优化系统,以适应不断变化的业务环境,并确保系统的高效、安全和...

    SAP MM 配置大全

    目 录 1 配置总体框架 1 1.1 系统环境 1 1.2 机构设置 1 1.3 工厂结构概图: 1 1.4 产品组成结构图 3 1.5 BOM简要清单 4 1.6 主要业务蓝图 4 2 一般设置部分(全局) 5 ...10.3.5 定义打印机 OMJ3 175

Global site tag (gtag.js) - Google Analytics