Smart form printing without dialog box
Hi,
Thanks to eveyone for reading this post.
I want to print a form thru smartform. I am able to do that now by calling that smart form and passing the data. Now i wanted to print multiple docs using smartform so that the dialog box printer doesnt apppear and all printing is executed without any user intervention.
I tried to call smart form in the following way so that data is printed to the printer without any thing appearing on the screen (dialog box).
I did consult the forums here and when i try it I either see the dialog box or see other sy-subrc.
Code -
Data: w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop.
W_COMPOP-tdnewid = 'X'.
W_COMPOP-tdFINAL = 'X'.
W_COMPOP-tdimmed = 'X'.
W_COMPOP-tddelete = 'X'.
W_COMPOP-tdcopies = 1 .
*W_COMPOP-TDNOPREV = 'X' .
W_COMPOP-TDDEST = 'LP01'.
*W_COMPOP-tdnoprint = 'X'.
W_ctrlop-DEVICE = 'PRINTER'. " Here we dont give printer name 'KX-P3696'.
w_ctrlop-no_dialog = 'X'.
w_ctrlop-preview = ''.
CALL FUNCTION '/1BCDWB/SF00000135'
*CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
i would be glad if anyone can help me. I did a few RND in the code above to make it work but it dosent.
Moreover when the dialog box appears then there is a text in the bar below which says please maintain printer master data. (something like that). Is that creating a problem ?
Thanks,
JG
REPORT ZANNTEST.
Data Declarations
DATA : control TYPE ssfctrlop,"Smart Forms: Control structure
output_options TYPE ssfcompop,"Smart Composer (transfer) options
v_fm TYPE rs38l_fnam."Form Name
control-preview = 'X'."Preview the output of Smartform
control-no_dialog = 'X'."Don't show Dialog
output_options-tddest = 'LOCL'."Spool: Output device
output_options-tdnoprint = 'X'."No printing from print preview
Function Module to get Generated Fucntion module of Smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZCONEXTNLETTER' " your created zform
IMPORTING
fm_name = v_fm
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 v_fm
EXPORTING
user_settings = ' ' " don't forget this option
control_parameters = control
output_options = output_options
PR_PERNR = '00001019' " it wil come from ur form parameters
PR_BEGDA = '19940101' " it will come from ut form parameters
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.
this is the best answer for ur requirement..
lets njyyyyyyyyyyy..
Similar Messages
-
Smart Form printing witout dialog box
Hi Experts,
I want to print the smart form when i execute the print program witout any dialogbox asking for printer name or other details.
I am using the following code. By using this i am not getting any dialog box, but its not printing anything.
DATA wa_outputoption TYPE ssfcompop.
DATA wa_controlparameters TYPE ssfctrlop.
wa_outputoption-tddest = 'INFO' .
wa_outputoption-tdnoprev = 'x'.
wa_outputoption-tdimmed = 'X' .
wa_controlparameters-no_dialog = 'X' .
wa_controlparameters-no_open = 'X'.
wa_controlparameters-no_close = 'X'.
wa_controlparameters-device = 'PRINTER'.
CALL FUNCTION '/1BCDWB/SF00000116'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = wa_controlparameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = wa_outputoption
USER_SETTINGS = 'X'
v_whno = 'WN1'
v_sttyp = 'ND1'
v_plant = 'WN01'
v_invrec = '1068'
v_page = '3'
v_invdt = sy-datlo
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
Please suggest a solution.hi pankaj,
it looks fine, u r passing correct parameters only but just try..
just pass these parameters:
DATA: ST_CONTROL_PARAMETERS TYPE SSFCTRLOP
st_control_parameters-device = 'PRINTER'. "Output device
st_control_parameters-no_dialog = 'X'. "SAP Smart Forms: General Indicator
I am using the same, it is working fine,
can u plese tell wht exactly happening.. is the dialogue is displaying or smethig else. r u calling this from only once or many time base on any conditions check once..r u passing right values..
call this FM before calling samrtform because u will face problems in PRD and Quality.. if u r already then ignore this.
c_formname = 'xxxx ut form name'.
v_fm_name is type rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION v_fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = wa_controlparameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* output_options = wa_outputoption
* USER_SETTINGS = 'X'
v_whno = 'WN1'
v_sttyp = 'ND1'
v_plant = 'WN01'
v_invrec = '1068'
v_page = '3'
v_invdt = sy-datlo
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5 -
Smart forms print control pop box (no required) when run report
Dear All Expert Guru,
how to control printing pop box when execute transaction code ,Report are make in smart form format
because while run our report then come printing pop box select out put device the will come report
. but our user required no should be come printing pop box they are required when run report direct come report
Pls help me any one.
Thanks & Regars.
Sudhir SrivsatavaHi,
Pass the parameter no_dialog = 'X' while calling the smartform.
data: wa_ctrlop type ssfctrlop.
wa_ctrlop-no_dialog = 'X'.
CALL FUNCTION fm_name
EXPORTING
* ARCHIVE_INDEX = ARCHIVE_INDEX
* ARCHIVE_INDEX_TAB = ARCHIVE_INDEX_TAB
* ARCHIVE_PARAMETERS = ARCHIVE_PARAMETERS
CONTROL_PARAMETERS = wa_ctrlop
* MAIL_APPL_OBJ = MAIL_APPL_OBJ
* MAIL_RECIPIENT = MAIL_RECIPIENT
* MAIL_SENDER = MAIL_SENDER
* OUTPUT_OPTIONS = OUTPUT_OPTIONS
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO = DOCUMENT_OUTPUT_INFO
* JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
* JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
Regards,
Srini. -
I would like to print from the .swf without seeing a regular
OS print dialog box. Is there anyway around this? I am currently
using the print command with bframe.dcrawford wrote:
> I would like to print from the .swf without seeing a
regular OS print dialog box. Is there anyway around this? I am
currently using the print command with bframe.
No, it's not possible from flash itself. The user needs to
set the preference and that's something
we can't force. There are 3rd party tools tho that could help
you with it (for windows and flash exe
projector files) like Jstart from www.flashjester.com
Check
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Print without dialog box, scripting php
I have build a php based application that has a printing requirement.
I would like the user to be able to print a simple html file to a network printer without seeing a dialog box.
the JS window.print() shows the user a dialog box. I would prefer the user bypass this dialog and just print some output generated by a php script.
this is probably the wrong forum to post this, but i didn't see much activity elsewhere and i figureds some type of unix command line print function might be the solution.
any thoughts?You will have to use a tool like swfstudio
or zinc to achieve this.
Flash itself can`t (and shouldn`t) override the systemwide settings . -
Printing directly to printer without Print setup dialog box
I am using Crystal Reports 2008 with VB.NET 2008. Using the CrystalReportViewer control, how can I print directly to the printer without having the Print setup dialog box popup every time?
Only way would be to create your own print button and use the report engine APIs. A good sample app is vbnet_win_printtoprinter in this sample download:
https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe
The developer help is a good place to have a look also;
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
https://boc.sdn.sap.com/developer/library
Additional resources:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208edbbf-671e-2b10-d7b5-9b57a832e427
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/702ab443-6a64-2b10-3683-88eb1c3744bc
Ludek -
Regarding Smart Form Printing, Print Preview issues
Hi,
I have couple of issues regarding Smart Form Printing, Print Preview.
In my program i am passing below parameters to smart form function module:
t_control-device = c_printer.
t_control-no_dialog = space.
t_control-preview = space.
t_control-no_dialog = c_x.
t_output-tddest = g_spld.
t_output-tdimmed = c_x. " Print Immediately
t_output-tddelete = space. " Don't Release spool after output
g_user_settings = c_x.
Issue#1: Though i have set preview paramter to space, after executing program it is prompting for Preview Screen, There again i have to give printer name though i am passing printer name as above and i need to hit on print preview button to set Layout output.
Here how can i go directly to layout output without preview screen.
Issue#2: In some cases we need to Print the layout set output after executing program immediately without prompting for preview screen and then Layout set output should also be shown after printing the output.
How can i solve these issues!
Thanks in advance.
Thanks,
Deep.Hi,
In the SAP menu screen goto <b>System->User Profile->Own data</b>
There in the defaults tab, for the output device give the value you had maintained for <b>g_spld.</b> This will not prompt you a dialog screen, and if you want to print immediately select the checkbox as well. Then try to execute the smartform. Hope this solves ur issue.
Tushar -
Hi,
I am user defined form (Dispatch Memo).
I have done coding for display crystal report
When i click on Print Preview, its showing me Print Preference Dialog box.
How should i hide this dialog box.
Thanx & Regards,
PravinHI PRAVINAUG17 ,
Please check first Printer is attach as default or not
and which sap version used ?
Regrads
kalpen -
I’m using an iMac running Os X Yosemite, Photoshop CS5 Extended, R2880 Epson printer In the Print Settings dialog box, I can’t select Color, Advanced BW or Grayscale unless I select “Printer Manages Color”. The pull down menu is grayed out. Even with “printer manages color” the tif or jpg image comes out in color overlaid with black. (See example - printer1. image on left is close to what it should be). Photoshop has no updates pending. I’ve downloaded the latest Epson driver which was working fine just before the problem occurred
Is your Photoshop CS5 updated to 12.1?
Are you on Yosemite 10.10.1 or Yosemite 10.10.2?
Did you apply the recent Epson software 2.1.9 update?
What type of file is it (file format)? What bit depth and what color space?
BOILERPLATE TEXT:
Note that this is boilerplate text.
If you give complete and detailed information about your setup and the issue at hand,
such as your platform (Mac or Win),
exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
your settings in Photoshop > Preference > Performance
the type of file you were working on,
machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
what troubleshooting steps you have taken so far,
what error message(s) you receive,
if having issues opening raw files also the exact camera make and model that generated them,
if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
etc.,
someone may be able to help you (not necessarily this poster, who is not a Windows user).
a screen shot of your settings or of the image could be very helpful too.
Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
http://forums.adobe.com/thread/419981?tstart=0
Thanks! -
SAP Vendor Master Communication Details for SMART FORM Printing.
Hi
Could you please advice Functional module to extract SAP Vendor Master Communication Details for SMART FORM Printing.
Thanks in Advance.
Regards
RaviHi Ravi,
I don't know about a function module, but the vendor master table LFA1 has a field ADRNR pointing to the general address table with the fields for e.g. language and to the tables ADR2 for phone numbers, ADR3 for fax numbers and ADR6 for e-mail addresses.
BR
Raf -
Communication Details Vendor Master SMART FORM Printing.
Hi
Could you please advice Functional module to extract SAP Vendor Master Communication Details for SMART FORM Printing.
Thanks in Advance.
Regards
RaviHi,
class VMD_EI_API_EXTRACT with method GET_DATA could make it.
There are also some eSOA services that could make it fine. See services starting with Supplier*.
Otherwise, this is more complicated.
BR
Alain -
Print Configuration Dialog Box
Hello all,
I want to enable the print configuration dialog box pop up when a button is clicked in vi.
This is standard windows printer configuration dialog box which pops up when any file (xls,txt etc.)
is tried printing.Any suggestions please ?
Also i have attached the standard windows print dialog box, just incase.
Thanks in advance,
Nalin
Attachments:
print.JPG 33 KBIn general use a property node with nothing attached to it in LabVIEW with the property Printing >> Default Printer or Printing >> Avalaible Printers to return the printers configured with Windows. One of these string items can be wired into the printer input of the report generation Print Report VI to select a printer.
In regards to the Microsoft Common Dialog 6.0 ActiveX controls, the printer selection from the dialog seems to be determined by the hDC output, which stands for hardware device context. If you modify the demo posted above to send in the appropriate flag value, either an informational or a direct hardware device context handle is returned in the ICommon property hDC. Input the flag value 512 to the ICommonDialog property Flags to return an hardware device context handle from the hDC property, or 1024 to return an informational device context.
More information about how to extract any meaningful information from this I32 number can doubtlessly be found at msdn.com, but I'm not sure personally how to do it. Specifically, here are a few posts to start your search at:
Using the Print Dialog Box
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingprintdialogb...
Common DialogControl Constants
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmdlg98/html/vbidxCommonDialogContr...
Alternatively, consider avoiding the Common Dialog Control calling a dll that will directly return the selected printer name from a dialog:
http://support.microsoft.com/default.aspx?scid=kb;en-us;322710
Hope this helps!
Jarrod S.
National Instruments -
related to smart form printing :
I have to print the data using template , but i dont want to fix the line in template ,
i want to take the data in template , and how much data is accessed that much space
must be occupied on the page, i dont want to fix the area in template
Hope you have got me.
Edited by: rihano7 mansoori on Jul 13, 2011 2:48 PM
Edited by: rihano7 mansoori on Jul 13, 2011 2:49 PM
Moderator message: please choose more descriptive subject lines for your posts.
Edited by: Thomas Zloch on Jul 13, 2011 3:53 PMHi,
Do you intend to say , that template cell size should vary depending on your data.
I doubt that is possible.
You should look for a workaround.
Why dont you be more specific in your exact requirment, so that an alternate soln can be found. -
Print Progress Dialog box always stays on top
Since upgrading to InDesign CC I have noticed that all print progress dialog boxes stay on top of all windows, even after switching apps. I find this highly annoying and want it to go away. Is there a preference I can change to make it NOT be on top, especially when I've switched to a different application?
(I am OP, having account issues)
Trashing preferences wouldn't help if it is a default behavior, which I think this is since it's been happening since the beginning with CC. I was wondering if this was a behavior that I can change with a preference or if I'm just stuck with it. -
Image looks great in PS- when I go to print, it looks grainy in printer preview dialog box and prints blurry. Why is this happening?
PS CC, Yosemite, Epson 3880 (called espson to make sure it wasn't something with that), saved as a tiff/psdjpg- all files behave the same way. When I open the raw file- and only crop the image- it behaves this way now- with grain and blur when printing. No other files do this in the same shoot. I worked on this image- could something have gotten corrupted along the way such that now even opening the raw file creates this problem. SInce upgrading my computer - a window pops up when I open PS that says I need to update my graphics card?? for 3D- I'm not using 3D- so I don't know if that means anything. I have to leave for about an hour- but greatly appreciate any feedback. I will be in touch. Thank you.
Maybe you are looking for
-
here i m attaching the rear view of my dvd home theater system. if it can attach then plz tell me the type of cable to be used.
-
URL link Attachment Limitation in Foreground
Hi Experts, When i am attaching a URL link through Services of Object for a invoice document. The Complete URL link is not copied to the Address field. Only it is accepting 1000 character. My question is how to increase the URL length. Since my requi
-
The issue is currently with adobe reader 9 and 10. The issue is when i open a PDF on the affected PC, the font is different and some of it is really small and hard to read. Not all PDF's open up with this font only the ones received from a certain pe
-
Oracle support s/mime v3.0 or not ?
Hi All, We have a requirement to implement S/MIME V3.0 over HTTPS in our application (java) for encryption/singing/decryption/verification. Can anyone let me know if there any oracle library which support s/mime v3.0 which can work with HTTPS also. I
-
Hello community! How do i make an official complaint about an app? They have stopped access to my account and are trying to extort money via paypal (skirting Apple) to allow me access again!! Who might i contact regarding this behavior? Does Apple ha