How can send a script as a mail.

Hi
this is fazil.
Please tell me any body How can send a script as a mail.
Thanks & Regards
Fazil
[email protected]

Hi Fazil,
First convert your script to Smartform and then use this type of coding to mail it.
Check this code.
REPORT zptpfrm202p_pogr_pr_instr MESSAGE-ID zmm.
TABLES *
Database table made for getting information about PRINTPREVIEW and
PRINT command more than one times
TABLES: zgr_table.
TYPE-POOLS:syscr.
GLOBAL TYPE DECLARATION *
DATA: zdoc_output_info TYPE ssfcrespd, "SF:Return Document Inf.
zjob_output_info TYPE ssfcrescl, "SF:Return value at end of
form printing
i_control TYPE ssfctrlop ,
i_output_options TYPE ssfcompop,
zjob_output_opts TYPE ssfcresop. "SF:Return value at start
of form printing
*This internal table is used for storing Document Segment: Material
DATA: BEGIN OF i_mseg.
INCLUDE STRUCTURE mseg.
DATA: END OF i_mseg.
This internal table is used for storing Header: Material Document
DATA: BEGIN OF i_mkpf.
INCLUDE STRUCTURE mkpf.
DATA: END OF i_mkpf.
*Variables
DATA flag(1) TYPE c.
DATA: vfile TYPE string.
SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
PARAMETERS:p_mblnr TYPE mkpf-mblnr OBLIGATORY MATCHCODE OBJECT zganesh,
p_mjahr TYPE mkpf-mjahr OBLIGATORY MATCHCODE OBJECT zganesh1,
p_zeile TYPE mseg-zeile OBLIGATORY MATCHCODE OBJECT zganesh2.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETER:r_disp RADIOBUTTON GROUP g1 USER-COMMAND u1 DEFAULT 'X'.
SELECTION-SCREEN:COMMENT 15(10) text-002 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETERS: r_down RADIOBUTTON GROUP g1.
SELECTION-SCREEN:COMMENT 15(10) text-003.
*PARAMETERS: v_file LIKE rlgrap-filename .
*SELECTION-SCREEN:COMMENT 70(50) text-005.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETERS: r_print RADIOBUTTON GROUP g1 .
SELECTION-SCREEN:COMMENT 15(10) text-004.
SELECTION-SCREEN END OF LINE.
PARAMETERS: v_file LIKE rlgrap-filename MODIF ID g12.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR v_file.
DATA : wlv_field_name LIKE dynpread-fieldname,
wlv_file_name LIKE ibipparms-path.
wlv_field_name = v_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = wlv_field_name
IMPORTING
file_name = wlv_file_name.
IF sy-subrc EQ 0.
vfile = wlv_file_name.
v_file = wlv_file_name.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'V_FILE'.
IF r_disp EQ 'X' OR r_print EQ 'X'.
screen-input = 0.
ELSE.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
CALLING CONVERSION FUNCTION MODULE 'CONVERSION_EXIT_ALPHA_INPUT' *
*Conversion function module for appending 00 befor MBLNR FIELD
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_mblnr
IMPORTING
output = p_mblnr.
Call subroutine for fetching data from database
PERFORM get_data.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
Call subroutine for calling and processing smartform
PERFORM call_smartform.
*& Form get_data
Subroutine for fetching data from database
FORM get_data .
Fetching data from MKPF table with using parameters MBLNR and MJAHR
SELECT SINGLE * FROM mkpf
INTO i_mkpf
WHERE mblnr = p_mblnr
AND mjahr = p_mjahr.
IF sy-subrc EQ 0.
Fetching data from MSEG with using parameters MBLNR,ZEILE and MJAHR
SELECT SINGLE * FROM mseg
INTO i_mseg
WHERE mblnr = i_mkpf-mblnr
AND mjahr = i_mkpf-mjahr
AND zeile = p_zeile.
IF sy-subrc NE 0.
CLEAR i_mseg.
ENDIF.
ELSE.
MESSAGE i000.
EXIT.
ENDIF.
ENDFORM. " get_data
*& Form call_smartform
Subroutine for calling smartform
FORM call_smartform .
Local template used in the processing output of smartform
TYPES: BEGIN OF lt_ztable,
mandt TYPE sy-mandt,
mblnr TYPE mseg-mblnr,
flag(1) TYPE c,
END OF lt_ztable.
CONSTANTS: c_x(1) TYPE c VALUE 'X'.
Workarea
DATA: lw_ztable TYPE lt_ztable.
*Variable used in the smartform
DATA: lv_form(30) TYPE c,
lv_fm_name(30) TYPE c.
lv_form = 'ZPTPFRM202L_POGR'.
*Calling function module SSF_FUNCTION_MODULE_NAME which gives new name
*to the function module that will generated by smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lv_form
IMPORTING
fm_name = lv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*Calling function module that will be generated by smartform
IF r_disp = c_x.
i_output_options-tdimmed = space.
i_output_options-tdnewid = c_x.
i_output_options-tddest = 'LOCL'.
i_control-no_dialog = 'X'.
i_control-preview = 'X'.
ELSEIF r_print = c_x.
i_output_options-tdimmed = c_x.
i_output_options-tddest = 'LOCL'.
i_control-no_dialog = c_x.
ELSE.
i_output_options-tdimmed = space.
i_output_options-tdnewid = c_x.
i_output_options-tddest = 'LOCL'.
i_control-getotf = 'X'.
i_control-preview = space.
i_control-no_dialog = c_x.
flag = c_x.
ENDIF.
CALL FUNCTION lv_fm_name
EXPORTING
control_parameters = i_control
output_options = i_output_options
user_settings = space
zmkpf = i_mkpf
zmseg = i_mseg
IMPORTING
document_output_info = zdoc_output_info
job_output_info = zjob_output_info
job_output_options = zjob_output_opts
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Modify the database table if it found the print command
IF zjob_output_opts-tdpreview NE c_x.
lw_ztable-mandt = sy-mandt.
lw_ztable-mblnr = p_mblnr.
lw_ztable-flag = c_x.
MODIFY zgr_table FROM lw_ztable.
CLEAR lw_ztable.
ENDIF.
IF flag EQ c_x.
DATA: li_lines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA: lv_file TYPE string,
lbin_fsiz TYPE i.
lv_file = v_file.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lbin_fsiz
TABLES
otf = zjob_output_info-otfdata
lines = li_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = lbin_fsiz
filename = lv_file
filetype = 'BIN'
TABLES
data_tab = li_lines
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " call_smartform
Hope this resolves your query.
Reward all the helpful answers.
Regards

Similar Messages

  • How can send mails using hotmail/rediffmail domain name?

    I have used the below code to send a mail using javamail API?Even when I am sending my application does not have notified any of error/exceptions,But the message is not reached to I have given receipient's address in the to field.
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Sendmail1 extends HttpServlet {
    private String smtpHost;
    // Initialize the servlet with the hostname of the SMTP server
    // we'll be using the send the messages
    public void init(ServletConfig config)
    throws ServletException {
    super.init(config);
    smtpHost = config.getInitParameter("smtpHost");
    //smtpHost = "sbm5501";
    smtpHost = "www.rediffmail.com";
    public void doGet(HttpServletRequest request,HttpServletResponse response)
    throws ServletException, java.io.IOException {
    String from = request.getParameter("from");
    String to "[email protected]";
    String cc = "[email protected]";
    String bcc ="[email protected]";
    String smtp ="www.rediffmail.com";
    String subject = "hai";
    String text = "Hai how r u";
    PrintWriter writer = response.getWriter();
    if (subject == null)
    subject = "Null";
    if (text == null)
    text = "No message";
    String status;
    try {
    // Create the JavaMail session
    java.util.Properties properties = System.getProperties();
    if (smtp == null)
    smtp = "www.rediffmail.com";
    properties.put("mail.smtp.host", smtp);
    Session session = Session.getInstance(properties, null);
    //to connect
    //Transport transport =session.getTransport("smtp");
    //transport.connect(smtpHost,user,password);
    // Construct the message
    MimeMessage message = new MimeMessage(session);
    // Set the from address
    Address fromAddress = new InternetAddress(from);
    message.setFrom(fromAddress);
    // Parse and set the recipient addresses
    Address[] toAddresses = InternetAddress.parse(to);
    message.setRecipients(Message.RecipientType.TO,toAddresses);
    Address[] ccAddresses = InternetAddress.parse(cc);
    message.setRecipients(Message.RecipientType.CC,ccAddresses);
    Address[] bccAddresses = InternetAddress.parse(to);
    message.setRecipients(Message.RecipientType.BCC,bccAddresses);
    // Set the subject and text
    message.setSubject(subject);
    message.setText(text);
    Transport.send(message);
    //status = "<h1>Congratulations,</h1><h2>Your message was sent.</h2>";
    } catch (AddressException e)
    status = "There was an error parsing the addresses. " + e;
    } catch (SendFailedException e)
    status = "<h1>Sorry,</h1><h2>There was an error sending the message.</h2>" + e;
    } catch (MessagingException e)
    status = "There was an unexpected error. " + e;
    // Output a status message
    response.setContentType("text/html");
    writer.println("<title>sendForm</title><body bgcolor= ><b><h3><font color=green><CENTER>CALIBERINFO.COM</CENTER></h3>Your message was sent to recepient(s).<br><font color=red>"+"\n"+to);
    writer.println("<br><br><a href=e:/mail/javamail/mail.html>back to compose</a>");
    writer.close();
    Please any one help me out from this probs.
    Awaiting for yours reply,
    or give me a reply to: [email protected]
    Regards,
    @maheshkumar.k

    Hi,
    how can send mails using hotmail/rediffmail domain name?In your java application,you specified www.rediffmail.com as your
    smtp server.But that is the address of that website.Try will a smtp
    server instead.For a list of free smtp servers,please visit http://www.thebestfree.net/free/freesmtp.htm
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support/

  • Can any one tell me how to send one PO to mutilple mail ids in vendor maste

    Hi Experts,
    Can any one tell me how to send one PO as a mail to multiple vendors who are all maintained in my vendor master record
    Suppose I have 3 mail ids in my Vendor master record and I created a PO with that vendor, will that PO goes to all the three mail ids maintained in the vendor master record  or only to one ?
    Inorder to send to multiple mail ids, Do we need to do any configure any thing in SPRO settings functionally, if so where we have to maintain?
    Or shall an Abaper needs to maintain a code for that.?
    Please suggest me, I would appreciate your feed back.
    Best Regards,
    Sairam

    Go to XK02 enter the vendor code
    go to the communication tab
    Email will be there press the ---> button
    you can add many Emails in the list.
    Please ensure that the  message output is configured by
    the  SAP BASIS team
    No need of any configuration
    G.Ganesh Kumar

  • HT1529 how can I open the outbox for mail? That is, mail that i have finished and pressed 'send' but has not appeared in the 'sent' folder

    how can I open the outbox for mail? That is, mail that i have finished and pressed 'send' but has not appeared in the 'sent' folder

    The reason it will not be in the sent folder is, it failed to send.
    If it failed to send, then you will see the Outbox icon. 'Pending' would be a more descriptive name.
    When it eventually sends, the Outbox will not show in the Mail app interface.
    Until it is sent it will stay stuck in the Outbox.
    If it refuses to send, you can manually delete it in Finder, at the location ~/Library/Mail/Mailboxes/Outbox.mbox
    Close Mail first, before you search for that email using the Finder.
    Mail version 4.6. Mac OS version 10.6.8

  • How To send SAP SCRIPT AS an email.

    Hi,
    Any one knows how to send sap script output to users in the form of an email.
    Is there any other way to send it apart from sending the script output to spool and converting the spool to PDF and send that PDF to user?
    It would it helpful for me if u can let me know any peace of code as an example for the same.
    Message was edited by: Narasimha

    Hi,
    This may be too late but here is a really easy way
    Here is a snippet of code that will help you out.
    You can use the OPEN_FORM of the SAPscript to have a device type of MAIL instead of PRINTER
          Form  OPEN_FORM
          Open SAPscript form to send to user
    FORM OPEN_FORM .
    *--- Set recipient
      GW_COMM_VALUES-ADSMTP-SMTP_ADDR = '[email protected]'.
    *--- Set NAST details as these will not currently be set....
      CLEAR GW_SNAST.
      GW_SNAST-ANZAL = 1.
      GW_TITLE = 'Mail Header Title'.
      MOVE GW_TITLE TO GW_SNAST-TDCOVTITLE.
    *--- Set sender and recipient details
      CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
        EXPORTING
          PI_COMM_TYPE              = 'INT'
          PI_COMM_VALUES            = GW_COMM_VALUES
          PI_REPID                  = SY-REPID
          PI_SNAST                  = GW_SNAST
          PI_MAIL_SENDER            = SY-UNAME
        IMPORTING
          PE_ITCPO                  = GW_ITCPO
          PE_MAIL_RECIPIENT         = GW_RECIPIENT
          PE_MAIL_SENDER            = GW_SENDER
        EXCEPTIONS
          COMM_TYPE_NOT_SUPPORTED   = 1
          RECIPIENT_CREATION_FAILED = 2
          SENDER_CREATION_FAILED    = 3
          OTHERS                    = 4.
    *--- Open SAPscript in MAIL mode for e-mailing
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          DEVICE                      = 'MAIL'
          DIALOG                      = 'X'
          FORM                        = SapScript Form Name
          LANGUAGE                    = SY-LANGU
          OPTIONS                     = GW_ITCPO
          MAIL_SENDER                 = GW_SENDER
          MAIL_RECIPIENT              = GW_RECIPIENT
        EXCEPTIONS
          CANCELED                    = 1
          DEVICE                      = 2
          FORM                        = 3
          OPTIONS                     = 4
          UNCLOSED                    = 5
          MAIL_OPTIONS                = 6
          ARCHIVE_ERROR               = 7
          INVALID_FAX_NUMBER          = 8
          MORE_PARAMS_NEEDED_IN_BATCH = 9
          SPOOL_ERROR                 = 10
          CODEPAGE                    = 11
          OTHERS                      = 12.
    When you have finished your SAPscript and call function CLOSE_FORM make sure you do a COMMI WORK after the call of this function.
    You should then see the mail created in SOST.
    Kind regards
    Colin

  • How can I resend an IPhoto e-mail with the wrong address?

    How can I resend an IPhoto e-mail that was returned because of an error I made in the address?

    ImagineThat:
    Welcome to the Apple Discussions. There is a 3rd party application, pdf-RecoverPro, that will let you lock the file to printing, changing, etc. You set two passwords, one to let the user view it and one to unlock the restricted features. Just provide the first password and send the file. You can try the demo version. It just saves one page in demo mode.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • How can I select to answer a mail with or without the message

    Hello
    When a mail is received and then opened, I have the options to answer to the sender or to all. In the account preferences, I can specify if the original message is copied or not. This option applies to ALL the answers. How can I choose when editing a mail if I want the message to be copied or not ?
    Kind regards
    JP

    This is the easiest method I have found that will resolve your issue.
    'Tools' > 'Account Settings' > 'Composition & Addressing' for the maill account
    or
    'menu icon' > 'Options' > 'Account Settings' > 'Composition & Addressing' for the mail account.
    deselect / do not select 'Automatically quote the original message when replying'.
    Click on OK to save changes.
    To send a 'Reply' with no original message, simply click on 'Reply' button.
    To send a 'Reply' with all or part of original message.
    Highlight the section of the message or all of the message and then click on 'Reply' button

  • How to send multiple attachements in single mail

    Hi All,
    Currently i am using this function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail with only one attachment.
    But now i need to send multiple attachments to a single mail.
    Can any one please tell me as how to send multiple attachments in single mail.
    Thanks in advance.

    Hi
    See this and do accordingly
    Mailing with Attachment by ABAP Coding  
    Refer this link:
    Mail with attachment.
    FORM send_list_to_basis .
      DATA: w_path      LIKE rlgrap OCCURS 0 WITH HEADER LINE,
            lt_index    TYPE sy-tabix,
            doc_type(3) TYPE c,
            descr       LIKE it_objpack_basis-obj_descr,
            temp_data   LIKE w_path,
            temp1       TYPE string,
            tab_lines   TYPE i,
            langu(15)   TYPE c,
            expirydate  TYPE so_obj_edt,
            L_FILE1(100).
      CONCATENATE 'C:\' sy-repid '_' sy-datum '.XLS' INTO L_FILE1.
      W_PATH-FILENAME = L_FILE1.
      APPEND w_path.
      CLEAR w_path.
      wa_doc_chng-obj_descr  = 'User List not logged on for 180 days'.
      wa_doc_chng-obj_langu  = 'E'.
      wa_doc_chng-obj_expdat = sy-datum.
      CLEAR w_subject.
      CONCATENATE 'Please find attached document with list of users'
                  'not logged on for 180 days for client' sy-mandt
                  INTO w_subject SEPARATED BY space.
      it_objtxt_basis-line = w_subject.
      APPEND it_objtxt_basis.
      CLEAR it_objtxt_basis.
      it_objtxt_basis-line = text-004.
      APPEND it_objtxt_basis.
      CLEAR it_objtxt_basis.
      CLEAR w_tab_line.
      DESCRIBE TABLE it_objtxt_basis LINES w_tab_line.
      READ TABLE it_objtxt_basis INDEX w_tab_line  INTO l_cline.
      wa_doc_chng-doc_size =
       ( w_tab_line - 1 ) * 255 + STRLEN( l_cline ).
      CLEAR it_objpack_basis-transf_bin.
      it_objpack_basis-head_start = 1.
      it_objpack_basis-head_num   = 0.
      it_objpack_basis-body_start = 1.
      it_objpack_basis-body_num   = w_tab_line.
      it_objpack_basis-doc_type   = 'RAW'.
      APPEND it_objpack_basis.
      CLEAR it_objpack_basis.
      LOOP AT w_path.
        temp1 = w_path.
        descr = w_path.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = descr
            lang    = 'E'
          IMPORTING
            rstring = descr.
        CALL FUNCTION 'STRING_SPLIT'
          EXPORTING
            delimiter = '\'
            string    = descr
          IMPORTING
            head      = descr
            tail      = temp_data.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = descr
            lang    = 'E'
          IMPORTING
            rstring = descr.
        CALL FUNCTION 'STRING_SPLIT'
          EXPORTING
            delimiter = '.'
            string    = descr
          IMPORTING
            head      = temp_data
            tail      = doc_type.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename      = temp1
            filetype      = 'BIN'
            header_length = 0
            read_by_line  = 'X'
            replacement   = '#'
          TABLES
            data_tab      = it_upload.
        DESCRIBE TABLE it_upload LINES tab_lines.
        DESCRIBE TABLE it_objbin_basis LINES lt_index.
        lt_index = lt_index + 1.
        LOOP AT it_upload.
          wa_objbin_basis-line = it_upload-line.
          APPEND wa_objbin_basis TO it_objbin_basis.
          CLEAR wa_objbin_basis.
        ENDLOOP.
        it_objpack_basis-transf_bin = 'X'.
        it_objpack_basis-head_start = 0.
        it_objpack_basis-head_num   = 0.
        it_objpack_basis-body_start = lt_index.
        it_objpack_basis-body_num   = tab_lines.
        it_objpack_basis-doc_type   = doc_type.
        it_objpack_basis-obj_descr  = descr.
        it_objpack_basis-doc_size   = tab_lines * 255.
        APPEND it_objpack_basis.
        CLEAR it_objpack_basis.
      ENDLOOP.
      it_reclist_basis-receiver = '[email protected]'.
      it_reclist_basis-rec_type = 'U'.
      APPEND it_reclist_basis.
      CLEAR it_reclist_basis.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = wa_doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_objpack_basis
          contents_txt               = it_objtxt_basis
          contents_bin               = it_objbin_basis
          receivers                  = it_reclist_basis
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
      IF sy-subrc EQ 0.
        SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
      ENDIF.
    ENDFORM.                    " send_list_to_basis
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to send purchase order via e-mail.

    Please could someone let me know how to send purchase order via e-mail.
    I am an BC.
    e-mailing is functionning however I am not very familiar in settings for MM

    No, you do not need to touch ME_PRINT_PO. You need to put code before and after ME_PRINT_PO in the print program.
    Step 1 - Copy the standard print program SAPFM06P to make a Z version, lets call it ZSAPFM06P
    Step 2 - Copy include FM06PE02 to make a Z version, lets call that ZFM06PE02.
    Step 3 - ZSAPFM06P change the statement "Include FM06PE02" to read "Include ZFM06PE02".
    Step 4 - In include ZFM06PE02 you will find a subroutine called "ENTRY_NEU". In this subroutine you will see it first calls ME_READ_PO_FOR_PRINTING then calls ME_PRINT_PO. Before it calls ME_PRINT_PO just put:
    l_nast-nacha = 1.
    CLEAR l_nast-dimme.
    This means that ME_PRINT_PO will not e-mail, it will create a spool request.
    Step 5 - Still in ZFM06PE02, after ME_PRINT_PO has been called, add new code. First check that ent_retco EQ 0. If it does not then exit.
    Step 6 - Get the spool ID created by ME_PRINT_PO by either moving sy-msgv1 to a variable or select from NAST.
    Step 7 - Call function CONVERT_OTFSPOOLJOB_2_PDF using the spool ID from step 6, and put the result from table PDF into an internal table you can use later. ALso store the export variable pdf_bytecount, you will need it later.
    Step 8 - Call function SX_TABLE_LINE_WIDTH_CHANGE using the table from step 7 as content_in and put the results from content_out into a new internal table.
    Step 9 - Add some text into a internal table of type solisti1, this will be the body text of the e-mail.
    Step 10 - Add whatever receivers you want into an internal table of type somlreci1. If you just want it to go to the address that the PO would have gone to anyway, select the e-mail address from ADR6 where the address number = l_doc-xekko-adrnr, that is the data from the PO.
    Step 11 - Populate an internal table of type sopcklsti1 with data relevant to your PDF table from step 8 and the text table from step 9. You will have to put the size of the PDF from step 7 (pdf_bytecount) on the PDF line and the size of the text will be the number of lines of text * 255.
    Step 12 - Add info to a structure of type sodocchgi1. You can add the e-mail title in here, field obj_descr. Also add the size of the PDF and the size of the text from step 12 into doc_size, and give the doc a name in field obj_name. This can be anything, ZPDFPO for example.
    Step 13 - Call SO_DOCUMENT_SEND_API1 using the tables from steps 8, 9, 10 and 11 and the structure from step 12. You can amend the sending e-mail also. Set commit_work to space.
    Step 14 - That is all you need, but I actually call function RSPO_R_RDELETE_SPOOLREQ to delete the spool request created in step 4, then call NAST_PROTOCOL_UPDATE to add some more messages to the processing log of the PO.
    That is all.

  • How to send a smartform result through mail?

    How to send a smartform result through mail?

    HI,
    YOu can convert the output of Smartform into a attachment say PDF file & then send it across through mail.
    Refer following program:
    <a href="http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm">http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm</a>
    Best regards,
    Prashant

  • How can I increase the number of mail recipients beyond 100?

    How can I increase the number of mail recipients beyond 100?

    If you're just sending a one-off email, send it in several batches (around 30 recipients each is usually safe). If you do this a lot, for business reasons, you need to look at specialized email blast services such as MailChimp or Constant Contact.
    Matt

  • HT4898 How can I continue sync my various Mail Accounts when I move to iCloud?

    How can I continue sync my various Mail Accounts when I move to iCloud?

    I wasn't aware that you could sync other mail accounts with MobileMe, other than their settings. If you are referring to settings, then they should already be set up on your mobile device, any new accounts would need to be added manually.
    POP accounts will continue to receive and send e-mail but will not sync (so for example if you delete an e-mail on one device it won't be deleted on the other), IMAP/exchange accounts will continue to function as they always have.

  • When initiating an e mail to someone with several addresses used in the past the one I use most often does not come up in the first position.  How can I get these multiple e mails prioritized?

    When initiating an e mail to someone with several addresses used in the past the one I use most often does not come up in the first position.  How can I get these multiple e mails prioritized?

    We are talking about the Mail app, right? In the Mail menubar, click on Window and then Previous Recipients:
    That eliminates the previous recipients. If you are talking about the suggestions because there are 10 people with the name 'Steve' in your Contacts, then I do not know how to eliminate those unless you change the name slightly or wait until you type the last name or some other differentiator.

  • How can I display all my e-mails.  Only some of them show up now...thanks to an apple representative in the apple store

    How can I display all my e-mails on all my Apple products?  Only some of them show up now...thanks to an apple representative in the apple store.  Also, he put my oldest emails in POP (???)

    How can I display all my e-mails on all my Apple products?  Only some of them show up now...thanks to an apple representative in the apple store.  Also, he put my oldest emails in POP (???)

  • How can I set up my exchange mail on my iphone 5

    how can I set up my exchange mail on my iphone 5?

    http://support.apple.com/kb/HT2480
    http://www.wikihow.com/Sync-Your-iPhone-with-Microsoft-Exchange

Maybe you are looking for