Print Excel to Spool

Hi Everybody,
I am printing Excel Sheet using the code below.
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
SET PROPERTY OF H_EXCEL  'Visible' = 0.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
  EXPORTING
    TEXT   = TEXT-008
  EXCEPTIONS
    OTHERS = 1.
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_MAPL 'OPEN' EXPORTING #1 = PATH.
CALL METHOD OF H_EXCEL 'ActiveSheet' = H_MAP.
CALL METHOD OF H_MAP 'PrintOut' .
FREE OBJECT H_EXCEL.
FREE : H_EXCEL,H_MAPL,H_MAP,H_ACT.
This directly print the excel on the printer.
But my requirement is to send it to the spool and print it form there.
Can someone tell me how to do that?Please help.
Thanks,
Sneha Singh

HI Sneha,
Why not create a smartform or simply use WRITE statement.
1. Smartform should be created & pass PRINT IMMEDIATELY = 'X'
2. Create WRITE Statements inside NEW-PAGE PRINT ON.. & NEW-PAGE PRINT OFF.
Best regards,
Prashant

Similar Messages

  • Printing Excel Instance from InfoView using Excel 2003

    Hi
    I have problem with printing Excel instance within InfoView. We are using Active X as viewer - but when user schedules report in Excel and when it opens that instance - it opens in Web Excel viewer within InfoView. At that point there is no standard menu if user uses Office 2003 or actually Excel 2003 on its own machine so user cannot print instance. Can anybody help with this. If you try to open instance on machine that has Office 2007 there are no problems since instance gets open in full Excel.
    Thanks

    What version of Crystal Reports are you using?  Any service packs or hot fixes installed?
    Can you open other xls files with 2007?  
    Have you ever exported to excel before?
    I export to -excel (97-2003) data only- and open the files with Excel 2007 with no problems. Excel 2007 complains about the old format (xls) and wants to convert it to the new excel format. I alsways ignor it.
    Maybe the 'garbage' you are seeing is because the layout of your crystal report is not working for the export. Is all the data there but you have extra cells and/or lines, or the data is pushed to the left? I find that I must have the fields packed tightly with no space between them and no space above or below the fields, or I get extra cells between and lines above or below them.
    Most of my exports are detail lines with a single line header and columns are set to match the detail line. When exporting multiple lines where the fields do not line up exactly with the ones above them, I may use one or more empty text fields that matches the size of the fields above them to fill the empty space. Sort of like:
    line 1:{field1.}{field2...}{field 3}
    line 2:(text...}{text.....}{field 4)
    And you may need to turn off 'can grow' on all fields as they may cause miss-alignment. All the data will be there when you export it, even what you can not see in Crystal. You will just need to format the cells in Excel to see it.
    Debi  (hi Don)

  • How to Print List to spool but skip the print parameter window?

    Dear all,
      I am coding a program for print list into  spool.
    But every times I run the program there must pop up a print parameter window, after I click the 'Continue' button,then the list print to spool.
      Is there some way that I can just run the program and print to spool directly?
                               Thank you for your kindness help~~~
    Message was edited by: jin yan

    Hi,
    If it is a report program then, use this code.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING DESTINATION           = 'LP01'
                COPIES                = COUNT
                LIST_NAME             = 'TEST'
                LIST_TEXT             = 'SUBMIT rep... TO SAP-SPOOL'
                IMMEDIATELY           = 'X'
                RELEASE               = 'X'
                NEW_LIST_ID           = 'X'
                EXPIRATION            = DAYS
                LINE_SIZE             = 79
                LINE_COUNT            = 23
                LAYOUT                = 'X_PAPER'
                SAP_COVER_PAGE        = 'X'
                COVER_PAGE            = 'X'
                RECEIVER              = 'SAP*'
                DEPARTMENT            = 'System'
                NO_DIALOG             = 'X'
      IMPORTING OUT_PARAMETERS        = PARAMS
                VALID                 = VALID.
    IF VALID <> SPACE.
      SUBMIT RSTEST00 TO SAP-SPOOL
        SPOOL PARAMETERS PARAMS
        WITHOUT SPOOL DYNPRO.
    ENDIF.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • Low Memory when Printing Excel chart on LaserJet 3015 ll-in-one

    Low Memory when Printing Excel chart on LaserJet 3015 ll-in-one
    When I try to print a chart from Excel 2007 I get a low memory error. All other printing seems to work just fine. I thought it might be because of a color fill in the chart area so I removed the fill but I'm still getting the error.
    I've also cleared the fax memory and run through the steps in http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c00378226&prodT...
    Running: Windows WP pro (SP3)
    Printer: LaserJet 3015 all in one
    Current driver: HP Lasetjet 3015 PCL 6
    Running as a network printer using a D-Link DP301P

    When an application is installed to the expansion card, that's the only place where you will see it in the app launcher screen, i.e. by selecting the card.  It will not appear in the All category because that only shows apps which are installed to internal memory.
    As for the Files application, yes, it only lets you browse contents of the card.  For a more robust file management utility which will let you browse your entire phone, you might want to look into a freeware application called FileZ, which I believe is available at www.palmgear.com and other places.
    I've never run Documents To Go from a card, but when you open Docs to Go and open the Menu > Options > Manage Applications, there is an option there to move applications to the Card.  Never having done that, I'm not sure whether it moves the whole DTG app to a card but, give it a try.
    I have oodles of applications and documents stored on my Centro's internal memory, and never have run up against a memory problem.  At any time, you can check available memory by going to the application launcher (home) screen, opening the menu, and selecting Info.
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • Purchase order print priview and spool print output are different.

    Hi Friends,
    there is problem with purchase order print priview and spool print output are different.
    mean : in me23n .. for a perticular po .. in po priview the TAX VALUES value is 120 coming..
    when i am giving print with spool.. the amount value is showing  TAX VALUE
    is 443..why it is showing wrong..
    this is for perticular output type.
    why TAX VALUES are showing different in print view and
    spool print.
    help me.
    regards,

    Hi Neil,
    thanks for your reply.
    but the valiadtions are happening in standard functional module PRICING.
    it is realted script(medruck)...but there is no code point for spool or printer side..
    and the issue is realted one PO OUTPUT TYPE..
    it is sap standard debugging... when i am debugging the functional module PRICING.
    the values are coming dynammically.
    help me.
    regards,

  • Program to Print Preview from Spool

    Hello gurus,
    I hope you guys could help me out...my requirement is to write an ABAP program that receives a spool number and displays its print preview to the user from there user can choose to print or delete the spool number
    Any advices ?:)

    Hi ..
    Call this FM to generate the Print preview from SPOOL
        CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
          EXPORTING
            spool_request_id = hrqident
          EXCEPTIONS
            OTHERS           = 0.
    <b>REWARD IF HELPFUL</b>

  • Print an existing spool in ABAP program.

    Hi Experts, 
    I have a problem to print an existing spool. 
    I need print many an existing spools in ABAP program 
    - I used the SHDB and call transaction with BDC data but work only for 1st. 
    - I tried use the RSPO_RPRINT_SPOOLREQ function but don't work.

    I resolved my own problem.
    I use the function RSPO_OUTPUT_SPOOL_REQUEST...
    The only parameters to this functions was spool_request_id  - ID spool.
    Thanks for  help!

  • How to get SapScript and Smartform printed in one spool request?

    Hello experts,
    I want to print the production order package in one spool request.
    Print program consists of Smartform and SapScript.
    First page is in landscape format with barcode(Smartform) and the rest is in portrait format(Sapscript).
    In SAP documentation is written that it is possible for several Smartforms to be printed in one spool request.
    Is it possible for 1 Smartform and 1 SapScript called from a single program to be printed in one spool request?
    I have tested it with calling first the Smartform control-no_close= 'X' without success.
    Can anyone tell me if this is possible and how?
    Thank you.
    Kind regards,
    Danijela

    Hi
    In the driver program .
    *"Selection screen elements............................................
    SELECTION-SCREEN BEGIN OF BLOCK block  WITH FRAME.
    PARAMETERS:
    p_script   RADIOBUTTON GROUP rad1,
    p_smartform RADIOBUTTON GROUP rad1,
    SELECTION-SCREEN END OF BLOCK block.
    *"Selection screen elements............................................
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
    PARAMETERS:
    p_single RADIOBUTTON GROUP rad2,      " All the spool request
    p_ind    RADIOBUTTON GROUP rad2.
    SELECTION-SCREEN END OF BLOCK block1. " Single spool request
    If p_script EQ 'x'.
    w_form = 'Y_SCRIPT'.
      Elseif p_smartfom EQ 'X'.
       w_form = 'Y_SMARTFORM'.
    ENDIF.
    call function 'SSF_FUNCTION_MODULE_NAME'.
    Call function 'SSFCOMP_OPEN'.
    w_control-no_open   = ' '.
        w_control-no_close  = ' '.
    *"Single spool request..................................................
        IF p_single EQ 'X'.
          w_control-no_open   = 'X'.
          w_control-no_close  = 'X'.
        ELSE.
    *"Individual spool request.............................................
          IF w_flag NE '1'.
            w_control-no_open  = 'X'.
            w_control-no_close = ' '.
            w_flag = 1.
    CALL FUNCTION '    '-----> smartform function module.
    CALL FUNCTION 'SSFCOMP_CLOSE'.
    Regards,
    Sravanthi

  • Print priview and spool print output are different

    Hi Friends,
    there is problem with purchase order print priview and spool print output are different.
    mean : in me23n .. for a perticular po .. in po priview one amount value is 120 coming..
    when i am giving print with spool.. the amount value is showing
    is  443..why it is showing wrong..
    this is for perticular output type.
    why perticular values are showing different in print view and
    spool print.
    regards,

    make this setting change:
    in SPAD > In the menu Settings -> Spool System
    In the others tab check the first check box in the Output Controller block, SAVE and exit

  • Printing excel grid lines

    I just installed an HP All-in -One Desket printer, Envy 3350.  I downloaded the software from the WEB as instructed. When I print an Excel spreadsheet with print grid lines selected, only everyother horizontal grid line is printed.  All vertical grid lines print as expected.  I have Windows Vista Home Premium as my operating system.  I had no such issue with my previous DELL printer.  I suspect there is a selection in one of the set-up options that needs to be checked/changed.  I have tried to find such an option, but have not been successful.  Any suggestions?? 

    Hello,
    Please click Printing Excel Gridlines Office 2007   to access the steps that should resolve the issue .
    Regards,
    Jabzi
    Give Kudos to say "thanks" by clicking on the "thumps Up icon" .
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Although I am an HP employee, I am speaking for myself and not for HP.

  • Printer suddenty wont print Excel or Quickbooks but will print Word docs

    Help!
    My HP 6500 just decided to stop printing Excel, Quickbooks and Efax but WILL print Word documents and other files. When I hit "okay" ont he print menu the printer head goes back and forth but no ink comes out. Again, the weird thing is that Word docs are fine and print out.
    I have downloaded the driver software twice and turned printer on and off and unplugged it from back of machine.
    Help

    Hi @Salsify,
    Welcome to the HP Forums!
    I see that your HP Deskjet 3050a will print an internet page but not any documents on Windows 7. I am sorry to hear this but happy to help!
    How is the printer connected? Wireless or USB?
    Are you able to make standalone copies with the printer? Copy Text or Mixed Documents.
    In the meantime, I would recommend to try our HP Print and Scan Doctor, and let me know what happens!
    Hope to hear from you soon!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Printing Excel File programmatically

    Hi,
    Can any body help me in printing an excel file with java
    I tried executing the below code.
    DocFlavor format = new DocFlavor("application/octet-stream", "java.io.FileInputStream");
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(MediaSizeName.ISO_A4);
    aset.add(new Copies(1));
    PrintService pservices = rintServiceLookup.lookupDefaultPrintService();
    DocPrintJob djob = pservices.createPrintJob();
    FileInputStream input = new FileInputStream("Test.xls");
    Doc doc = new SimpleDoc(input, format, null);
    djob.print(doc, aset);
    it prints the file if it a plain text file,if i try to print Excel File it is printing some weird characters.
    Can anybody help me in this ASAP?
    -- Sowmya

    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Test2 {
         public static void main(String[] args) {
              readexel("C:\\Documents and Settings\\Administrator\\&#26700;&#38754;\\1.xls");
         public static void readexel(String filename) {
              Connection c = null;
              Statement stmnt = null;
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   c = DriverManager
                             .getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ="
                                       + filename);
                   stmnt = c.createStatement();
                   String query = "Select * from [ICP111$]";
                   ResultSet rs = stmnt.executeQuery(query);
                   while (rs.next()) {
                        System.out.println(rs.getString(6));
              } catch (Exception e) {
                   e.printStackTrace();
    }

  • Can't Print Excel files

    Recently I have lost the ability to print Excel files. When I select "Print" the regualr print dialog comes up but when I click the "print" button nothing happens. I can send the files to other people and they can print them just fine. I have tried selecting other printers and the problem remains. I am trying to print to an HP Laserjet 1200 over the school's network. When I go to Print Setup the computer sees the printer and I can set it up just fine. I upgraded to Office 2004 and the problem persists. I can print Word files with no problem.
    Any suggestions?

    This thread may be of help:
    http://discussions.apple.com/thread.jspa?threadID=424795&tstart=0
    It sounds like the same problem - but with a different application. Hope it helps.

  • When i print excel file error microsoft excel has stoped working

    When I sent print then I got it one error Microsoft has stopped working

    hey raghu, 
    try to use this tip (from url)
    http://www.justanswer.com/microsoft-office/7087w-every-time-try-print-excell-sheet-workbook-excel.html
    http://cnedelcu.blogspot.co.il/2013/09/top-5-fixes-for-excel-2013-has-stopped-working-word-powerpoint-outlook.html
    Please Mark This As Answer if it helps to solve the issue
    Tzuri Ben Ezra | My Certifications:
    CompTIA A+ ,Microsoft MCP, MCTS, MCSA, MCITP
    |
    FaceBook: Tzuri FaceBook | vCard:
    Tzuri vCard | 
    Microsoft ID:
    Microsoft Transcript 
     |

  • Whats The Best Resolution To Use When Printing Excellent Quality Photos?

    Hi all
    My grandparents have given me quite a big task to do as they want me to edit, save on to disc or discs and print there old family photos, I am going to edit the photos from Photoshop CS3 Extended at the highest possible Resolution so the photos look amazing when printed from a normal printer or at a proper photo lab. What is the highest possible resolution I could use on the photos without making them look all pixelated (or what ever it looks like) when printed? I was told by a friend that 300 pixels/inch would yield better but is it possible I could go higher? they are family photos so I would like them to look as amazing as possible for the next generation which will be me, my cousins and our future families.
    Many Thanks for reading this and Many Thanks to the people who will reply to it. Very much appreciated.
    Kind regards,
    Oliver

    Hi ID. Awe
    Thank you for the resolution pixel/inch number but I will use 300ppi on Photoshop CS3 Extended because it seems popular on here and my friend did say 300 pixels/inch would yield better, okay so I should not go over board blimey as I wont be able to control how it is down-sampled for output, I had better be careful then. My scanners resolution is 4800 dpi optical and up to 19,200 dpi enhanced and the colour is: 48-bit and 8-bit greyscale but when I look in the scanner settings it only goes up to 24 bit colour hmmm? How do I down-sample to 8-bit for output? Do I use Photoshop for that? As my printer will not allow me to down-sample the 8-bit colour. I just want the photos to look amazing thats all.
    Hi John Joslin
    If you ask you shall receive, I will be getting my photos printed at Kodak or at the Devon Camera Centre. I do have a inkjet printer it is the HP Photosmart 2610 all-in-one= printer, fax, scanner, copier. Thank you for the warning John it is nice to know if I was to use my inkjet printer but I am going to have my photos developed at a photo lab so the photos will last allot longer. My printer resolution is 1200 and up to 4800 dpi optimised.
    Hi Donald Reese
    The highest resolution my scanner can go up to is 19,200 dpi, could you explain to me what interpolation is please? is it another selection I can select within the scanner settings? That does sound logical to have extra data to downsize from, instead of trying to upsize from a low resolution scan because I suppose it would make the photo look a bit pixelated.
    Hi Gernot Hoffmann
    That is interesting that by using 300ppi or 288ppi which is good for an accurate pixel preview by zoom=400% and this is OK for the reproduction of photos by high quality offset printing and for large format inkjets and for inkjet proof printing thank you. Thank you for the simplified version:-D
    Hi Ed Grenzig
    I did think that scanning is more important but I did not know how high I should go with the resolution on that either, thats true that the scans can be no better than the picture that I am scanning. Yeah I suppose it also is trial and error using different settings. Extra pixels won't make your picture any sharper than the print. That is what they said about the freeview box until they found out that it made the picture clear as it had a higher resolution then the tv itself but I will give it ago.
    Yeah good idea I will experiment myself on similar photos to see if increasing the resolution helps and how much it helps, depending on the type of photo. Yes I definitely will keep my original scans because as you said I can always go back and re-edit them in the future. I agree all editing software will get better as time goes on and they will probably laugh at my edits when they look at the capability of their future software. True that my present printed photos will not last forever as they will deteriorate. As johntolliday below said he usually scans his photos at 600 ppi and I will probably do the same or higher if needs be. Thanks for the great tips, I did think could I use my camera to take photos of the original photos if they are to big for my scanner and of course I can like you said, I would not shot the photos though as I do not want holes in the photo lol.
    Hi johntolliday
    Yeah I will be getting the photos professionally printed at a photo lab as you said Unless you are using they will not last as long as a print printed on photo paper by the very expensive photo lab machines and I do not have archive quality inks or paper and anyway they are to expensive. Cool that you do most of your prints and enlargements online and have been very pleased with the results. I also thought that inkjet printers are not really up to the job when it comes down to printing excellent quality photos.
    I will try your suggestion and scan my photos at 600 ppi or more depending on the picture quality, I do not seem to have a selection for 16 bit colour on my scanner settings I only have Millions of colours (24-bit), 256 colours
    (8-bit), 256 colour web palette, 256 colour system palette, 256 grey shades (8-bit greyscale) and Black & White
    (1-bit) so I guess I will have to stick with 24 bit colour. Sounds like a good idea to down sample to 300 on Photoshop and print from there. I have never enlarged photos before but there might be a time when I might need to.
    A huge thank you to everyone who has posted on here you all have helped me out allot and I know where I am going now before I have to say I was going around blindfolded, if you have any more tips about scanning or even printing please feel free to post. Thank You again.
    Kind Regards, Oliver

Maybe you are looking for

  • Web photo gallery prob

    sup, when i try to use the web photo gallery feature in PSCS3 i get an error message " error disabling controlls for missing tokens , some file or folder for selected style might be missing" wtf, ive been using PS for about 6 years now and i havent a

  • Thread scheduling

    Hi, I have some questions bout threads. 1) When it comes to thread scheduling, Java has no say in it, since thread scheduling is solely in a domain of operating system? 2)In preemptive environment, when thread with higher priority becomes runnable, r

  • What is best way to reuse a view repeatedly?

    hi, I have one major view through which I navigate to other sub views. The question arises when i want to call the main view again without disrupting contents on main view. that is the main view which is called again should be local and not the origi

  • Total Run Time of Captivate 4 Project

    I know it has to be here somewhere . . . but, where does Captivate show you the total run time of a completed projected?  I have put together about a dozen slides with animation and narration, and I'm trying to find out how long the whole thing will

  • Another CRM Forum where you could discuss about your issues !!!!!

    Another SAP Forum where you could discuss about your issues and cookbooks for various SAP modules - http://sapcookbook.com/sapcookbook.com/forum/. There are plenty of users (many of them are very experienced) there as well to discuss your issues. The