23 Kasım 2011 Çarşamba

SAP/ABAP: Smartforms, SSF_OPEN, SSF_CLOSE

REPORT  zsmart_ssf.

DATA : gv_formname TYPE tdsfname VALUE 'ZSMART',
gv_fm_name  TYPE rs38l_fnam,

gt_01 LIKE pa0001 OCCURS 0 WITH HEADER LINE,

gs_cont TYPE ssfctrlop.

PARAMETERS : p_pernr TYPE persno.

START-OF-SELECTION.
SELECT * FROM pa0001 INTO TABLE gt_01.

gs_cont-no_open  = 'X'.
gs_cont-no_close = 'X'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname                 = gv_formname
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
IMPORTING
FM_NAME                  = gv_fm_name
* EXCEPTIONS
*   NO_FORM                  = 1
*   NO_FUNCTION_MODULE       = 2
*   OTHERS                   = 3
.

CALL FUNCTION 'SSF_OPEN'
EXPORTING
*     ARCHIVE_PARAMETERS       =
*     USER_SETTINGS            = 'X'
*     MAIL_SENDER              =
*     MAIL_RECIPIENT           =
*     MAIL_APPL_OBJ            =
*     OUTPUT_OPTIONS           =
control_parameters       = gs_cont
EXCEPTIONS
formatting_error         = 1
internal_error           = 2
send_error               = 3
user_canceled            = 4
OTHERS                   = 5
.

DO 20 TIMES.

CALL FUNCTION gv_fm_name
EXPORTING
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
control_parameters         = gs_cont
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
*   OUTPUT_OPTIONS             =
*   USER_SETTINGS              = 'X'
i_pernr                    = p_pernr
* IMPORTING
*   DOCUMENT_OUTPUT_INFO       =
*   JOB_OUTPUT_INFO            =
*   JOB_OUTPUT_OPTIONS         =
TABLES
t_pers                     = gt_01
EXCEPTIONS
formatting_error           = 1
internal_error             = 2
send_error                 = 3
user_canceled              = 4
OTHERS                     = 5
.

ENDDO.

CALL FUNCTION 'SSF_CLOSE'
*   IMPORTING
*     JOB_OUTPUT_INFO        =
EXCEPTIONS
formatting_error       = 1
internal_error         = 2
send_error             = 3
OTHERS                 = 4
.

Hiç yorum yok:

Yorum Gönder

İnsdroid

Sabahtan beri çatada çutada çatada çutada… Bitmedi yine de… Neyse, yolumuz uzun, toparlıyorum çantamı, adaptörü falan tıkıştırıyorum bir şe...