Spool and Output Requests

Hi,
Can U define what do u mean by spool and output requests(Reporting Agent) and its use in simple words...

Ash
Please check this for some more details
http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a8efb51ea11d189570000e829fbbd/frameset.htm
Thnaks
Sat

Similar Messages

  • How to get Log and Output File Names for a concurrent request

    Hi,
    I am submitting a concurrent frm OAF with the following code in AM
    try{
    OADBTransaction tx = getOADBTransaction();
    Connection conn = tx.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(conn);
    Vector parameters = new Vector();
    parameters.addElement("10");
    nRequestID= cr.submitRequest("CIE","DTFEMP","","",false,parameters);
    tx.commit();
    }catch(RequestSubmissionException e)
    How do i get the handle to log and output files for the abvoe concurrent request ?
    One more thing is there a way where we can evaluate the environment variables
    like in the above example once i get a the request id
    logfile = $APPLCSF/$APPLOUT/"l"+requestID+".log"
    and
    outputfile=$APPLCSF/$APPLOUT/"o"+requestID+".out"
    is there a way i can get the values of $APPLCSF and $APPLOUT from the os ?
    Thanks
    Tom...
    Thanks
    Tom ...

    You can query the Fnd_Concurrent_Requests table using Request_ID, which has the log & out file directory details.
    Hth
    Srini

  • 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,

  • 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

  • SSFCOMPOSER - 154 - No output request open. End not possible.

    Hi Experts,
    I'm trying to print multiple smartforms using FMs SSF_OPEN and SSF_CLOSE. Inside the main program RBDAPP01 (Inbound processing for IDOCS) there is a loop at the IDOCS to be processed. Deep within the processing, we have a custom FM being called which prints smartforms. Since there is a loop at the calling main program, I have organized the code in the custom FM such that the first IDOC calls SSF_OPEN and the last IDOC calls SSF_CLOSE, so that all IDOCS in between will be able to print their smartforms. Here is the call stack:
    8
    SAPLZCUSTOM                   
    ZCUSTOMPROGRAM                             
    113
    FUNCTION                     
    ZCUSTOMPROGRAM                                         
    7
    SAPLPPC1                               
    ZCUSTOMPROGRAM     
    136
    FUNCTION                     
    KK2A_GET_DATA_FROM_IDOC                                     
    7
    SAPLPPC1                               
    LPPC1U01                               
    1
    FUNCTION                     
    KK2A_GET_DATA_FROM_IDOC                                     
    6
    SAPLBD20                               
    LBD20F0A                               
    454
    FORM                         
    IDOCS_PASS_TO_APPLICATION                                   
    5
    SAPLBD20                               
    LBD20F0B                               
    69
    FORM                         
    IDOCS_PROCESS                                               
    4
    SAPLBD20                               
    LBD20U05                               
    260
    FUNCTION                     
    IDOC_INPUT                                                  
    3
    SAPLEDIR                               
    LEDIRU02                               
    182
    FUNCTION                     
    IDOC_START_INBOUND                                          
    2
    SAPLBD12                               
    LBD12U04                               
    37
    FUNCTION                     
    APPLICATION_IDOC_POST_IMMEDIAT                              
    1
    RBDAPP01                               
    RBDAPP01                               
    388
    EVENT                        
    START-OF-SELECTION                                          
    The problem is:
    1. When I only have 1 IDOC being processed, SSF_OPEN and SSF_CLOSE happens in the custom FM at the same time. This creates a successful spool.
    2. Whereas, when I have 2 or more IDOCS, SSF_OPEN happens in the first IDOC, but then it goes back to the calling program, and then when the last IDOC is encountered SSF_CLOSE is called. The FM SSF_CLOSE in this scenario calls the exception INTERNAL_ERROR (sy-subrc = 2).
    The system message is SSFCOMPOSER - 154 - No output request open. End not possible.
    Why is this happening? Is it because that other programs (calling programs) may have affected the status of SSF_OPEN? It seems that the SSF_OPEN is no longer open.
    Thanks in Advanced,
    Jack

    No, it will not hold the smartform open, but you don't need to hold it open in order for printout to be accumulated in one spool. Spool system does the accumulation automatically, provided the spool requests that are to be added to an existing spool request are:
    - generated in the same transaction and
    - have the same attributes (such as user, title, output device, client from which the request was issued, number of copies, priority, cover sheet setting, archive mode, and ABAP session number).
    Important is: where do OUTPUT_OPTIONS like printer come from currently? Is print parameters popup displayed on first Idoc for user to choose printer and options? Or do you use USER_SETTINGS = 'X' to simply take over defaults from user master? If the print options dialog is displayed, it needs to be controlled as well so it's displayed only once.
    Assuming print options come from the user in dialog, the logic without explicit open/close could look somewhat like this:
    On first idoc:
    - call SSF_OPEN  importing  JOB_OUTPUT_OPTIONS to display print options dialog; move-corresponding JOB_OUTPUT_OPTIONS to global OUTPUT_OPTIONS;
    - set OUTPUT_OPTIONS-TDNEWID = 'X' and clear  OUTPUT_OPTIONS-TDFINAL, to ensure new spool will be started (overriding user choices for these parameters!);
    - if the user has set OUTPUT_OPTIONS-TDIMMED = 'X' save it globally and clear it;
    - set CONTROL_PARAMETERS-NO_OPEN = 'X';
    On subsequent idoc:
    - clear OUTPUT_OPTIONS-TDNEWID;
    - clear CONTROL_PARAMETERS-NO_OPEN;
    On last idoc:
    - set OUTPUT_OPTIONS-TDFINAL = 'X' (this is not absolutely necessary, but prevents further appending to the spool);
    - restore OUTPUT_OPTIONS-TDIMMED from the value saved on first idoc;
    Calling Smartform:
    - set CONTROL_PARAMETERS-NO_DIALOG = 'X';
    - call smartform passing OUTPUT_OPTIONS and CONTROL_PARAMETERS;
    The logic is somewhat complicated; I'd wrap it in a class (singleton, which would be de-instantiated after last idoc) to avoid global data and code other than simple method call(s) in FM.
    Even if you decide to refactor the logic, it would still be important to understand, I think, why the current logic does not work (where and why smartform gets closed)... Maybe there are some nasty "surprises" somewhere, and your current algorithm should work.
    cheers
    Janis

  • How to generate output requests (Print) from BSP ?

    How to trigger an Print output controller from BSP ?
    i have designed certification letter in BSP page and if i trigger print button in BSP am passing the required parameters to the SAP spool,and letter is generated in SAPSCRIPT. Ans am able to trigger a print from the spool request.
    But how to trigger the ouput controller from BSP Itself .
    regards ,
    Message was edited by: J
    Solved . I have missed some Printer params .
    Message was edited by: J

    Hi,
    Refer this link.
    How to Print HU and its contents
    Vishal

  • Several smartform outputs are included in an output request

    In SAP help there is an example :
    SF_EXAMPLE_03 whereby several customers are selected in the application program; the  form is called for each customer and all form outputs are included in an output request. But there is no print-program given. 
    Wrt the above eg. I am facing the same problem to print the payslips for all the employees under single print request.
    The smartform made is in a loop called for each employee, but it is required that the print button once pressed shall print the O/P of all the forms for all the selected employees (in the loop).
    The control_parameters and output_options in the stmnt:
    CALL FUNCTION /1BCDWB/SF00000233 is concerned with the O/P criteria of the smartform being called in that loop pass; whereas I want to bunch all of the smartforms called in the loop in one print command.
    Can u pl provide the help as to how to proceed in my case to print for all the employees.

    There is a parameter TDNEWID (OUTPUT_OPTIONS I think), if this is set to X, it will trigger a new spool request for every time you are executing the smart form. Else, it will bundle all the request coming out of one program in to one spool id.
    So, just set that to X and your problem should be solved.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • Script to search all files in specified folder for multiple string text values listed in a source file and output each match to one single results txt file

    I have been searching high and low for this one.  I have a vbscript that can successfully perform the function if one file is listed.  It does a Wscript.echo on the results and if I run this via command using cscript, I can output to a text file
    that way.  However, I cannot seem to get it to work properly if I want it to search ALL the files in the folder.  At one point, I was able to have it create the output file and appear as if it worked, but it never showed any results when the script
    was executed and folder was scanned.  So I am going back to the drawing board and starting from the beginning.
    I also have a txt file that contains the list of string text entries I would like it to search for.  Just for testing, I placed 4 lines of sample text and one single matching text in various target files and nothing comes back.  The current script
    I use for each file has been executed with a few hundred string text lines I want it to search against to well over one thousand.  It might take awhile, but it works every time. The purpose is to let this run against various log files in a folder and
    let it search.  There is no deleting, moving, changing of either the target folder/files to run against, nor of the file that contains the strings to search for.  It is a search (read) only function, going thru the entire contents of the folder and
    when done, performs the loop function and onto the next file to repeat the process until all files are searched.  When completed, instead of running a cscript to execute the script and outputting the results to text, I am trying to create that as part
    of the overall script.  Saving yet another step for me to do.
    My current script is set to append to the same results file and will echo [name of file I am searching]:  No errors found.  Otherwise, the
    output shows the filename and the string text that matched.  Because the results append to it, I can only run the script against each file separately or create individual output names.  I would rather not do that if I could include it all in one.
     This would also free me from babysitting it and running each file script separately upon the other's completion.  I can continue with my job and come back later and view the completed report all in one.  So
    if I could perform this on an entire folder, then I would want the entries to include the filename, the line number that the match occurred on in that file and the string text that was matched (each occurrence).  I don't want the entire line to be listed
    where the error was, just the match itself.
    Example:  (In the event this doesn't display correctly below, each match, it's corresponding filename and line number all go together on the same line.  It somehow posted the example jumbled when I listed it) 
    File1.txt Line 54 
    Job terminated unexpectedly
     File1.txt Line 58 Process not completed
    File1.txt
    Line 101 User input not provided
    File1.txt
    Line 105  Process not completed
    File2.txt
    No errors found
    File3.txt
    Line 35 No tape media found
    File3.txt
    Line 156 Bad surface media
    File3.txt Line 188
    Process terminated
    Those are just random fake examples for this post.
    This allows me to perform analysis on a set of files for various projects I am doing.  Later on, when the entire search is completed, I can go back to the results file and look and see what files had items I wish to follow up on.  Therefore, the
    line number that each match was found on will allow me to see the big picture of what was going on when the entry was logged.
    I actually import the results file into a spreadsheet, where further information is stored regarding each individual text string I am using.  Very useful.
    If you know how I can successfully achieve this in one script, please share.  I have seen plenty of posts out there where people have requested all different aspects of it, but I have yet to see it all put together in one and work successfully.
    Thanks for helping.

    I'm sorry.  I was so consumed in locating the issue that I completely overlooked posting what exactly I was needing  help with.   I did have one created, but I came across one that seemed more organized than what I originally created.  Later
    on I would learn that I had an error in log location on my original script and therefore thought it wasn't working properly.  Now that I am thinking that I am pretty close to achieving what I want with this one, I am just going to stick with it.
    However, I could still use help on it.  I am not sure what I did not set correctly or perhaps overlooking as a typing error that my very last line of this throws an "Expected Statement" error.  If I end with End, then it still gives same
    results.
    So to give credit where I located this:
    http://vbscriptwmi.uw.hu/ch12lev1sec7.html
    I then adjusted it for what I was doing.
    What this does does is it searches thru log files in a directory you specify when prompted.  It looks for words that are contained in another file; objFile2, and outputs the results of all matching words in each of those log files to another file:  errors.log
    Once all files are scanned to the end, the objects are closed and then a message is echoed letting you know (whether there errors found or not), so you know the script has been completed.
    What I had hoped to achieve was an output to the errors.log (when matches were found) the file name, the line number that match was located on in that file and what was the actual string text (not the whole line) that matched.  That way, I can go directly
    to each instance for particular events if further analysis is needed later on.
    So I could use help on what statement should I be closing this with.  What event, events or error did I overlook that I keep getting prompted for that.  Any help would be appreciated.
    Option Explicit
    'Prompt user for the log file they want to search
    Dim varLogPath
    varLogPath = InputBox("Enter the complete path of the logs folder.")
    'Create filesystem object
    Dim oFSO
    Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
    'Creates the output file that will contain errors found during search
    Dim oTSOut
    Set oTSOut = oFSO.CreateTextFile("c:\Scripts\errors.log")
    'Loop through each file in the folder
    Dim oFile, varFoundNone
    VarFoundNone = True
    For Each oFile In oFSO.GetFolder(varLogPath).Files
        'Verifies files scanned are log files
        If LCase(Right(oFile.Name,3)) = "log" Then
            'Open the log file
            Dim oTS
            oTS = oFSO.OpenTextFile(oFile.Path)
            'Sets the file log that contains error list to look for
            Dim oFile2
            Set oFile2 = oFSO.OpenTextFile("c:\Scripts\livescan\lserrors.txt", ForReading)
            'Begin reading each line of the textstream
            Dim varLine
            Do Until oTS.AtEndOfStream
                varLine = oTS.ReadLine
                Set objRegEx = CreateObject("VBScript.RegExp")
                objRegEx.Global = True  
                Dim colMatches, strName, strText
                Do Until oErrors.AtEndOfStream
                    strName = oFile2.ReadLine
                    objRegEx.Pattern = ".{0,}" & strName & ".{0,}\n"
                    Set colMatches = objRegEx.Execute(varLine)  
                    If colMatches.Count > 0 Then
                        For Each strMatch in colMatches 
                            strText = strText & strMatch.Value
                            WScript.Echo "Errors found."
                            oTSOut.WriteLine oFile.Name, varLine.Line, varLine
                            VarFoundNone = False
                        Next
                    End If
                Loop
                oTS.Close
                oFile2.Close
                oTSOut.Close
                Exit Do
                If VarFoundNone = True Then
                    WScript.Echo "No errors found."
                Else
                    WScript.Echo "Errors found.  Check logfile for more info."
                End If
        End if

  • Output Types and output determination procedure

    Hi All,
       What is the output type and output determination procedure for the following:
    1) Credit Memo Request
    2) Credit Memo
    3) Debit Memo Request
    4) Debit Memo
    Regards
    Ashis

    Hi Ashis,
    As per the standard
    1) Credit Memo Request-
    Procedure-V10000
    Output type-BA00
    2) Credit Memo
    Procedure-V10000
    Output type-RD00
    3) Debit Memo Request
    Procedure-V10000
    Output type-RD00
    4) Debit Memo
    Procedure-V10000
    Output type-BA00
    I hope it will help you,
    Regards,
    Murali.

  • Error in Smartform: No output request open.End not possible..

    Hi Experts,
    I am getting below mentioned error while trying to execute smartform..
    NO OUTPUT REQUEST OPEN..END NOT POSSIBLE..
    Message no. SSFCOMPOSER154.
    Help me to resolve the issue..
    Thanks in advance..
    Hampanna Kamatar

    Hi experts,
    I am getting the same error and found found that its because ssfcstat-tdopen getting false in the FM ssfcomp_close.
    if ssfcstat-tdopen = c_false.
        err_comp ssf_err_close_unstarted 'A' 154 space space space space.
      endif.
    I want to know the reason why and where exactly the field is getting populated with c_false.
    ps: I am using a Zprogram and it PRINTS FOR FEW DELIVERIES AND THIS ERROR FOR FEW DELIVERIES.

  • Input and output on same device, producer/consumer structure

    Hello interested people,
    I have a question about using the same device for both digital inputs
    and outputs.  I have written a simple program of one while loop
    that continuously polls the device, processes, and requests.  I
    have addressed the device using two DAQmx Asst. and I have attached
    them with their error in/out cluster terminals to provide data flow and
    eliminate the chance of addressing the devices at the same time (which
    produces an error).  Now I want to change this program structure
    to a producer/consumer loop foundation with state machine.  
    In this design, I will have the DI in the producer loop and the DO in
    the consumer loop, under one of the states.  I can't simply
    connect the error in/out ports in this configuration, so my question is
    how to avoid the error caused by addressing the same device
    simultaneously with two different tasks (input and output)?  I
    have attached two VI's, the "One Loop" vi is the original configuration
    (simplified), and the Producer-Consumer vi is a NONSENSICAL program
    that simply represents the desired configuration.  (I don't need
    any comments on the programming of this vi, it is only an example for
    illustration of the problem). 
    I am thinking about bundling the input data and the error cluster, both
    from the PXI 6528 DI, into one cluster, queueing that up, and
    unbundling the de-queued elements for some kind of data flow between
    the producer loop and the "Request" state of the consumer loop. 
    Is this the right approach, or am I barking up the wrong tree?
    Thanks
    Attachments:
    One Loop DO DI.vi ‏102 KB
    Producer-Consumer DI-DO.vi ‏106 KB

    Hello,
    It sounds to me like you really have two modes:
    1. user interface actions determine execution
    2. user interface is locked, and execution is automated.
    I think it would make sense to use the producer consumer for an architecture.  Basically you would do the following:
    1. program the producer to handle the user interface as you normally would.
    2. provide one additional event case in the producer which would be your "automated handling" case.  In that case, you could put a state machine which could run until whatever conditions were met to put your program back in "user interface mode".
    Keep in mind that you can use custom USER EVENTS to programmatically generate events ie. you can trigger the start of your "automated handling" form anywhere in your code at virtually any time.
    I think this would allow you to take advantage of the producer consumer architecture in its intended spirit, while integrating an automated routine.
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • 6534 in Pattern Generation Input and Output

    Hello All
    I have a PCI 6534 High Speed Digital I/O card that I am trying to use to generate a pattern output from port A and acquire some data from port C. I have connected Port C, bit 0 to high and all the others low and I have also connected the two REQ pins together. This is to allow for the REQ pin from the pattern generation output to drive the input as an external clock. I have set the timebase as 1uS and the request interval as 10, to give a REQ pulse every 10uS. The idea being that the pattern generation output will generate a REQ pulse every 10uS and this would cause an input read to occur. My code can be found in the attached word file.
    Now initially I placed the DIG_Block_In command before the DIG_Block_Out and set the two counts to 100. For a single run of the application this filled my input buffer array with 50 elements of 257.... which I think is what I would expect as for a count of 100 it takes 2 to fill both the upper and lower 8 bits of the input array. OK....
    Now if I change the In Count to 200 and leave the Out Count at 100 I only fill 48 elements. I have no idea why this would happen. In my finall application I hope to increase the count to nearer 2000 and this loss of elements becomes significant.
    If I swap the DIG_Block_Out command to go before the DIG_Block_In then with both counts set to 100 I get no data acquired at all. If I increase both counts to say 2000, I actually acquire 944 elements, 56 less than I would expect? Why is this....?? Is it because the DIG_Block_Out command has already started the process before the DIG_Block_In command is initiated?
    Does anybody know what is going on here? I have had the same problem with a PCMCIA 6533 card (worse) and thought it would be solved with the PCI 6534. Does anybody know how I can ensure the correct numbers of data are acquired every time I run this operation? I need to be sure that all the desired data is being acquired as my final application is very dependent on this.
    Any help would be gratefully appreciated.
    Jamie
    Attachments:
    6534_Timing_Issues.doc ‏27 KB

    Hi Jamie,
    Whenever you are communicating from one group to the other on the 653x boards, you should have the input clocked on an external signal and you should have the output start AFTER the input process has started.
    As for why your input buffer is half your output buffer, it could be that the intermediate PC memory buffer is in terms of bytes and your application buffer was casting this data to a 2 byte word.
    I linked on one of your other posts 2 example programs. Adapting those might suit your needs best. Have a good day.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HFORCEKWTID=75069:5&HOID=5065000000080000008BA10000&HExpertOnly=&UCATEGORY_0=_31_%24_12_&UCATEGORY_S=0
    Ron

  • How to stop spooling and get error or status of the statement

    Hi All,
    I am using the bellow in .sql file to generate a spool file which is called from a shell script.
    The issue is whn i kill the job the .csv file is still generated and doesnt thow any error.
    Could any one please let me know how to stop spooling if the script end in between or catch the status of the error and email if spooling stops in between.
    Please help. Thanks
    below is used in .sql
    set feedback off
    set term off
    set trimspool on
    set pagesize 0
    exec dbms_output.disable
    exec dbms_output.enable(40000)
    set linesize 2000;
    set long 2000;
    WHENEVER SQLERROR EXIT 1 ROLLBACK
    whenever oserror exit 1 rollback
    alter session set global_names=false;
    spool  $HOME/data/abc.csv
    select statement;
    spool off;
    exit
    sql is called from this script:
    #!/bin/ksh
    status=`sqlplus -s / @$HOME/sql/extract/abc.sql `
    status1=$?
    if [ $status1 -ne 0 ]
      then
    mailx  -s "Fatal - Error in Extraction process "  [email protected]
    fi ____________________________________
    Edited by: user11942774 on 1 Mar, 2012 4:07 AM

    Hi, dczay, and welcome to the Community,
    Sign in to your Skype account via the Skype website; the link to Sign In appears at the upper right corner of the website page.
    Cancel the subscription.
    Please contact Skype Customer Service to explain the situation and to request a refund.
    (The blue type is actually a link to the instruction related to contacting Skype Customer Service and how to request a refund.)
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Send spool id output (sap script) via email in PDF format

    Dear friends,
    Looking for sample program to send spool id output of sapscript via email in PDF format.
    Regards,
    Praveen Lobo

    Hi,
    Try this code..
    * Parameters.
    PARAMETERS: p_email(50) LOWER CASE.
    PARAMETERS: p_spool LIKE tsp01-rqident.
    * Data declarations.
    DATA: plist LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: document_data LIKE sodocchgi1.
    DATA: so_ali LIKE soli OCCURS 100 WITH HEADER LINE.
    DATA: real_type LIKE soodk-objtp.
    DATA: sp_lang LIKE tst01-dlang.
    DATA: line_size TYPE i VALUE 255.
    DATA: v_name LIKE soextreci1-receiver.
    DATA rec_tab LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    * Get the spool data.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
    EXPORTING
    rqident = p_spool
    first_line = 1
    last_line = 0
    desired_type = ' '
    IMPORTING
    real_type = real_type
    sp_lang = sp_lang
    TABLES
    buffer = so_ali
    EXCEPTIONS
    no_such_job = 1
    job_contains_no_data = 2
    selection_empty = 3
    no_permission = 4
    can_not_access = 5
    read_error = 6
    type_no_match = 7
    OTHERS = 8.
    * Check the return code.
    IF sy-subrc <> 0.
    MESSAGE s208(00) WITH 'Error'.
    LEAVE LIST-PROCESSING.
    ENDIF.
    * Prepare the data.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 0.
    plist-body_num = 0.
    plist-doc_type = 'RAW'.
    plist-obj_descr = 'Spool data'.
    APPEND plist.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 1.
    DESCRIBE TABLE so_ali LINES plist-body_num.
    plist-doc_type = real_type.
    * Get the size.
    READ TABLE so_ali INDEX plist-body_num.
    plist-doc_size = ( plist-body_num - 1 ) * line_size
    + STRLEN( so_ali ).
    APPEND plist.
    * Move the receiver address.
    MOVE: p_email TO rec_tab-receiver,
    'U' TO rec_tab-rec_type.
    APPEND rec_tab.
    IF NOT sp_lang IS INITIAL.
    document_data-obj_langu = sp_lang.
    ELSE.
    document_data-obj_langu = sy-langu.
    ENDIF.
    v_name = sy-uname.
    * Subject.
    document_data-obj_descr = 'Spool attached'.
    * Send the email.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = document_data
    sender_address = v_name
    sender_address_type = 'B'
    TABLES
    packing_list = plist
    contents_bin = so_ali
    receivers = rec_tab
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE e208(00) WITH 'Error in sending email'.
    ENDIF.
    COMMIT WORK.
    * Send the email immediately.
    SUBMIT rsconn01
    WITH mode = 'INT'
    AND RETURN.
    * Success message.
    MESSAGE s208(00) WITH 'Email sent'.
    Thanks
    Naren

  • Get HTML spool and save it as html on a server directory (in batch)

    Hi all,
    I wrote a program which permits to get a spool an send it per mail as attachment or save it as file in a directory.
    It musst be available to start the program in batch mode.
    I've no problem to get the spool (type HTML) and send it via mail with the HTML file as attachment.
    But by getting the spool and saving it in a directory insteed sending it via mail, I've a corrupted file. Does anybody know how to solve the problem ?
    I did following :
    get the spool :
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
         EXPORTING
           rqident              = iv_spool
         IMPORTING
           real_type            = lv_real_type
         TABLES
           buffer               = lt_soli
    * convert the file :
      lt_solix = cl_bcs_convert=>soli_to_solix( lt_soli ).
    *Transfert the file:
        OPEN DATASET lv_dataset FOR OUTPUT IN LEGACY BINARY MODE.
       LOOP AT lt_solix INTO ls_solix.
         TRANSFER ls_solix TO lv_dataset.
       ENDLOOP.
       CLOSE DATASET lv_dataset.
    Some other informations :
    - I do not want a spool in text mode (RAW). I want to get the HTML file.
    - I allready tried to do an open dataset in text mode -> didn't work.
    thank in advance for any advice.
    Fred

    i'm sorry, i'm pretty dumb and missed the change into solix table.
    try give a look here
    Spool to HTML Function Module
    ABAP Utility : Print-Screen to HTML

Maybe you are looking for