Send the SapScript to Spool

Hi all,
i need to send to sapscript form to spool.
any suggestion to do this ?
Regards,
Luke

Hi
During script call send print parameters and it will be sent to spool accordingly.
After getting the print preview of the SCRIPT.
Click On PRINT.
then one spool request will be generated by system.
Go to SP01.
You Can Find SPOOL Reqest Number
Edited by: Lavanya K on Aug 13, 2008 9:54 AM

Similar Messages

  • Need send the sapscript in HTML format.

    Hi,
      I need to email the SAPScript form in HTML format to external user i mean customer.
       Please help me how to send SAP data in email as HTML data with or with out script is very helpful to me .
    Regards,
    Naidu

    Hi,
      I need to email the SAPScript form in HTML format to external user i mean customer.
       Please help me how to send SAP data in email as HTML data with or with out script is very helpful to me .
    Regards,
    Naidu

  • How to send the ALV GRID output to spool by using the print button in std t

    How to send the ALV GRID output to spool by using the print button in standard tool bar.
    We have created a button in the va02 transaction.  If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept.  But i am unable to send the output to spool using the print button in the standard tool bar.
    I am able to display the Print parameter dialog box but i am not able to send it to spool.
    Kindly help.
    Thanks In Advance.
    G.V.Ramana

    Hi Shaik,
    There is not properties button in my print screen.
    MODULE user_command_0900 INPUT.
        WHEN 'EXCEL'.
          PERFORM excel_download.                              
        WHEN 'PRI'.
          PERFORM print_output.
    form Print_output.
    CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
               EXPORTING
                    columns        = 80
                    device         = 'ANY '
                    lines          = 65
                    maxpenality    = 1999
               TABLES
                    layouts        = lt_layouts1
               EXCEPTIONS
                    unknown_device = 1
                    OTHERS         = 2.
          IF sy-subrc = 0.
            LOOP AT lt_layouts1.
              IF lt_layouts1-penality < 1000        AND
                 lt_layouts1-penality < l_min_penality.
                l_layout       = lt_layouts1-layout.
                l_min_penality = lt_layouts1-penality.
              ENDIF.
            ENDLOOP.
            IF NOT l_layout IS INITIAL.
              CALL FUNCTION 'GET_PRINT_PARAMETERS'
                   EXPORTING
                        mode                   = 'CURRENT'
                        line_size              = 80             "#EC *
                new_list_id            = l_new_list_id
                        no_dialog              = l_no_dialog
                        layout                 = l_layout
                   IMPORTING
                        out_archive_parameters = rs_arc_params
                        out_parameters         = rs_pri_params
                        valid                  = l_valid
                   EXCEPTIONS
                        archive_info_not_found = 1
                        invalid_print_params   = 2
                        invalid_archive_params = 3
                        OTHERS                 = 4.
              IF sy-subrc NE 0.                                 " INS SLIN
              ENDIF.                                            " INS SLIN
              IF rs_pri_params-linsz LT 80 OR
                 rs_pri_params-linsz LT gt_stack-s_lprint-width.
                gt_stack-print_line_break = 'X'.
              ELSE.
                CLEAR gt_stack-print_line_break.
              ENDIF.
              IF l_valid NE 'X'.
                rs_pri_params = ls_pri_params_sav.
                rs_arc_params = ls_arc_params_sav.
              ENDIF.
            ENDIF.
          ENDIF.
    endform.                    " Print_output
        CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
                EXPORTING
                   is_layout         = gs_layout_cost_tot_grand
                CHANGING
                   it_fieldcatalog   = gt_fcat_cost_tot_grand[]
                   it_outtab         = gt_cost_tot_grand[].
    Please check my code

  • How to send an ALV to Spool

    Dear all,
    Could you please help, my requirement is to send an ALV report as a PDF attachement to a list of email address. My plan is to send the ALV to spool and read it from there and email it. However I have a problem in as much as the ALV is not being sent to spool, furthermore I also get print dialog popup when running the report. Can you please help, i am using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY and  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' I have browsed here and there are several questions on this topic but they do not address the issue of sending the file to the spool. The partial code is below
    DATA:i_t001 TYPE t001 OCCURS 0,
         pdf    LIKE tline OCCURS 0,
         g_spool   TYPE tsp01-rqident,
         g_program TYPE sy-repid VALUE sy-repid.
    TYPE-POOLS:slis.
    DATA: w_print TYPE slis_print_alv,
          w_print_ctrl TYPE alv_s_pctl.
    PARAMETERS: p_file TYPE string.
    INITIALIZATION.
      p_file = 'H:\TEST_gh.pdf'.
    START-OF-SELECTION.
      rp-def-time-period.
      help1 = behrs DIV 24.
      bdate = ldate - help1.
      help1 = behrs MOD 24.
      help2 = ltime(2) - help1.
      IF help2 LT 0.
        bdate = bdate - 1.
        btime = ltime.
        btime(2) = 24 + help2.
      ELSE.
        btime = ltime.
        btime(2) = help2.
      ENDIF.
      pn-begps = ldate - 1.
      pn-endps = ldate.
    GET pernr.
      loop at p0007 where begda le ldate and endda ge ldate.  "
      endloop.                                              
    * überprüft Arbeitszeitplanregel
    * CHECK schkz.
      CHECK p0007-schkz IN schkz.
      CHECK p0007-zterf IN zterf.        
      CALL FUNCTION 'HR_SEL_STAT_CHECK'
           EXPORTING
                get_pernr    =  pernr-pernr
                get_ldate    =  ldate
                get_bdate    =  bdate
                get_btime    =  btime
                get_psp_flag =  psp_flag
                get_ltime    =  ltime
    *    IMPORTING
    *         NO_PERMIT    =
           TABLES
                get_p0000    =  p0000
                get_p0001    =  p0001
                get_p0002    =  p0002
                get_p0050    =  p0050
                get_p0007    =  p0007
                data_tab     =  data_tab.
    *   End-of-Selection                                                   *
    END-OF-SELECTION.
      loop at data_tab into ls_data_tab.
        ls_data_tab-total_records = '1'.
        ls_data_tab-kostl = p0001-kostl.
        Append ls_data_tab to lt_data_tab.
      endloop.
      DESCRIBE TABLE data_tab LINES lines.
      CALL FUNCTION 'HR_GET_ERROR_LIST'
        TABLES
          error      = errors
          errortexts = errortexts
        EXCEPTIONS
          no_errors  = 1
          OTHERS     = 2.
      IF lines EQ 0 AND sy-subrc EQ 1.
        MESSAGE i050.
        STOP.
      ENDIF.
      LOOP AT errors.
        READ TABLE data_tab WITH KEY errors-pernr.
        IF sy-subrc EQ 0.
          DELETE data_tab INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
      g_repid = sy-repid.
    * fill field catalog for output
      PERFORM fill_fcat USING  fcat
                               g_repid.
    * Listheader
      PERFORM fill_header USING header_alv_wa
                                header_alv.
      FIELD-SYMBOLS <lwa_fcat> like line of fcat.
      LOOP AT fcat ASSIGNING <lwa_fcat>.
        IF <lwa_fcat>-fieldname = 'TOTAL_RECORDS'.
          <lwa_fcat>-do_sum    = 'X'.
        ENDIF.
      ENDLOOP.
    *Right, sort the table and produce sub totals
      wa_sort-spos      = 18.
      wa_sort-fieldname = 'KOSTL'.
      wa_sort-up        = 'X'.
      wa_sort-subtot    = 'X'.
      append wa_sort to it_sort.
    * Layout for REUSE_ALV_GRID_DISPLAY
      s_layout-colwidth_optimize = 'X'.
      s_layout-zebra             = 'X'.
      s_layout-no_author         = 'X'.
    w_print-print = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = g_repid
        "      i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command = 'USER_COMMAND'  
          i_callback_top_of_page  = 'TOP_OF_PAGE'
          is_layout               = s_layout           
          it_fieldcat             = fcat
          it_sort                 = it_sort
          i_save                  = 'A'                       
          i_structure_name        = MY_STRUCTURE'
          is_print                = w_print
        TABLES
          t_outtab                = lt_data_tab
        EXCEPTIONS
          program_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.
      ELSE.
    ***=====================================================================*
        g_spool = sy-spono.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid = g_spool
          TABLES
            pdf         = pdf.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              filename = p_file
              filetype = 'BIN'
            TABLES
              data_tab = pdf.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
              EXPORTING
                i_callback_program      = g_repid
              "      i_callback_pf_status_set = 'SET_PF_STATUS'
                i_callback_user_command = 'USER_COMMAND'  
                i_callback_top_of_page  = 'TOP_OF_PAGE'
                is_layout               = s_layout           
                it_fieldcat             = fcat
                it_sort                 = it_sort
                i_save                  = 'A'                 
                i_structure_name        = MY_STRUCTURE'
              TABLES
                t_outtab                = lt_data_tab
              EXCEPTIONS
                program_error           = 1.
                ENDIF.
          endif.
        endif.

    Hi Andy ,
    write this code before calling "CONVERT_ABAPSPOOLJOB_2_PDF"
    CALL FUNCTION 'SET_PRINT_PARAMETERS'
         EXPORTING
           destination = 'LOCL' " Printer
           layout      = 'X_65_512/2' "Format "X_65_255
           line_count  = '65' "Line Count
           line_size   = '1024'. "Line Size
    Regards ,
    Yogendra Bhaskar

  • Urgent Help. How to send the email in HTML format in Version 4.6c

    Hi,
      Please help me how to send a mail in HTML format with logo and specified format. Is it possible to send the SAPscript or Smartform in HTML format to external mail address.  The logo and the format is very important in this e-mail.
      quick response will help me better.
    Regards,
    Naidu

    Here is a sample program which emails HTML in the body.  Of course you can put an HTML tag in there that would point to the logo on some server(internet).  Notice we are just putting the HTML code in the MAILTXT table,  This is how we do it at my company.
    report zrich_0002.
    data: maildata   like sodocchgi1.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    start-of-selection.
      clear:    maildata, mailtxt,  mailrec.
      refresh:  mailtxt, mailrec.
      perform build_text_message.
      perform build_receivers.
      perform send_mail_nodialog..
    *      Form  BUILD_TEXT_MESSAGE
    form build_text_message.
      maildata-obj_name = 'TEST'.
      maildata-obj_descr = 'Test Subject'.
      mailtxt  = '<html>'.
      append mailtxt.
      mailtxt  = '<head>'.
      append mailtxt.
      mailtxt  = '<title>Untitled Document</title>'.
      append mailtxt.
      mailtxt  = '<meta http-equiv="Content-Type" content="text/html;'.
      append mailtxt.
      mailtxt  = 'charset=iso-8859-1">'.
      append mailtxt.
      mailtxt  = '</head>'.
      append mailtxt.
      mailtxt  = '<body>'.
      append mailtxt.
      mailtxt  = '<div align="center"><em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif">THIS'.
      append mailtxt.
      mailtxt  = '  IS A TEST </font></em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif"></font>'.
      append mailtxt.
      mailtxt  = '</div>'.
      append mailtxt.
      mailtxt  = '</body>'.
      append mailtxt.
      mailtxt  = '</html>'.
      append mailtxt.
    endform.
    *      Form  BUILD_RECEIVERS
    form build_receivers.
    *  mailrec-receiver = '[email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
    endform.
    *      Form  SEND_MAIL_NODIALOG
    form send_mail_nodialog.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = maildata
                document_type              = 'HTM'
                put_in_outbox              = 'X'
           tables
                object_header              = mailtxt
                object_content             = mailtxt
                receivers                  = mailrec
           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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.
    Regards,
    Rich Heilman

  • Send bdc messages to spool

    Hi all,
    i am using call transaction in my program and collectiong messages into megtab(of type bdcmsgcoll)..
    1)can anyone please tel me how to process the messages and
    2) how to send the messages to spool
    SAI

    Sai Ram,
    after you getting the messages
    loop at it_msg.
    call function 'MESSAGE_PREPARE'
    endloop.
    pass appropriate params to the above FM.
    now you have the messages , using NEW-PAGE PRINT ON.
    you can trigger the spool job.
          DATA: L_PARAMS TYPE PRI_PARAMS,
                L_VALID TYPE C.
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
              IMMEDIATELY            = ' '
              LINE_SIZE                =  220
              LAYOUT                 = 'X_65_255'
              RELEASE                = ' '
              MODE                   = 'CURRENT'
              NO_DIALOG              = ' '
            IMPORTING
              OUT_PARAMETERS         = L_PARAMS
              VALID                  = L_VALID
            EXCEPTIONS
              ARCHIVE_INFO_NOT_FOUND = 1
              INVALID_PRINT_PARAMS   = 2
              INVALID_ARCHIVE_PARAMS = 3
              OTHERS                 = 4.
          NEW-PAGE PRINT ON   PARAMETERS L_PARAMS NO DIALOG.
          PERFORM DISPLAY_REPORT.  "here you call your write statements.
          NEW-PAGE PRINT OFF.
    Regards
    Vijay

  • Send the result from SM36 run to a recepient

    Hi Gurus!
    After defining a job in the background , is it possible to have the report sent to a particular receipient through mail saying that the report ran with success or error. I mean a program has been fixed to run in the background everyday . Instead of me checking the result in sm37 everyday , can an automation be done such that teh report goes to my functional person everday stating the report .
    Thanks
    Aarav

    Hello All,
      Thank you very much for the information
    1. Instead of sending a mail stating that the report ran with success or error, you can send the report output(spool) to the mail recipient. If no spool is generated(table update program), then use a WRITE command in the program at the end stating 'Program executed successfully'. This will generate the spool. Mention the recepient while defining the background job in SM36 ..button "SPOOL LIST RECIPIENT".
    Per the above solution, can u please tell me the steps for WRITE Command for
    "Program ended with errors"
    Following is the scenario
    Name of the the daily  job which needs a autmated error email incase if it failes
    Name of the job:  za2_daily_report
    Steps
    Step 1 za2_crm_one
    step 2 za2_crm_two
    step 3 za2_crm_three
    I know how to define the above jobs in sm36.
    Can u please tell me step by step how to append the write command so that an email gets triggered if it failes
    Thanks
    Rezwan

  • Sapscript get spool when the delivery printed

    Hi all,
    i need such a thing:
    the user gets print out from printer and also wee need to send the same delivery items via email.
    We want to send the email while printing occurs.
    here i i need to get the spool id of sapscript and this convert this spool to pdf.
    How can i do that? especially how can i get the spool id, when you get print from printer no spool created or what?
    thanks

    Hi,
    The user gets print out from printer and also wee need to send the same delivery items via email.
    For this maintain condition record and configure sost settings
    We want to send the email while printing occurs.
    Here check for any exit available or develop a custom program.
    here i i need to get the spool id of sapscript and this convert this spool to pdf.
    Check the table nast,tsp01.
    How can i do that? especially how can i get the spool id, when you get print from printer no spool created or what?
    << Moderator message - Cut and paste response without attribution from http://help.sap.com/saphelp_nwpi711/helpdata/en/82/a9234289305133e10000000a155106/content.htm removed. Plagiarism is not allowed in SCN >>
    Regards,
    Madhu.
    Edited by: Rob Burbank on Jan 4, 2012 11:15 AM

  • How to send the spool output to the specific user during ALE distribution

    Hi All
    In ALE internal order Configuration done by BAPI Method SAVEREPLICA Business object BUS2075whenever user changed the internal order which is moved to the destination system because of change data setting in data element fields.
    I want to know how to send the spool output of the changed internal order to the specific user during ALE distribution.
    Please help me to reslove the above issue
    Thanks & Regards
    KRISHGUNA

    Solved by myself

  • How to send a job log/Spool once the job completed?

    Could you please help me how to send a job log/Spool once the job completed.
    There was an option is available System Send mail to send a mail once the job completed . So could you please help me how we can send a job log using this option .
    I have tried the below but i didn't get any mail . Could some one help this please !
    For example :
    Job chain name : Test_spool
                    Step1 : Reportstep
                                    Job definition u2013 XXX_YYY
                    Step2:  Mailstep
                                    Job definition: system_mail_send
    Expression :  Reportstep,job<(what i need to mention here )>:reportstep/log.txt
    Check the ablove mentioned is correct and correct me , still i didnu2019t get the log in the mail please .
    Thanks
    Ramkumar

    Hi Ram,
    I need your help on getting mail alert with  log file.
    here is how i have provide the parameter valure for job definition: system_mail_sent.
    Step1 with one job1 and step2 with one job1
    In step2 , i have included the job definition to send mail. with below parameter.
    Relative Job: Step 1, Job 1
    Job File: step 1, job 1: step 1/log.txt
    Please let me  know if the above method is correct or not.
    NOTE: mail server and from address are configured.
    Thanks,
    Karthik

  • Send the Report output to email from spool

    Hi All,
    The following process which i am doing to send the report output(Executed in background) to my mail id.
    I ran the report in Background and got the output in the spool. i opened the spool from the transaction SM37 and send the output to my external mail id via the following process
    click Spool Request->forward-> send SAP data
    here i am getting one POP up in there i gave my mail id and tick the check box on Express and click copy.
    Now i received the output in my mail .
    By doing the above process in the Quality server i am receiving the output in the mail as a PDF format that is correct.(Output is also correct).
    But when i execute the same in production server i am receiving the output in the mail as HTML format. (output and format is totally wrong). I want to know why its coming as HTML format instead of PDF format.
    Kindly help me regarding this.. Any configuration is there? If yes please let me know soon..
    Regards,
    Navaneeth...

    Hi,
    use scon, double-click on SMTP, select internet
    and compare the types of you both SAP-Systems.
    Hope it helps.
    Regards, Dieter

  • Convert spool to xls and send the attachment through email

    Hello,
    I have a requirement to convert spool to xls and then send the xls as an attachment through email,how sould i go about it,which fm can i use please advice..
    Thanks.

    Please check the links
    Re: Spool to XLS
    Re: converting spool data to xls file format.
    Regards
    Satish Boguda

  • Only sending the first 16 pages of spool out of full 145

    Hi gurus,
        We got problem with sending e mail (spool recipients). After completion of a back ground job, the job should send the a pdf report to the mail address specified. But out of 145 pages it is sending only 16 pages (2MB) of data. Can any one help or guide me to fix this problem.
    Regards,
    S.Manu

    Hi,
    As per the Ref thread i can manage the step 1 and 2  in the Note 329537, can any one help me in step 3.... what exactly i need to do in SE37. do i need to save the changes after calling the function module ?
    Regards,
    S.Manu

  • A utility program to send the content of a spool OR an internal table in

    Hello Guys,help me.
    A utility program to send the content of a spool / an internal table in various formats like HTML, PDF, TXT etc.
    can u explain wht is this completely
    Thank you
    Santhosh.

    Please check below links for better understanding of sending data from SAP to various formats...
    internal table to an XML file
    http://www.erpgenie.com/abap/code/abap27.htm
    Report Output to a PDF File
    http://www.erpgenie.com/abap/code/abap51.htm
    HTML EMail from ABAP
    http://www.erpgenie.com/abap/code/abap20.htm
    Spool from SAP to Acrobat format
    http://www.erpgenie.com/abap/pdf_creation.htm

  • Send/export the background job spool in Excel (in MHTML format) in ECC 6.0.

    Hello All,
    I have a requirement to send/export the background job spool in Excel (in MHTML format) in ECC 6.0. Please help.
    Thank you.
    Nalini

    Hi Jigar,
    Thanks for your response.
    Anything is like download to desktop or email is fine. But in MHTML format.
    We can download the ALV report in MHTML spreadsheet format when we run the program online. But the program is running for long time and going to dump.
    So i scheduled it as background job and downloading the output in  .HTML format. But user wants the spool/report output in .MHTML spreadsheet format.
    I can write the code. Instead of changing the existing program I would like to know is there any way (from standard SAP) that I can get the background spool in MHTML spreadsheet format.
    Thanks,
    Nalini

Maybe you are looking for

  • How to identify if a data node exist?

    Hi, If a form is binded to a schema, and when the xml is supplied to the form how to identify an optional node in the xml is available or not. for example if I have a XML input like below <root>      <childTable>                    <childRow>        

  • Why don't Grapher's Frame Limits work correctly with saved Grapher files using multiple equations on Mountain Lion?

    Hi, I generally enjoy using Grapher in OS X (I am using Mountain Lion v10.8.2). However, I have repeatedly encountered what seems to be broken basic functionality in setting the limits on the display frame  (View> Frame Limits-). When opening saved G

  • Import Server fails to import if repository has password

    Hi, I am using MDM SP05 Patch2 on Windows Server. I added a login password to my repository. Now what happens is the import server fails to import files for that repository giving the error : "<i>[MDS=MDM Repos=Repo]: CatMgrClientWorker.Connect() fai

  • Graphical corruption in X after playing media or using chromium

    In SMPlayer (xv output) and sdlmame, when I switch to full screen, afterwards X will show graphical corruption. This does not seem to happen with VLC or GnomeMPlayer. For SMPlayer, the task bar space between icons and the pager, and the rest of it af

  • How to get an exception when casting a generic collection?

    Hi, I have a bit of code that looks more or less like this:import java.util.ArrayList; import java.util.Collection; public class CollectionTest {      public static void main (String[] args) {           try {                get (Float.class);