on 10-16-2007 2:35 PM
HI All,
i have a requirement wherein i should create a program to print 5 to 10 smart forms .Whenever the program is run 5 forms should be printed automatically and the selection screen contains check boxes for selecting the forms to printed from the remaining five.
Can some one give me an overview of how the program can be developed. The only knowledge i have is giving the form name and getting the function module and then passing the relevant parameters to the function module. I think its not just calling all the ten function modules and passing the parameters.
Thanks in advance
Actually, it is just calling ten function modules and passing the parameters.
Your only extra consideration over printing just one is if you want one or multiple spool requests. Here you will have to adjust the settings in OUTPUT_OPTIONS to flag a new spool request or not.
Regards,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to build a logic like this..
Design your selection screen with check boxes... since your are having 5 forms create 5 check boxes.
Logic...
IF CHECKBOX1 = 'X'
**CALL SMARTFORM1
ENDIF.
IF CHECKBOX2 = 'X'
**CALL SMARTFORM2
ENDIF.
IF CHECKBOX3 = 'X'
**CALL SMARTFORM3
ENDIF.
IF CHECKBOX4 = 'X'
**CALL SMARTFORM4
ENDIF.
IF CHECKBOX5 = 'X'
**CALL SMARTFORM5
ENDIF.
IF CHECKBOX1 = ' ' AND CHECKBOX2 = ' ' AND CHECKBOX3 = ' ' AND CHECKBOX4 = ' ' AND CHECKBOX5 = ' '.
**MEssage no form selected for printing...
ENDIF.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Sai Ram,
my doubt is that if you have one smart form and if we execute the driver program a dialog box pops up and we select the printer. But in the program if you are calling more than one smart form. Then how does the output appear. Do we need to select multiple times. I agree that we can execute without the dialog box. Then will they be saved as multiple spool requests or only the first form executed will save. Can we save all the forms in a single spool request.
Thanks in advance
Hi Madhu,
Recently i completed the same requirement
if its direct printing it gives all the forms
& if it is print preview it gives the first forms first page after getting this print preview
click back button and gives the dialog box again click print preview it gives the
next page
so better to put a radio button to check if print preview required or direct print required
in the form inerface import parameters you will find the parameters
1).CONTROL_PARAMETERS
2).OUTPUT_OPTIONS
DATA: x_control_parameters TYPE ssfctrlop,
x_output_options TYPE ssfcompop.
x_output_options-tdimmed = c_x.
x_output_options-tddest = p_prin.
x_output_options-tdnewid = c_x.
x_output_options-tdreceiver = sy-uname.
x_output_options-tdcopies = '001'.
x_control_parameters-device = 'PRINTER'.
x_control_parameters-no_dialog = c_x.
x_control_parameters-langu = sy-langu.
depends on the radio button you selected
call your function module with the above mentioned parametres as
for direct print:
CONTROL_PARAMETERS = X_CONTROL_PARAMETERS
OUTPUT_OPTIONS = X_OUTPUT_OPTIONS
Regards,
Phani.
Hi Madhu,
You can trigger multiple smartforms. But you need to keep in loop and endloop, you have selection screen with checkboxes, for selecting which form do you want. As its a check bos you can select many. Based on what ever selected in selection screen you need to populate the internal table with all those form names. And inside the loop as usual you will be calling the only one SSF function module name. Now, the thing is parameters which you will be passing to the dynamic function module, you need to consolidate all data of different forms and pass it to dynamic function module or you need to have some case conditions or if conditions so that what ever selected in selection screen based on that you will be writing the respective code under each if condition or case .
Regards,
Hemanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.