Save Spool File to Local PC

Hi there,
We have run our P60 program which has created a spool file which can be seen
in SP01 as a PDF file.
When I go into the menu SPOOL REQUEST => Forward => the save as local file is greyed out :
I need to download this file to my local PC.
Does anybody know how to do this.
Thanks
Andy

Hello,
It is a very simple process.
Go to SP01, and select the spool number which you want to save as PDF.
Follow the below path:
Goto-->Display Requests-->Content
this will show the content which is to be printed using this spool number.
Then type PDF! ( exclamation mark) which will give a pop up like screen to you. This is actually a PDF preview.
Navigate your mouse toward the below part of the screen and a save button will come. You can now save the file.
Regards,
Hrishav

Similar Messages

  • Save video file in local drive?

    Hi all,
    1)I want to upload some video in my project
    2) i want to save it in my local drive..
    please any one help me
    Thanks in advance

    What happens when you save?

  • Unable to save PDF file to local drive from sap after Above reader XI update.(Not as sap issue ,this is related to Adobe)

    Hi All,
    Users are unable to download/save file from sap after a adobe XI update.(no pop comes to save/open)
    Surprisingly,i am able to do so on my system without any adobe plug ins disabled or any registry editing.
    This is a strange behaviour and need to be resolved Asap....
    I contacted sap..this is not sap issue..this is a pure adobe reader bug.
    Please need help on this experts
    Feel free to comment for further details
    kind Regards,
    Sumit
    Mail me at [email protected]

    Hi ,
    Please tell us a lot more.
    - Is SAP running a local process, or something in a web browser?
       sap is running via SAPGUI ,no java system
    - What system?
      Users facing issue in all system
    - What browser?
    IE 9.0.28
    - Can PDFs from other sources be downloaded?
    Yes,they are downloaded.
    More Details-I did some tricks below which resulted in open/save popup......tht is not recomended by IT team...i need a permanent solution
    In IE, goto menu Options -> "Manage
    Addons", select in box "Show:" "Run without
    permission", then you see the Adobe PDF plugin
      Ichanged status to "Disabled
    Also, if i change the registry key settings for users as
    HKEY_CLASSES_ROOT\AcroExch.Document.11
    Value: EditFlags
    Changed: 0x00000100
    to 0x00000000
    (Remove the "Open always with this
    program" option)
    ITS WORKING.....
    But,in my system i need not to do all this settings and surprisingly it is working  only for me,rest all users are facing this issue.....
    If any one using Lync ,communicator ..do let me know..i wil show  the actual scnerio.
    Kind Regards,
    Sumit

  • Open and Save Excel Files

    Hi All,
    I need code of How to open and save excel file in local system in Oracle forms.
    With Regards,
    Chandra Shekhar

    Hello Chandra,
    Webutil can be used to achieve this functionality.
    STEPS TO FOLLOW
    ================
    1. Install and configure Webutil following instructions in the webutil manual
    and the readme file.
    2. Create a form with a block Eg. DEPT
    3. Create a button, and in that button put the following code -
    DECLARE
    application Client_OLE2.Obj_Type;
    workbooks Client_OLE2.Obj_Type;
    workbook Client_OLE2.Obj_Type;
    worksheets Client_OLE2.Obj_Type;
    worksheet Client_OLE2.Obj_Type;
    args Client_OLE2.List_Type;
    cell ole2.Obj_Type;
    j INTEGER;
    k INTEGER;
    BEGIN
    application := Client_OLE2.create_obj('Excel.Application');
    workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');
    workbook := Client_OLE2.Invoke_Obj(workbooks, 'Add');
    worksheets := Client_OLE2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := Client_OLE2.Invoke_Obj(worksheets, 'Add');
    go_block('dept');
    first_record;
    j:=1;
    k:=1;
    while :system.last_record = 'FALSE'
    loop
    for k in 1..3 /* DEPT has 3 columns */
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    End If;
    next_item;
    end loop;
    j:=j+1;
    next_record;
    end loop;
    /* For the last record */
    for k in 1..3
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    End If;
    next_item;
    end loop;
    Client_OLE2.Release_Obj(worksheet);
    Client_OLE2.Release_Obj(worksheets);
    /* Save the Excel file created */
    args := Client_OLE2.Create_Arglist;
    Client_OLE2.Add_Arg(args,'d:\test.xls');
    Client_OLE2.Invoke(workbook, 'SaveAs', args);
    Client_OLE2.Destroy_Arglist(args);
    /* release workbook */
    Client_OLE2.Release_Obj(workbook);
    Client_OLE2.Release_Obj(workbooks);
    /* Release application */
    Client_OLE2.Invoke(application, 'Quit');
    Client_OLE2.Release_Obj(application);
    END;
    4. Save the form and compile it.
    5. Run the form.
    6. Execute the query in the block.
    7. Click on the button.
    8. An excel file will be created in the d:\ directory by the name test.xls.
    Kind regards,
    Alex
    If someone's answer is helpful or correct please mark it accordingly.

  • Saving spool request with multiple Adobe PDF files to local directory

    Hi,
    I have a spool file with multiple Adobe PDF files in it.  You can only save the spool content to local directory by opening and save each PDF files.  Does anyone know whether there is a way to combine all the PDF files within a spool into one big PDF file?
    Chuin

    Are you using any plugins, like PDFlyer?

  • CREATE file, SAVE a copy on local mechine, UPLOAD a copy to remote server

    Hi all,
    I have a question to ask here, i am developing a pure java app (client/server) which hopefully can
    1) client > create a file (abc.txt for e.g) save a copy in local mechine,
    2) upload the file to remote server that currently connected (consider store in server?)
    3) than remove the copy in local mechine
    -OR-
    1) create a document with JTextPane, when click on "Save" button,
    2) the file will upload ( through ftp and created abc.txt in remote server)
    Is this possible with java application?

    Thanks,
    but do you have any idea,
    how these things can happend...
    perhaps i can get some concept from you...about the program design and how the flow of the program..that could make file tranfer...to remote server.
    regards

  • Can somebody can tell me is CC for team can support to save the files in the local area without using the cloud ?

    Can somebody can tell me is CC for team can support to save the files in the local area without using the cloud ?

    The desktop applications are still installed on your computer, and the files are also saved on your computer.
    Optionally you can upload files with a browser to https://creative.adobe.com/files, or sync up files using the file sync that is part of the Creative Cloud desktop application. The online file storage is private to you, no one else can see it your files.
    If you do want to share your files there are two options:
    You can Collaborate, which is sharing a folder with another Adobe ID. Only the person you collaborate with can see the folder.
    You can use Send Link to send a publicly accessible url to a file or folder.

  • How to save a file locally when executing backgroud job??

    Hi guys!
    Hope you can help...
    I need to be able to save a file (text file) locally on my machine when Im running my report in the background...
    Basically my program works like this:
    I have a Selection Screen where the user makes a selection, and enters where on his/her local machine a generated text file (.txt) needs to be saved when F8 has been pressed.
    But, it should ALSO be possible for this generated text file to be saved to the same location on the local machine if the program is run as a background job...
    Is that possible??  or can one only save stuff when you run things in the background on the Application Side??  Do I have to use "OPEN DATASET" keywords, or is there a Function Module you know of??
    POINTS WILL BE REMOVED!!!
    tks
    Christiaan
    Edited by: Julius Bussche on Jul 11, 2008 8:34 PM

    Hello,
    It is not possible to save file locally when running the program in background. It will be only saved on the application server.
    We had a similar requirement earlier. We developed another program which is executed after this program which downloads the file from the application server to the user desktop. This is just one simple additional step which should solve your problem.
    Hope this helps.
    cheers,
    Sushil Josih

  • Using a shutdown script to save files to local sever

    Hello,
    I am writing a shutdown script which runs when the use shuts their computer down. The goal is to back up some user files to a local sever. I am wondering if the shutdown will be delayed until the file is uploaded to the server. The file is approx 1 - 2 gb
    in size which would take a few minutes to send over to the server.
    I have used gpedit.msc and linked the batch file I wish to run.
    However, I have a few questions regarding this. Does windows wait for the batch file to finish executing before shutting down? If not,
    is there a way to delay the shutdown long enough for the file to send?
    For dev purposes I have experimented using a log off script (faster than constantly shutting off/turning on), however windows does not seem to want to wait and logs off before the btach file is finished executing. In the test batch script, I used the pause
    command to test if it would wait for me to finish executing the file before it logged off, but it seems that it does not want to wait and just goes ahead and logs off before it is done.
    The only work around I can think of is using a batch file which saves the files then turn off the computer
    instead of a script being run at shutdown - this might be not a practical solution since I have to integrate this into several workstation computers. Also, some employees may forget to use the file to shut down. I am also not sure how keen my boss
    would be for me to change the entire way everyone shuts down their computer (by running my batch file instead of the usual start->shutdown). If this is the only way to go about it I will discuss with him what needs to be done however I much prefer there
    to be a script that automatically runs when they shut their computers off.
    To wrap it up:
    Using a shut down script, how do I delay the shutdown long enough for files to be saved to a local server? Will windows automatically wait for the batch script to finish executing before turning off?
    Kind regards,
    - Strider

    Hello Strider,
    It seems that you issue is related with windows client, I suggest that you could post it to:
    https://social.technet.microsoft.com/Forums/windows/en-US/home?category=w7itpro%2Cw8itpro%2Cwindowsvistaitpro%2Cwindowsxpitpro%2Cwindowsintune
    The current forum you post to is used to discuss general issues about developing applications for Windows.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Save File on Local PC

    Hi,
    Is it possible to save the output of a JSP file in .csv format? I do not want to force the user to click on save. Once the user clicks on submit, I would like to display the page and also save the file (file.csv) on their computer (i.e. c:\temp\JSP).
    Is this possible? If so, how can I proceed?
    Thanks

    Here you go:
    <%@ page import="
    java.io.File,
    java.io.OutputStream,
    java.io.FileOutputStream,
    java.io.ByteArrayOutputStream"
    %>
    <%
    String contentType = "application/vnd.ms-excel";
    String fileName = "testFile";
    fileName = fileName + ".csv";
    response.setContentType(contentType);
    response.setHeader("Content-Disposition","filename="+fileName);
    out.print("I am the only data in the file");
                   String FileName = "c:/testFile.csv";
                   OutputStream os = new FileOutputStream(FileName);          
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   String text = "test string";
                   byte buf[] = text.getBytes();
                   baos.write(buf);
                   baos.writeTo(os);
                   baos.close();
                   os.close();
    %>

  • Acrobat X plugin running in Browser cannot save pdf files locally

    Hi,
    I have a Digital Signature plugin written for Acrobat X and it handles both signature creation and verification. When a PDF with digital signatures is opened in a browser (specifically IE8, IE9) acrobat X runs in browser mode and it calls our digital signature plugin. Our plugin then saves the online PDF to local disk using the following Acrobat X SDK method:
    PDDocSave()
    This normally works fine without any problems under windows 7. However, there are some cases where the PDF does not get saved at all. In that case, if we try running Internet Explorer using "Run as admin", saving starts to work again. From this we have concluded that the saving functionality of our plugin requires Internet Explorer to be run as admin.
    Problem is that, for users without admin rights this behavior is not ideal.
    We have also noted that, if we try to save the PDF opened in a browser using the default save feature of acrobat X, then the save goes through successfully.
    Question is, how can we make our plugin to save the pdf the same way acrobat X does when run under browsers?  What options do we have?
    My system specs: Windows 7 64bit,   Acrobat X v.10.1.4 (occurs in 10.1.1 through 10.1.4),    IE9. 
    Thanks in advance.

    My question is then how is acrobat itslef able to save the same pdf locally at the same destination without any problems. I am assuming it is using the same save api itself.
    If acrobat itself can do it, why cant a plugin running inside acrobat X.
    And if the plugin cannot achieve the same behavior as acrobat then can we conclude that for a digital signature plugin running inside acrobat X which is running in browser mode to open a PDF:
    - Acrobat X itself and the plugins which run inside it behave differently when saving an online pdf locally. And there is no way for the plugin to achieve the same behavior as acrobat itself in this regard.
    - There is no way (either programmatically or otherwise) for the digital signature plugins, to save online PDFs locally, without either running the browser 'as admin' or adding the website, hosting the online PDF, to Trusted websites list of acrobat X.
    - User of acrobat X plugin has to either run the browser 'as admin' or add the pdf hosting website to Trusted websites list to save the opened PDF locally.
    Please confirm if my conclusions are right. And in cases they aren't please explain why. Thanks for you prompt replys.

  • How to save HTML file with images present in the server to local machine

    Hi all
    In my application i have a option for the user to save HTML files with images present in the server. The HTML file is getting saved but the images are not being saved.
    The code i am using is below :-
    l
                        File fname = new File(filePath);
                        if(!fname.exists())                return;
                        FileInputStream istr = null;
                        OutputStream ostr = null;
                        response.setContentType("application/"+format);
                        response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
                        try { 
                             istr = new FileInputStream(fname);
                             ostr = response.getOutputStream();
                             int curByte=-1;
                             while( (curByte=istr.read()) !=-1)
                                  ostr.write(curByte);
                             ostr.flush();
    Can anyone suggest what i need to do
    regards

    The client should probably parse the html that comes down, and look for <img> links, and request those of the server as well.

  • Need Spool file 255 characters for background HR Reports into Excel

    We have been looking for a solution for problem this for more than 2 years now.
    Problem:
    1.     Requirement is to run large HR reports – either standard or with Ad Hoc Query in background mode in a company with more than 50,000 employees.
    2.     Nobody wants printed reports these days.  We want to save the forests. Customers prefer to be emailed an Excel file so they can do further data analysis, filtering, pivot tables etc.
    3.     Reports are running OK in foreground for smaller sections of the organisation, where you send the output to Excel from ALV, or save as a local file in spreadsheet format.
    4.     But large reports for entire company are awkward, tie up your PCs resources, and complex reports accessing many tables can timeout before completion.
    5.     So scheduling these reports to run in background would be the ideal solution.
    6.     However when we access the report output from SP02, we find that most reports (say with more than 13 or so fields) have an output wider than 255 characters and the output of the spool file wraps to the next line in Excel.  It is very tricky to then parse the data back into one row for each employee.  And you have a problem if you output is for 50,000 or so employees, because then you file is 100,000 rows and will not load completely into Excel – limit problem of 65,536 characters.
    7.     We simply want a spool file that does not wrap the data to the next line after 255 characters.
    8.     But how to explain this simple requirement to some technical people. It seems a lot of posts on SDN think we always want to print a spool file.  NO – remember the forests!
    Possible Solutions:
    I see a lot of posts here that refer to OSS note 186603, but they don’t mention the target for the output of the spool is to import into an Excel File (i.e. spreadsheet format).  Just search for 186603 or ” Spool request with more than 255 columns”.  There is also a reference to OSS note 313566.  I am not sure if these will work?
    I have also seen the suggestions that you need to define a customer printer format that does not wrap the output after 255 characters (create a new format type in transaction SPAD).
    Can anyone help us!
    John McKee

    Hi,
    Can you please check whether you can use:
    CONSTANTS C_LF TYPE X VALUE '0A'.
    CONSTANTS C_CR TYPE X VALUE '0D'.
    Regards,
    Lakshmi.

  • How to send generated Spool file through e-mail

    Hi,
    We have a ABAP report which generates a spool file. Now there is a requirement to send this spool file to our clients external mail boxes.
    Also we would like to automate this so that whenever a spool file is generated, the system should automatically send it as an attachment to user mail inboxes.
    Any idea how I can achieve this. Thanks is advance!
    Regards,
    Vikrant.

    Hi Vikrant,
       Have a look at this code...
    z_send_email_fax_global
    FUNCTION-POOL z_gfaian_mail_fax.            "MESSAGE-ID ..
    WORK TABLE AREAS
    TABLES: tsp01.
    INTERNAL TABLES
    DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
          lt_note_text   LIKE STANDARD TABLE OF soli  WITH HEADER LINE,
          lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
    DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
          lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
    DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
    TYPES: BEGIN OF y_files,
           file(60) TYPE c,
           END OF y_files.
    DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
    DATA: l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE.
    DATA: l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE.
    STRUCTURES
    DATA: folder_id      LIKE soodk,
          object_id      LIKE soodk,
          link_folder_id LIKE soodk,
          g_document     LIKE sood4,
         g_header_data  LIKE sood2,
          g_folmem_data  LIKE sofm2,
          g_header_data  LIKE sood2,
          g_receive_data LIKE soos6,
          g_ref_document LIKE sood4,
          g_new_parent   LIKE soodk,
          l_folder_id    LIKE sofdk,
          v_email(50).
    DATA: hd_dat  like sood1.
    VARIABLES
    DATA: client  LIKE tst01-dclient,
          name    LIKE tst01-dname,
          objtype LIKE rststype-type,
          type    LIKE rststype-type.
    DATA: numbytes TYPE i,
          arc_idx LIKE toa_dara,
          pdfspoolid LIKE tsp01-rqident,
          jobname LIKE tbtcjob-jobname,
          jobcount LIKE tbtcjob-jobcount,
          is_otf.
    DATA: outbox_flag LIKE sonv-flag VALUE 'X',
          store_flag  LIKE sonv-flag,
          delete_flag LIKE sonv-flag,
          owner       LIKE soud-usrnam,
          on          LIKE sonv-flag VALUE 'X',
          sent_to_all LIKE sonv-flag,
          g_authority LIKE sofa-usracc,
          w_objdes    LIKE sood4-objdes.
    DATA: c_file LIKE rlgrap-filename,
          n_spool(6) TYPE n.
    DATA: cancel.
    DATA: desired_type  LIKE sood-objtp,
          real_type LIKE sood-objtp,
          attach_type LIKE sood-objtp,
          otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
          ali LIKE sood-objtp VALUE 'ALI'. " ABAP lists
    CONSTANTS
    CONSTANTS: ou_fol LIKE sofh-folrg              VALUE 'O',
               c_objtp    LIKE g_document-objtp    VALUE 'RAW',
               c_file_ext LIKE g_document-file_ext VALUE 'TXT'.
    =================================================================================
    z_send_email_fax2
    FUNCTION z_faian_mail_fax2.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(FAX_MAIL_NUMBER) TYPE  SO_NAME
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"     REFERENCE(OBJECT_TYPE) TYPE  SO_ESCAPE
    *"  TABLES
    *"      LT_BODY_EMAIL STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
    Fist part: Verify if the spool really exists
      SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
      IF sy-subrc NE 0.
        RAISE err_no_abap_spooljob. "doesn't exist
      ELSE.
        client = tsp01-rqclient.
        name   = tsp01-rqo1name.
        CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                  authority     = 'SP01'
                  client        = client
                  name          = name
                  part          = 1
             IMPORTING
                  type          = type
                  objtype       = objtype
             EXCEPTIONS
                  fb_error      = 1
                  fb_rsts_other = 2
                  no_object     = 3
                  no_permission = 4
                  OTHERS        = 5.
        IF objtype(3) = 'OTF'.
          desired_type = otf.
        ELSE.
          desired_type = ali.
        ENDIF.
        CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
             EXPORTING
                  rqident              = src_spoolid
                  desired_type         = desired_type
             IMPORTING
                  real_type            = real_type
             TABLES
                  buffer               = l_objcont
             EXCEPTIONS
                  no_such_job          = 14
                  type_no_match        = 94
                  job_contains_no_data = 54
                  no_permission        = 21
                  can_not_access       = 21
                  read_error           = 54.
        IF sy-subrc EQ 0.
          attach_type = real_type.
        ENDIF.
        CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
             EXPORTING
                  owner     = sy-uname
                  region    = ou_fol
             IMPORTING
                  folder_id = l_folder_id
             EXCEPTIONS
                  OTHERS    = 5.
    fill out informations about the header of the email
        CLEAR: g_document.
        g_document-foltp     = l_folder_id-foltp.
        g_document-folyr     = l_folder_id-folyr.
        g_document-folno     = l_folder_id-folno.
        g_document-objtp     = c_objtp.
        g_document-objdes    = header_mail.
        g_document-file_ext  = c_file_ext.
        g_header_data-objdes    = header_mail.
        CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
             EXPORTING
                  method      = 'SAVE'
                  office_user = sy-uname
             IMPORTING
                  authority   = g_authority
             TABLES
                  objcont     = lt_body_email
                  attachments = lt_attachments
             CHANGING
                  document    = g_document
                  header_data = g_header_data
             EXCEPTIONS
                  OTHERS      = 1.
        folder_id-objtp = l_folder_id-foltp.
        folder_id-objyr = l_folder_id-folyr.
        folder_id-objno = l_folder_id-folno.
        object_id-objtp = c_objtp.
        object_id-objyr = g_document-objyr.
        object_id-objno = g_document-objno.
        link_folder_id-objtp = l_folder_id-foltp.
        link_folder_id-objyr = l_folder_id-folyr.
        link_folder_id-objno = l_folder_id-folno.
        REFRESH lt_rec_tab.
       CLEAR lt_rec_tab.
       lt_rec_tab-sel        = 'X'.
       lt_rec_tab-recesc     = object_type.   "This field for FAX/MAIL
       lt_rec_tab-recnam     = 'U-'.
       lt_rec_tab-deliver    = 'X'.
       lt_rec_tab-not_deli   = 'X'.
       lt_rec_tab-read       = 'X'.
       lt_rec_tab-mailstatus = 'E'.
       lt_rec_tab-adr_name   = fax_mail_number.
       lt_rec_tab-sortfield  = fax_mail_number.
       lt_rec_tab-recextnam  = fax_mail_number.
       lt_rec_tab-sortclass  = '5'.
       APPEND lt_rec_tab.
          lt_rec_tab-recextnam = fax_mail_number.
          lt_rec_tab-recesc = object_type.
          lt_rec_tab-sndart = 'INT'.
          lt_rec_tab-sndpri = 1.
          APPEND lt_rec_tab.
        lt_files-file = c_file.
        APPEND lt_files.
    begin of insertion by faianf01
        hd_dat-objdes = header_mail.
        CALL FUNCTION 'SO_ATTACHMENT_INSERT'
             EXPORTING
                  object_id                  = object_id
                  attach_type                = attach_type
                  object_hd_change           = hd_dat
                  owner                      = sy-uname
             TABLES
                  objcont                    = l_objcont
                  objhead                    = l_objhead
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  object_type_not_exist      = 17
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  x_error                    = 1000.
        IF sy-subrc > 0.
        ENDIF.
    end of insertion by faianf01
    send email from SAPOFFICE
        CALL FUNCTION 'SO_OBJECT_SEND'
             EXPORTING
                  folder_id                  = folder_id
                  object_id                  = object_id
                  outbox_flag                = outbox_flag
                  link_folder_id             = link_folder_id
                  owner                      = sy-uname
                 check_send_authority       = 'X'
             TABLES
                  receivers                  = lt_rec_tab
                 note_text                  = lt_note_text
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  component_not_available    = 1
                  folder_no_authorization    = 5
                  folder_not_exist           = 6
                  forwarder_not_exist        = 8
                  object_no_authorization    = 13
                  object_not_exist           = 14
                  object_not_sent            = 15
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  too_much_receivers         = 73
                  user_not_exist             = 35.
      ENDIF.
    ENDFUNCTION.
    =================================================================================
    z_send_email_fax
    FUNCTION ZCBFS_SEND_MAIL.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"  TABLES
    *"      LIST_FAX_MAIL_NUMBER STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
      DATA: vg_achou(1) TYPE n.
    Fist part: Verify if the spool really exists
      vg_achou = 1.
      DO 60 TIMES.
        SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
        IF sy-subrc IS INITIAL.
          CLEAR vg_achou.
          EXIT.
        ELSE.
          WAIT UP TO 1 SECONDS.
        ENDIF.
      ENDDO.
      IF vg_achou = 1.
        RAISE err_no_abap_spooljob. "doesn't exist
      ENDIF.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
           EXPORTING
                authority     = 'SP01'
                client        = client
                name          = name
                part          = 1
           IMPORTING
                type          = type
                objtype       = objtype
           EXCEPTIONS
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4
                OTHERS        = 5.
      IF objtype(3) = 'OTF'.
        desired_type = otf.
      ELSE.
        desired_type = ali.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
           EXPORTING
                rqident              = src_spoolid
                desired_type         = desired_type
           IMPORTING
                real_type            = real_type
           TABLES
                buffer               = l_objcont
           EXCEPTIONS
                no_such_job          = 14
                type_no_match        = 94
                job_contains_no_data = 54
                no_permission        = 21
                can_not_access       = 21
                read_error           = 54.
      IF sy-subrc EQ 0.
        attach_type = real_type.
      ENDIF.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
           EXPORTING
                owner     = sy-uname
                region    = ou_fol
           IMPORTING
                folder_id = l_folder_id
           EXCEPTIONS
                OTHERS    = 5.
    fill out informations about the header of the email
      CLEAR: g_document.
      g_document-foltp     = l_folder_id-foltp.
      g_document-folyr     = l_folder_id-folyr.
      g_document-folno     = l_folder_id-folno.
      g_document-objtp     = c_objtp.
      g_document-objdes    = header_mail.
      g_document-file_ext  = c_file_ext.
      g_header_data-objdes    = header_mail.
      CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
           EXPORTING
                method      = 'SAVE'
                office_user = sy-uname
           IMPORTING
                authority   = g_authority
           TABLES
                attachments = lt_attachments
           CHANGING
                document    = g_document
                header_data = g_header_data
           EXCEPTIONS
                OTHERS      = 1.
      folder_id-objtp = l_folder_id-foltp.
      folder_id-objyr = l_folder_id-folyr.
      folder_id-objno = l_folder_id-folno.
      object_id-objtp = c_objtp.
      object_id-objyr = g_document-objyr.
      object_id-objno = g_document-objno.
      link_folder_id-objtp = l_folder_id-foltp.
      link_folder_id-objyr = l_folder_id-folyr.
      link_folder_id-objno = l_folder_id-folno.
      REFRESH lt_rec_tab.
      LOOP AT LIST_FAX_MAIL_NUMBER.
        lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
        lt_rec_tab-recesc = 'U'.
        lt_rec_tab-sndart = 'INT'.
        lt_rec_tab-sndpri = 1.
        APPEND lt_rec_tab.
      ENDLOOP.
      lt_files-file = c_file.
      APPEND lt_files.
      hd_dat-objdes = header_mail.
      CALL FUNCTION 'SO_ATTACHMENT_INSERT'
           EXPORTING
                object_id                  = object_id
                attach_type                = attach_type
                object_hd_change           = hd_dat
                owner                      = sy-uname
           TABLES
                objcont                    = l_objcont
                objhead                    = l_objhead
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                object_type_not_exist      = 17
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                x_error                    = 1000.
      IF sy-subrc > 0.
      ENDIF.
    send email from SAPOFFICE
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                folder_id                  = folder_id
                object_id                  = object_id
                outbox_flag                = outbox_flag
                link_folder_id             = link_folder_id
                owner                      = sy-uname
           TABLES
                receivers                  = lt_rec_tab
                note_text                  = lt_note_text
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                component_not_available    = 1
                folder_no_authorization    = 5
                folder_not_exist           = 6
                forwarder_not_exist        = 8
                object_no_authorization    = 13
                object_not_exist           = 14
                object_not_sent            = 15
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                too_much_receivers         = 73
                user_not_exist             = 35.
    ENDFUNCTION.
    Regards,
    Santosh

  • Downloading spool files FM

    Hello,
    Need your help with downloading 108 spool files.
    I have scheduled 108 jobs and now I have to download data of all these 108 spools into excel files (from various PRD systems).
    One way is I go to System -> List -> Save -> Local File.
    However I don't want to use this.
    Neither I have option to create program in SE38, as I don't have access to same.
    Please advice if theree is any standard program or function module which can help me in this.
    Will be very thankful.

    form download_selected tables lsporq type sp01r_tview
                           changing rs_selfield type slis_selfield.
      data: rqnum like sy-tabix,
            filename like rlgrap-filename,
            dw_rc type sy-subrc.     
      perform get_selected3 tables lsporq
                            using ' ' rs_selfield changing rqnum.
      if rqnum > 0.
        loop at lsporq where selected = 'X'.
          filename(3) = lsporq-sys.
          filename+3(10) = lsporq-rqid_char.
          filename+13(4) = '.TXT'.
          move-corresponding lsporq  to tsp01sys.
          call function 'RSPO_CHECK_OUTRQ_PERMISSION'
            exporting
              spoolreq = tsp01sys
              access   = 'DOWN'
            exceptions
              others   = 1.
          if sy-subrc  0.
            out_message ti.
          MESSAGE i059 WITH tsp01sys-rqident tsp01sys-sys.
          else.
            gprog = 'RSPO_DOWNLOAD_SPOOLJOB'.
            if lsporq-sys = sy-sysid.
              call function 'RSPO_DOWNLOAD_SPOOLJOB'
                exporting
                  id     = lsporq-rqident
                  fname  = filename
                exceptions
                  others = 1.
            else.
              call function 'RSPO_DOWNLOAD_SPOOLJOB'
                destination lsporq-sys
                exporting
                  id                    = lsporq-rqident
                  fname                 = filename
                exceptions
                  communication_failure = 102  message msg_text
                  system_failure        = 103  message msg_text
                  others                = 1.
            endif.
            dw_rc = sy-subrc.        
            out_rfc_message lsporq-sys ti.
          endif.
        endloop.
        if dw_rc = 0.             
          message s028.
        endif.                     
      endif.
    endform.                    "DOWNLOAD_SELECTED

Maybe you are looking for

  • 2 channel oscilloscope not working on one channel, Better scope?

    My experience with Labview is limited and I am just restarting after about a year. I have searched but do not see the answer to my question. We upgraded from LV 7.0 to LV 7.1 and the 2 channel oscilloscope that is included as an example under V7.0 br

  • How to define map of maps?

    Hello, i want to do something like that in pl/sql: TYPE map_type    IS       TABLE OF NUMBER          INDEX BY VARCHAR2 (1);    --    map: 1 -> 'a'    --         2 -> 'b'    --         11 -> 'A'    --         22 -> 'B'    TYPE map_of_map_type    IS  

  • A few IPhoto Faces pictures cannot be used in Address Book contacts

    Hi all, I have read some topics around about similar issue but I was not able to fix the problem by reading at suggestions. Couple of days ago I have started to populate my address book. I noticed that I was not able to use Faces from Iphoto to assig

  • Cp 1700 skipping pages when printing

    I do not know if the problem comes from MS Excel or a printer issue but, when I go to print a multiple page spread sheet the first page prints and the rest are blank. Sometimes, but not on every skipped page I will get a page number printed. Help.

  • Error in Connecting to MS SQL Server 2000

    Thanks for your reply. My Problem and the Error shown in the command prompt is: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver Error Trace in getConnection() : com.microsoft.jdbc.sqlserver.SQLServerDriver Error: No act