2024年3月24日发(作者:苟资)
下面是SE38 call smartform的code.
FM_NAME其实是你smartforms生成的函数名称(可能象/1BCDWB/SF00000010)
smartforms其实生成了一函数
当然确定你可以直接将FM_NAME写成'/1BCDWB/SF00000010'
在调用smartforms函数时,exporting 参数对应smartforms里面的import,tables
也是import,只是输入内表做参数.在smartforms->global settings->form interface定
义.
对于传到smartforms的内表,global settings->Global definitions定义一个work
area (iWA).通常做法是pages and windows某window create a table,同时定义好line
type,在table ->data拦写上Loop 内表into iWA,当然可create program lines处理更
复杂的逻辑.
**-----------Use Smartform to print ---------------*
form callform.
************************************************************************
***********************CALL SMARTform FUNCTION**************************
DATA FM_NAME(30) TYPE C.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formNAME = 'ZDOCform'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_form = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
.
*Loop at acctxt.
* write : acctxt-saknr, acctxt-txt20 .
*endloop.
2024年3月24日发(作者:苟资)
下面是SE38 call smartform的code.
FM_NAME其实是你smartforms生成的函数名称(可能象/1BCDWB/SF00000010)
smartforms其实生成了一函数
当然确定你可以直接将FM_NAME写成'/1BCDWB/SF00000010'
在调用smartforms函数时,exporting 参数对应smartforms里面的import,tables
也是import,只是输入内表做参数.在smartforms->global settings->form interface定
义.
对于传到smartforms的内表,global settings->Global definitions定义一个work
area (iWA).通常做法是pages and windows某window create a table,同时定义好line
type,在table ->data拦写上Loop 内表into iWA,当然可create program lines处理更
复杂的逻辑.
**-----------Use Smartform to print ---------------*
form callform.
************************************************************************
***********************CALL SMARTform FUNCTION**************************
DATA FM_NAME(30) TYPE C.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formNAME = 'ZDOCform'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_form = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
.
*Loop at acctxt.
* write : acctxt-saknr, acctxt-txt20 .
*endloop.