Create, write, and close the Spool

Hello everybody,
I have a problem with the spool in one program i have to develop.
In the same program I have to create different lists and transform them into pdf to send by mail. The issue I am facing is to create different entries in the spool with the different lists. I read something about the function Get_print_parameters, but what I need is to open the spool, then write into this spool and close it, because afterwards I will send the email with this attachement. i have to do this several times.
Does anybody know how to do this opening writing and closing??
Regards, and thanks very much
Caletrio

You may use these FMs
RSPO_OPEN_SPOOLREQUEST
RSPO_WRITE_SPOOLREQUEST
RSPO_CLOSE_SPOOLREQUEST
P.S. Please search the forum before posting the query.

Similar Messages

  • Open, Write and Close the file using Powershell

    Hi All,
    I need to create/open a file and write some data into it and close that file.
    Could anyone please help me with this.
    Thanks.

    You don't need to explicitly create, open, or close a file in Powershell.  Here are some ways to write to a file, in addition to New-Item:
    $text = 'Hello World'
    # Create file:
    $text | Set-Content 'file.txt'
    #or
    $text | Out-File 'file.txt'
    #or
    $text > 'file.txt'
    # Append to file:
    $text | Add-Content 'file.txt'
    #or
    $text | Out-File 'file.txt' -Append
    #or
    $text >> 'file.txt'
    Grant Ward, a.k.a. Bigteddy
    The problem with Out-File is that it works like the console. When text is output, it will be truncated if it is wider than the default. So if you are looking for something where you need to store lots of long strings, then you may want to choose a different
    route, or ensure than you specify a width for your output.
    http://technet.microsoft.com/en-us/library/ee176924.aspx
    For example to get 200 characters of width:
    $text | Out-File
    'myfile.txt' -width 200
    I do not know for certain if there is a limit to how wide it can be. I also assume the default is the standard console width (80 characters I believe.)

  • How to check if the spool req is open or close and close the req or open it

    Hi All.
    I have developed a program in which user can have option of print preview the outputs (all prints in one print request) , then save the outputs in one pdf, then send them through fax/email
    But problem is that when I run each option, the spool requests get generated properly. But when I do print preview and then save as pdf is gives error message that
    "No output request open. Document processing not possible. "
    Diagnosis
        You tried to process a new document by calling function module
        SSFCOMP_PROCESS_DOCUMENT, but no output request is open.
    System response
        The system issues an error message.
    Procedure
        Check the sequence in which you call the function modules SSFCOMP_OPEN
        and SSFCOMP_CLOSE. This is probably an internal error. Contact the SAP
        hotline and report the problem.
    in the code of print preview I have called the FM:
    call function 'SSFCOMP_CLOSE'
        exceptions
          ERROR  = 1
          others = 2.
      if SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Please help.
    Rgds,
    Madhuri

    Hi
    1) Use below parameters of structure SSFCTRLOP
    NO_OPEN, NO_CLOSE: These two flags prevent the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request. The value should be like the following:
    1st call: 
    NO_OPEN = SPACE.
    NO_CLOSE = 'X'.
    nth call:
    NO_OPEN = 'X'.
    NO_CLOSE = 'X'.
    last call:
    NO_OPEN = 'X'.
    NO_CLOSE = SPACE
    2.SSFCOMPOP: Structure for the output option.
    TDNEWID: A flag indicating whether a new request is created.
    4)     Define one data wa_print_control referencing the structure SSFCTRLOP, and define another data variable wa_output_option referencing the structure SSFCOMPOP in the top include file of this report.
    5)     Clear the above two work areas before the print loop happens on the internal table that contains the selected invoice headers.
    6)     Initialize these two work areas with the values which would not change during the print loop as the following code fragment:
    wa_print_control-no_dialog = ' '. u201DShow print setting dialog
                wa_print_control-preview = 'X'. u201DEnable print preview
                wa_output_option-TDNEWID = 'X'. u201CNew spool request.
    7)     In the loop at the internal table which holds the selected invoice headers, set blank value to of the field wa_print_control-NO_OPEN and set u2018Xu2019 to the field wa_print_control-NO_CLOSE for the first loop at the AT FIRST event because it will be the first call to the function module of the smartform. The code is bellow:
        print_control-no_open = ' '.
        print_control-no_close = 'X'.
    8)     Set blank value to the field wa_print_control-NO_CLOSE to close the spool request for the last loop at the AT LAST event.
    wa_print_control-NO_CLOSE = u2018 u2018
    9)     Call the function module generated by the Form Design by passing the print control work area and output area.

  • How to read spool file and get the spool file number

    Hey everyone.
    I created a program ztemp that is calling another program ztemp2 within, ztemp2 creates a spool file. Now the requirement is I need to write a code within ztemp to download that spool request and then convert it to the pdf file. I know I can use program rstxpdft4 to convert the spool file to the PDF but for this I need to give the spool number, so can you please tell me how can I get the spool number and then fetch it to the program rstxpdft4 .
    Thank you.
    Rhul goel

    Hi,
       Please check the [link|Convert ABAP List to PDF and display without downloading first; (Rich's reply) and get the spool similarly.
    Or read from table TSP01 to get the latest spool using sy-uname.
    Regards,
    Srini.

  • Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems n

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

  • Can we open and close the cursor again and again

    hi all,
    with the help of cursor select statement i am writing some columns into the text file. while writing into the file in between i want to write something which belongs to others cursor. shall i close the first cursor and reopen it again..
    is its works?

    If you are using for loop the you don't need to open and close the cursor like:
    SQL> set autot off
    SQL> begin
      2     for i in (select ename, deptno, sal from emp)
      3     loop
      4             for j in (select dname from dept where deptno = i.deptno)
      5             loop
      6             dbms_output.put_line ('Ename:' || i.Ename ||'  Dept Name:'|| j.dname);
      7             end loop;
      8     end loop;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> /
    Ename:SCOTT  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:ACCOUNTING
    PL/SQL procedure successfully completed.
    SQL> Or let us know about your requirements i.e. why you need to open/close the cursor again and again.

  • Save and Close the PDF form

    I've created PDF Form (Acrobat XI standard) with various field and button for sending the link of document location by outlook mail. I need the adobe java script for save the document in same location and close the document while i use the button for sending the link.

    You can only save the file to a specific location if you can install a script on the local machine where the file is used.
    Otherwise the best you can do is cause the Save As dialog to open, but you can't force the file to be saved.

  • Can TestStand open, read, write and close binary files?

    From a TestStand sequence, I need to open, read, write and close binary files. Does TestStand support this capability?

    Christine -
    In the past I have used the C/C++ Adapter to call directly into the CVI RTE functions. The CVI functions I have used are OpenFile, WriteFile and CloseFile. The functions are exported from the DLL as CVI_OpenFile, CVI_WriteFile, and CVI_CloseFile. I just had to make sure that on termination of the sequence, that the integer handle was properly released by calling the close function.
    If you are using LabVIEW, you could call directly into the low level VIs to do a similar set of operations.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • The program signals an error and closes the program.

    When I try to use the program with an .epub file, it signals an error and closes the program. Have reinstalled, but the same thing happens.
    What to do?

    itunes encounters an error and shuts down.
    That would be an unusual error message to be getting if you were having a problem with a photo cache ... but just in case ...
    Try deleting your iTunes photo cache, as per the following document:
    Photo Sync creates iPod photo Cache
    ... can you get a photo sync to go through without the crash after that?

  • When I click on any of my movie or TV shows in Itunes I immediately get an error message that says Itunes has stopped working and closes the program. I can sync the movies and shows to my phone okay but I can't watch on Itunes. Can anyone help?

    When I click on any of my movie or TV shows in Itunes I immediately get an error message that says Itunes has stopped working and closes the program. I can sync the movies and shows to my phone okay but I can't watch on Itunes. Can anyone help?

    Let's try the following user tip with that one:
    iTunes for Windows 10.7.0.21: "iTunes has stopped working" error messages when playing videos, video podcasts, movies and TV shows

  • The hinge makes a clicking sound at the right corner as i open and close the lid

    I bought my Mac 2 weeks ago and The hinge makes a clicking sound at the right corner as i open and close the lid. Someone help me out Please

    At the bottom of this page click
    Then on the right side of the next page click
    On the next page click
    Select a topic
    Select Other Topics then Hardware not working as expected
    Finally, provide your contact information and Apple will call you!

  • FF31: When I only have one tab open, even a blank one, and close the tab the window closes.

    FF31: When I only have one tab open, even a blank one, and close the tab the window closes.

    Type '''about:config''' in the Location bar and hit '''''Enter'''''.
    ''Accept the warning.''
    '''browser.tabs.closeWindowWithLastTab'''
    double-click to toggle to '''false''' and then restart Firefox.
    Now if you close the last tab the window (or Firefox) won't close, but a New Tab will be there.

  • How to open an URL and close the URL window, using adobe javascript

    Hi,
      Is it possible to open an URL and close the URL back again(without allowing the user to perform any other operation)? I was able to acheive the opening of the URL, using the app.launchURL("address". true); - But here it lauches in new window, and how do i close the window using the javascript. Is it possible?
    Thanks.

    Hi all
    In addition to what Bobby W - Adobe TS added, you might find
    the following useful as a bypass or workaround to the pesky prompt.
    var pw=window.parent;pw.opener=window.self;window.open("
    http://www.adobe.com");
    pw.close();
    I think this will only work for IE browsers. Actually, I
    think the whole window.close() only works for IE, but could be
    wrong about that.
    Cheers... Rick

  • I recently migrated my MacBook from 10.5.8 to 10.6.8, using the Snow Leopard CD I purchased from Apple. Since then I have noticed a strange ozone smell coming from the MacBook in the area where the hinges are to open and close the unit. I was told by Appl

    I recently migrated my MacBook from 10.5.8 to 10.6.8, using the Snow Leopard CD I purchased from Apple. Since then I have noticed a strange ozone smell coming from the MacBook in the area where the hinges are to open and close the unit. I was told by Apple that it probably is not serious and is coming from the fans in the MacBook. It is true that the smell/odor is more intense when the fans are working. Apple said I should take the MacBook to an Apple Store to have the hardware checked out. Everything seems to be working correctly. I am backing up automatically wirelessly to a Time Capsule, which I had not done until recently, although I had purchased the Time Capsule in 2009. I have not noticed this odor before. Does anyone suspect something more serious that may be going on?

    You may be smelling it because with the new OS the processor is having to work harder causing it to get hotter then it would with the other OS.  I can't say there is nothing wrong, but what could be happening is just that, it's getting hotter so the fan is spinning faster and moving more air so you are getting more of the smell then you would before.  I would still continue to back it up, and take it to the Apple Store at a Genius Bar and have them look at it to make sure.  Was the computer ever in a smoky environment??

  • When I have two browser windows open, the first with multiple tabs the second a window opened from a link (so just one tab), and close the second window, I receive the Quit Firefox prompt, "do you want to save tabs...?"

    This was happening with FF 3 before upgrading to 4, and was not happening with FF4.0 until the 4.0.1 update was applied, the first time it ran. Same issue on another computer running FF3, so may be a extension related problem.
    If I have three windows open and close the third, I do Not get this. Only when two are opened and one is closed. I could have three, close one, then the second and get the prompt.
    Not disabled extensions
    Adblock Plus
    BugMeNot
    Cooliris
    Download Statusbar
    DownloadHelper
    DowntThemAll!
    FireGestures
    HTML5 Extension for Windows Media Player
    HTTPS-Everywhere
    Java Console
    PDF Download
    Session Manager
    TinEye Reverse Image Search
    YouTube Comment Snob
    Disabled

    Does that 2nd window have a '''Close Window''' hyperlink on that page and you are using the X in the upper right corner of that 2nd window to close it?

Maybe you are looking for

  • Java + PL/SQL modules w one login

    We have a huge (600+ modules) collection of applications done in web pl/sql via Designer. We are moving to JDeveloper for future work and would like our end-users to be able to log into each individual application just once regardless of whether its

  • Firefox is already running but is not responding... I get this error ten times a day or more!

    I love Firefox and don't want to use a different browser, but the error "Firefox is already running but is not responding" is driving me crazy. The reason I get this error is because I frequently use http shortcuts from my desktop or click links from

  • Howto diff between bug and unknown?

    I am living in Europe, not in the USA. Your products are sold in the World. With my latest iMovie, I still cannot find the right 720p or 1080i (PAL) match. Apple, are you supporting Europe as well or do you think that the world is ending between 2 oc

  • Deleting messages in iOS8

    Since upgrading to ios8 i can only delete two text message conversations at a time.   I then have to close messages and reopen to delete any more than two.  Has any one else seen to experienced this problem?   Any solutions?

  • Trouble with screen resolution when using Parallels and ACT on Macbook Pro (late 2013)

    Hello, I have installed my Sage ACT 2013 software on my Macbook Pro 13" Retina (late 2013) computer that has 16GB of RAM and an i7 core processor using Parallels 9 desktop and Windows 7- 64bit.  The problem is that the screen resolution is very small