Output device tddest in smartforms
Hi,
I am using smartforms to convert the otf data to pdf. The coding is as follows:
* Set the Parameters of smartform
l_s_ssfctrlop-no_dialog = 'X'.
l_s_ssfctrlop-getotf = 'X'.
l_s_output_options-tdnoprint = 'X'.
* call FM to get the name of the FM of smart for smart form
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = g_form_name
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 l_fm_name
EXPORTING
control_parameters = l_s_ssfctrlop
output_options = l_s_output_options
user_settings = ' '
IMPORTING
job_output_info = l_s_job_output_info
TABLES
g_t_datatab = g_t_datatab
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.
REFRESH g_t_pdf_tab.
*Convert to OTF Format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = l_byte_count
TABLES
otf = l_s_job_output_info-otfdata[]
lines = g_t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
I am not passing tddest (output device) to 'l_s_output_options' as I don't want to print it.
I just want to convert the otf data obtained to pdf and use it for further processing.
Will there be any problem if I don't assign any ouput device.
Please note that in the system ouput device 'LOCL' is not maintained.
Thanks,
Soumya.
Hi Valerie,
I am using below code to get the printer name by default , even i want to skip that screen that asks for the printer name. But am unable to get this requirement. I have tried with various combinations but its not working. Please suggest.
control-preview = 'X'.
control-no_dialog = SPACE.
output_options-tddest = 'LP01'.
CALL FUNCTION lv_fmname
EXPORTING
output_options = output_options
contol = control
p_matnr = p_matnr
user_settings = 'X'
TABLES
gt_stpo = gt_stpo
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_cancelled = 4
OTHERS = 5.
Thanks & Regards
Jatin
Similar Messages
-
Output device in SPAD/Smartform
Hi All,
We have a ouput device created through SPAD transaction with a name of 14 characters.
We want to pass the output device name to the Smartform. But the smartform has a parameter of ssfcompop-tdest of only 4 characters.
We do not want to change the output device name from 14 characters to 4 characters.
Is there any alternative to pass the Output device name to smartform without changing the name of output device.
Thanks in advance,
Best regards,
PrashantHi prashant,
even you create 14 chars or 20 chars it doesn't matter. but we will pass the short name not the name which you created 14 chars. i guess you might gave <b>short name</b> for your printer in SPAD while creating check it, that you have to pass.
Regards
vijay -
Output device option in smartform
Hi,
I am getting the below error in a program which calls a smartform.
'Output device LOCL is not defined'. As the output device LOCL is not maintained in the system through tcode SPAD, ia m getting this.
My doubt is if i remove the option of giving output device, will it work.
The coding is as follows:
* Set the Parameters of smartform
l_s_ssfctrlop-no_dialog = 'X'.
l_s_ssfctrlop-getotf = 'X'.
l_s_output_options-tddest = 'LOCL'. --------> if I comment this line, will it work without any error as I don't want to print it.
l_s_output_options-tdnoprint = 'X'.
* call FM to get the name of the FM of smart for smart form
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = g_form_name
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 l_fm_name
EXPORTING
control_parameters = l_s_ssfctrlop
output_options = l_s_output_options
user_settings = ' '
IMPORTING
job_output_info = l_s_job_output_info
TABLES
g_t_datatab = g_t_datatab
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.
Thanks & Regards,
SoumyaHi,
One more doubt if I give the parameter
l_s_output_options-tdnoprint = 'X'. will it prevent the printing of the form generated or is it just to disable the print button in the pop up.
Thanks & Regards,
Soumya. -
OUTPUT DEVICE SEND TO SMARTFORMS
Dear All,
I have to send output device of smartforms from my driver program.
Waiting for reply.
Regards,
Shrikant.Hi,
Please check this code.
DATA: lx_ssfctrlop TYPE ssfctrlop,
lx_ssfcompop TYPE ssfcompop.
lx_ssfcompop-tddest = 'output device'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = l_fname
IMPORTING
fm_name = l_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
CALL FUNCTION l_fm_name
EXPORTING
output_options = lx_ssfcompop
Thanks
Abhijit -
Output device issue in smartform
Hi All,
I have configured smartform and driver program throough nace and testing output . I am facing the problem of alignment of output which is changing depening on Printer. i.e., for printer one the field KOMVD-KBETR(VAT) is prining properly .But if we give another printer or MAIL_PDF as output device then it is moving towards left and alignemnt is wront.
Please let me know if any solution and max points will provided.
Thanks,
J.P
Edited by: Prakash Jeevakala on Sep 14, 2009 2:00 PMWhen using SAPscript or SmartForms, HP (PCL based) printers in SAP will generate an extra 1/4 inch or so on the left margin.
Design your form for the specific printer. If multiple printer types will be used, design the form to fit regardless of the margin adjustment. -
Smartforms, Output device WA_EKPO-NETPR not defined., ME9F
Hi
I am creating a form of purchase order, I am trying to have the price printed, but I have the following message when I try to print:
Output device WA_EKPO-NETPR not defined.
Message no. SSFCOMPOSER011
Diagnosis
The output device specified is not known in the SAP System. Valid output devices are maintained in spool administration.
System Response
The system issues an error message.
Procedure
Choose an output device from the possible entries help on the printer dialog box.
Procedure for System Administration
Check the output devices defined in spool administration.
thankshi, i guess you havent defined your printer (i.e) output type.
if you use driver program then when you call your sf just insert the below code.
also please check your reference field
NETPR in > global declaration >Currency / Quant. Fields and select either currency or quantity.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = f_sf_formname
* VARIANT = ' '
* DIRECT_CALL = ' '
importing
fm_name = f_sf_fmname
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.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-preview = 'X'.
st_output_options-tddest = 'WINDEFAULT'.
and also please check your smartform -> form attributes -> output tab page format and also check output format.
regards,
koolspy. -
Change output device in smartform when using gui_diwnload
can any one please tell me how to change the output device for gui_download into pdf for a smartform.
(i want the setting to be done in my report -driver program , not in sap application tool bar settings)
kindly please suggest me,
thanks in advance,
koolspy.I give you an example
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
Parametros por defecto para la generación de la orden de spool.
ls_composer_param-tddataset = 'PDF'.
ls_composer_param-tdsuffix1 = 'FACT.'.
ls_composer_param-tdsuffix2 = nast-OBJKY.
ls_composer_param-TDDEST = 'LP02'.
output_options-tdprinter = 'PRINTER'.
ls_composer_param-tdnewid = 'X'.
ls_composer_param-tddelete = 'X'.
ls_composer_param-tdfinal = ' '.
ls_composer_param-tdlifetime = 8.
ls_control_param-no_dialog = 'X'.
ls_control_param-preview = ' '.
ls_composer_param-tdimmed = ' '.
ls_control_param-getotf = 'X'.
call smartform invoice
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = repeat
is_vbdkr = is_vbdkr
IMPORTING
job_output_info = job_output_info
document_output_info = document_output_info
job_output_options = job_output_options
TABLES
gt_vbdpr = gt_vbdpr
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Convertimos el fichero OTF a PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
bin_filesize = file_size
BIN_FILE =
TABLES
otf = job_output_info-otfdata
lines = lt_pdf
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
Hope it helps. -
SmartForms : Printing Non-English characters with SWIN output device?
I have a Japanese Text (entered in Unicode at So10) and I want to print it from my SmartForms application using SWIN device type.
I thought SWIN converted all the components into graphics before sending to printer. To my surprise, the Japanese text printed out as "########".
I even tried duplicate the SWIN output device to another output device and changed the character set to 4103 UTF-16LE Unicode / ISO/IEC 10646 but then the print process hang.
Anyone knows how to overcome the problem so that I can print Japanese with SWin output device?I have a Japanese Text (entered in Unicode at So10) and I want to print it from my SmartForms application using SWIN device type.
I thought SWIN converted all the components into graphics before sending to printer. To my surprise, the Japanese text printed out as "########".
I even tried duplicate the SWIN output device to another output device and changed the character set to 4103 UTF-16LE Unicode / ISO/IEC 10646 but then the print process hang.
Anyone knows how to overcome the problem so that I can print Japanese with SWin output device? -
Default output device for smartform
Hi all
how can we assign a default output device to a smart form so that the every time we execute a smartform it doesnt ask for a output device?
thanks in advance....Hi
First see what your default out put device is.
That you can see in SU3>Default>OutputDevice.
Suppose it is set as 'PRINTER' .
Then in ur print program you have to write the logic as below.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_smartform
IMPORTING
FM_NAME = WF_FUNCMODULENAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CLEAR: WA_CONTROL_PARAMETERS.
WA_CONTROL_PARAMETERS-GETOTF = 'X'.
WA_CONTROL_PARAMETERS-LANGU = 'E'.
WA_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.
CALL FUNCTION WF_FUNCMODULENAME
EXPORTING
CONTROL_PARAMETERS = WA_CONTROL_PARAMETERS "Control Params
OUTPUT_OPTIONS = WA_OUTPUT_OPT "Output Options
WF_CARRID = WF_CARRID
WF_CONNID = WF_CONNID
WF_FLDATE = WF_FLDATE
IMPORTING
DOCUMENT_OUTPUT_INFO = WA_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = WA_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = WA_JOB_OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5. -
Output device LOCL is not defined
Hi,
I am getting an error message while executing a report containing smartform
'Output device LOCL is not defined'.
The coding is as follows:
l_s_ssfctrlop-no_dialog = 'X'.
l_s_ssfctrlop-getotf = 'X'.
l_s_output_options-tddest = 'LOCL'.
l_s_output_options-tdnoprint = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
Please let me know what is the issue here.
Thanks,
Soumya.Hi,
Might be the local printer is not defined. Try using LP01.
To verify for LOCL...
Goto SPAD tcodeFull Administrations>Mention the LOCL in the Output Device I/0 Field.
Regards,
Aditya -
Output_options in SF; selecting output device
Hi all,
i've been struggling with the following, maybe anyone can help?
In a smartforms i want to, dynamically determine the printer for output.
Whatever i do, i cant get it to work. I have set 'print directly' OFF so i can catch the printjobs in the spool. When i look in the Spool, allways the default printer is selected. And when i delete my default printer, i get an error while printing saying i have to define a printer.
This is what i tried so far:
-set USER_SETTINGS to SPACE in the form
- set OUTPUT_OPTIONS-DDEST to the short printername
- set the OUTPUT_OPTIONS-TDPRINTEr to the long printer name
- i even tried the following code which comes with a popup to select th eoutput device..
data : g_dest TYPE rspopname,
g_printer TYPE rspoptype.
*FM to accept the device type and returns the short name of the output device
CALL FUNCTION 'EFG_GET_PRINTER'
EXPORTING
x_no_dialog = ' '
x_obligatory = 'X'
IMPORTING
y_tddest = g_dest
EXCEPTIONS
cancelled = 1
failed = 2
OTHERS = 3.
*device type name for the output device
SELECT SINGLE patype "#EC CI_NOFIELD
FROM tsp03d
INTO g_printer
WHERE padest = g_dest.
output_options-tddest = g_dest.
output_options-tdprinter = g_printer.
The result is allways the same: in the Spool, it has the default printer defined...
What am i doing wrong?
Is it wrong to send the jobs to the spool, where i've deactiveted 'print directly'?
Is it wrong to look at the spool-job for determining on which printer it will be printed?
Hope someone can help!
thanks
Joris BotsHi Ravi,
My default printer in Own data is set to let's say PR2007.
I'm not sure what other default printer you mean.
What i want is to send the smartform to a printer
depending on the user's printer in its Own Data.
so if a usre has defined printer PR2007, then the smartform should go to PR2557
if the user has defined printer PR3004, then the form should go to PR3557, etc.
Thank you for your help
Joris
Message was edited by:
Joris Bots -
Update was terminated: maintain output device. How to avoid?
Hi,
I created a smartform, and when it is printed, we get the error: Please maintain an output device in your user master data.
The client wants to avoid this error, without having to maintain the output device in the user master data.
So I look for the printer device in the NAST table, and pass the printer device in the output parameters when the form is being called.
But I still get the same message. Anybody know a solution for this? THX.
Here some of my code.
Select printer name
select single LDEST from nast into v_printer_name
where OBJKY = NAST-OBJKY.
output_options-tddest = v_printer_name.
output_options-tdprinter = v_printer_name.
call function FM_NAME
EXPORTING
control_parameters = control_parameters
output_options = output_options
user_settings = ' 'Hi,
Have you checked the sy-subrc value for the select statement that fetches LDEST from NAST? If the condition fails try to get the user default printer and pass it on to the smartforms.
select single LDEST from nast into v_printer_name
where OBJKY = NAST-OBJKY.
IF sy-subrc = 0.
output_options-tddest = v_printer_name.
output_options-tdprinter = v_printer_name.
else.
wa_users-mandt = sy-mandt.
wa_users-bname = sy-uname.
APPEND wa_users TO i_users.
Get the user default printer.
CALL FUNCTION 'SUSR_GET_USER_DEFAULTS'
TABLES
users = i_users
EXCEPTIONS
OTHERS = 0.
READ TABLE i_users INTO wa_user1 INDEX 1.
IF sy-subrc EQ 0.
set user default printer
output_options-tddest = v_printer_name.
output_options-tdprinter = v_printer_name.
ENDIF. -
Changing font size for output device / spool file
hi all,
i see only these below parameters for print in the code of the transaction which gets spool no and output device as input and prints it.
i need to increase the font size of the print out.any help?
LAYOUT = 'X_65_132'
LINE_COUNT = 60
LINE_SIZE = 110Hi Sona,
You can not do that in report.
If you need some output format like font type, color, size you have to use Smartforms or Sapscript.
Sapscript Tcode: SE71,
Smartforms TCode: SMARTFORMS.
Regards, -
Maintain output device in user master data
when we try to print the Purchase order smartform we are getting the
following update terminated error message.
" Please maintain output device in user master data".
1. If we maintain output device in my user profile as any printer name
then we are not getting the update terminated error message.
2. when we select the network printer it is always printing
using the output device maintained in the user profile (example
LOCL). it is not printing using network printer.
when we select the network printer it should overwrite the user profile
output device.
Can we have the network printer selected irrespective of the printer
maintained in the user profile?
Please provide the solution
Title was edited by:
Alvaro Tejada GalindoHi
If you mention printer as LOCL the system will use network printer and the printer will be controled by Windows.
If you specify printer name the printer will be controled by SAP.
I hope now you can re-analyze your issue.
Regards
Surya. -
Output Device prints 3 copies of each print out
Hi Frnds,
We are facing a problem with the output device.
When we try to print anything from SAP to an out put device, it gives us 3 copies of same printout.
We tried with smartforms, sap scripts and even a normal print request from the anywhere in SAP. For the particular output device it gives 3 printouts.
That output device is configured to a particular printer here in the user location.
We have also tried couple of other things,
Made that particulrt printer as the default one in our operating system (Windows) and printed using LOCL output device. It printed only one copy.
Made other printer as the default in Windows and then print using LOCL output device, now again it printed only one copy, to another printer.
Since it prints 3 copies of the same thing from anywhere in SAP with this op device, We think that there is no problem in Print programs or in Output condition configurations.
The spool that gets generated out of this request says "No. of copies" 1.
Not really sure where its going wrong. We think the problem is somewhere in Basis settings.
If any one has faced this kind of issue can u please let me know how we can rectify this?
Regards,
Karthick CHello,
Are you using Access Method G for the output?
If so you can check if the following setting was set:
set use_copies = N (where N = number of copies) in
HKEY_CURRENT_USER\Software\SAP\SAPlpd\SAPLPD
Check the SAP note: 1149136 also.
Regards,
David
Maybe you are looking for
-
HT2623 how can I change my icloud email address?
I have not been able to change my icloud email address and would like to do so. I know before this was not an option. Has it changed?
-
Why do I get a memory leak when I use the Write Data Storage VI in a loop
I have a large application that I am collecting various data points from. For the most part they are simple scalar values that need to be logged on a regular basis. I was attempting to use the new TDM files and the storage VI's I though everything
-
How do I get to my apple email account to verify it for Icloud
I just downloaded the new IOS5 software and my music from Itunes is not on my phone and I cannot figure out where to verify my email. I went on line and reset my password, and sent myself an email to verify, but I can't seem to figure out where my a
-
Ho do I know if an ORACLE autmatically starts up with the linux machine?
three of the machines are RAC database and there is one single node database. How do I know if the DB will automatically startup with Linux machine? and if does not automatically start how can I modify the DB's so that they will automatically start w
-
I created my first site which has the following address: web.mac.com/myname/iweb/TopDragster/Home.html I then created a second site named miyout. Can anyone tell me what the name of that site would be? You would think it wold be easy but when I go to