如何在sap里设置打印机参数
2007-12-14 17:13
399 查看
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.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1551797
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.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1551797
相关文章推荐
- 如何在sap里设置打印机参数
- 如何在sap里设置打印机参数
- 如何在sap里设置打印机参数
- 如何在sap里设置打印机参数
- IntelliJ IDEA中如何设置忽略@param注释中的参数与方法中的参数列表不一致的
- ffmpeg命令机制分析--参数如何被设置
- 如何设置电脑共享打印机
- 如何设置超时参数(串行通讯)
- 百度外卖wifi小票打印机如何设置连接手机
- 串行通讯如何设置超时参数
- vs如何向main函数传参数、设置字符编码、设置OpenMp等
- Jquery如何序列化form表单数据为JSON对象 C# ADO.NET中设置Like模糊查询的参数 从客户端出现小于等于公式符号引发检测到有潜在危险的Request.Form 值 jquery调用iframe里面的方法 Js根据Ip地址自动判断是哪个城市 【我们一起写框架】MVVM的WPF框架(三)—数据控件 设计模式之简单工厂模式(C#语言描述)
- 如何查询和设置系统参数
- 如何在maven环境中设置JVM参数
- 如何修改使用 DocumentProperties() 函数的打印机设置
- VS2010如何设置使得可以是程序利用argv参数来运行
- RHCE 系列(二):如何进行包过滤、网络地址转换和设置内核运行时参数
- kshell 如何传递参数给shell和调用参数 以及设置参数的默认值
- pdf打印机如何设置双面打印
- 在PB程序中如何设置打印机?