Automatic mail shoot from java

hell every body,
hope this topic will draw ur kind attention.
i have a database in sql server200.
when our client lodged a complaint, i want an automated mail should forwarded to his personal Email ID
Can any body send some sample Code
Awaiting

The JavaMail API. But don't do it. Get humans responding.

Similar Messages

  • Process Mail Attachments from Java

    Hi all,
    from my Java application i would like to access to a mail account, check if there are new messages, and if so, save locally their attachments
    How could it do it?
    Thanks!
    T

    Did you read the [JavaMail API|http://java.sun.com/products/javamail/javadocs/index.html] ?

  • Automatic Mail Sending in Java/JSP/Servlets

    Hi,
    How to send mails with a specified format automatically after a stipulated no of days when the user does not access a file/page.
    TIA

    1. In your web application, have a database that keeps track of when a user accesses a page.
    2. Once a day, run a program that scans that database looking for cases when a user has not accessed a page for N days, or whatever your criterion is. Use JavaMail to send an e-mail message to each of those users.
    If you have specific questions about any of these things, don't hesitate to ask them in the appropriate forum.

  • Automate CD burning from Java

    Hey everybody,
    I got a question about automating Nero burning software through java. Is it possible? I posted a question last about getting file information from a directory, I was able to do that, and output a series of textfiles with the names of all the files in a given directory that are 6 months old. This process is for archiving purposes. Each of the textfiles has the names of the files in them that will add up to be about the size of a cd (700mb), and the last one has the left overs that don't reach to 700mb. Now that I have the textfiles, can I write a process to feed those names to Nero, or is there another piece of cd burning software that already does this? Any suggestions would be great.
    Thanks all

    Haha, atleast I know people are reading this. I know that there are ways to use Nero through VB, but they seem really sketchy to me. And besides VB isn't my bag. Right now I'm trying to find some sort of CD Burning API or anything relevant to that.

  • Using Java mail API from JSPDynPage

    Hi Experts,
    I am working on a Portal Assignment that requiresto sent work flow mails on the basis of error conditions.
    Can u please suggest if at all I can use Java Mail APIs from JSP page within the JSP DYN Page Framework.
    If at all Java Mail can be used could u please suugest some help docs on the same.
    Thanks for the help.
    Manab C Ghosh
    EP Consultant
    Kolkata INDIA
    +919830603327

    Hi Experts,
    Thanks for all the responses to my Mail question(mailing from JSPDynPage).
    I have found the solution.
    Here is how I have got the things: (pls note there are other solns)
    Using Java Mail APIs;
    Create a Java file in the scr.core / src.api
    MailSender.java
    * Created on Jul 21, 2005
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    package com.mailsend.test;
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    * Edited on Jul 24, 2005
    * @author Manab C Ghosh
    public class MailSender {
         public String sendMessage(){
            String msg ="Hello mail Test";
            String smtpServer ="mySMTPServer";
            String smtpSender = "senderemailaddress";
            String smtpRecipient="receipientemailaddress";
            String stBody =  msg ;
            //String stDate = new Date().toString() ;
            String stSubject = "Mail Test ";
            Send(     smtpServer,          //SMTPServer
                      smtpSender,          //Sender
                      smtpRecipient,     //Recipient
                      stSubject,          //Subject
                      stBody               //Body
                        );               //Attachments                    
         return "Mail Success";
    public static void Send(String SMTPServer,
                                  String From,
                                  String To,
                                  String Subject,
                                  String msgText1
            // Error status;
            int ErrorStatus = 0;
            // create some properties and get the default Session
            Properties props = System.getProperties();
            props.put("mail.smtp.host", SMTPServer);
            Session session = Session.getDefaultInstance(props, null);     
            try {
                 // create a message
                 MimeMessage msg = new MimeMessage(session);
                 msg.setFrom(new InternetAddress(From));
                 InternetAddress[] address = {new InternetAddress(To)};
                 msg.setRecipients(Message.RecipientType.TO, address);
                 msg.setSubject(Subject);
                 // create and fill the first message part
                 MimeBodyPart mbp1 = new MimeBodyPart();
                 mbp1.setText(msgText1);
                 // create the Multipart and its parts to it
                 Multipart mp = new MimeMultipart();
                 mp.addBodyPart(mbp1);
                 //mp.addBodyPart(mbp2);
                 // add the Multipart to the message
                 msg.setContent(mp);
                 // set the Date: header
                 msg.setSentDate(new Date());
                 // send the message
                 Transport.send(msg);
            } catch (MessagingException mex) {
    Call this file from the JSP page (which is set at JSPDynPage controller)
    one important thing-----
    Create a dir under PORTAL-INF and import the following jars-- activation.jar, mail.jar,imap.jar,smtp.jar, mailapi.jar.
    This works..
    Thanks once again to the Experts.
    happy mailing
    Manab Ghosh.
    INDIA (+919830603327)

  • Automatic mails by java

    Hi
    Request help for automatic mails to be sent using JAVA.We will maintain the status of people and as soon as the status chnges the mail needs to be triggered to those people.They needs to be sent to varous email ids which can be stored in a table.Also PDF attachment needs to be sent with the mail.It will very helpful if I can get any code snippet as it is required urgently.

    You get code snippets with the JavaMail download. At least you get code snippets about how to use the JavaMail classes. As for the rest, I would suggest hiring a designer and a programmer. What you describe would be pretty basic for them. And since it's urgent, it would be definitely better to hire somebody who knew what they were doing and could get it done quickly.

  • Venu : Sending a mail from java proram , getting problem

    Hi ,
    please go through the below code
    Properties ps = new Properties();
    ps.put("mail.transport.protocol","smtp");
    ps.put("mail.smtp.host","172.20.76.63");
    ps.put("mail.smtp.port","25");
    Session mailSession = Session.getInstance(ps);
    Message msg = new MimeMessage(mailSession);
    try
    msg.setFrom(new InternetAddress ("Hear Sender Address"));
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse("hear Receipent Address"));
    msg.setSentDate(new Date());
    msg.setSubject("Hi From Java Class");
    msg.setText("I am sending An Email from Java class ");
    Transport.send(msg);
    catch(Exception e) { }
    by using the above code , is it just possible to send the mail
    from only pelple who are in (172.20.76.63) the domain only
    while i am trying to send other domain like yahoo , it is showing exception
    just suggest me , how to send the mail from any domain to domain

    Hey,
    With MIDP it's little bit hard to make application which connects to POP3 or IMAP server because there is no support for socket connections. But if your phone support sockets, it's not hard to
    make a simple e-mail client for j2me.
    But i've heard that it's possible to make somekind hacked socket connection for MIDP but i'm not sure will that work on actually phones.
    - fuse

  • P.O automatic mail genration pdf to word/text.

    Hi  everyone,
    this is regarding the automatic mail generation in smartforms. Its like when you process the smartforms the mails are automatically shooted to the address maintained for eg usually to the vendors. So what I need is incase I proces my smartforms the mail shouldnt be in the pdf format but in normal text format.
    I dont want to take that pdf convert to word/text by external sofware and attch it to the mail. I want it to be automatic.
    Plz suggest the possible ways of doing it. Thanks to all in advance.
    Rgds,
    Anuc.

    *& Report  ZCS_IRN
    report  zpo_spool no standard page heading line-size 260.
    Table Declaration *******************************
    tables : zptreg,zpoinb,dd07t,nase.
    Data Declaration ********************************
    type-pools: slis.
    data :   report_id  like sy-repid.
    data :   ws_title   type lvc_title value 'Reprint PT Inbound Register'.
    data :   i_layout   type slis_layout_alv.
    data :   i_fieldcat type slis_t_fieldcat_alv.
    data :   lf_fm_name            type rs38l_fnam.
    data :   ls_control_param      type ssfctrlop.
    data :   ls_composer_param     type ssfcompop.
    data :   ls_recipient type swotobjid.
    data :   ls_sender    type swotobjid.
    data : control_parameters type ssfctrlop.
    data :   output_options type ssfcompop.
    Internal Table Declaration *******************************
    data: begin of itab occurs 0,
            chk,
            indno type zptreg-indno,
            dtype type zptreg-dtype,
            ernam type zptreg-ernam,
            erzet type zptreg-erzet,
            aedat type zptreg-aedat,
            traid type zptreg-traid,
            traty type zptreg-traty,
            vehnum type zptreg-vehnum,
            bolnr type zptreg-bolnr,
            lrdat type zptreg-lrdat,
            lrdelv type zptreg-lrdelv,
            lrtime type zptreg-lrtime,
            datia type zptreg-datia,
            uhria type zptreg-uhria,
            lifnr type zptreg-lifnr,
            werks type zptreg-werks,
            anzpk type zptreg-anzpk,
            btgew type zptreg-btgew,
            gewei type zptreg-gewei,
            ntgew type zptreg-ntgew,
            idtxt type zptreg-idtxt,
            waybl type zptreg-waybl,
            dpack type zptreg-dpack,
            ebeln type zpoinb-ebeln,
            vbeln type zpoinb-vbeln,
             menge type eket-menge,
            wemng type eket-wemng,
            wemng1 type eket-wemng,
            chaln type zptreg-chaln,
            paymt type zptreg-paymt,
            zchquan type zptreg-zchquan,
            rdesc(60) type c,
            trdesc(60) type c,
            tydesc(60) type c,
            pdesc(60) type c,
            name1 type lfa1-name1,
         end of itab.
    data : itab1 like itab occurs 0 with header line.
    data : itab2 like itab occurs 0 with header line.
    data: begin of ieket occurs 0,
            ebeln type eket-ebeln,
            ebelp type eket-ebelp,
            menge type eket-menge,
            wemng type eket-wemng,
          end of ieket.
    data : ieket1 like ieket occurs 0 with header line.
    data : ieket2 like ieket occurs 0 with header line.
    data : flag type c.
    Selection Screen *******************************
    selection-screen : begin of block b1 with frame title text-001.
    select-options : x_indno for zptreg-indno matchcode object zindnohelp2.
    select-options : x_aedat for zptreg-aedat.
    select-options : x_werks for zptreg-werks .
    select-options : x_lrdat for zptreg-lrdat.
    select-options : x_lifnr for zptreg-lifnr no intervals no-extension.
    select-options : x_ebeln for zpoinb-ebeln no intervals no-extension.
    select-options : x_bolnr for zptreg-bolnr no intervals no-extension.
    select-options : x_traid for zptreg-traid no intervals no-extension.
    selection-screen : end of block b1.
    Start of Selection  *****************************
    start-of-selection.
      set pf-status 'STATUS'.
      perform get_data.
      perform display_data.
    *&      Form  get_data
    form get_data .
      select * from zptreg into corresponding fields of table itab1
                              where indno in x_indno
                                and aedat in x_aedat
                                and werks in x_werks
                                and lrdat in x_lrdat
                                and lifnr in x_lifnr
                                and bolnr in x_bolnr
                                and traid in x_traid.
      if sy-subrc ne 0.
        message i001(zmsg).
        stop.
      endif.
      select * from zpoinb into corresponding fields of table itab
                           for all entries in itab1
                             where indno = itab1-indno
                             and ebeln in x_ebeln.
      if sy-subrc ne 0.
        message i001(zmsg).
        stop.
      endif.
      loop at itab.
        at new indno.
          flag = 1.
        endat.
        if flag = 1.
          read table itab1 with key indno = itab-indno.
          move itab1-traid to itab-traid.
          move itab1-lifnr to itab-lifnr.
          move itab1-traty to itab-traty.
          move itab1-bolnr to itab-bolnr.
          move itab1-traid to itab-traid.
          move itab1-werks to itab-werks.
          move itab1-vehnum to itab-vehnum.
          move itab1-lifnr to itab-lifnr.
          move itab1-btgew to itab-btgew.
          move itab1-gewei to itab-gewei.
          move itab1-ntgew to itab-ntgew.
          move itab1-idtxt to itab-idtxt.
          move itab1-waybl to itab-waybl.
          move itab1-anzpk to itab-anzpk.
          move itab1-aedat to itab-aedat.
          move itab1-dpack to itab-dpack.
          move itab1-erzet to itab-erzet.
          move itab1-ernam to itab-ernam.
          move itab1-zchquan to itab-zchquan.
          move itab1-paymt to itab-paymt.
          move itab1-chaln to itab-chaln.
          move itab1-lrdat to itab-lrdat.
          move itab1-lrdelv to itab-lrdelv.
          move itab1-lrtime to itab-lrtime.
          move itab1-datia to itab-datia.
          move itab1-uhria to itab-uhria.
          clear flag.
        endif.
        modify itab.
      endloop.
      delete itab where indno not in x_indno.
      select * from eket into corresponding fields of table ieket for all entries in itab
        where ebeln = itab-ebeln.
      loop at ieket.
        move ieket-ebeln to ieket1-ebeln.
        move ieket-menge to ieket1-menge.
        collect ieket1.
      endloop.
      loop at ieket.
        move ieket-ebeln to ieket2-ebeln.
        move ieket-wemng to ieket2-wemng.
        collect ieket2.
      endloop.
      loop at itab.
        read table ieket1 with key ebeln = itab-ebeln.
        move ieket1-menge to itab-menge.
        read table ieket2 with key ebeln = itab-ebeln.
        move ieket2-wemng to itab-wemng.
        itab-wemng1 = itab-menge - itab-wemng.
        select ddtext from dd07t into itab-rdesc where domvalue_l = itab-idtxt and domname = 'ZIDTXT'.
        endselect.
        select ddtext from dd07t into itab-trdesc where domvalue_l = itab-traid and domname = 'ZTRAID'.
        endselect.
        select ddtext from dd07t into itab-tydesc where domvalue_l = itab-traty and domname = 'ZTRATY'.
        endselect.
        select ddtext from dd07t into itab-pdesc where domvalue_l = itab-paymt and domname = 'ZPAYMT'.
        endselect.
        select name1 from lfa1 into itab-name1 where lifnr = itab-lifnr.
        endselect.
        modify itab.
        clear itab.
      endloop.
      if itab[] is initial.
        message i001(zmsg).
        stop.
      endif.
    endform.                    " get_data
    *&      Form  display_data
    form display_data .
      report_id = sy-repid.
      perform f1000_layout_init changing i_layout.
      perform f2000_fieldcat_init changing i_fieldcat.
      call function 'REUSE_ALV_LIST_DISPLAY'
       exporting
        I_INTERFACE_CHECK              = ' '
        I_BYPASSING_BUFFER             =
        I_BUFFER_ACTIVE                = ' '
         i_callback_program              = report_id
         i_callback_pf_status_set       = 'STATUS'
         i_callback_user_command        = 'USER_COMMAND'
        I_STRUCTURE_NAME               =
         is_layout                       = i_layout
         it_fieldcat                     = i_fieldcat
        IT_EXCLUDING                   =
        IT_SPECIAL_GROUPS              =
        IT_SORT                        =
        IT_FILTER                      =
        IS_SEL_HIDE                    =
         i_default                      = 'X'
         i_save                         = 'A'
        IS_VARIANT                     =
        IT_EVENTS                      =
        IT_EVENT_EXIT                  =
        IS_PRINT                       =
        IS_REPREP_ID                   =
        I_SCREEN_START_COLUMN          = 0
        I_SCREEN_START_LINE            = 0
        I_SCREEN_END_COLUMN            = 0
        I_SCREEN_END_LINE              = 0
        IR_SALV_LIST_ADAPTER           =
        IT_EXCEPT_QINFO                =
        I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER        =
        ES_EXIT_CAUSED_BY_USER         =
        tables
          t_outtab                       = itab
      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.
      endif.
    endform.                    " display_data
    *&      Form  f1000_layout_init
    form f1000_layout_init using i_layout type slis_layout_alv.
      clear i_layout.
      i_layout-colwidth_optimize = 'X'.
      i_layout-edit = ''.
      i_layout-box_fieldname = 'CHK'.
    endform.                    " F1000_Layout_Init
    *&      Form  f2000_fieldcat_init
    form f2000_fieldcat_init changing i_fieldcat type slis_t_fieldcat_alv.
      data: line_fieldcat type slis_fieldcat_alv.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'CHK'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_l = 'Checkbox'.
      line_fieldcat-checkbox  = 'X'.      " Display this field as a checkbox
      line_fieldcat-outputlen = '8'.
      line_fieldcat-edit      =  'X'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'INDNO'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' PT Register No '.
      line_fieldcat-outputlen = '15'.
    line_fieldcat-hotspot       = 'X' .
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'AEDAT'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' Creation Date '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'TRDESC'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' Transporter Name    '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'TYDESC'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' Transport Type  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'VEHNUM'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' Vehicle Number   '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'BOLNR'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' L .R Number  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'NAME1'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' Vendor / Supplier'.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'WERKS'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Site   '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'EBELN'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Purchasing Document '.
      line_fieldcat-outputlen = '15'.
      line_fieldcat-hotspot       = 'X' .
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'WEMNG1'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Still To Be Delivered '.
      line_fieldcat-outputlen = '20'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'VBELN'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Sales Document  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'ANZPK'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'No.of Packages  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'DPACK'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Damaged Packages  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'BTGEW'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Total Weight   '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'GEWEI'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Weight Unit   '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'NTGEW'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = ' Net Weight   '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'RDESC'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Remarks   '.
      line_fieldcat-outputlen = '60'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'WAYBL'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Weigh Bill Number  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'ERNAM'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Created By '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'ERZET'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Created At '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'LRDAT'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'L.R Date  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'LRDELV'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'L.R Delivery Date  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'LRTIME'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'L.R Time  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'DATIA'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_l = 'Appointments: From date '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'UHRIA'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_l = 'Appointments: Time from  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'CHALN'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Challan No  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'PDESC'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Payment method  '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
      clear line_fieldcat.
      line_fieldcat-fieldname = 'ZCHQUAN'.
      line_fieldcat-tabname   = 'ITAB'.
      line_fieldcat-seltext_m = 'Challan Quantity '.
      line_fieldcat-outputlen = '15'.
      append line_fieldcat to i_fieldcat.
    endform.                    "f2000_fieldcat_init
    *&      Form  user_command
    form user_command using r_ucomm like sy-ucomm
                          rs_selfield type slis_selfield.
      data: wa_job_output_info type ssfcrescl.
    data wa_spoolids type  tsfspoolid.
    data wa_spoolnum type rspoid.
    data: objpack like sopcklsti1 occurs  2 with header line,
          objhead1 like solisti1   occurs  1 with header line,
          objbin  like solisti1   occurs 10 with header line,
          objtxt  like solisti1   occurs 10 with header line,
          reclist like somlreci1  occurs  5 with header line,
          doc_chng like sodocchgi1,
          tab_lines like sy-tabix.
      data : wa_itab like itab.
      data : line type c.
      case r_ucomm.
        when 'SAVE'.
          clear line.
          refresh itab2.
          read table itab index rs_selfield-tabindex.
          loop at itab where chk ne space.
            move-corresponding itab to itab2.
            collect itab2.
          endloop.
          describe table itab2 lines line.
          if line ge 2.
            message 'Please Select Only Document for Print Output ' type 'E'.
          endif.
          set parameter id : 'ZIN' field itab-indno.
          call function 'SSF_FUNCTION_MODULE_NAME'
            exporting
              formname = 'ZPTREG_NEW'
            importing
              fm_name  = lf_fm_name.
          if sy-subrc <> 0.
          endif.
          control_parameters-no_dialog = 'X'.
          control_parameters-preview   =  'X'.
          output_options-tddest = 'LOCL'.
          output_options-tdcopies = '2'.
          call function lf_fm_name
            exporting
              control_parameters = ls_control_param
              output_options     = ls_composer_param
              mail_recipient     = ls_recipient
              mail_sender        = ls_sender
              user_settings      = 'X'
              p_indno            = itab-indno
              importing
      DOCUMENT_OUTPUT_INFO       =
       job_output_info            = wa_job_output_info
      JOB_OUTPUT_OPTIONS         =
            exceptions
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              others             = 5.
          if sy-subrc <> 0.
          endif.
    move wa_job_output_info-spoolids[] to wa_spoolids[].
    read table wa_spoolids into wa_spoolnum index 1.
    if sy-subrc = 0.
    data :id like tsp01-rqident.
    move wa_spoolnum to id.
    endif. .
    *loop at wa_spoolids INTO wa_spoolnum .
    write : id.
    *endloop.
    data i_soli like soli occurs 0 with header line.
    call function 'RSPO_RETURN_SPOOLJOB'
    exporting
    rqident = id
    desired_type = 'OTF'
    tables
    buffer = i_soli
    exceptions
    no_such_job = 1
    job_contains_no_data = 2
    selection_empty = 3
    no_permission = 4
    can_not_access = 5
    read_error = 6
    type_no_match = 7
    others = 8.
    data content_bin type solix_tab.
    data objhead type soli_tab.
    data i_soli_tab type soli_tab.
    data boolean type sx_boolean.
    data length type so_obj_len.
    loop at i_soli.
    append i_soli to i_soli_tab[].
    endloop.
    call function 'SX_OBJECT_CONVERT_OTF_RAW'
    exporting
    format_src = 'OTF'
    format_dst = 'RAW'
    changing
    transfer_bin = boolean
    content_txt = i_soli_tab
    content_bin = content_bin
    objhead = objhead
    len = length
    exceptions
    err_conv_failed = 1
    others = 2.
      endcase.
    *describe table objbin lines tab_lines.
          objpack-transf_bin = 'X'.
          objpack-head_start = 1.
          objpack-head_num = 1.
          objpack-body_start = 1.
          objpack-body_num =  '100'. "tab_lines.
    * objpack-doc_type = c_asc.
          objpack-doc_type = 'DOC'.
          objpack-obj_name = 'ATTACHMENT'.
          objpack-obj_descr = 'ATTACH'. "p_attach.
    "Name of Attachment
          objpack-doc_size = tab_lines  * 255.
          append objpack..
    reclist-receiver = '[email protected]'.
            reclist-rec_type = 'U'.
            append reclist.
    objbin[] = i_soli_tab[].
          call function 'SO_RAW_TO_RTF'
            tables
              objcont_old = objbin
              objcont_new = objbin
            exceptions
              others      = 0.
          call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
            exporting
              document_data              = doc_chng
              put_in_outbox              = 'X'
              commit_work                = 'X'
            tables
              packing_list               = objpack
              object_header              = objhead1
              contents_bin               = objbin
              contents_txt               = objtxt
              receivers                  = reclist
            exceptions
              too_many_receivers         = 1
              document_not_sent          = 2
              operation_no_authorization = 4
              others                     = 99.
    endform.                    "user_command
    Message was edited by:
            anu c

  • Calling invalid stored procedure from java

    Will the stored procedure which is invalid get re-compiled automatically when called from a java program?
    1.a stored procedure is invalid (oracle 9i)
    2.calling the stored procedure from a java program
    3.what will happen a.oracle recompiles the stored procedure
    b.returns an sql exception
    what happens,kindly help
    drop your mail to [email protected]
    Keep Smiling and Mailing,
    Vijay Anand Natesan.

    thank you ..Kindly let me know if any of your friends have tried this

  • I want to create Automatic mailing application, help!.

    hi all,
    i m given an assignment to develop an automatic mailing application.
    i this app. each newly registered user is being sent an email to email addr specified by him. this mail will be an acknowlegement to his registration.
    email to be sent is an dynamic jsp file.
    plz give any idea hw to do that.
    thanx

    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    // Send a simple, single part, text/plain e-mail
    public class TestEmail {
    public static void main(String[] args) {
    // SUBSTITUTE YOUR EMAIL ADDRESSES HERE!!!
    String to = "";
    String from = "";
    // SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
    //Straing host = "smtp.yourisp.net";
    String host = "smtp";
    // Create properties, get Session
    Properties props = new Properties();
    // If using static Transport.send(),
    // need to specify which host to send it to
    props.put("mail.smtp.host", host);
    // To see what is going on behind the scene
    props.put("mail.debug", "true");
    Session session = Session.getInstance(props);
    try {
    // Instantiatee a message
    Message msg = new MimeMessage(session);
    //Set message attributes
    msg.setFrom(new InternetAddress(from));
    InternetAddress[] address = {new InternetAddress(to)};
    msg.setRecipients(Message.RecipientType.TO, address);
    msg.setSubject("Test E-Mail through Java");
    msg.setSentDate(new Date());
    // Setting message as text content
    //msg.setText("This is a test Mail from Java");
    // Setting message as html content
    msg.setContent("<div style='background-color:blue'>This is the test HTML content</div>","text/html;charset=\"UTF-8\"");
    //Send the message
    Transport.send(msg);
    catch (MessagingException mex) {
    // Prints all nested (chained) exceptions as well
    mex.printStackTrace();
    }//End of class

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

  • I just downloaded and instaled firefox 4. Now, everytime I institute a command I get a po[p-up from Java script that tells me to uninstal set. I cannot go on untin I press ok and then I am good for one more command and it starts with the pop-up again.

    I'm not even sure if this is an extension or plug-in and all I can tell you is what I have already stated. I can only make one command at a time and after each one I get a pop-up from Java script that says uninstal set. I must depress ok to move on, but only for one more command and it starts over again. This also happened when I tried to instal firefox 4 a couple months ago and I deleted the program and went back to an earlier version.

    Mail troubleshooting - Yosemite
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages
    SMTP servers keep going offline

  • Opening mail application from the dock sometimes doesn't open window.

    In Mountain Lion, sometimes when I open Mail on the dock with a single left mouse (or touchpad) click, the Mail application opens, as shown in the menu bar, but a mail window doesn't open. I must then click or double click on it to get it to open a window. No other application in the dock behaves this way. How can I fix this?

    Is there a problem with mail opening from the dock?
    NOPE!  Do you have open at login enabled?  Is Mail listed in Login Items through System Preferences?
    My iMac is automatically up to date with all updates as at 09/01/2014.i
    Your system profile is a complete blank!
    When posting in Apple Communties/Forums/Message Boards.......It would help us to know which iMac model you have, which OS & version you're using, how much RAM, etc. You can have this info displayed on the bottom of every post by completing your system profile and filling in the information asked for.
    CLICKY CLICK---> https://discussions.apple.com/docs/DOC-3602
    CLICKY CLICK-----> Help us to help you on these forums
    ***This will help in providing you with the proper and/or correct solutions.***

  • How do I block unsolicited e-mail(s) from unsolicited senders? Why isn't there an auto option that simply pops up and asks if you wish to block this sender from future e-mails? I am so tired of my e-mail address being sucked out of a friends address book,

    How do I block unsolicited e-mails from the sites that have stolen my e-mail address from a friends address book, and send me non-stop horrid e-mails. Why is there no pop-up to ask if "want sender blocked", to easily solve this problem? Seems like it would be such an easy solution to what must be a universal problem with these e-mail pirates.

    It is frontiernet.com that would need to block the emails.
    You can setup a Mail "Rule" to send email you do not want into the trash, or a spam folder, etc...
    In fact, there is a Mail -> Message ->  Mark -> as Junk Mail, which will train Mail to reconize junk mail and start to automatically move it to a junk mail folder.
    You can put this option on the Mail toolbar via Mail -> View -> Customize Toolbar, and drag the "Junk" icon to your Mail Toolbar.
    But of course Junk takes training.  You can create a Rule to trash the emails you do not want right away via Mail -> Message -> Add Rule, or Mail -> Preferneces -> Rules

  • Can you move mail folders from an old .Mac account to a new .Mac account?

    I hope someone can help since even the Mac Genius at the Apple Store nor Applecare seem to know.
    Due to massive spam to my .Mac account & it's alias accounts I opened a new .Mac account before my old account died. However, without any answers my old account died last night. Which probably doesn't help.
    1. Is there a way to move my mail folders in 'mail app' from my old .Mac account over to the new .Mac account?
    2. In 'mail app' > preferences > add account > the pop-up box for the new account automatically shows my old .Mac account information, full name, description, user name. But, if I replace that information with my new .Mac account name and info no one can tell me if that automatically delete any mail folders/information from the old account.
    Basically I'm lost because no one seems to understand how the system works, not even the Mac Genius.
    Any ideas?

    You're welcome.
    Second, because I couldn't get any real answers somehow last night I managed to drag & drop my 'mail app' mail folders onto my desktop. At least I have it there, LOL.
    What do you mean by Mail.app mail folders? There is a single Mail folder which contains all Mail.app data (account folders, mailboxes, rules, junk mail learned settings, etc.) except for the Mail.app preference file which stores all account information and is stored in your Preferences folder.
    Did you place a copy of the entire Mail folder located at Home > Library > Mail on the Desktop?
    The question is can that mail folder from the desktop be placed into mail with the new .Mac account? Some of the old folders were from "on my mac" and some with .Mac & the server so not really sure what moved to the desktop. But, at least it's something.
    The answer to this question is no. User created "On My Mac" location mailboxes are stored locally on the hard drive and are not associated with any account. User created "On My Mac" location mailboxes are located in the Mailboxes folder at Home > Library > Mail > Mailboxes are are not deleted when deleting an account or changing existing account information with Mail.
    When creating an account with Mail, an account named folder is created within the Mail folder at Home > Library > Mail named by the user name and incoming mail server for the account. The associated account mailboxes are located within the account named folder with the exception of locally stored mailboxes for a .Mac type account or IMAP account. Locally stored mailboxes for a .Mac type account or IMAP account are located in the Mailboxes folder at Home > Library > Mail > Mailboxes. This would be the account's Drafts, Sent, Trash and Junk mailboxes if these mailboxes are not stored on the server which is available under the Mailboxes Behaviors tab for the account preferences.
    Since a .Mac type account is really an IMAP account and behaves in the same way, you have the option to store Drafts, Sent, Trash and Junk messages locally on the hard drive with Mail for the account preferences.
    Were you accessing your old .Mac account as a .Mac type account with Mail and if so, what were/are your settings under the Mailbox Behaviors tab for the account preferences for Drafts, Sent, Trash and Junk messages - storing these messages on the server or locally on the hard drive?
    Since a .Mac type account with Mail is really an IMAP account and behaves in the same way, messages in the account's Inbox mailbox remain on the server and since Apple/.Mac has now cancelled this account, messages in the account's Inbox mailbox on the server have been deleted.
    When you open the 'mail app' >file>add account> the pop-up box automatically has the information in there from the expired .Mac account.
    Is your old .Mac account information still available at System Preferences > .Mac under the Account tab?
    If so, this is where the Mail.app is getting the old .Mac account information which needs to be changed to your new .Mac account information.
    If you placed a copy of the Mail folder on the Desktop for backup purposes, you can can create your new .Mac account with Mail which should not change or affect your existing .Mac account with Mail but you cannot "merge" account named folders and mailboxes between two accounts.
    You can use the Import Mailboxes feature to import the old account's Sent mailbox if you did not store Sent messages on the server for your old .Mac account preferences.

Maybe you are looking for