2005 Dec 13 1:08 PM
Hi all,
i must create a smartforms for my customer.
Quickly he want to select 1..N employee(s) in ALV grid, and when he click on one button, smartforms is launched, but my customer want to print every forms in one time, i.e each form comes following the other, in fact in a pool.
Any ideas ?
Regards,
2005 Dec 14 12:19 PM
Ok, i must pass employees code in table and in smartforms, for each employee i must get data. But i heard that this method is low compared to the method to pass all data in table ?
Regards,
Hi all,
i must create a smartforms for my customer.
Quickly he want to select 1..N employee(s) in ALV grid, and when he click on one button, smartforms is launched, but my customer want to print every forms in one time, i.e each form comes following the other, in fact in a pool.
Any ideas ?
Regards,
2005 Dec 13 4:08 PM
2005 Dec 13 4:19 PM
Hi,
Have the smartform developed, to which you pass all the selected employees in a internal table...
Loop on this internal table and display the relevant data for each employee... so, if 5 employees are selected(lets say its 2 pages for each employee), you get data for each employee one after other (in total 10 pages)
Regards,
Raj
2005 Dec 13 4:24 PM
Hi,
Once user selects the customer which he want to print trap all the customer details in Internal table & then pass this internal table data to smart forms and also write the logic in smartforms layout that for each new customer trigger new page . with this you can print all the customer at once.
check any of the SAP created smartforms example :LB_BIL_INVOICE base on this you can write your logic.
Hope this will help you.
Thanks
Rajeev
2005 Dec 14 12:19 PM
Ok, i must pass employees code in table and in smartforms, for each employee i must get data. But i heard that this method is low compared to the method to pass all data in table ?
Regards,
2005 Dec 14 12:39 PM
I don't understand. Well, i pass table with all employees but how can i do for each employee to print a form ? if i loop on table how to create rupture when employee change ?
2005 Dec 14 11:31 PM
Is not better to use import parameter of the generated function module: CONTROL_PARAMETERS ?? Particularly NO_OPEN and NO_CLOSE parameters ?
2005 Dec 15 2:09 AM
Hi ,
In you program you can control While calling the form.
Please call smartform between Loop at end loop of your internal table.
Call you smart form in the loop.
Please make sure Dialog will be open once means program will ask for O/P device for Once.
Need help let me know. I have developed a form for HR records for employees and if user selects 'N' no.of enmloyees but form prints all in one shot. But printer will be asked only once and if you run this in back groud it will check user default printer.
Hope this will help.
2005 Dec 15 7:24 AM
Thanks so much Lanka,
you save me i will not hesitate to ask for your assistance.
Regards.
2005 Dec 22 10:40 AM
Hi,
print forms in one spool work good, thank so much but i've a little problem. I want to suppress all output dialog windows, when user click on button i want directly to preview forms.
I've a internal table with employee number and i do that (simplified version) :
LOOP AT it_pernr_to_print INTO wa_simple.
PERFORM prepare_data.
PERFORM transfer_data_to_smartforms.
ENDLOOP.
FORM transfer_data_to_smartforms USING p_index
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZHR_PRF_SHEET'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF p_index EQ 1. " First call
ctrl_param-no_open = space.
ctrl_param-no_close = 'X'.
ctrl_param-NO_dialog = 'X'.
output_param-TDDEST = 'PRINTER'.
ELSEIF is_last EQ 'X'. " Last call
ctrl_param-no_open = 'X'.
ctrl_param-no_close = space.
ctrl_param-NO_dialog = 'X'.
output_param-TDDEST = 'PRINTER'.
ELSE.
ctrl_param-no_open = 'X'. " Nth call
ctrl_param-no_close = 'X'.
ctrl_param-NO_dialog = 'X'.
output_param-TDDEST = 'PRINTER'.
ENDIF.
CALL FUNCTION fm_name
EXPORTING
CONTROL_PARAMETERS = ctrl_param
OUTPUT_OPTIONS = output_param
personal_data = prfl_0002
since_data = since_data
init_edu_level = 'TEST'
init_edu_spe = 'TEST'
TABLES
it_language = it_lang
it_training_group = it_training
it_opc = it_opc
it_prc = it_prc
it_last_dev = it_last_dev.
ENDFORM.
With this code, output dialog always display.
Regards,
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |