‎2008 Mar 27 11:38 AM
Hi expart..
In selection screen using select-options . i m puting the debit no 1100019222 to 1100019224 . the output shows only 1 page . n't showing 3 page .in smartform .Pls tell me how to print multiple page . i m using
data : l_sform type tdsfname,
l_fm_name type rs38l_fnam.
data : control_param like ssfctrlop.
clear control_param-no_dialog .
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : s_budat for bsid-budat ,
s_belnr for bsid-belnr .
SELECTION-SCREEN : END OF block b1 .
move 'ZS_FI_CREDITNOTE' to l_sform.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = l_sform
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = l_fm_name.
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at itab_debit.
if sy-tabix = 1.
clear control_param-no_dialog .
else.
control_param-no_dialog = 'X'.
endif.
read table itab_basic with key belnr = itab_debit-belnr .
CALL FUNCTION l_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
itab_debit = itab_debit
itab_basic_value = itab_basic
itab_t030k = itab_t030k
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
new-page.
endloop.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
but n't working...
i ll give points...
regards
bhabani
‎2008 Mar 27 11:46 AM
Hi,
I have Corrected the code.Check and reply.
data : l_sform type tdsfname,
l_fm_name type rs38l_fnam.
data : control_param like ssfctrlop.
clear control_param-no_dialog .
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : s_budat for bsid-budat ,
s_belnr for bsid-belnr .
SELECTION-SCREEN : END OF block b1 .
move 'ZS_FI_CREDITNOTE' to l_sform.
control_param-no_open = 'X'.
control_param-no_close = 'X'.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = l_sform
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = l_fm_name.
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
ARCHIVE_PARAMETERS =
user_settings = ' '
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJ =
output_options =
control_parameters = control_param
IMPORTING
JOB_OUTPUT_OPTIONS =
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.
loop at itab_debit.
if sy-tabix = 1.
clear control_param-no_dialog .
else.
control_param-no_dialog = 'X'.
endif.
read table itab_basic with key belnr = itab_debit-belnr .
CALL FUNCTION l_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
itab_debit = itab_debit
itab_basic_value = itab_basic
itab_t030k = itab_t030k
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
new-page.
endloop.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
JOB_OUTPUT_INFO =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = errtab.
IF NOT errtab IS INITIAL.
add your handling
ENDIF.
Regards,
Morris Bond.
Reward Points if helpful.
‎2008 Mar 27 11:46 AM
Hi,
I have Corrected the code.Check and reply.
data : l_sform type tdsfname,
l_fm_name type rs38l_fnam.
data : control_param like ssfctrlop.
clear control_param-no_dialog .
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : s_budat for bsid-budat ,
s_belnr for bsid-belnr .
SELECTION-SCREEN : END OF block b1 .
move 'ZS_FI_CREDITNOTE' to l_sform.
control_param-no_open = 'X'.
control_param-no_close = 'X'.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = l_sform
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = l_fm_name.
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
ARCHIVE_PARAMETERS =
user_settings = ' '
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJ =
output_options =
control_parameters = control_param
IMPORTING
JOB_OUTPUT_OPTIONS =
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.
loop at itab_debit.
if sy-tabix = 1.
clear control_param-no_dialog .
else.
control_param-no_dialog = 'X'.
endif.
read table itab_basic with key belnr = itab_debit-belnr .
CALL FUNCTION l_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
itab_debit = itab_debit
itab_basic_value = itab_basic
itab_t030k = itab_t030k
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
new-page.
endloop.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
JOB_OUTPUT_INFO =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = errtab.
IF NOT errtab IS INITIAL.
add your handling
ENDIF.
Regards,
Morris Bond.
Reward Points if helpful.
‎2008 Mar 27 11:50 AM