05-30-2008 3:25 PM
Hi,
I am building a custom smartform and print program.
The print-program/module-pool will be triggered from a custom screen.
How do I do the following in regards to this custom (non-standard) transaction & process?
- Create a custom output type
- Assign it to the forms, print program/module pool, screens and transaction
The biggest benefit to creating this output type, is probably the fact that I will
be able to configure immediate printing and etc. What other benefits are there, in regards
to creating a custom output type to this custom process?
Please suggest and help.
05-30-2008 3:46 PM
Hello.
If you have a custom transaction that will call a custom smartform, unless you will use that smartform to other situations in future, and don't see any advantage on creating custom output type nor a print program. Your custom transaction can be the print program itself.
You only need to use:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZLTRIBM01'
IMPORTING
fm_name = wa_fm_name1. "To know FM name of Smartform
and
CALL FUNCTION wa_fm_name1
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = wa_control_param
output_options = wa_composer_param
user_settings = space
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5. "To call smarform
Best regards.
Valter Oliveira.
05-30-2008 3:48 PM
05-30-2008 3:52 PM
Hi again.
When you create a smarform, system automatically generates a function module. It's differente from Sapscript.
FM SSF_FUNCTION_MODULE_NAME gives you that name. variable wa_fm_name1 has now the name of the function module that "represents" you ZSMARTFORM.
After that, to actually print the smartform, you must call FM wa_fm_name1 (whicj is now your smartform).
DATA: wa_fm_name1 TYPE rs38l_fnam,
wa_control_param TYPE ssfctrlop,
wa_composer_param TYPE ssfcompop.
wa_control_param-device = 'PRINTER'.
wa_control_param-no_dialog = 'X'.
wa_control_param-langu = 'E'.
wa_composer_param-tdarmod = '1'.
wa_composer_param-tddest = p_printer.
wa_composer_param-tdreceiver = sy-uname.
wa_composer_param-tdcopies = '001'.
In first post replace 'ZLTRIBM01' by your smartform name.
Regards.
Valter Oliveira.
05-30-2008 4:03 PM
Hi,
Thank you for the explanation.
I understand how to call a smartform and write a print program.
However, the issue that I have is how to assign a custom transaction code to a custom output type.
This is necessary for configuration purposes.
05-30-2008 4:15 PM
Hi,
THis probably can be done based on the application your development belongs to you can trying checking transaction nace and see how forms are associated to print program and message types.
Regards,
Himanshu Verma
05-30-2008 4:18 PM
But this is all custom and the smartform is just 5 barcodes.
How do I assign a transaction code to the application/output type?
05-30-2008 4:53 PM
Hello again-
If you really want to create a custom output message, go to transaction V/30. There you can associate you r form and print program.
Best regards.
Valter Oliveira.