本文主要是介绍Smartforms连续打印(L_CONTROL_PARAMETERS参数设置),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
IF GT_DATA[] IS NOT INITIAL.
LOOP AT GT_DATA .
L_CONTROL_PARAMETERS-NO_OPEN = 'X'.
L_CONTROL_PARAMETERS-NO_CLOSE = 'X'."
AT FIRST .
L_CONTROL_PARAMETERS-NO_OPEN = SPACE."首次运行时打开打印对话框
L_CONTROL_PARAMETERS-NO_CLOSE = 'X'."并且不关闭假脱机请求
ENDAT .
CLEAR GT_DATA_IT[] .
SELECT VBELN POSNR MATNR ARKTX FKIMG VRKME NETWR INTO CORRESPONDING FIELDS OF TABLE GT_DATA_IT[] FROM VBRP
WHERE VBELN = GT_DATA-VBELN
.
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = L_CONTROL_PARAMETERS
OUTPUT_OPTIONS = L_OUTPUT_OPTIONS
USER_SETTINGS = ''
GS_INVOICE_HEAD = GT_DATA
TABLES
GT_INVOICE_ITEM = GT_DATA_IT[]
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
DATA: LS_JOB_OUTPUT_INFO TYPE SSFCRESCL.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
JOB_OUTPUT_INFO = LS_JOB_OUTPUT_INFO
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 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.
这篇关于Smartforms连续打印(L_CONTROL_PARAMETERS参数设置)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!