on 07-05-2009 6:37 AM
Hi all,
I have a issue on to print multiple pages in single spool,i can able to print multiple pages in multiple spool .I am doing Check Print smartforms in that i need to print Multiple pages in single spool.Currently i am using the below code please help to solve this issue.
IF gv_tabix = 1.
lwa_outp_option-tdnewid = 'X'.
ELSE.
lwa_outp_option-tdnewid = ' '.
ENDIF.
Thanks,
Deesanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are trying to print multiple forms in a single spool use tdimmed, it should work.
IF gv_tabix = 1.
lwa_outp_option-tdimmed = 'X'.
ELSE.
lwa_outp_option-tdimmed = ' '.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
TABLES: spfli.
DATA:
t_spfli type STANDARD TABLE OF spfli.
DATA:
fs_spfli TYPE spfli.
DATA:
w_form TYPE tdsfname,
w_flag TYPE i,
f_nam TYPE rs38l_fnam,
w_input TYPE ssfcompin,
w_control TYPE ssfctrlop.
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
SELECT-OPTIONS s_carrid FOR spfli-carrid.
SELECTION-SCREEN END OF BLOCK blk .
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
PARAMETERS:
p_single RADIOBUTTON GROUP rad1,
p_ind RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK block1.
START-OF-SELECTION.
PERFORM display_data.
PERFORM ssf_function_module_name.
PERFORM spool_request.
*&---------------------------------------------------------------------*
*& Form display_data
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM display_data .
SELECT * FROM spfli INTO TABLE t_spfli WHERE carrid IN s_carrid.
ENDFORM. " display_data
*&---------------------------------------------------------------------*
*& Form ssf_function_module_name
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM ssf_function_module_name .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = ' '
IMPORTING fm_name = f_nam
EXCEPTIONS no_form = 1
no_function_module = 2.
* IF sy-subrc NE 0.
* MESSAGE 'Form cannot be displayed' TYPE 'E' .
* ENDIF. " IF sy-subrc eq 0
ENDFORM. " ssf_function_module_name
*&---------------------------------------------------------------------*
*& Form spool_request
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM spool_request .
w_input-dialog = 'X'.
CALL FUNCTION 'SSFCOMP_OPEN'
EXPORTING input = w_input
EXCEPTIONS error = 1.
*" LOOP AT t_spfli .....................................................
LOOP AT t_spfli INTO fs_spfli.
w_control-no_open = ' '.
w_control-no_close = ' '.
*"Single spool request..................................................
IF p_single EQ 'X'.
w_control-no_open = 'X'.
w_control-no_close = 'X'.
ELSE.
*"Individual spool request.............................................
IF w_flag NE '1'.
w_control-no_open = 'X'.
w_control-no_close = ' '.
w_flag = 1.
CALL FUNCTION ' '
EXPORTING control_parameters = w_control
fs_spfli = fs_spfli
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4.
endif. " IF w_flag ne '1'
ENDIF. " IF p_single eq 'X'.
CALL FUNCTION ' '
EXPORTING
control_parameters = w_control
fs_spfli = fs_spfli
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4.
ENDLOOP. " LOOP at t_spfli into ...
*&--------------------------------------------------------------------*
*&This function module close the spool request *
*&--------------------------------------------------------------------*
CALL FUNCTION 'SSFCOMP_CLOSE'
EXCEPTIONS error = 1.
ENDFORM. " spool_request
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deensath,
Loop your internal table before you call your smartform inthedriver program.
Then implement the below given code. Here first means the number of lines of your internal table. Declare flag variable.
Is_Control Parameter is the parameter passed when u call smartform Funciton module.
Loop your <internal table >.
IF first GT 1.
AT FIRST.
l_flag_first = space.
ENDAT.
IF l_flag_first IS INITIAL.
For first loop
ls_control_param-no_close = c_x.
ls_control_param-no_open = space.
l_flag_first = c_x.
ELSE.
For other loop
ls_control_param-no_close = c_x.
ls_control_param-no_open = c_x.
ENDIF.
AT LAST.
For last loop
ls_control_param-no_close = space.
ls_control_param-no_open = c_x.
ENDAT.
ENDIF.
Call Smartform <FM>.
end loop.
This code i have used for my proj, it will work for sure.
Regards,
Vanisree G
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.