Document Distribution for External Mails ids

Dear Expert Consultants,
I would like to know how to send Docuemnts as link from Document Distribution to external Mails. Also i  want to know Mass printing functionality in DMS Documents.
Regards,
Deviprasad.P

Hi,
In the standard case you need to folow below procedure
1. Use TC SOCP to create external recipients. you may need BASIS help in this. 
2. Create recipient list using TC CVI1.
2. Assign the documents to be distributed to this list. Document should be created before this step.
3. Assign External recipients to this list.
4. Distribute the document using CVI8.
5. TC CVI9 will help you to know the status of distribution.
Most important factor is that your SAP standard workflow which drives the distribution to external mail ids should be working. Please contact BASIS team if it has any problem. Without this distribution is not possible.
Hope it will help you.
Regards,
Atul

Similar Messages

  • Mails not going from SOST to external mail ids

    Hi all,
    I have to send mails to external mail ids in workflow.
    when my workflow triggers, mails are coming in SOST transaction.
    But, when i try any mail to send further to its respective mail id, its giving the following error:-
    " no route available from WF-BATCH to mail-id"
    i tried sending mails manually as well as by using RSCONN01 also, but no results.
    Our BASIS consultant has already done SCOT configuration. Please guide me what is the issue?
    Is some configuration pending from Workflow side or BASIS side?
    Regards
    Navjot.

    Hello Navjot,
    if you have some basis background you can check TCode SCOT there you can see if the mail connect for external mails is configured correctly. There shoud be at least a node for SMTP communication. If there is such node check that sending s not restricted to certain adresses. Furthermore you could check over the menu if the default domain is set properly.
    Kind Regards
    Roman

  • Problem while sending mail to external mail ids

    Hi All,
    while trying to send mail to external mail ids through some custom program, i'm facing an error as "recipient not in address management".
    Can anyone giude me why this is occuring and actually what is this Address management?
    Thanks & Regards,
    Anil.

    Hi,
    Check this sample code..
    http://www.sapdevelopment.co.uk/reporting/email/email_mbody.htm
    * Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
    <b>  it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.</b>
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    what Fm you are using..?are you specifying like above for e-mail address..
    Regards
    vijay

  • Domain name changes when sent to external mail ids

    Here's the problem...
    We are sending PO's as pdf's to the vendor..
    If the vendor domain name is vendor.com and mine is company.com.
    SAP sends a mail
    To [email protected] ;[email protected]
    CC : [email protected]
    When the mail reaches the vendor it shows as
    To [email protected] ;[email protected]
    CC : [email protected]
    the domain name of person2 gets changed though person2 does get the mail...and when the purchase manager at the company looks at it in his inbox - it looks as it should be.
    I checked SOST it shows the correct mail id.This is not specific to a particular domain occurs with all domains .
    Has anyone encountered such a problem before.
    Regards
    Rani

    Hello Navjot,
    if you have some basis background you can check TCode SCOT there you can see if the mail connect for external mails is configured correctly. There shoud be at least a node for SMTP communication. If there is such node check that sending s not restricted to certain adresses. Furthermore you could check over the menu if the default domain is set properly.
    Kind Regards
    Roman

  • Document Summarization for External Accounting Documents - ECC 6.00

    Hi All,
              I would like to know about the Document Summarization for external accounting documents in controlling. please can anyone suggest when we have to use this in ECC 6.00.
    Regards,
    Pranav

    Hi,
    Please see note 1070629 - FAQs: New General Ledger Migration
    https://websmp204.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=1070629&_NLANG=E
    Extract :
    77. How can I deactivate classic Profit Center Accounting (EC-PCA) after activating the new General Ledger?
    Note 702854 explains how to deactivate classic Profit Center Accounting.
    If you use document splitting for profit centers in ERP2004, delete the dummy profit center from the table TKA01 also. For this purpose, Note 702854 provides the program Z30PCA23. Use the program Z30PCA23 to delete the dummy profit center of classic Profit Center Accounting in the controlling area.
    Hope this helps.
    Cheers,
    Gimmo

  • Document Distribution process with email ids.

    Hi Experts,
    When Documents are distributed with Distribution Type INT on mail id. I am able to distributed & receive that on mail ids without attachment(appl. file).
    But if I want to send documents with attached original application file then I am getting error
    "Error uploading u2026u2026u2026. (Path of original application file)"
    What I am missing for Distributions of documents with attach original application files on email ids.
    thx..in advance for your help.

    Hi all,
    according to the mentioned error message, please check if the originals are checked in to a storage category.
    Further please verify that you have maintained the value '2' in field 'File processing' in customizing of INT. You will find this customizing under
    Cross-Application Components >> Document Management >> Document Distribution >> Distribution Type >> Define Distribution Types
    Best regards,
    Christoph

  • Sending INVOICE as attachment in PDF for  external Mail address

    HI!,
    We have made configuraiton for sendin mail while saving VF01 or VF02 from SAP R/3 to external id.
    Email is going to the partner Payer but the attachment of the invocie is going as OTF format and not in PDF.
    Where i am missing. I have gone thro the discussion thread of srinivas talks about some coding required in Program which what is that
    thanks in advance

    Hi,
    Check this program.
    Re: send a mail thro abap report  
    Posted: Mar 14, 2006 11:40 AM      Reply      E-mail this post 
    hi,
    the below program will help you to send email with any kind of attachment.It is working fine for me.Just try it.
    REPORT ZSAMPL_001 .
    INCLUDE ZINCLUDE_01.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
    *PARAMETERS : appfn(150) TYPE c LOWER CASE OBLIGATORY.
    DATA : pos TYPE i.
    DATA : len TYPE i.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    *file_name = appfn.
    *OPEN DATASET appfn FOR INPUT IN BINARY MODE.
    *DO.
    READ DATASET appfn INTO ITAB.
    IF SY-SUBRC EQ 0.
    *APPEND ITAB.
    ELSE.
    *APPEND ITAB.
    EXIT.
    ENDIF.
    *ENDDO.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    ***INCLUDE ZINCLUDE_01 .
    Data
    tables crmrfcpar.
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    data v_rfcdest LIKE crmrfcpar-rfcdest.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    SELECT SINGLE * FROM crmrfcpar WHERE consumer = 'CRM'.
    v_rfcdest = crmrfcpar-rfcdest.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' DESTINATION v_rfcdest
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = 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.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    FORM
    FORM ml_saveforbp USING jobname jobcount.
    Data
    *data : yhead like yhrt_bp_head.
    *DATA : ydocdata LIKE yhrt_bp_docdata,
    *yobjtxt LIKE yhrt_bp_objtxt OCCURS 0 WITH HEADER LINE,
    *yreclist LIKE yhrt_bp_reclist OCCURS 0 WITH HEADER LINE.
    *DATA : seqnr TYPE i.
    Head
    *yhead-jobname = jobname.
    *yhead-jobcount = jobcount..
    *MODIFY yhrt_bp_head FROM yhead.
    Doc Data
    *ydocdata-jobname = jobname.
    *ydocdata-jobcount = jobcount.
    *MOVE-CORRESPONDING docdata TO ydocdata.
    *MODIFY yhrt_bp_docdata FROM ydocdata.
    Objtxt
    *seqnr = 0.
    *LOOP AT objtxt.
    *seqnr = seqnr + 1.
    *yobjtxt-jobname = jobname.
    *yobjtxt-jobcount = jobcount.
    *yobjtxt-seqnr = seqnr.
    *MOVE-CORRESPONDING objtxt TO yobjtxt.
    *MODIFY yhrt_bp_objtxt FROM yobjtxt.
    *ENDLOOP.
    RecList
    *seqnr = 0.
    *LOOP AT reclist.
    *seqnr = seqnr + 1.
    *yreclist-jobname = jobname.
    *yreclist-jobcount = jobcount.
    *yreclist-seqnr = seqnr.
    *MOVE-CORRESPONDING reclist TO yreclist.
    *MODIFY yhrt_bp_reclist FROM yreclist.
    *ENDLOOP.
    ENDFORM. "ml_saveforbp
    FORM
    FORM ml_fetchfrombp USING jobname jobcount.
    *CLEAR docdata.
    *REFRESH objtxt.
    *REFRESH reclist.
    *SELECT SINGLE * FROM yhrt_bp_docdata
    *INTO corresponding fields of docdata
    *WHERE jobname = jobname
    *AND jobcount = jobcount.
    *SELECT * FROM yhrt_bp_objtxt
    *INTO corresponding fields of TABLE objtxt
    *WHERE jobname = jobname
    *AND jobcount = jobcount
    *ORDER BY seqnr.
    *SELECT * FROM yhrt_bp_reclist
    *INTO corresponding fields of TABLE reclist
    *WHERE jobname = jobname
    *AND jobcount = jobcount
    *ORDER BY seqnr.
    ENDFORM. "ml_fetchfrombp
    -suresh

  • Triggering multiple mails for external Mail id when PO is created

    Hi,
    I configured PO workflow and i used a standard program to send the mail to the external Mail id's of the users.
    The thing is when a PO is created the user whos has to release the PO is getting a Mail in Business Workplace through work flow and simoultaneously a mail will go to his external mail with a message that So and so PO is created please release it.
    As he cant keep on monitor his SAP Business workplace,whenever he get a mail to his external id,he will login to SAP and approves or rejects the PO.
    Here the probelm is the external mail is keep on triggering for every 15 min as we scheduled the Job for ever 15 min.
    So for the same PO number it is giving multiple mails to the external id until it is released.
    It should be like one mail should trigger for one PO number instead of multiple mails for the sam PO number.
    I'am unable to find the solution.
    Please guide me with a solution.
    With Regards,
    Praveen

    Hi Praveen,
    1> Goto transaction SWO1.
    2> Enter Object/Interface Name as BUS2012 and click on Create Subtype.
    3> Enter the required values (you can give ZBUS2012 everywhere....only give Application as R). Place cursor on methods and click on create. Enter details and finally give name of your function module (which you would be creating with the logic of sending mails to selected users) in ABAP tab.
    4> Place cursor on method name and click on parameters and create the required parameters. These parameters would receive value from task container.
    5> Finally goto transaction SWO6 and delegate this BO to parent BO (which is BUS2012). This would enable the methods of child BO to be available to the parent one.
    Try the steps and let me know wherever you get stuck.
    Best regards,
    Abir

  • SCOT Configuration--for external mail

    Hi All,
    I am trying to configure SCOT on my solution manager server. and able to send mail inside comapny  mail domain but not able to send mail on any external mail domain like yahoo,hotmail.gmail.
    we are using MS exchange server for mailing. please advice me if any further setting require on Mail server side.
    Thank
    Gyan

    Hi,
    Yes this is because your SMTP email server does allow sending emails to the outsid world.
    If you are using SAP WAS 6.10 or above you do not need any extra configuration you need only to follow the following steps:
    https://service.sap.com/sap/support/notes/455140
    This is because the SMTPplug-in from WAS 6.10 and onwards - supports all SMTP mail gateways and you do not need any SAP Exchange Connector as well to connect to MS Exchange Servers. Please find below the details from SAP as well:
    https://service.sap.com/sap/support/notes/122657
    if you have followed all the steps as mentioned in sap note 455140 above, please liaise with your M/S Exchange Server administrator so that he can unblock the sending of emails to the outside world as well, if that is permitted.
    - Regards, Dibya

  • How to receive mails from External mail ids to SAP SBWP

    Dear Experts!!!!!
    Gud Evening and Wish you all a HAPPY DIWALI !!!!!!!!
    I have requirement like suppose say I have my company mail id for eg: abc<AT>xyz<DOT>com and also have a gmail ID. My login ID in sap is say BASIS. Normally, if I configure SMTP with our exchange server then I can send mails from SAP to my company ID and also gmail ID.
    Similarly, I want to know like what needs to be configured for receiving mails in to SAP if I send mails from my compnay ID or gmail ID. To be more precise...my interest is mostly from Gmail i.e., if I send a mail from my Gmail ID, I should be able to see the mail in SBWP of my BASIS login.
    Please suggest how this can be acheived.....
    Thanks & Regards,
    Sharath

    Hi Sharath,
    Generally it is not recommended to configure income mail on SAP.
    as it increase heaby memory utilization as well as it make big impact on sap database. i.e it is unwanted increase the databse of sap.
    Thanks
    Anil

  • Marketing Documents distribution via e-mail or fax add-on

    We are looking for an add-on which can e-mail customer automatically that their order has been processed for shipment as soon as the order are added in SAP B1. Also the capability that the Invoice are automatically e-mailed or faxed based on customer preference.
    Any sujestion?
    Mike

    Mike,
    You may want to check out Crystal Wave as it has that ability and much more http://www.twbs.com/newsite/solutions-crystal-wave.htm
    Hope this helps,
    Karl

  • Document Distribution Question for Confirm Receipt Workflow

    Hi all,
    If I do a document distribution for recipient list (CVI7) with several users as recipients of the document, all of the workflows with links back to the dist log for confirming receipts go to the person who initiated the distributions.  Is there any method of directing these workflows directly to the users specified in the recipient list?
    Thanks in advance
    Bill Pickett

    Hi
    In stndard sap it is not possible.It might be done by changing the recipient in the workflow. So consult a workflow person for this.
    Regards
    Prasad

  • External Mailing with DIR status change

    Hi SAP gurus
    we have a particular senario,
    where in DIR of Particular Document types at reaching a particular document status, a mail has to sent to the concerned relevent authorities for corrections and Approval.
    (as and when the status changes to be mailed personalities also Changes)
    how can this be achived if the mail has to be sent to there company or external Mailing IDs apart from SAP mail.
    Can this  be done using Document Distribution?
    what is the Work  flow activities involved (if required) for enabling this functions,
    Thanks in Advance
    Kumar K

    hi kumar,
    you can do it by doc distribution and activating some standerd task. and for mailing to extenal mail id , you have to activate SMTP, by tcode SCOT
    but according to your requirement , you should consult to workflow consultent.
    regards,
    nitin
    award point if useful

  • How to put mail ids in CC and BCC while sending mail through ABAP?

    Hi all,
    i have created a report which sends the output of the  report to external mail ids. I want to put some email ids in CC or BCC.
    Please do guide me so that i can proceed with the development.
    Thanks and Regards,
    Syed

    just go through below code and
    *& Report  Z_TTTT
    REPORT  Z_TTTT1.
    *TABLE DECLARATIONS
    TABLES: SOLI.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT_B1 NO INTERVALS.
    SELECTION-SCREEN BEGIN  OF LINE .
    PARAMETERS: SAPID RADIOBUTTON GROUP ADDR.
    SELECTION-SCREEN COMMENT 5(20) T_SAPID.
    PARAMETERS: EMAIL_ID RADIOBUTTON GROUP ADDR.
    SELECTION-SCREEN COMMENT 30(20) T_EMAIL.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT_B2 NO INTERVALS.
    SELECTION-SCREEN BEGIN  OF LINE .
    SELECTION-SCREEN COMMENT 5(20) TXT_ID.
    SELECT-OPTIONS: ID FOR SOLI-LINE NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN  OF LINE .
    SELECTION-SCREEN COMMENT 5(20) TXT_CC.
    SELECT-OPTIONS: CC FOR SOLI-LINE NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN  OF LINE .
    SELECTION-SCREEN COMMENT 5(20) TXT_BCC.
    SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    *SELECTION-SCREEN BEGIN  OF LINE .
    *SELECTION-SCREEN COMMENT 5(20) TXT_SEND.
    *PARAMETERS: SENDER LIKE SOUD-USRNAM.
    *SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    *SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-009.
    *PARAMETERS: SUB_LINE(60) TYPE C.
    *SELECTION-SCREEN END OF BLOCK B3.
    *SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-008.
    *SELECT-OPTIONS: TEXT1 FOR SOLI-LINE NO INTERVALS.
    *SELECTION-SCREEN END OF BLOCK B4.
    SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT_B5.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: P_ATTACH AS CHECKBOX USER-COMMAND RAD1.
    SELECTION-SCREEN COMMENT 5(20) T_ATTACH.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(20) T_FLNAME.
    PARAMETERS: P_FLNAME  TYPE RLGRAP-FILENAME MODIF ID M1 .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B5.
    *Data Declarations
    DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
          SUBJECT_LINE LIKE SOOD1-OBJDES.
    DATA : SENDER TYPE SY-UNAME.
    DATA : IT_REC type SOLI OCCURS 0 WITH HEADER LINE.
    *INITIALIZATION Block
    INITIALIZATION.
      TEXT_B1 = 'Output Specification'.
      T_SAPID = 'SAP User ID'.
      T_EMAIL = 'Email ID'.
      TXT_ID =  'Receipient Id'.
      TXT_CC =  'CC'.
      TXT_BCC = 'BCC'.
      TEXT_B2 = 'Receipient'.
      TEXT_B5 = 'Attachment'.
      T_ATTACH = 'Attachment'.
      T_FLNAME = 'File name'.
    *  TXT_SEND = 'Sender Name'.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF P_ATTACH <> 'X'.
          IF SCREEN-GROUP1 = 'M1'.
            SCREEN-INPUT = 0. " Disable for input.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FLNAME.
      PERFORM GET_FILENAME.
    *start of selection Block
    START-OF-SELECTION.
    *  LOOP AT TEXT1.
    *    MOVE TEXT1-LOW TO MAIL_CONTENT-LINE.
    *    APPEND MAIL_CONTENT.
    *  ENDLOOP.
    ****  Mail Body
      MOVE 'Hi' TO MAIL_CONTENT-LINE.
      APPEND MAIL_CONTENT.
      MOVE 'This is Test mail' TO MAIL_CONTENT-LINE.
      APPEND MAIL_CONTENT.
      MOVE 'Thanxs' TO MAIL_CONTENT-LINE.
      APPEND MAIL_CONTENT.
    ****  Mail Heading
      MOVE 'Test Mail' TO SUBJECT_LINE.
      PERFORM SEND_EMAIL  TABLES MAIL_CONTENT USING SUBJECT_LINE.
    *& Form SEND_EMAIL
    FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
                    USING TITLE LIKE SOOD-OBJDES.
      DATA: RECEIVERS TYPE  SOOS1 OCCURS 0 WITH HEADER LINE,
            TSOOD1 TYPE SOOD1,
            PACKING_LIST TYPE SOXPL OCCURS 0 WITH HEADER LINE,
            OBJCONT1 type SOLI OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF AT_HEADER OCCURS 1.
              INCLUDE STRUCTURE SOLI.
      DATA: END OF AT_HEADER.
      CLEAR: TSOOD1,
             RECEIVERS.
      REFRESH RECEIVERS.
      MOVE: SY-LANGU TO TSOOD1-OBJLA,
      'Email Notice' TO TSOOD1-OBJNAM,
      'C' TO TSOOD1-OBJSNS,
      TITLE TO TSOOD1-OBJDES,  " rajan
      'Rajan' TO TSOOD1-OWNNAM.
    *loop through each ID and move them to recipient table
      LOOP AT ID.
    *    TRANSLATE ID-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM TO RECEIVERS-RCDAT,
          SY-UZEIT TO RECEIVERS-RCTIM,
          ' ' TO RECEIVERS-RECESC,
          ID-LOW TO RECEIVERS-RECNAM,
          'X' TO RECEIVERS-SNDEX.
        ELSE.
          MOVE: SY-DATUM TO RECEIVERS-RCDAT,
          SY-UZEIT TO RECEIVERS-RCTIM,
          'U' TO RECEIVERS-RECESC,
          'U-' TO RECEIVERS-RECNAM,
          ID-LOW TO RECEIVERS-RECEXTNAM.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
    *loop through each CC and move them to recipient table
      LOOP AT CC.
        TRANSLATE CC-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM TO RECEIVERS-RCDAT,
          SY-UZEIT TO RECEIVERS-RCTIM,
          ' ' TO RECEIVERS-RECESC,
          CC-LOW TO RECEIVERS-RECNAM,
          'X' TO RECEIVERS-SNDEX,
          'X' TO RECEIVERS-SNDCP.
        ELSE.
          MOVE: SY-DATUM TO RECEIVERS-RCDAT,
          SY-UZEIT TO RECEIVERS-RCTIM,
          'U' TO RECEIVERS-RECESC,
          'U-' TO RECEIVERS-RECNAM,
          CC-LOW TO RECEIVERS-RECEXTNAM,
          'X' TO RECEIVERS-SNDCP.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
    *loop through each BCC and move them to recipient table
      LOOP AT BCC.
        TRANSLATE BCC-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM TO RECEIVERS-RCDAT,
          SY-UZEIT TO RECEIVERS-RCTIM,
          ' ' TO RECEIVERS-RECESC,
          BCC-LOW TO RECEIVERS-RECNAM,
          'X' TO RECEIVERS-SNDEX,
          'X' TO RECEIVERS-SNDBC.
        ELSE.
          MOVE: SY-DATUM TO RECEIVERS-RCDAT,
          SY-UZEIT TO RECEIVERS-RCTIM,
          'U' TO RECEIVERS-RECESC,
          'U-' TO RECEIVERS-RECNAM,
          BCC-LOW TO RECEIVERS-RECEXTNAM,
          'X' TO RECEIVERS-SNDBC.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
      AT_HEADER = SY-DATUM.
      APPEND AT_HEADER.
      AT_HEADER = SY-UZEIT.
      APPEND AT_HEADER.
      IF SENDER EQ SPACE.
        SENDER = SY-UNAME.
      ENDIF.
      IF P_ATTACH EQ 'X'.
        PACKING_LIST-HEAD_START = 1.
        PACKING_LIST-HEAD_NUM = 2.
        PACKING_LIST-BODY_START = 1.
        PACKING_LIST-BODY_NUM = 9999.
        PACKING_LIST-FILE_EXT = 'PDF'.
        APPEND PACKING_LIST.
        CLEAR PACKING_LIST.
    *    APPEND LINES OF OBJCONT TO OBJCONT1.
    *    REFRESH OBJCONT.
        DATA : FLNAME TYPE  STRING.
        FLNAME = P_FLNAME.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            FILENAME                      = FLNAME
       FILETYPE                      = 'BIN'
    *   HAS_FIELD_SEPARATOR           = ' '
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
          TABLES
            DATA_TAB                      = IT_REC
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    APPEND LINES OF IT_REC TO OBJCONT1.
    *    APPEND  P_FLNAME TO OBJCONT1.
      ENDIF.
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          SENDER                     = 'AAB_ABAP5'
          OBJECT_HD_CHANGE           = TSOOD1
          OBJECT_TYPE                = 'RAW'
        TABLES
          OBJCONT                    = OBJCONT
          RECEIVERS                  = RECEIVERS
          ATT_HEAD                   = AT_HEADER
          ATT_CONT                   = OBJCONT1
          PACKING_LIST               = PACKING_LIST
        EXCEPTIONS
          ACTIVE_USER_NOT_EXIST      = 1
          COMMUNICATION_FAILURE      = 2
          COMPONENT_NOT_AVAILABLE    = 3
          FOLDER_NOT_EXIST           = 4
          FOLDER_NO_AUTHORIZATION    = 5
          FORWARDER_NOT_EXIST        = 6
          NOTE_NOT_EXIST             = 7
          OBJECT_NOT_EXIST           = 8
          OBJECT_NOT_SENT            = 9
          OBJECT_NO_AUTHORIZATION    = 10
          OBJECT_TYPE_NOT_EXIST      = 11
          OPERATION_NO_AUTHORIZATION = 12
          OWNER_NOT_EXIST            = 13
          PARAMETER_ERROR            = 14
          SUBSTITUTE_NOT_ACTIVE      = 15
          SUBSTITUTE_NOT_DEFINED     = 16
          SYSTEM_FAILURE             = 17
          TOO_MUCH_RECEIVERS         = 18
          USER_NOT_EXIST             = 19
          X_ERROR                    = 20
          OTHERS                     = 21.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE .
        MESSAGE 'sent successfully' TYPE 'I'.
      ENDIF.
    *  CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    **  BIN_FILESIZE = GV_BIN_FILESIZE
    *  FILENAME =  'C:\Documents and Settings\Administrator\Desktop\file'"W_FULL_PATH
    *  FILETYPE = 'BIN'
    ** APPEND = ' '
    ** WRITE_FIELD_SEPARATOR = ' '
    ** HEADER = '00'
    ** TRUNC_TRAILING_BLANKS = ' '
    ** WRITE_LF = 'X'
    ** COL_SELECT = ' '
    ** COL_SELECT_MASK = ' '
    ** DAT_MODE = ' '
    ** CONFIRM_OVERWRITE = ' '
    ** NO_AUTH_CHECK = ' '
    ** CODEPAGE = ' '
    ** IGNORE_CERR = ABAP_TRUE
    ** REPLACEMENT = '#'
    ** WRITE_BOM = ' '
    ** TRUNC_TRAILING_BLANKS_EOL = 'X'
    ** WK1_N_FORMAT = ' '
    ** WK1_N_SIZE = ' '
    ** WK1_T_FORMAT = ' '
    ** WK1_T_SIZE = ' '
    ** IMPORTING
    ** FILELENGTH =
    *  TABLES
    *  DATA_TAB = IT_REC
    ** FIELDNAMES =
    ** 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.
    ENDFORM. " SEND_EMAIL
    *&      Form  GET_FILENAME
    FORM GET_FILENAME .
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          FILE_NAME = P_FLNAME.
    ENDFORM.                    " GET_FILENAME

  • Send mails to Agents from Infotype 105  External mails / SAP Inbox

    Hi,
    1) Whenever there is a change in the Address  the change has to be notified to HR Business partner (HRBP)  and Manager (MGR)
       a) The mail has to be  sent to the Extermail id.
       b) OR it has to be sent to the SAPID (Inbox)
    2) These mail ID /SAPID will be taken from the INFOTYPE PA0105, where two custom fields will carry this Mail / SAPIDs
    3) Sending mail To external mail id  is been done using the Function module in  the rule (Inside the function module i have written a program which will collect the mail id from PA0105 and send mails)
    4) Huv can i send mail to SAPINBOX from there if i  have SAPID instread of external mail IDs.
    Please help me to solve .
    Richard A

    Check the Business Object that is relevant to you
    ADDRESS    Address for sending documents
    ADDRESSEMP Employee Address
    BUS4001    Addresses of companies and organizations
    BUS4002    Address of natural oerson
    BUS4003    Address of "Person in company"
    After selecting the Business object check which event is getting triggered when you change address. If no event getting triggered try toi configure in SWEHR3
    You can take reference of the following Wflow Template
    01000015
    01000080
    You can just use SAP User Id in mail if email address is maintained in SU01d.
    <b>Reward points if useful and close thread if resolved</b>

Maybe you are looking for