Calling Smartforms through function module
Create structure
* Goto se11.
* Select data type and give name and select structure.
* Give short description fields.
Create table type
* Goto se11.
* Select data type and give name and select table type.
* Give short description and line type is <structure name>.
Create smart form
* Create table and et data from table.
* Form Interface declare internal table.
* Global definitions declare work area.
Calling smart form through function module
TYPES: BEGIN OF ty_vbap,
vbeln TYPE vbap-vbeln,
posnr TYPE vbap-posnr,
matnr TYPE vbap-matnr,
matwa TYPE vbap-matwa,
END OF ty_vbap.
data: it_vbap type table of ty_vbap,
wa_vbap type ty_vbap.
select vbeln
posnr
matnr
matwa
from vbap
into table it_vbap
where vbeln lt '0000000015'.
sort it_vbap by vbeln.
CALL FUNCTION '/1BCDWB/SF00000170'
* EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
it_vbap = it_vbap
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Output:
Comments
Post a Comment