How to change Sender mail addres in sapconnect.

Hi,
I have searched this and i have found a thread, but i cant see it because when i click the link, giving a message "No message Found". Can you open this thread?
https://forums.sdn.sap.com/click.jspa?searchID=738174&messageID=1287908
Anyway, is it possible to change sender address when i am sending mail with FM SO_NEW_DOCUMENT_SEND_API1 ? How ?
I looked at fields of structures, but i haven't found a field to change sender addres.
Thanks
Ibrahim

Hi Ibrahim,
i can't also use the Link.
I use for sending this FM:
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            DOCUMENT_DATA              = DOC_DATA
            PUT_IN_OUTBOX              = 'X'
            COMMIT_WORK                = 'X'
           SENDER_ADDRESS             = 'SAP_USER' "Your SAP User
           SENDER_ADDRESS_TYPE        = 'U'
       TABLES
            PACKING_LIST               = OBJ_PACK
            CONTENTS_TXT               = OBJ_TXT
            CONTENTS_BIN               = OBJ_BIN
            RECEIVERS                  = REC_LIST
       EXCEPTIONS
            TOO_MANY_RECEIVERS         = 1
            DOCUMENT_NOT_SENT          = 2
            DOCUMENT_TYPE_NOT_EXIST    = 3
            OPERATION_NO_AUTHORIZATION = 4
            PARAMETER_ERROR            = 5
            X_ERROR                    = 6
            ENQUEUE_ERROR              = 7
            OTHERS                     = 8.
Perhaps you can use this FM
Regards, Dieter

Similar Messages

  • How can i send mails from SAP?

    how can i send mails from SAP?
    what are the configurations i have to do in SAP for that?
    pls give me a detail reply......
    if possible, pls give me the sample ABAP program for that.

    recently i have worked on a similar requirement here is the sample code for that
    REPORT ZDOC_AS_EMAIL_3.
    *& Report ZEMAIL_ATTACH *
    *& Example of sending external email via SAPCONNECT *
    TABLES: ekko.
    PARAMETERS: p_email TYPE somlreci1-receiver.
    TYPES: BEGIN OF t_ekpo,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
    wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
    ebeln(10) TYPE c,
    ebelp(5) TYPE c,
    aedat(8) TYPE c,
    matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: l_t_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    w_cnt TYPE i,
    w_sent_all(1) TYPE c,
    w_doc_data LIKE sodocchgi1,
    gd_error TYPE sy-subrc,
    gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
    *Retrieve sample data from table ekpo
    PERFORM data_retrieval.
    *Populate table with detaisl to be entered into .xls file
    PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *Populate message body text
    perform populate_email_message_body.
    *Send file by email as .xls speadsheet
    PERFORM send_file_as_email_attachment
                        tables it_message
                                it_attach
                            using p_email
        'Example . xls documnet attachment'
                                     'XLS'
                                'filename'
                        changing gd_error
                              gd_reciever.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    PERFORM initiate_mail_execute_program.
    *& Form DATA_RETRIEVAL
    *Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    SELECT ebeln ebelp aedat matnr
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekpo.
    ENDFORM. " DATA_RETRIEVAL
    *& Form BUILD_XLS_DATA_TABLE
    *Build data table for .xls document
    FORM build_xls_data_table.
    *CONSTANTS: con_cret(2) TYPE c VALUE '0D', "OK for non Unicode
    *con_tab(2) TYPE c VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    class cl_abap_char_utilities definition load.
    constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
    CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
    INTO it_attach SEPARATED BY con_tab.
    CONCATENATE con_cret it_attach INTO it_attach.
    APPEND it_attach.
    LOOP AT it_ekpo INTO wa_charekpo.
    CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
    wa_charekpo-aedat wa_charekpo-matnr
    INTO it_attach SEPARATED BY con_tab.
    CONCATENATE con_cret it_attach INTO it_attach.
    APPEND it_attach.
    ENDLOOP.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    *Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                           using p_email
                                                p_mtitle
                                                p_format
                                              p_filename
                                        p_attdescription
                                        p_sender_address
                                    p_sender_addres_type
                                        changing p_error
                                              p_reciever.
    DATA: ld_error TYPE sy-subrc,
    ld_reciever TYPE sy-subrc,
    ld_mtitle LIKE sodocchgi1-obj_descr,
    ld_email LIKE somlreci1-receiver,
    ld_format TYPE so_obj_tp ,
    ld_attdescription TYPE so_obj_nam ,
    ld_attfilename TYPE so_obj_des ,
    ld_sender_address LIKE soextreci1-receiver,
    ld_sender_address_type LIKE soextreci1-adr_typ,
    ld_receiver LIKE sy-subrc.
    ld_email = p_email.
    ld_mtitle = p_mtitle.
    ld_format = p_format.
    ld_attdescription = p_attdescription.
    ld_attfilename = p_filename.
    ld_sender_address = p_sender_address.
    ld_sender_address_type = p_sender_addres_type.
    *Fill the document data.
    w_doc_data-doc_size = 1.
    *Populate the subject/generic message attributes
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name = 'REPORT'.
    w_doc_data-obj_descr = ld_mtitle . "mail description
    w_doc_data-sensitivty = 'F'.
    *Fill the document data and get size of attachment
    CLEAR w_doc_data.
    READ TABLE it_attach INDEX w_cnt.
    w_doc_data-doc_size =
    ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name = 'SAPRPT'.
    w_doc_data-obj_descr = ld_mtitle.
    w_doc_data-sensitivty = 'F'.
    CLEAR t_attachment.
    REFRESH t_attachment.
    t_attachment[] = pit_attach[].
    *Describe the body of the message
    CLEAR t_packing_list.
    REFRESH t_packing_list.
    t_packing_list-transf_bin = space.
    t_packing_list-head_start = 1.
    t_packing_list-head_num = 0.
    t_packing_list-body_start = 1.
    DESCRIBE TABLE it_message LINES t_packing_list-body_num.
    t_packing_list-doc_type = 'RAW'.
    APPEND t_packing_list.
    *Create 1st attachment notification
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 0.
    t_packing_list-head_num = 1.
    t_packing_list-body_start = 1.
    DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    t_packing_list-doc_type = ld_format.
    t_packing_list-obj_descr = ld_attdescription.
    t_packing_list-obj_name = ld_attfilename.
    t_packing_list-doc_size = t_packing_list-body_num * 255.
    APPEND t_packing_list.
    **Create 1st attachment notification
    *t_packing_list-transf_bin = 'X'.
    *t_packing_list-head_start = 0.
    *t_packing_list-head_num = 1.
    *t_packing_list-body_start = 1.
    *DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    *t_packing_list-doc_type = ld_format.
    *t_packing_list-obj_descr = ld_attdescription.
    *t_packing_list-obj_name = ld_attfilename.
    *t_packing_list-doc_size = t_packing_list-body_num * 255.
    *APPEND t_packing_list.
    **Create 2nd attachment notification
    data: x type i.
    DESCRIBE TABLE t_attachment LINES X.
    append lines of it_attach to t_attachment.
    data: start type i,
          end type i,
          cal type i.
    start = X + 1.
    describe table t_attachment lines end.
    cal = end - start.
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 0.
    t_packing_list-head_num = 1.
    t_packing_list-body_start = start.
    t_packing_list-body_num = end.
    *DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    t_packing_list-obj_descr = 'Eng Change'. "ld_attdescription.
    t_packing_list-doc_type = ld_format.
    *t_packing_list-obj_name = 'Eng' .
    t_packing_list-doc_size = t_packing_list-body_num * 255.
    APPEND t_packing_list.
    *Add the recipients email address
    CLEAR t_receivers.
    REFRESH t_receivers.
    t_receivers-receiver = ld_email.
    t_receivers-rec_type = 'U'.
    t_receivers-com_type = 'INT'.
    t_receivers-notif_del = 'X'.
    t_receivers-notif_ndel = 'X'.
    APPEND t_receivers.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = w_doc_data
    put_in_outbox = 'X'
    sender_address = ld_sender_address
    sender_address_type = ld_sender_address_type
    commit_work = 'X'
    IMPORTING
    sent_to_all = w_sent_all
    TABLES
    packing_list = t_packing_list
    object_header = l_t_objhead
    contents_bin = t_attachment
    contents_txt = it_message
    receivers = t_receivers
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    *Populate zerror return code
    ld_error = sy-subrc.
    *Populate zreceiver return code
    LOOP AT t_receivers.
    ld_receiver = t_receivers-retrn_code.
    ENDLOOP.
    ENDFORM.
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    *Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
    WAIT UP TO 2 SECONDS.
    SUBMIT rsconn01 " WITH mode = 'INT'
    "WITH output = 'X'
    AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    *Populate message body text
    form populate_email_message_body.
    REFRESH it_message.
    it_message = 'Please find attached a list test ekpo records'.
    APPEND it_message.
    endform. " POPULATE_EMAIL_MESSAGE_BODY

  • How do I send mail from an alias?

    I have a .mac mail account, and would like to send mail from an alias I created.
    Although I can receive mail to the alias, I don't know how to send from it. Does anyone know how I can send mail so that my sender's name is my alias?
    G5 imac   Mac OS X (10.4.5)  

    Joel,
    First, if you Compose a new message, confirm that you do not have an Account box below Subject, or if you do, when you click on the arrows beside it, you are not presented with a choice of your .mac alias?
    It may be that you have to click on the Edit Email Aliases button, and go, via it, to the .Mac web pages, and be sure your alias is noted by Mail, but make no changes. I have seen this question, and I do not remember when my alias was first made available. If this does not resolve, I will have to test by establishing still another one for myself, and see what is needed to get it recognized.
    Do you have any other accounts set up in Mail, besides your .mac?
    Ernie

  • How to configure sender mail adapter

    Hi,
    My scenario  Mail-XI-file. In adapter monitoring it is giving me error "not initialized: mail agent null". What do we exactly mean by this??
    and can anyone suggest any blog as how to configure sender mail adapter.
    Kindly help
    Anu Singhal

    Hi Anu,
    Just check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm
    and this 1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
    Rewardif helpful
    Reagards
    Sachin

  • How to change e-mail address in iCloud IMAP

    how to change e-mail address in iCloud IMAP. i have to change it to another e-mail address.
    please help
    please find in image.

    Welcome to the Apple community usama.butt.
    Unfortunately you cannot change an iCloud mail address once you have created it. You can however use an iCloud alias which you can set up at iCloud.com.
    To create an alias.....
    Navigate to the Mail feature at iCloud.com and click on the gear icon in the bottom left corner. Choose Preferences from the drop down menu, then select accounts from the options across the top, here you can create your alias.

  • How to configure send mail ?

    Hi,
    How to configure send mail ?
    O/S is OEL-5.8 64-bit.
    Thanks.

    Sendmail uses the M4 macro processor to compile the configuration files. There is no GUI, if that is what you are looking for.
    The configuration depends on what you want to accomplish and how email needs be routed in your environment.
    You can find many tutorials and scenarios in Google:

  • How to change outlook mail using Word to try and open PDF to Adobe Reader XI?

    how to change outlook mail using Word to try and open PDF to Adobe Reader XI?

    I've never found technology to make life easier. It mainly offers the promise (often unfulfilled) of making it cheaper or quicker. This didn't happen when the Girl Guides put a form in an envelope and posted it. But they probably laid off the person whose job that was with the promise of everything being easy on the internet.
    PDF has, curiously, become a victim of its own success. A few years ago, you could say to people "You need Adobe Reader" and it was the only serious game in town. So they got it and it works. Now everyone is making their own PDF reader for whatever reason, fewer and fewer people can be sure of having Reader. (PDF readers come at least with every Mac, every Windows 8 system, Chrome and FireFox, which covers a LOT of ground).
    This is coupled with a bizarre decision Adobe made a few years ago to have two kinds of form, one of which all the other software fails with (and, as I noted, even Adobe's own software on iPad and Android fails). This was a neat idea which was designed for big corporations. Then the really big mistake: giving everyone with Acrobat the tools to make these new kinds of form, and making it seem they were preferre or the only game in town. This is finished now (Acrobat 11 doesn't include this big boy's software) but the damage is done, oh how it is done.
    Even regular forms tend to only work properly in real Adobe Reader. The fact is, if you make or distribute PDF forms you need to tell people to use Adobe Reader, and to know exactly how to help them do that. If people can't do that or their users won't be motivated to bother, then PDF forms are no longer a suitable choice. Sad but true.

  • How can i send mails from mac mail to a PC?

    When i send mails from my mac to a Pc (outlook) the mail arrive with a different format or including the mail as an atached document.
    How can i send mails from mac mail to a PC outlook with the same format?

    send it in "windows friendly format" when you click the paper clip for an attachment.

  • Pleas Guide me on how to change my mail id on BBM....

    Pleas Guide me on how to change my mail id on BBM....Have tried thrice but no result.... :/

    mail ID or your BlackBerryID?
    Article ID: KB32514 How to change or update a BlackBerry ID username on a BlackBerry smartphone
    Follow these steps to change your BlackBerry ID username.
    From a BlackBerry 10 smartphone:
    Swipe down from the homescreen and select Settings
    Scroll down and tap BlackBerry ID
    Tap Edit
    Tap within the BlackBerry ID Username field and remove the current email address
    Type the new email address and press and hold the space bar to hide the keyboard
    Tap Submit and Continue when prompted
    Enter your current BlackBerry ID password and tap OK to complete the change
    Tap OK to return to BlackBerry ID settings
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How do I send mail that is sitting in my outbox?

    How do I send mail that is sitting in my outbox?  Why does some of my mail go there instead of being sent?

    Troubleshooting Apple Mail
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

  • How can i send mail

    Hello!
    how can i send mail
    Thanks, B

    Hy
    Hello!
    how can i send mailTake a closer look to the Java Mail Api, http://java.sun.com/products/javamail/
    Thanks, B\Robert

  • How can i send mail to the yahoo mail or gmail or something else

    hello guys,
    i want to know how to send mails to the yahoo or gmail or something else.i heard that we have to change some smtp address and some port number. can any body suggest me to get that.please help me
    any replies will be appreciated greatly.

    Hi chnaresh,
    This is the code I use to send mail, it's not specific to gmail, but it works. The "props" object expects the usual mail properties, "mail.smtp.host", "mail.user" or "mail.smtp.user", as well as "mail.smtp.ssl" which you'd want to set to "true" if you're using gmail. It also expects "mail.smtp.passwd" or "mail.passwd" which my gut tells me is unsafe, but I'm not sure why.
    Good luck,
    radikal_3dward
    public static int sendMail(final Properties props, String subject, String body, String to, String cc, String bcc, String from, File[] attachments, boolean toStdOut)
    throws javax.mail.internet.AddressException, javax.mail.MessagingException, javax.mail.NoSuchProviderException
    Session sess;
    //props.setProperty("mail.debug", "true");
    if(props.getProperty("mail.smtp.ssl") != null && props.getProperty("mail.smtp.ssl").equalsIgnoreCase("true"))
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    String portStr = ((props.getProperty("mail.smtp.port") != null) ? (props.getProperty("mail.smtp.port")) : "465");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.socketFactory.port", portStr);
    props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
    props.put("mail.smtp.socketFactory.fallback", "false");
    sess = Session.getDefaultInstance(props,
    new javax.mail.Authenticator()
    protected PasswordAuthentication getPasswordAuthentication()
    String userName = ((props.getProperty("mail.smtp.user") != null) ? props.getProperty("mail.smtp.user") : props.getProperty("mail.user"));
    String passwd = ((props.getProperty("mail.smtp.passwd") != null) ? props.getProperty("mail.smtp.passwd") : props.getProperty("mail.passwd"));
    if(userName == null || passwd == null)
    return null;
    return new PasswordAuthentication(userName , passwd);
    else
    String portStr = ((props.getProperty("mail.smtp.port") != null) ? (props.getProperty("mail.smtp.port")) : "25");
    sess = Session.getInstance(props, null);
    //sess.setDebug(true);
    MimeMessage mess = new MimeMessage(sess);
    mess.setSubject(subject);
    StringTokenizer toST = new StringTokenizer(to, ",;");
    while(toST.hasMoreTokens())
    Address addr = new InternetAddress(toST.nextToken());
    mess.addRecipient(Message.RecipientType.TO, addr);
    if(from != null)
    StringTokenizer fromST = new StringTokenizer(from, ",;");
    InternetAddress[] fromAddrs = new InternetAddress[fromST.countTokens()];
    for(int i = 0; fromST.hasMoreTokens(); i++)
    fromAddrs[i] = new InternetAddress(fromST.nextToken());
    mess.addFrom(fromAddrs);
    if(cc != null)
    StringTokenizer ccST = new StringTokenizer(cc, ",;");
    while(ccST.hasMoreTokens())
    Address addr = new InternetAddress(ccST.nextToken());
    mess.addRecipient(Message.RecipientType.CC, addr);
    if(bcc != null)
    StringTokenizer bccST = new StringTokenizer(bcc, ",;");
    while(bccST.hasMoreTokens())
    Address addr = new InternetAddress(bccST.nextToken());
    mess.addRecipient(Message.RecipientType.BCC, addr);
    BodyPart messageBodyPart = new MimeBodyPart();
    Multipart multipart = new MimeMultipart();
    if(body != null)
    messageBodyPart.setText(body);
    multipart.addBodyPart(messageBodyPart);
    if(attachments != null)
    for(int i = 0; i < attachments.length; i++)
    messageBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(attachments);
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName(attachments[i].getName());
    multipart.addBodyPart(messageBodyPart);
    mess.setContent(multipart);
    Address[] allRecips = mess.getAllRecipients();
    if(toStdOut)
    System.out.println("done.");
    //System.out.println("Sending message (\"" + mess.getSubject().substring(0,10) + "...\") to :");
    System.out.println("Sending message (\"" + mess.getSubject() + "...\") to :");
    for(int i = 0; i < allRecips.length; i++)
    System.out.print(allRecips[i] + ";");
    System.out.println("...");
    Transport.send(mess);
    if(toStdOut)
    System.out.println("done.");
    return 0;

  • How to change sender's name in  FM SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi Friends ,
    I am using FM "SO_NEW_DOCUMENT_ATT_SEND_API1"
    I want to change sender's name in this Fm. Actully when i am using this FM , in place of sender my name is goign but i want to send system name.
    Please help in this.
    point will be assign,

    Hi,
    Have a look on the following code,it sends an email with attachment to the SAP inbox
    Internal Table declarations
    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
    i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    w_objhead TYPE soli_tab,
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    w_doc_chng typE sodocchgi1,
    w_data TYPE sodocchgi1,
    w_buffer TYPE string,"To convert from 132 to 255
    Variables declarations
    v_form_name TYPE rs38l_fnam,
    v_len_in LIKE sood-objlen,
    v_len_out LIKE sood-objlen,
    v_len_outn TYPE i,
    v_lines_txt TYPE i,
    v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZCS_FORM6'
    importing
    fm_name = v_form_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.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    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.
    i_otf[] = w_return-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 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.
    Convert PDF from 132 to 255.
    LOOP AT i_tline.
    Replacing space by ~
    TRANSLATE i_tline USING '~'.
    CONCATENATE w_buffer i_tline INTO w_buffer.
    ENDLOOP.
    Replacing ~ by space
    TRANSLATE w_buffer USING '~'.
    DO.
    i_record = w_buffer.
    Appending 255 characters as a record
    APPEND i_record.
    SHIFT w_buffer LEFT BY 255 PLACES.
    IF w_buffer IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Refresh: i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
    clear w_objhead.
    Object with PDF.
    i_objbin[] = i_record[].
    DESCRIBE TABLE i_objbin LINES v_lines_bin.
    Object with main text of the mail.
    i_objtxt = 'Find attached the output of the smart form.'.
    APPEND i_objtxt.
    i_objtxt = 'Regards,'.
    APPEND i_objtxt.
    i_objtxt = 'Chandu Valluri'.
    APPEND i_objtxt.
    DESCRIBE TABLE i_objtxt LINES v_lines_txt.
    Document information.
    w_doc_chng-obj_name = 'Smartform'.
    w_doc_chng-expiry_dat = sy-datum + 10.
    w_doc_chng-obj_descr = 'Smart form output'.
    w_doc_chng-sensitivty = 'F'. "Functional object
    w_doc_chng-doc_size = v_lines_txt * 255.
    Pack to main body as RAW.
    Obj. to be transported not in binary form
    CLEAR i_objpack-transf_bin.
    Start line of object header in transport packet
    i_objpack-head_start = 1.
    Number of lines of an object header in object packet
    i_objpack-head_num = 0.
    Start line of object contents in an object packet
    i_objpack-body_start = 1.
    Number of lines of the object contents in an object packet
    i_objpack-body_num = v_lines_txt.
    Code for document class
    i_objpack-doc_type = 'RAW'.
    APPEND i_objpack.
    Packing as PDF.
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 1.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_bin.
    i_objpack-doc_type = 'PDF'.
    i_objpack-obj_name = 'Smartform'.
    CONCATENATE 'Smartform_output' '.pdf'
    INTO i_objpack-obj_descr.
    i_objpack-doc_size = v_lines_bin * 255.
    APPEND i_objpack.
    Document information.
    CLEAR i_reclist.
    e-mail receivers.
    i_reclist-receiver = sy-uname.
    i_reclist-express = 'X'.
    i_reclist-rec_type = 'B'. "SAP User
    APPEND i_reclist.
    Sending mail.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = w_doc_chng
    put_in_outbox = 'X'
    TABLES
    packing_list = i_objpack
    object_header = w_objhead
    contents_bin = i_objbin
    contents_txt = i_objtxt
    receivers = i_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    IF sy-subrc = 0.
    write:/ 'This is successful'.
    *MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward,if useful.
    Thanks,
    Chandu

  • How to migrate send mail addressbok

    Hi All ,
    we have sun java messaging server 7.3 directory server 6.2.we have migrated the all mail box send mail messaging server,Now how can we migrate the address book.
    Regards
    kamal

    kkdas wrote:
    we have sun java messaging server 7.3 directory server 6.2.we have migrated the all mail box send mail messaging server,Now how can we migrate the address book.Sun does not provide a "sendmail format" to Sun format addressbook migration tool.
    You could however write a script to convert the sendmail format to the appropriate Sun LDIF format and import the information manually.
    It is trivial to reverse-engineer the Sun PAB format/structure.
    You may also want to see if this user created any tools to achieve your goal:
    http://forums.sun.com/thread.jspa?messageID=10854786#10854786
    Regards,
    Shane.

  • How we will send mails to Mutiple Users in One Department

    Hi,
    I don't want to send mails to Outlook/Lotusnotes.
    I want to send mails from my SAP user to my whole department internally.
    Only the message has to go to my whole Purchase depatmen. If i Change any Purchase Requisition then only message has to go them..as pur.req has been changed.
    Kindly give me the solution...
    Thanks and Have a Great day!!
    Soni

    Hi Soni,
    Think i have answered in your other post as well.
    May b u can proceed as Ajay had told u.
    But instead of creating a Postion.
    You can directly go to the Send Mail Step.
    Select "Organizational Unit" in the recipient type and select your production Department using F4 help (which will display all org units defined)
    This will enable the send mail step to send mails to everybody in your department.
    i.e. mails will be sent to all positions that are under the org.unit selected and are assigned to an employee and with a valid IT0105 (Communications type) record.
    Hope this solves your problem
    Regards,
    Raj

Maybe you are looking for

  • How do I change the default certificate in Java Web Console?

    I have a 3rd party issued server keystore & truststore ready to go in both jks and p12 file formats. I wish to use this in the Sun Java Web Console instead of the self signed certificate. I cannot find any documentation as to changing the certificate

  • Setting the data source of an External List to a WCF Web Service

    From SharePoint Online, I want to create/connect an External List to a SQL Azure data source.  This will feed a Visio diagram so I want it to be able to refresh and dynamically retrieve current data via Visio Services.<o:p></o:p> I have a published W

  • Clustering read-write entity beans

              reading the WLS 6.1 documentation, it's unclear to me whether read-write entity           bean           method calls load-balancing and failover are supported. here's an excerpt from           "Understanding Object Clustering":           "

  • Buying Group / End Customer Validation in Trade Management

    Hi All, I need to validate a buying group and one of its member as End Customers against an agreement in POS. Does anyone know a way of acheiving this objective ? Eg: Manf = M Disti = A Buying Group = BG End Customer = EC EC is a member of BG. Disti

  • MM Pricing Schema - Contract item price not picked

    Hi All, For a certain Material and Vendor, when there is a Info Rec Condition and Contract Condition maintained, I thought having the Key table for Contract (016) above the Key table for Info Rec (017) in the Access Sequence for PB00 would take the C