Print immediately without screen dialog

Hello,
I want to print a smartforms immediately without screen dialog.
The spool is created but not sent to the printer.
I call function module with following parameters :
ws_control-device = 'PRINTER'.
ws_control-no_dialog = 'X'.
ws_control-langu = 'F'.
ws_options-tdnoprev = 'X'.
ws_options-tdcovtitle = 'Releve'.
ws_options-tddest = 'LOCL'.
ws_options-tdnewid = 'X'.
ws_options-tdimmed = 'X'.
ws_options-tdcover = 'D'.
ws_options-tdcopies = '001'.
CALL FUNCTION lf_fm_name
             EXPORTING
                      control_parameters   = ws_control
                      output_options       = ws_options
                      user_settings        = 'X'
              TABLES    tbl_em = wt_em
             EXCEPTIONS formatting_error     = 1
                        internal_error       = 2
                        send_error           = 3
                        user_canceled        = 4
                        OTHERS               = 5.
Thanks for your help.

hi sebastian,
first of all u check for user settings.....in TABLE USR01
Selecting user master records from USR01 table
  SELECT SINGLE * FROM usr01
     INTO ls_usr01
    WHERE bname = sy-uname.
  ls_outputoptions-tddest = ls_usr01-spld.
  IF ls_usr01-spdb  = 'H'.
      ls_outputoptions-tdimmed = ' '.                "Print immediatetly
  ELSE.
      ls_outputoptions-tdimmed = 'X'.
  ENDIF.
and in control parameters use
ls_outputoptions-no_dialog = 'X'.
this will help u out..
please reward in case usefull...
regards,
prashant

Similar Messages

  • How to print adobe form immediately without preview?

    Hi, Experts.
    I made a WD4A using Interactive Form control
    and the app is working fine and displays Adobe Form.
    But I meet a new client needs on how to print immediately without display the form.
    My client says that "I don't wanna see the form and just print form immediately when I click the print button".
    I think there are some option parameters for solving those problem...
    Plz. Help.
    Regards Junha.

    Hello Junha,
    you need to send the pdf to spool. There's a function module for it as far as I know. Can't remember the
    name at the moment and having no access to a SAP system. A good way to find it would be searching
    for SPOOL and PDF in the name.
    Best regards,
    Thomas

  • Crystal report print directly without crystal viewer

    HI !
    In my addon i use Crystal Report. What would be the code i need to add if i want to print directly instead of having to go thru the crystal viewer.
    The crystal viewer gives me lots of problems with painting the screen when i move the form and it allways opens in the task bar. I cant seem to control the window sizes of the viewer either so unless it's easyer to fix those problem i need help to go and print direct without the viewer....
    Thanks for your time

    Hi John !
    I finnaly made it work... 
    here's what i used
    Dim objAppl As New CRAXDRT.Application
                Dim objReport As CRAXDRT.Report
                objReport = objAppl.OpenReport("C:Program FilesSAPSAP Business OneAddOnsDutiesresultat.rpt")
                objReport.PrintOut(True, 1)
    Thanks alot for your time.
    p.s.: I can i get the print window open on the screen instead of the task bar ??? it did that with the viewer too...
    Thanks again

  • Load a PDF and Print it Without User Seeing the PDF

    I have a client who has a need to allow users via a web browser to print PDFs wihtout gaining direct access to them.  Ignoring all the flaws in this logic , I am new to Flex and am having difficulty determining if this is possible.  So, here are the details:
    1) This is a web browser application.
    2) The files reside on a server.
    3) The user will view a list of available PDF files in their browser.
    4) There will be a print icon next to each one.
    5) When they click on the print icon we need to pull in the PDF from the server and initiate a print, all without the user seeing the PDF.  So once they click the print icon the next thing they see is thier browser's print dialog box.
    I have 1-4 done, I just need help with the most important one, #5.
    So, can Flex (without AIR) load a PDF in without displaying it and print it?
    I am using Flash Builder 4.6, if it matters.
    Thanks in advance for any input.

    Well, that's going to be difficult. Before everything else, a silent printing in general, is not what Browser is all about. A print dialog is thrown by the browser when a user selects a print option. Same thing if an application is trying to print using built into it conventional methods of printing - you get Print dialog. It gets even harder if you want to print PDF files silently. You will need to make sure that a file is available to print in case it's generated on the fly. The following code will print your PDF without dialogs to a selected (var printer) printer:
    var WshShell = new ActiveXObject("WScript.Shell");
    var fs = new ActiveXObject("Scripting.FileSystemObject");
    var fi = "AcroRd32.exe /N /T " + '"c:\\temp\\' + "filename" + '" ' + printer;
    WshShell.Run(fi, 0, false);
    As you notice, the file is on the local system. Or you can try printing over the network.
    This code will be a part of a JS function in your html wrapper. You will call this function from Flex using ExternalInterface.
    AcroRd32.exe is an Adobe free PDF reader.  I would suggest starting from the end - have a file on the local system and working on everything esle.
    HTH

  • Print immediately

    HI everybody,
    Is it possible to specify in an abap program that I want to print a list immediately after clicking on the print button?
    I don't want that the user chooses 'Send to SAP spooler only for now'.
    Is it possible???
    Thank you.

    Hi Karim
    The <b>ITCPO</b> structure in Scirpts is used to set characterstics to Output interface to the scripts.
    Here you can give values to print parameters like no of copies to print, Spool request, Print preview option, type of device specificatin etc.
    You will use this structure in the OPEN_FORM function module for the parameter OPTIONS.
    Different variants can be defined for the output via the parameter OPTIONS. The structure is described in table ITCPO. Some of the fields contained in this structure can be changed by the user via the print dialog.
    Yes, there is. It is used in Sapscript print programs to load up output paramaters. It is used when call the OPEN_FORM function module in the print program. Here is the structure
    TDPAGESLCT      TDPAGESLCT      CHAR     60     0Pages selected for printing                            
    TDCOPIES        RSPOCOPIES      INT1      3     0Number of copies                                       
    TDDEST          RSPOPNAME       CHAR      4     0Spool: Output device                                   
    TDPRINTER       RSPOPTYPE       CHAR      8     0Spool: Device type name                                
    TDPREVIEW       TDPREVIEW       CHAR      1     0Print preview                                          
    TDNOPREV        TDNOPREV        CHAR      1     0No print preview                                       
    TDNOPRINT       TDNOPRINT       CHAR      1     0No printing from print preview                         
    TDNEWID         SYPRNEW         CHAR      1     0Print parameters, new spool request                    
    TDDATASET       RSPO0NAME       CHAR      6     0Spool request: Name                                    
    TDSUFFIX1       RSPO1NAME       CHAR      4     0Spool request: Suffix 1                                
    TDSUFFIX2       RSPO2NAME       CHAR     12     0Spool request: Suffix 2                                
    TDIMMED         SYPRIMM         CHAR      1     0Print parameters, print immediately -------------------------->>> This one is useful for  u                    
    TDDELETE        SYPRREL         CHAR      1     0Print parameters, delete after printing                
    TDLIFETIME      SYPEXPI         NUMC      1     0Print parameters, spool retention period               
    TDSCHEDULE      SKSCHEDULE      CHAR      3     0Send time request                                      
    TDSENDDATE      SKDATE          DATS      8     0Requested send date                                    
    TDSENDTIME      SKTIME          TIMS      6     0Requested send time                                    
    TDTELELAND      LAND1           CHAR      3     0Country key                                            
    TDTELENUM       SKTELNR         CHAR     30     0Telecommunications partner                             
    TDTITLE         TDTITLE         CHAR     50     0Title in dialog box                                    
    TDTEST          TDTEST          CHAR      1     0Test form                                              
    TDPROGRAM       TDPROGRAM       CHAR     40     0Program name                                           
    TDSCRNPOS       TDSCRNPOS       NUMC     15     0Screen display position for OTF                        
    TDCOVER         SYPRSAP         CHAR      1     0Print: SAP cover page                                  
    TDCOVTITLE      SYPRTXT         CHAR     68     0Print parameters, text for cover page                  
    TDRECEIVER      SYPRREC         CHAR     12     0Print parameters, recipient                            
    TDDIVISION      SYPRABT         CHAR     12     0Print parameters, department on cover page             
    TDAUTORITY      SYPRBER         CHAR     12     0Print: Authorization                                   
    TDARMOD         SYARMOD         CHAR      1     0Print: Archiving mode                                  
    TDIEXIT         TDIMMEXIT       CHAR      1     0Immediate exit after printing/faxing from print preview
    TDRDIDEV     RSPOPNAME     CHAR     4     0     Spool: Output device
    TDNOARMCH     TDNOARMCH     CHAR     1     0     No changes by user in the archiving mode
    TDFINAL         RSPOFINAL     CHAR     1     0     
    Spool request completed
    Regards Rk
    Message was edited by:
            Rk Pasupuleti
    Message was edited by:
            Rk Pasupuleti

  • Print immediately option for ME21N(PO) and ME41(RFQ)

    Dear friends,
    Can anybody please tell me for the purchase orders(ME22N),if we select messages button,select communication method----in this screen,print immediately button is automatically coming.
    Where i have to do settings to see that in Communication method under messages of PO(ME22N),printing immediately should not come automatically.
    With our client for PO-print immediately is set automatically and for RFQ-it is not set.
    Client wants that for PO print shall not come automatically on saving/approving the PO.
    please suggest where to remove the print immdiately setting for PO.
    Advance Thanks ,
    Regards,
    Dayanand

    Hi Gopala,
    For RFQs currently-in MN02,
    Medium is set to '1' and Date/Time is '4' i.e send immediately on saving the application.And while creating RFQ,under messages,in communication button,print immediately button is unchecked. So whenever print is needed ,print button is checked and getting the print.
    But in PO, Medium is set to '1' and Date/Time is '4' i.e send immediately on saving the application.And while creating the PO,under messages/comminication data,print button is automatically coming with checked option,so as soon as approval PO print is coming.where as in RFQ,print check button is not comming as default as checked , so they are getting the print whenever they want. If they want they will create the meassage type with print immediately check the button and get the print.
    The same feature shall be there in PO. How to avoid the print immediately check button coming automatically in communication data under messages.print immediately check button should not come automatically same as RFQs.
    please suggest.
    Regards,
    Dayanand

  • Change printer settings without printing?

    To create a new template one has to go through the "Printer..." dialog to change the paper size.  Unfortunately, the only way to actually SAVE the new settings is to click OK, which causes Lightroom to print the current image.  In all other programs, the "Printer..." dialog is used only to adjust settings.  In Lightroom it seems to serve as a "Print" dialog as well.  On Windows this violates long-standing UI function guidelines embodied by pretty much all other software.
    A concrete example:
    I needed to create a new template to print on 8-1/2 x 11 paper.  To do so, I created a new template while in an existing template for 8x10. This copies the settings to the new template, but one cannot adjust the cell size to anything larger than 8x10.  So I went to the "Printer...:" dialog to change the paper size.  However, when clicking OK on the "Printer..." dialog, to save the new paper size, Lightroom starts printing the current image.
    What should happen is that the settings are saved and no printing starts.  Printing should occur only when I click on "Print".
    Unless I've missed something and there's a way to change paper size, color profile, paper type, etc. (all the things you can change on the printer driver's dialog) from within Lightroom without invoking "Printer..."?

    Jim, you have provided no detail at all.
    I can change paper size without printing on my Mac with epson printers. I can even change paper size with o printer attached.
    Let us know what your are doing with what set up....

  • Printing the "Grab" screen selection

    When I print a "Grab" screen selection I don't get the entire selection. I get about 2/3's of it starting from the left so I'm losing the right 1/3 of the selection. Anyone know how to solve this problem and get the entire selection to print?

    Save it as an imag file on your desktop and print it via Preview. You can rescale the image to fit the page in the print dialog box.

  • How to report print to the printer immediately and display the popup?

    Dear friends,
    I am running my report in background and displaying the confirm results on popup window and sending the results to printer,
    but now i want to send the results page to printer then  want to display the popup.
    i have writen my popup perform after printer perform only but its not working...when i am clossing the popup or came back from that popup then only the results sending to printer...
    How to report print to the printer immediately and display the popup?
    Thanks in advance
    Sridhar

    Hi Sudheer,
    I am using my print parameters like this :
        NEW-PAGE PRINT ON DESTINATION ws_printer
                             IMMEDIATELY 'X'
                             KEEP IN SPOOL 'X'
                             NEW LIST IDENTIFICATION 'X'
                             SAP COVER PAGE 'X'
                             ARCHIVE MODE '1'
                             LINE-COUNT 64
                             LINE-SIZE 170
                             NEW-SECTION
                             NO DIALOG.
    Then also its not printing immediatly.
    here one thing for displaying the popup i am using submit report(calling another report for popup purpose)
    before trigering the submit programe i need to print this.
    Thanks
    Sridhar.

  • Check printing:Print immediately option not working in check printing

    Hi,
    In check printing program i have made some changes for sending data to 2nd page,when line items crosses more than 1 page.
    In such cases print immediately option,selected on the screen of FCH7 is not working.Always i have to print from spool.
    If data is limited to single page,then print immediately option is working fine.
    Can you have some idea about this option to work correctly?
    Thanks & Regards
    Seshagiri.

    Can u check out for the field   TDIMMED field in output options.
    I think U have to reset that flag .

  • Printing emails without headers and footers

    I just purchased a new printer HP Deskjet 2510 series and use it with Microsoft XP. Have also used HP color lazer CP2025 and HP lazer P2055DN.
    I am trying to figure out how to print emails without the header and footer showing.  I have been able to do it with other printing jobs for example when printing a copy of PDF, but it does not work for emails.  Can this be done for emails as well?

    Hello,
    You can print any section you want on the email. You will need to highlight the section you want printed, press down Ctrl+P, and then select print using system dialog, which will look like this:
    Then select the option that says "selection", and then select print.

  • Printing Script without a spool request

    Hi Experts.
    when executing transaction F.62, it is giving a spool request instead of printing the form or generating preview.
    my requirement is that I need to print the script directly after the transaction is executed.

    Hi,
       Go to Txn. NACE... select your Application and click on "Condition Records" button.... Select your Output Types... then choose your condtion.... inside the screen... Please maintain "4" under the column Date/Time... then Select the line.. and click on the "Communication" Button.. here please flag "print Immedieately" and "Release after Output"
    Regards
    GK.

  • Oracle XML DOM parser - attribute values are not printing on the screen ??

    Hi Everyone,
    I am just trying to use oracle DOM parser to paerse one of my xml file, java file can be compiled and run agianst a xml file, But I cannot see any attribute values printing on the screen..
    Appreciate if anyone can help, where I have gone wrong please?
    Below is the java file:
    // menna puthe DOMSample eka - duwanawa 19/12/2005
    import java.io.*;
    import java.net.*;
    import org.w3c.dom.*;
    import org.w3c.dom.Node;
    import oracle.xml.parser.v2.*;
    public class DOMSample {  //public class eka ***
    static public void main(String[] argv){  // main method eka ###
    try {
    if (argv.length != 1){
    // Must pass in the name of the XML file...
    System.err.println("Usage: java DOMSample filename");
    System.exit(1);
    // Get an instance of the parser
    DOMParser parser = new DOMParser();
    // Generate a URL from the filename.
    URL url = createURL(argv[0]);
    // Set various parser options: validation on,
    // warnings shown, error stream set to stderr.
    parser.setErrorStream(System.err);
    parser.showWarnings(true);
    // Parse the document.
    parser.parse(url);
    // Obtain the document.
    Document doc = parser.getDocument();
    // Print document elements
    System.out.print("The elements are: ");
    printElements(doc);
    // Print document element attributes
    System.out.println("The attributes of each element are: ");
    printElementAttributes(doc);
    catch (Exception e){
    System.out.println(e.toString());
    } // main method eka ###
    static void printElements(Document doc) {
    NodeList nl = doc.getElementsByTagName("*");
    Node n;
    for (int i=0; i<nl.getLength(); i++){
    n = nl.item(i);
    System.out.print(n.getNodeName() + " ");
    System.out.println();
    static void printElementAttributes(Document doc){
    NodeList nl = doc.getElementsByTagName("*");
    Element e;
    Node n;
    NamedNodeMap nnm;
    String attrname;
    String attrval;
    int i, len;
    len = nl.getLength();
    for (int j=0; j < len; j++){
    e = (Element)nl.item(j);
    System.out.println(e.getTagName() + ":");
    nnm = e.getAttributes();
    if (nnm != null){
    for (i=0; i<nnm.getLength(); i++){
    n = nnm.item(i);
    attrname = n.getNodeName();
    attrval = n.getNodeValue();
    System.out.print(" " + attrname + " = " + attrval);
    System.out.println();
    static URL createURL(String filename) {  // podi 3 Start
    URL url = null;
    try {
    url = new URL(filename);
    } catch (MalformedURLException ex) { /// BBBBBB
    try {
    File f = new File(filename);
    url = f.toURL();
    } catch (MalformedURLException e) {
    System.out.println("Cannot create URL for: " + filename);
    System.exit(0);
    } // BBBBBB
    return url;
    } // podi 3 End
    } //public class eka ***
    // End of program
    output comes as below:
    Isbn:
    Title:
    Price:
    Author:
    Message was edited by:
    chandanal

    Hi Chandanal,
    I edited your code slightly and I was able to get the correct output.
    I changed the following line:
    for (int j=0; j >< len; j++)to:
    for (int j=0; j < len; j++)I have included the complete source below:
    // menna puthe DOMSample eka - duwanawa 19/12/2005
    import java.io.*;
    import java.net.*;
    import org.w3c.dom.*;
    import org.w3c.dom.Node;
    import oracle.xml.parser.v2.*;
    public class DOMSample {
        //public class eka ***
        public static void main(String[] argv) {
            // main method eka ###
            try {
                if (argv.length != 1) {
                    // Must pass in the name of the XML file...
                    System.err.println("Usage: java DOMSample filename");
                    System.exit(1);
                // Get an instance of the parser
                DOMParser parser = new DOMParser();
                // Generate a URL from the filename.
                URL url = createURL(argv[0]);
                // Set various parser options: validation on,
                // warnings shown, error stream set to stderr.
                parser.setErrorStream(System.err);
                parser.showWarnings(true);
                // Parse the document.
                parser.parse(url);
                // Obtain the document.
                Document doc = parser.getDocument();
                // Print document elements
                System.out.print("The elements are: ");
                printElements(doc);
                // Print document element attributes
                System.out.println("The attributes of each element are: ");
                printElementAttributes(doc);
            } catch (Exception e) {
                System.out.println(e.toString());
        // main method eka ###
        static void printElements(Document doc) {
            NodeList nl = doc.getElementsByTagName("*");
            Node n;
            for (int i = 0; i < nl.getLength(); i++) {
                n = nl.item(i);
                System.out.print(n.getNodeName() + " ");
            System.out.println();
        static void printElementAttributes(Document doc) {
            NodeList nl = doc.getElementsByTagName("*");
            Element e;
            Node n;
            NamedNodeMap nnm;
            String attrname;
            String attrval;
            int i, len;
            len = nl.getLength();
            for (int j = 0; j < len; j++) {
                e = (Element)nl.item(j);
                System.out.println(e.getTagName() + ":");
                nnm = e.getAttributes();
                if (nnm != null) {
                    for (i = 0; i < nnm.getLength(); i++) {
                        n = nnm.item(i);
                        attrname = n.getNodeName();
                        attrval = n.getNodeValue();
                        System.out.print(" " + attrname + " = " + attrval);
                System.out.println();
        static URL createURL(String filename) {
            // podi 3 Start
            URL url = null;
            try {
                url = new URL(filename);
            } catch (MalformedURLException ex) {
                /// BBBBBB
                try {
                    File f = new File(filename);
                    url = f.toURL();
                } catch (MalformedURLException e) {
                    System.out.println("Cannot create URL for: " + filename);
                    System.exit(0);
            // BBBBBB
            return url;
        // podi 3 End
    } //public class eka ***-Blaise

  • How can I get all the print on my screen to be larger?

    How can I get all of the print on my screen to be larger?

    Thank you for helping me with the size of the print on my screen. The suggestion you made works well with the email font. I really wanted all the print on my computer to be larger. (Some of the print seems to be way too small.) Someone suggested I change the resolution settings. I did this, and changed it to 1024 X 640. That changed the size of the font on the toolbar at the top of the page, and that is what I really wanted, as well as all the other print on my screen. Nonetheless, I would like to thank you for your very helpful and prompt reply to my question.
    Sincerely,
    Wayne10

  • Hp photosmart wireless e-all-in-o​ne b 110 series printer on main screen says ink system failure

      hp photosmart wireless e-all-in-one b 110 series printer on main screen says ink system failure

    Hi,
    In order to troubleshoot the problem. please follow the steps listed under '0xc19a0013' or no code displays with the 'Ink System Failure' error message below:
    http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c01458034&cc=us&dlc=en&lc=en&product=4022343&tmp​...
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

Maybe you are looking for

  • Newbie question: how to monitor cluster disk drive free space

    ok folks, it is a really painful process for me to use SCOM2007R2 and I figure it might be easier if I start to ask concrete questions. 1. I have a cluster server and I know some drives have only 10MB and they are not changing at all as I fixed them.

  • Iphone 3gs internet speeds

    Hi, I am living in South Korea and have a 3gs with the latest software (4.2). I am using a 500mb data plan a month but have the option to upgrade / change to unlimited data plan for a slight increase in monthly fees. I was told by my telecom company

  • Photoshop won't open after shut down and restart. Any ideas?

    Photoshop won't open after shut down and restart? Any ideas? Hazelydogs

  • Resyncing Previously Downloaded Music to Ipod Touch?

    I have a lot of music downloaded that I removed from my library a long time ago and I redownloaded it and am trying to sync it to my Ipod Touch 4th generation, but it doesn't sync? 

  • Nexus 7010 OSPF Equal Cost Paths

    Hello, I currently have two physical links connecting one data center to another.  These are both 10Gb links and I have manually set the cost to the primary link to '1' and the secondary link to '10'.  My question is, if I set the secondary link to '