Print, pdf, mail from form

Hello,
I want to print, create pdf file on desktop and send external mail of invoice from SAP form (all in one program).
I have following question:
1) can we do all from one program?
2) Will it download pdf file on presentation server (c:\filename.pdf) even thought output will be called in a document while saving in backgroung?
3) If we send mail can we have multiple recipents?
4) Any sample code or reference?
Thank you.
AP

Hi,
  This is the program to download form into pdf file.
1.Directly with RSTXPDFT4.
or
TABLES : vbrk.
TYPE-POOLS : slis.
                           GLOBAL TYPES
                   naming convention: "TY_name"
                          GLOBAL CONSTANTS
                   naming convention: "c_name"
                    GLOBAL ELEMENTARY VARIABLES
                    naming convention: "w_name"
                          GLOBAL STRUCTURES
                    naming convention: "st_name"
                       GLOBAL INTERNAL TABLES
                     naming convention: "i_name"
DATA:i_bdcdata    TYPE TABLE OF bdcdata    ,
     i_fieldcat   TYPE slis_t_fieldcat_alv ,
     i_vbrk       TYPE TABLE OF ty_vbrk    ,
     i_sort       TYPE slis_t_sortinfo_alv ,              "for sorting the fields
     i_rows       TYPE lvc_t_row            .
                      PARAMETERS & SELECT-OPTIONS
                 aming convention: "p_name" & "s_name"
SELECTION-SCREEN  BEGIN OF BLOCK b1." WITH FRAME TITLE text-010.
SELECT-OPTIONS : s_vkorg FOR  vbrk-vkorg OBLIGATORY,
                 s_fkart FOR vbrk-fkart  OBLIGATORY,
                 s_kunag FOR vbrk-kunag            ,
                 s_vbeln FOR vbrk-vbeln            ,
                 s_fkdat FOR vbrk-fkdat  OBLIGATORY.
SELECTION-SCREEN  END OF BLOCK b1.
SELECTION-SCREEN  BEGIN OF BLOCK b2.
PARAMETERS: p_file1 TYPE string DEFAULT 'C:\'.
SELECTION-SCREEN  END OF BLOCK b2.
DEFINE m_fieldcat.
  add 1 to st_fieldcat-col_pos.
  st_fieldcat-fieldname   = &1.
  st_fieldcat-ref_tabname = 'VBRK'.
  st_fieldcat-seltext_s   = &2.
  st_fieldcat-seltext_m   = &3.
  st_fieldcat-seltext_l   = &4.
  append st_fieldcat to i_fieldcat.
END-OF-DEFINITION.
                           START-OF-SELECTION
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
  CALL METHOD cl_gui_frontend_services=>directory_browse
    CHANGING
      selected_folder      = p_file1
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      OTHERS               = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
START-OF-SELECTION.
  EXPORT w_file FROM  p_file1 TO MEMORY ID 'ZMEM1'(005).
  PERFORM f1000_get_data.
  PERFORM f2000_display_data.
*&      Form  F1000_get_data
      This routine is used for Get the data from VBRK based on
      Selection Screen
FORM f1000_get_data.
  SELECT vkorg
         fkart
         kunag
         vbeln
         fkdat
    INTO TABLE i_vbrk
    FROM vbrk
   WHERE vkorg IN s_vkorg
     AND fkart IN s_fkart
     AND kunag IN s_kunag
     AND vbeln IN s_vbeln
     AND fkdat IN s_fkdat.
  IF sy-subrc NE 0.
    MESSAGE i014(zmsg) WITH 'No data is available for your Input'(003).
  ENDIF.
ENDFORM.                    "get_data
*&      Form  F2000_display_data
     This routine is used for building field catalogs and display
     ALV Data
FORM f2000_display_data.
  PERFORM f6000_field_cat.
  PERFORM f7000_sort.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program       = sy-repid
      i_callback_pf_status_set = 'F3000_PF_STATUS_SET'
      i_callback_user_command  = 'F4000_USER_COMMAND'
      is_layout                = st_layout
      it_fieldcat              = i_fieldcat
      it_sort                  = i_sort
    TABLES
      t_outtab                 = i_vbrk.
ENDFORM.                    "display_data
*&      Form  F6000_field_cat
     This routine is used for building field catalogs and display
     ALV Data
FORM  f6000_field_cat.
  m_fieldcat 'VKORG' '' '' ''.
  m_fieldcat 'FKART' 'Billing Document Type'(007) 'Billing Document Type'(007) 'Billing Document Type'(007).
  m_fieldcat 'KUNAG' 'Customer No'(008) 'Customer No'(008) 'Customer No'(008).
  m_fieldcat 'VBELN' 'Invoice No'(009) 'Invoice No'(009) 'Invoice No'(009).
  m_fieldcat 'FKDAT' '' '' ''.
  st_layout-cell_merge = 'X'.
  st_layout-colwidth_optimize = 'X'.
  st_layout-box_fieldname = 'VKORG'.
ENDFORM.                    "F7000_field_cat
*&      Form  F7000_sort
FORM f7000_sort .
  CLEAR st_sort.
  st_sort-fieldname = 'VBELN'.
  st_sort-up = 'X'.
  st_sort-group = 'UL'.
  APPEND st_sort TO i_sort.
ENDFORM.                                                    "f6000_sort
      FORM F3000_PF_STATUS_SET                                      *
      This routine is for creating User button on output
FORM f3000_pf_status_set  USING ut_extab TYPE slis_t_extab. "#EC CALLED
  SET PF-STATUS 'ZPF_STATUS' OF PROGRAM 'ZVRXX_SF_PDF_DOWNLOAD'
      EXCLUDING ut_extab.
ENDFORM.                               " PF_STATUS_SET
      FORM F4000_USER_COMMAND                                       *
      This routine is for When user on clicks on custom button in
      OUTPUT and Download to PDF format
FORM f4000_user_command USING ucomm TYPE sy-ucomm
                              sel TYPE slis_selfield.
  TYPES: BEGIN OF ty_alv,
          lights(1)  TYPE c, "Exception, Holding the value of the lights
          number(14) TYPE c,  "billing document no
          text(150)  TYPE c,  "text
         END OF ty_alv.
  DATA: gs_alv       TYPE ty_alv,
        gt_alv       TYPE TABLE OF ty_alv,
        gr_alv       TYPE REF TO cl_salv_table,
        gr_columns   TYPE REF TO cl_salv_columns_table,
        gr_column    TYPE REF TO cl_salv_column,
        lw_ref       TYPE REF  TO cx_salv_not_found,
        lw_ref1      TYPE REF TO cx_salv_msg,
        lw_ref2      TYPE REF TO cx_salv_data_error,
        lw_text      TYPE string,
        lw_pdf(3)    TYPE c,
        lw_pdf1(3)    TYPE c.
  DATA: ref_grid TYPE REF TO cl_gui_alv_grid.
  DATA :lw_row_index       TYPE lvc_index    ,
        lw_subrc           TYPE sy-subrc      .
  CONSTANTS : c_0          TYPE c VALUE '0'.
*then insert the following code in your USER_COMMAND routine...
  IF ref_grid IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      IMPORTING
        e_grid = ref_grid.
  ENDIF.
  IF NOT ref_grid IS INITIAL.
    CALL METHOD ref_grid->check_changed_data.
  ENDIF.
  CASE ucomm.
    WHEN 'PDF'.
      lw_pdf = 'PDF'.
      EXPORT lw_pdf1 FROM lw_pdf TO MEMORY ID 'ZMEM4'(004).
      CALL METHOD ref_grid->get_selected_rows
        IMPORTING
          et_index_rows = i_rows.
      LOOP AT i_rows
         INTO st_selected_line.
        lw_row_index = st_selected_line-index.
        CLEAR st_selected_line.
        READ TABLE i_vbrk
              INTO st_vbrk
             INDEX lw_row_index.
        IF sy-subrc EQ 0.
          CLEAR:w_vbeln.
          MOVE st_vbrk-vbeln TO w_vbeln.
          EXPORT lw_vbeln1 FROM w_vbeln TO MEMORY ID 'ZMEM'(004).
          lw_subrc = 1.
*--Begin of changes for DRFK904991
*--We need an identifier to tell the print program that PDF is being
downloaded through this program and the word "COPY" should not be
printed hence we are exporting this flag to memory which will be
read later on in the smartform
          DATA l_pdf TYPE c.
          l_pdf = 'X'.
          EXPORT l_pdf TO MEMORY ID 'ZPDF'.
          PERFORM f5000_print_vbeln USING w_vbeln.
          FREE MEMORY ID 'ZPDF'.
*--End of changes for DRFK904991
          IMPORT lw_subrc1 TO lw_subrc FROM MEMORY ID 'ZMEM2'(006).
          CLEAR : w_objky.
          SELECT objky
            FROM nast
            UP TO 1 ROWS
            INTO w_objky
           WHERE kappl EQ c_v3
             AND objky EQ w_vbeln
             AND ( kschl EQ c_zrd0 OR kschl EQ c_zrdx ).
            and nacha eq '8'. "--02/15/2008
          ENDSELECT.
*insertion by kudalarr on 05-02-2008
*displaying the status of download.
          IF w_objky NE space
                   AND lw_subrc EQ c_0.
            st_check-value = 'PDF is  Generated Successfully'(001).
            gs_alv-lights = '3'.    "Color green
            gs_alv-number = w_objky.
            gs_alv-text = st_check-value.
            APPEND gs_alv TO gt_alv.
          ELSE.
            st_check-value = 'PDF is not Generated'(002).
            gs_alv-lights = '1'.    "Color red
            gs_alv-number = w_vbeln.
            gs_alv-text = st_check-value.
            APPEND gs_alv TO gt_alv.
          ENDIF.
        ENDIF.
        lw_subrc = 1.
        EXPORT lw_subrc1 FROM lw_subrc TO MEMORY ID 'ZMEM2'.
      ENDLOOP.
  ENDCASE.
*GETTING ALL THE COLUMNS AND ASSISGNING THE COLUMN NAMES TO THE RESPECTIVE.
  TRY.
      CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = gr_alv
        CHANGING
          t_table      = gt_alv.
    CATCH cx_salv_msg INTO lw_ref1.
      lw_text = lw_ref1->get_text( ).
      IF NOT lw_text IS INITIAL.
      ENDIF.
  ENDTRY.
  gr_columns = gr_alv->get_columns( ).
  TRY.
      CALL METHOD gr_columns->get_column
        EXPORTING
          columnname = 'NUMBER'
        RECEIVING
          value      = gr_column.
    CATCH cx_salv_not_found INTO lw_ref .
      lw_text = lw_ref->get_text( ).
      IF NOT lw_text IS INITIAL.
      ENDIF.
  ENDTRY.
  TRY.
      CALL METHOD gr_column->set_long_text
        EXPORTING
          value = 'Invoice number'(010).
      CALL METHOD gr_columns->get_column
        EXPORTING
          columnname = 'TEXT'
        RECEIVING
          value      = gr_column.
      CALL METHOD gr_column->set_long_text
        EXPORTING
          value = 'Status'(011).
    CATCH cx_salv_not_found ."INTO LW_REF.
      lw_text = lw_ref->get_text( ).
      IF NOT lw_text IS INITIAL.
      ENDIF.
  ENDTRY.
*DISPALYING THE STATUS OF PDF GENERATION.
  TRY.
      gr_columns->set_exception_column( value = 'LIGHTS' ).
      CALL METHOD gr_alv->display.
    CATCH cx_salv_data_error INTO lw_ref2.
      lw_text = lw_ref2->get_text( ).
      IF NOT lw_text IS INITIAL.
      ENDIF.
  ENDTRY.
  IF NOT sel IS INITIAL.
  ENDIF.
*end of insertion by kudalarr on 05-02-2008
ENDFORM.                    "sub_user_command
                                                            "F6000_sort
*&      Form  F5000_print_vbeln
      text
-->  p1        text
<--  p2        text
FORM f5000_print_vbeln USING l_vbeln TYPE vbeln.
  CONSTANTS:   c_ctumode(1) TYPE  c VALUE 'N', "set the parametrs for call transaction.
               c_cupdate(1) TYPE  c VALUE 'A'. "set the parametrs for call transaction
  DATA:lw_kschl      TYPE sna_kschl.
  DATA : lw_field      TYPE dd03l-fieldname,
         lw_counter(2) TYPE n .
  REFRESH: i_bdcdata.
  CLEAR:   lw_kschl,
           lw_counter,
           lw_field.
  SELECT kschl
         FROM nast
         INTO lw_kschl
         UP TO 1 ROWS
        WHERE kappl EQ c_v3
        AND  kschl EQ c_rd00
        AND objky EQ l_vbeln.
       and nacha eq '8'. "--02/15/2008
  ENDSELECT.
  IF sy-subrc EQ 0.
    lw_counter = lw_counter + 1.
  ENDIF.
  CLEAR:lw_kschl.
  SELECT kschl
         FROM nast
         INTO lw_kschl
         UP TO 1 ROWS
               WHERE kappl EQ c_v3
        AND ( kschl EQ c_zrd0 OR kschl EQ c_zrdx )
        AND objky EQ l_vbeln.
       and nacha eq '8'. "--02/15/2008
  ENDSELECT.
  IF  sy-subrc = 0.
    lw_counter = lw_counter + 1.
  ELSE.
    MESSAGE i015(zmsg) WITH 'No output Type Available  for the selected Invoice'(013) l_vbeln.
  ENDIF.
  PERFORM bdc_dynpro      USING 'SAPMV60A' '0101'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'VBRK-VBELN'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=DRCK'.
  PERFORM bdc_field       USING 'VBRK-VBELN'
                                l_vbeln.
  PERFORM bdc_dynpro      USING 'SAPLVMSG' '0200'.
  CONCATENATE 'NAST-KSCHL(' lw_counter ')' INTO lw_field.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                 lw_field.
  CLEAR:lw_field.
  CONCATENATE 'ROW_MARK(' lw_counter ')' INTO lw_field.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=PRNT'.
  PERFORM bdc_field       USING lw_field
                                'X'.
  CALL TRANSACTION 'VF03' USING i_bdcdata MODE c_ctumode
                                        UPDATE c_cupdate.
  IF sy-subrc EQ 0.
    MESSAGE s999(zyus) WITH 'Invoice Report'(012).
  ENDIF.
ENDFORM.                    " SUB_PRINT_VBELN
       Start new screen                                              *
FORM bdc_dynpro USING program dynpro .
  CLEAR st_bdcdata.
  st_bdcdata-program  = program.
  st_bdcdata-dynpro   = dynpro.
  st_bdcdata-dynbegin = 'X'.
  APPEND st_bdcdata TO i_bdcdata.
ENDFORM.                    "BDC_DYNPRO
       Insert field                                                  *
FORM bdc_field USING fnam fval.
  CLEAR st_bdcdata.
  st_bdcdata-fnam = fnam.
  st_bdcdata-fval = fval.
  APPEND st_bdcdata TO i_bdcdata.
ENDFORM.     
Regards(replay with points),
Shiva.
Edited by: shiva kumar on Mar 20, 2008 5:33 AM

Similar Messages

  • Printing a report from Forms 9i

    Hi all
    I have to print a report from Forms 9i, but I can't do it directly, I have to execute it with desname = preview and then I can print it.
    I use the following sintax
    RUN_REPORT_OBJECT_PROC(repid, v_server_name,'pdf',printer,v_path,v_report,'paramform=no'|| other parameter....,v_servlet)
    where v_path is the name of the printer and run_report_object is a procedure to execute reports into forms
    I try to set v_path with the printer name on my client and on the server.. but it doesn't find it...
    Please help me,
    Thanks in advance
    Antonio

    Hi all
    have any one some information about ORARPP (Oracle Reports Remote Printing) ???
    I should print directly, my desname should be a printer.... could any one help me???
    Thanks in advance for your support...
    Antonio

  • Reader 10.1.3 for Mac doesn't print pdf's from web

    Yesterday we updated to Adobe Reader 10.1.3.  Now we can't print any pdf's from the web. In some cases we can save the files and open in Reader - those files print. However some web pdf's, like Stamps.com postage, don't allow the files to be saved.  Any suggestions?  We've tried Safari & Firefox, re-installing Reader, running Disk Utility and re-starting the Mac.
    When we try to print pdf's from the web, the print preview page in the print dialogue box is empty/white ... so the content to be print isn't even getting that far.
    We are running Snow Leopard OS - 10.6.8.
    Thanks in advance for any input!
    Joan

    Did you try the solutions listed here:
    http://forums.adobe.com/message/4338063
    "Can you please check your preview box present at the right bottom corner of print dialog. Is the preview coming right?
    If no, then please try changing 'Comment and Forms' option present just above it. Try selecting 'Document and markups'."
    If yes, Please let me know if it works or not.
    Also, Could you provide more information:
    ->Which Printer are you using
    ->Can you print from Safari/firefox for non-pdf pages. Please try printing any html page and see if works
    ->Can you removing and readding your Printer and then see if it works

  • Opening .pdf files from forms using OLE

    Hi,
    I want to open, print , save and save as pdf files from forms using OLE . Please help me with the same.
    Thanks
    Vidya

    If you are in client/server mode, you can put an OLE container component on your form. However, be warned that this method does not work when you convert to the forms server web enabled mode. If you anticipate moving your application to the web anytime soon, my advice would be to web-enable first and then add in the feature to view .pdf (or other) files. In our client/server app, I went to a lot of trouble to add in OLE features such as you describe, and now I have to completely re-write those features for the web.

  • Print PDF file from folder using SSIS

    Is there a way in SSIS to print pdf file from folder?
    ANy help much appreciated.

    One method is calling Adobe Acrobat Reader exe from Execute Process Task within SSIS passing the document path as the argument
    The command and arguments will look like this
    http://geekswithblogs.net/JeremyRamos/archive/2013/10/22/print-ssrs-report--pdf-from-sql-server-agent-or.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How can print a report from form 6i,  when I press a button?

    hi Friends,
    How can print a report from form 6i, when I press a button?
    When i press a button from Form 6i, the report should print through printer.
    I have done it by using report parameter DESTYPE Printer but problem is that when I press a button printer dialogue box appear and then I give command Print to printer, I don’t want to show Printer dialogue box.
    I want when I press a button form Forms 6i , printer will print my report directly.
    Please send me the solution of this problem.
    Best regards,
    Shahzad

    Hi
    If You are using Client server application then to passing to Add all Print Parameter in the Host Command.
    Means Print command in unix to Host(lp.............) and Other Parameter to file name of the report to print.
    If You not Use Client Server Application the Also Passing a Host Command in Button-Pressed Event and Run.

  • Printing a report from forms

    I would like to print a report from forms without opening reports first. Is this possible and if so how?

    From a command-line or .BAT file (assuming Windows and Developer6i) run the following (on a single line). It will go to your default printer.
    <ORA_HOME>\bin\rwrun60 <report>.rdf userid=<user>/<pw>@<hoststring> destype=printer batch=yes
    null

  • Why can't I print PDF files from my iPad or smart phone. Just started this recently.

    Not able to print PDF files from either my iPad or smart phone

    You probably don't have a printer which supports AirPrint:
    What Printers Are AirPrint Compatible? - iPhone / iPod - About.com
    If your printer is not supported, you can buy a utility like PrinterPro from Readdle on the App Store. That's what I've used to print.

  • No longer possible to save or print PDF files from browsers

    I am suddenly having a problem saving or printing PDF files from the browser, but it extends to all browsers in OS X. I can view the PDF normally but if I try to print as PDF all it shows is two black pages. Then if I try to save as a PDF it tells me the document could not be exported. I just tried this with a PDF and the only way I could get it was via Windows running on Parallels. I've already tried resetting the printer by removing and adding it again with the alt key pressed but this made no difference.
    This all started about a week or so ago and I just ignored it at first thinking it was something wrong with a particular file but now it's happening in all cases. I'm running the latest 10.7.3 on a new Mac Pro and everything is up to date. Does anybody know what might be causing this?
    Thanks
    Ashley

    Quit Safari.
    Open the Library folder in your home folder as follows:
    ☞ If running Mac OS X 10.7 or later, hold down the option key and select Go ▹ Library from the Finder menu bar.
    ☞ If running an older version of Mac OS X, select Go ▹ Go to Folder… from the Finder menu bar and enter “~/Library” (without the quotes) in the text box that opens.
    Delete the following items from the Library folder:
    Caches/com.apple.Safari/Cache.db
    Preferences/com.apple.quicktime.plugin.preferences.plist
    Preferences/QuickTime Preferences
    Relaunch Safari and test.

  • Adobe Acrobat Pro XI problems printing PDFs created from AutoCAD.

    Just installed Adobe Acrobat Pro XI and am having problems printing PDFs created from AutoCAD.  Printing other PDF created by MS Word works well.  Had a similar problem in an earlier version of Pro.  The fix I figure out then was to print the PDF file as another PDF.  Using the second PDF to print to a plotter typically worked.  It does not work for Adoabe Acrobat Pro XI.

    Hi presottom
    Please refer ; http://helpx.adobe.com/acrobat/kb/troubleshoot-pdf-printing-acrobat-reader.html
    or
    Let us know more details about it to help you better ?
    What is the OS ?
    is there any error message , etc .. ?

  • Can't print pdf files from my imac

    can't print pdf files from my imac.

    macs don't come with acrobat reader by default
    when one get a mac and open a pdf file the build in program called preview opens it
    most of us stick with preview because acrobat reader is a rather dangerous program to install
    http://www.cvedetails.com/vulnerability-list/vendor_id-53/product_id-497/cvsssco remin-6/cvssscoremax-6.99/Adobe-Acrobat-Reader.html
    more
    https://www.google.com/search?sourceid=opera-portal&q=acrobat+reader+exploits&cl ient=opera-portal&channel=portal#hl=en&client=opera-portal&hs=lqn&channel=portal &sclient=psy-ab&q=list+of+acrobat+reader+exploits&oq=list+of+acrobat+reader+expl oits&gs_l=serp.3...8463.9471.0.9773.8.7.0.0.0.1.162.508.6j1.7.0.les%3B..0.0...1c .1.5.psy-ab.4Tc73RiiXXA&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.43148975,d .bGE&fp=cab576d3b9062d9c&biw=1825&bih=748
    after adobe flash and oracle Java the adobe acrobat reader is the most open door for hackers into ones system
    if you type preview in spotlight(the icon which looks like a spyglass) or in the launch's seach you can get to the preview app

  • NEED TO SEND MAIL FROM FORMS...

    DEAR ALL,
    I NEED TO SEND MAIL FROM FORMS WHEN I PRESS THE MAIL BUTTON.
    I HAVE NO IDEA FOR THIS CRITERIA. IF ANY ONE EXPERIENCED WITH
    THIS CRITERIA, PLS HELP ME AND GIVE ME THE CODING FOR THAT.
    AND ALSO PLS EXPLAIN EACH LINE OF CODING, WHICH U POST.
    THANKS IN ADVANCE
    S.BERNANDAS

    Your requirement can be done in forms. Good amounts of advice here. There 244 messages this year alone that fit the search criteria in the Oracle Forms forum.

  • Can't print PDF's from preview with os x v10.7 lion

    Hi.  Ever since I installed Lion Im having a hard time printing PDF's from the preview menue.  All I get is the pinwheel?  

    Are you using a Canon printer? If so:
    https://discussions.apple.com/message/15748239#15748239
    https://discussions.apple.com/thread/3216206?tstart=0
    If not, can you provide more details please and post the log of the hang?
    Hope this helps.

  • How send mail from forms 10g

    hi all,
    can any help in this,
    i want send a mail from forms 10g,how???
    thanx in advace,
    chands

    hi,
    my oracle version is 10.1.0.4.2
    this is my code....
    PROCEDURE Send_Mail_001 (sender IN VARCHAR2,
    recipient IN VARCHAR2,
    subject IN VARCHAR2,
    message IN VARCHAR2)
    IS
    mailhost VARCHAR2(30) := '10.192.30.12';
    mail_conn utl_smtp.connection;
    TEST VARCHAR2(100);
    crlf VARCHAR2(2):= CHR( 13 ) || CHR( 10 );
    mesg VARCHAR2(2000);
    BEGIN
    mail_conn := utl_smtp.open_connection(mailhost,25);
    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, sender);
    utl_smtp.rcpt(mail_conn, recipient);
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: ' || sender || crlf ||
    'To: ' || recipient || crlf ||
    'Subject: '|| subject || crlf;
    mesg:= mesg || ' ' || crlf || crlf || message ||'.' || crlf || '.'|| crlf;
    UTL_SMTP.OPEN_DATA(mail_conn);
    utl_smtp.write_data (mail_conn, mesg);
    /* body of email with multiple
    utl_smtp.write_data (v_mail_conn, v_message);
    call to write_data
    utl_smtp.write_data (mail_conn, mesg);
    UTL_SMTP.CLOSE_DATA(mail_conn);
    utl_smtp.quit(mail_conn);
    premia_wf_log('mail','hi');
    EXCEPTION
    WHEN OTHERS THEN
    premia_wf_log('mail',sqlerrm);
    END;
    can u help me in this..........
    thanx in advance
    chands

  • Who send mail from Forms 6i Builder?????

    I need send mail from Forms 6i Builder
    Please help me.
    Write me to [email protected]
    thanks.

    I need send mail from Forms 6i Builder
    Please help me.
    Write me to [email protected]
    thanks.

Maybe you are looking for

  • Changing Account question

    Hi, I have a problem with my itunes account. My girlfriend bought me my ipod and put it under her account. I recently got a new computer and tried listening to songs and such but she already has her account authorized on 5 computers. However, what I

  • Using Excel Active X to Find a String within a column

    I am trying to use ActiveX functions to search for a string within a specific column in excel. And return the row index of that string if a match occurs. Any help on that will be appreciated. I used Read then Compare for each cell in that column, but

  • Displaying different data series on drilldown

    I have a bar/line combo chart which displays two data series in bar form and one in line form. What I want to be able to do is to only show the bars when drilling down and not the line data series. I haven't found a way to do this yet, can anyone hel

  • Time Zone issues with iCal 2.0.3?

    I've been using iCal for a while now, and haven't had any problems until just recently. For some reason, meeting notices sent to me from Outlook (Windows XP) now appear in iCal with times for Africa (I am based in Arizona, and the people sending me t

  • Move test case with referenced items to another project

    How can I move a test case with all referenced contexts and verifications from a project to another project? At the moment I have to move each single item. How can I do this more efficient?