Recruitment module ---interview call letter through email

Hi Gurus
My client is implementing Recruitment module ( Not  E- Recruitment module), they asked for is there any why to send interview call letter to the candidateu2019s personal email ID through SAP.  Is it required to activate any BAdi.
Is this a customized scenario or  a standard settings?
Please advice.
Thank you,
Srinvias

yes there is standard apllication for getting the mail activated viz applicant activity types/ status......
below is the part which has to be customizied in order to get the mail activated..... you choose feature PACTV for assigning the aplicant activity types to the status of the application.... based on which automatically the mail can be triggred........and feature MAILS define the activiyt type and the std text which you want to activate.... ex Below the std text used is MAIL-APP-INTERVIEW which will be called if activity is appointment for interview..... meaning of variuos variable can be found in the forum.....
APACT Applicant activity type
005 Appointment for interview
IDTXT MAIL-APP-INTERVIEW
RECV1
RECV2 X
RECV3 X
SUBTY 0001
OUTBX X
After this you have to take care of the standard text in SO10 and here you will need a abaper to put the variable name etc which you would require... to place....
if any further queries ...let me know..
regds
SS

Similar Messages

  • Dunning letter through email

    Hi,
    I want to send dunning letter ( Tcode F150) through email.As per SAP note 328124, I copied OPEN_FI_PERFORM_00001040_P into z FM. Also add new entry for 00001040 event in FIBF tcode.But still when Iam running the Tcode F150, it shows print preview option.Email is not sent to the user. When I debug the program, it stops in std. FM ( i.e OPEN_FI_PERFORM_00001040_P ) not in Z FM that I have created. Please guide on this issue.
    Thanks & Regards,
    Anagha Deshmukh

    Did you activate your product?  FIBF -> Settings -> Products -> Customer (click the checkbox)

  • Generating Offer Letter & Data Transfer in Recruitment Module

    Dear Gurus,
    1) We are implementing Recruitment module and i am quite new to it. Could any one of you suggest what are the sequence of steps required to maintain to make sure that a Standard offer letter is generated and how to mail it to the applicant while you perform Offer Applicant Contract activity. Kindly suggest how to move further to fulfill this requirement.
    Kindly note this is pure Recruitment module and  e recruitment is totally out of scope.
    2) How do you transfer applicant data to Personnel Adminstration module when the Applicant action Prepare for Hiring is run.
    Kindly suggest the sequence of steps to be followed to make sure the data transfer happens from recruitment to personnel adminstration.
    Kindly also let me know what are the mandatory switches that have to be activiated in T77S0 table to set up an integration between PA & RC.
    3)When you hire a external applicant whose data is already there in PB10 and when you hire him for suitable vacancy and do the data transfer to PA. The next time when i try searching in the applicant pool will the Applicant group change from External applicant to internal applicant in case of hired applicant. If yes how to go about it.
    Kindly throw some light on this. Please note we would like to go about the standard functionalities of SAP Recruitment module.
    If there is any challenge in fulfilling the above requirements, kindly point out the same so i can address the same to my client...
    Regards,
    Kiran

    Hi Ravi,
    You can do the initial data entry of the applicant through Tcode PB40 or PB10.  Once you have maintained the data, then you can do the applicant actions like given below through Tcode PB40.
    Enter additional data
    Reject applicant
    Put applicant on hold
    Process applicant
    Offer applicant contract
    Applicant rejects offer
    Change of org. assignment
    Further application
    Invite applicant.
    It is not compulsory to do all these actions, but these actions are useful to keep a track of applicants.
    Then you have to do applicant action prepare for hiring through PB40.  After doing prepare for hiring action you can transfer the applicant data to Personnel administration through Tcode PBA7.  Once the data is transferred personnel number is generated for applicant.  Then you have to complete the activities throug Tcode PBA8.
    Few tables for configuration of recruitment :
    T750D - for creating media for recruitment
    V_T750C - Recruitment instruments
    T750K - Applicant group
    V_T750F - Applicant range
    V_T751E - Applicant action type
    V_T588D - Infogroup for Applicant action
    Shrikant

  • HT5622 i need help using the icloud it is not making any since to me can some one call me and help me with it please don't try to help me through email i need to talk and listen i don't understand instruction by reading

    i need help using the icloud it is not making any since to me can some one call me and help me with it please don't try to help me through email i need to talk and listen i don't understand instruction by reading.
    <Phone Number Edited by Host>

    You aren't addressing anyone from Apple here.  This is a user forum.
    You might want to call a neaby Apple store to see if they have a free class you could attend.

  • Yes Verizon has contacted me by phone.  I never scheduled a call time nor did I call them.  They also are not making it easy to contact them through email.  I need to discuss a way to assure that my phone is never called again during work hours without a

    Yes Verizon has contacted me by phone.  I never scheduled a call time nor did I call them.  They also are not making it easy to contact them through email.  I need to discuss a way to assure that my phone is never called again during work hours without a prearranged meeting.  I will not speak on the phone nor use a live chat.  I want email as I want this documented offical and no other means offeres me that assurance.  I'd also like to discuss comensation for being harrassed with phone calls.

    Well if you pay your bill the calls would not happen.
    You need only tell them not to call you during working time.
    The Fair Debt Collections Practices Act states you must tell them it is not convenient.
    Now if marketing calls you can opt out at the Verizon web portal under your My Verizon account.
    You will not get compensation for them to call you. Nice try.
    However they could just shut your phone off and then you will call them.
    Email is not an option.
    Good Luck

  • How to Record an Interview call through Skype in Audition CC

    Hi,
    I would like to record a Skype Interview call using Adobe Audition CC.
    I have seen posts about this topic, however, no one gives a step by step process to set it up if you are an absolute newbie to Audition.
    I am able to get Track 1 to reconize my voice, but I can't figure out how to get Track 2 to pick up the other person's voice I am interviewing through the Skype call. I am using Skype's call recording as a back up, however, I hear the call quality is better if it goes straight into Adutiton.
    Do I need a mixer for this to be possible?
    I am sure it has something to do with the input and output, but just ahve no idea where to start.
    Any help would be greatly apprecaited!
    Thank you!!!!

    idopodcast wrote:
    Thank you!
    Now you said it's best, however, if you don't have a mixer is it still possible?
    It might be, but if you think that setting it up with a mixer might be difficult, I can assure you that without one it's going to be a whole load harder, especially if you have to use an internal sound device. And no I haven't tried - nor am I likely to.
    Also, the PDF is great. If I get a mixer, Are there directions for after you set that up and you need help setting up the interface?
    No, because I haven't rewritten it yet! (as mentioned on the other thread).
    If you are serious about doing this, a small mixer is a very good idea anyway, and they really don't cost that much nowadays. I haven't tried it, but I think that it should be relatively easy to set this up with one of the mixers that also contains an audio interface (so you just have to connect it via a USB cable). I will look into that. The version in the .pdf works with any mixer, although it needs unimpeded line in/line connections on your computer. Most of them can just about manage this, but some manufacturers still make this difficult.

  • Why won't my computer let me accept a PS request through email?

    Each time I get a photo stream request through email, I go to click "Join this Photo Stream," and a screen pops up that simply TELLS me how to accept a photo stream, which, much to my frustration, is exactly what I did to get me to the window that popped up. Has this happened to anyone else? Is there another way to accept PS requests? None show up in my notification center

    Uncheck Photo Stream  in the System/iCloud preference pane,
    reboot and then reenable it.  See if that will allow you to join the Shared Photo Stream.
    OT

  • How to add letters  to applicant activities  in recruitment module

    Hi Experts,
    We have created letters in recruitment module through tcode So10
    Here im in confusion where shall we add these lettes in the module.
    We have to add for Acknoeledgement,invitation for interview,offer letter and  rejection letter.
    kindly advice.
    Vsai.

    Hi Vicky,
    You assign letters to activities by implementing feature PACTV.
    Please assign the standard text name to IDTXT field.
    Regards,
    Dilek

  • Need to Generate PDF file and send it to customer through email-ALV report

    HI All,
       I am having data in Internal table.
    can we create PDF file with out having spool-request number.
    My requirement is whenever user clicks on execute button the output is generated in PDF format automatically and then send it to customer through email.
    I found few programs in SDN for generation PDF. But problem is everyone passing the spool request to the function module.
    spool request will be generated whenever we click on print button.
    Am I correct?.
    Is there any other way to create spool request automatically. If so we can pass the this spool number to the function module.
    Regards,
    vinod.

    hi
    For sending a mail, this code will help you.
    Pls reward if help.
    FORM send_mail_2 USING msgid msgno msgv1.
    mailuser oder Gruppe like sy-uname default 'Ruckerk'.
    DATA: express_hold_time LIKE sovaltime.
    DATA: text LIKE sotxtinfo.
    DATA: receiver LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
    MESSAGE ZF100 (FTP an UDB fehlgeschlagen)
    text-msgid = msgid.
    text-msgno = msgno.
    text-msgv1 = msgv1.
    text-msgv2 = ' '.
    text-msgv3 = ' '.
    text-msgv4 = ' '.
    express_hold_time
    express_hold_time-days = 01.
    express_hold_time-h_min_sec = 240000.
    receiver
    receiver-receiver = mreceivr.
    Gruppe von Empfängern
    receiver-rec_type = 'C'.
    und Expressmeldung ausgeben
    receiver-express = 'X'.
    APPEND receiver.
    CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
    EXPORTING
    msgid = text-msgid
    msgno = text-msgno
    msgv1 = text-msgv1
    msgv2 = text-msgv2
    msgv3 = text-msgv3
    TABLES
    receivers = receiver.
    IF sy-subrc <> 0.
    WRITE:/ 'hat nicht geklappt', 'SY-SUBRC =', sy-subrc.
    ENDIF.
    PERFORM print_error_report.
    Fehlermeldung zum Abbrechen des Report's ausgeben.
    MESSAGE e398 WITH 'Jobabbruch' msgv1.
    ENDFORM. " SEND_MAIL_2
    Another Program:
    *& Report ZSENDEMAIL *
    *& Example of sending external email via SAPCONNECT *
    REPORT zsendemail .
    PARAMETERS: psubject(40) type c default 'Hello',
    p_email(40) type c default '[email protected]' .
    data: it_packing_list like sopcklsti1 occurs 0 with header line,
    it_contents like solisti1 occurs 0 with header line,
    it_receivers like somlreci1 occurs 0 with header line,
    it_attachment like solisti1 occurs 0 with header line,
    gd_cnt type i,
    gd_sent_all(1) type c,
    gd_doc_data like sodocchgi1,
    gd_error type sy-subrc.
    data: it_message type standard table of SOLISTI1 initial size 0
    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *& Form POPULATE_MESSAGE_TABLE
    Adds text to email text table
    form populate_message_table.
    Append 'Email line 1' to it_message.
    Append 'Email line 2' to it_message.
    Append 'Email line 3' to it_message.
    Append 'Email line 4' to it_message.
    endform. " POPULATE_MESSAGE_TABLE
    *& Form SEND_EMAIL_MESSAGE
    Send email message
    form send_email_message.
    Fill the document data.
    gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
    gd_doc_data-obj_langu = sy-langu.
    gd_doc_data-obj_name = 'SAPRPT'.
    gd_doc_data-obj_descr = psubject.
    gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
    clear it_packing_list.
    refresh it_packing_list.
    it_packing_list-transf_bin = space.
    it_packing_list-head_start = 1.
    it_packing_list-head_num = 0.
    it_packing_list-body_start = 1.
    describe table it_message lines it_packing_list-body_num.
    it_packing_list-doc_type = 'RAW'.
    append it_packing_list.
    Add the recipients email address
    clear it_receivers.
    refresh it_receivers.
    it_receivers-receiver = p_email.
    it_receivers-rec_type = 'U'.
    it_receivers-com_type = 'INT'.
    it_receivers-notif_del = 'X'.
    it_receivers-notif_ndel = 'X'.
    append it_receivers.
    Call the FM to post the message to SAPMAIL
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
    document_data = gd_doc_data
    put_in_outbox = 'X'
    importing
    sent_to_all = gd_sent_all
    tables
    packing_list = it_packing_list
    contents_txt = it_message
    receivers = it_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.
    Store function module return code
    gd_error = sy-subrc.
    Get it_receivers return code
    loop at it_receivers.
    endloop.
    endform. " SEND_EMAIL_MESSAGE
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
    wait up to 2 seconds.
    if gd_error eq 0.
    submit rsconn01 with mode = 'INT'
    with output = 'X'
    and return.
    endif.
    endform. " INITIATE_MAIL_EXECUTE_PROGRAM

  • Sending PDF attachment through EMAIL Triggering

    Hi,
    Could you plaese let me know How to send Pdf Attachments
    through Email  in SAP.
    Using Function Module  SO_NEW_DOCUMENT_ATT_SEND_API1.
    Regards
    Bhuvana

    Hi,
    GP does not involve any sort of coding.
    Just like workflow, GP has a flow desgined in a process.
    Each step has a callable object associated with it.
    Check [this|http://help.sap.com/saphelp_nw04s/helpdata/en/0f/619fd378a641b29386063019c24fc4/frameset.htm] link for details
    -Ashutosh

  • Paylisp in PDF Through Email

    HI All,
    I have a requirement to send  payslip in PDF format  through Email ( PE51- HR FORM EDITOR)
    Converted the Payslip into PDF by using  F.M BAPI_GET_PAYSLIP_PDF .
    PDF got generated nd  for the same am sending  through Email by using the FM SO_DOCUMENT_SEND_API1.
    Recieved an email but the format is not proper ..
    Got hanged with this problem..
    Please provide any  suggestion to move furthur ...
    Regards ,
    Dheeraj.

    @ Sriram and all ..
    Here is the link of the o/p :
    http://i56.tinypic.com/2w3w96d.jpg 
       .. Have used the FM 'QCE1_CONVERT' ( i.e to make the PDF content in a compatible format) before making use of 'SO_NEW_DOCUMENT_ATT_SEND_API1' FM.
    Still am facing the same probs  nd am also herewith posting the code ..
    First have retrieved the latest payroll  result and made the below....
    VARIABLES FOR SENDING EMAIL
    DATA document_data TYPE STANDARD TABLE OF sodocchgi1
         WITH HEADER LINE .
    DATA packing_list TYPE STANDARD TABLE OF sopcklsti1
         WITH HEADER LINE .
    DATA object_header TYPE STANDARD TABLE OF  solisti1
         WITH HEADER LINE .
    DATA contents_bin TYPE STANDARD TABLE OF  solisti1
         WITH HEADER LINE .
    DATA contents_txt TYPE STANDARD TABLE OF  solisti1
         WITH HEADER LINE .
    DATA receivers TYPE STANDARD TABLE OF  somlreci1
         WITH HEADER LINE .
    DATA i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE .
    DATA tab_lines_txt TYPE i .
    DATA tab_lines  TYPE i .
    DATA : successfully_sent TYPE c .
        CALL FUNCTION 'BAPI_GET_PAYSLIP_PDF'
          EXPORTING
            employeenumber = p0001-pernr
            sequencenumber = number
            payslipvariant = c_payslip_variant
          IMPORTING
            return         = return
            payslip        = pdf_content
            pdf_fsize      = pdf_fsize.
        IF pdf_content IS INITIAL.
          it_log-count = count.
          it_log-pernr = p0001-pernr.
          it_log-message_type = 'E'.
          it_log-message = return-message.
          APPEND it_log.
        ELSE.
          CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer     = pdf_content
            TABLES
              binary_tab = binary.
        ENDIF.
      ENDIF.
      BREAK-POINT.
      CALL FUNCTION 'QCE1_CONVERT'
        TABLES
          t_source_tab         = binary
          t_target_tab         = i_objbin
        EXCEPTIONS
          convert_not_possible = 1
          OTHERS               = 2.
      CONCATENATE 'PAYSLIP' '_' p0001-pernr '_'  INTO
    gc_testing.
    =================================================
    NAME OF THE OBJECT TO BE SENT
    =================================================
      BREAK-POINT.
      CLEAR document_data .
      document_data-obj_name  = gc_tst.
      document_data-obj_descr = gc_testing.
    =================================================
    CALCULATING THE SIZE OF THE TEXT IN THE MESSAGE
    BODY AND UPDATING THE PACKING LIST
    =================================================
      BREAK-POINT.
      DESCRIBE TABLE binary LINES   gv_tab_lines  .
      READ TABLE binary INDEX gv_tab_lines. .
      document_data-doc_size =
      ( gv_tab_lines - 1 ) * 255 + STRLEN( binary ).
      CLEAR packing_list.
      packing_list-head_start = 1.
      packing_list-head_num   = 0.
      packing_list-body_start = 1.
      packing_list-body_num   = gv_tab_lines.
      packing_list-doc_type   = 'RAW'.
      APPEND packing_list.
    * =================================================
    CALCULATING THE SIZE OF THE PDF ATTACHEMENT
    AND UPDATING THE PACKING LIST
    =================================================
      BREAK-POINT.
      DESCRIBE TABLE i_objbin  LINES tab_lines.
      CLEAR packing_list .
      packing_list-transf_bin = 'X'.
      packing_list-head_start = 1.
      packing_list-head_num   = 1.
      packing_list-body_start =  1 .
      packing_list-body_num   = tab_lines .
      packing_list-doc_type   = 'PDF'.
      packing_list-obj_name   = 'INFORMATION.PDF' .
      packing_list-obj_descr  = 'INFORMATION.PDF' .
      packing_list-doc_size   = tab_lines * 255.
      APPEND packing_list.
      =================================================
    CREATING THE ATTACHMENT OF THE MESSAGE
    =================================================
      FREE contents_bin .
      LOOP AT i_objbin .
        CLEAR contents_bin .
        contents_bin = i_objbin  .
        APPEND contents_bin .
      ENDLOOP .
    * =================================================
    LIST OF RECEPIENTS
    =================================================
      FREE receivers.
      CLEAR receivers.
      receivers-receiver = 'email id'  .
      receivers-rec_type = 'U'.
      APPEND receivers.
    =================================================
    =================================================
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    =  document_data
          put_in_outbox                    = ' '
          commit_work                      = 'X'
      IMPORTING
        SENT_TO_ALL                      =
        NEW_OBJECT_ID                    =
        TABLES
          packing_list                     = packing_list
          object_header                    = object_header
          contents_bin                     = contents_bin
          contents_txt                     = contents_txt
        CONTENTS_HEX                     =
        OBJECT_PARA                      =
        OBJECT_PARB                      =
          receivers                        = 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
      IF sy-subrc EQ 0 .
        successfully_sent = 'X' .
      ENDIF .
    Please  suggest and let me know for furthur changes that need to be done for  the above coding  to resolve my problem..
    Regards ,
    Dheeraj

  • Error in Recruitment module

    Hi SAP Gurus:
    My query here is that in the recruitment module, while doing prepare to hiring action, we face an error calle MESSAGE_TYPE_X
    when we exit and do the action again, we do not get it.
    did debug it and found out the following reason:
    I had a look at your system and was able to simulate the problem you
    mentioned. The reason what I could find out is the following.
    In your configuration of the view V_T751E, for the action type
    '04'(Offer applicant contract) an infogroup 'W4' is attached. Through
    this infogroup 'W4', an insert(INS) is done to the infotype 4002
    (V_T588D). This configuration means that when we execute the action type'04', the infogroup 'W4' will also get executed which would bring up
    the screen 'Change Vacancy Assignment Status' using which we can change
    the status to '5'.
    Now, SAP provides a dynamic action in standard which would update the
    vacancy assignment status. Please see the calling of the form routine
    SUBMIT_RPAPUT00_WITH_APPLICANT in the view V_T588Z. Here in this form
    routine, we update the vacancy assignment status to 5, when we execute
    the action '04'. So the updation of the status is already done. After
    this only the infogroup 'W4' is processed which will try to update the
    status again to '5'. This leads to some buffering issue in the system
    and as a result of this it is trying to insert the same record again.
    Hence the update of the database fails and the system dumps. So
    basically the dynamic action in T588Z as well as the infogroup 'W4' are
    doing the same thing. Both are updating the vacancy assignment status.
    So I would suggest you to kindly use either one of these since
    ultimately both of them are doing the same action. So either you can
    remove the infogroup assignment to the action '04' in V_T751E or you cancomment out the calling of the form routine -
    SUBMIT_RPAPUT00_WITH_APPLICANT in the dynamic action which SAP provides
    in the standard.
    Even after correcting this, i am facing with the same problem.
    please advise,
    Ayyaps

    MASSN Determining the Fast Entry Dialog Module
      Object
        Feature
      Use
        Transaction
      Procedure
        You select an action for fast entry in the entry screen of transaction
        PA42.
        The return value of the feature is a dialog module taken from table DCT.

  • Recruitment Module - requirement analysis of client's business processes

    Dear Friends,
    Greetings to All,
    My client informed me to prepare a questionnaire on what all the information is required from the HR department relating to Recruitment activity to configure the Recruitment module in SAP.
    I want to know what all the areas to be considered in preparing this document such as, Number Ranges, Recruitment media, Recruitment instruments, applicant structure and so on.....
    Can any expert help me in this regard as what all the areas I have to consider in preparing this questionnaire document. I am working on ECC 6.0.
    Appreciate your responses.......
    P. Sai Narayana
    SAP Functional Consultant

    Hi Manoj,
    Thank you so much for your response.......
    At present my objective is to provide the Client a Questionnaire......which should cover all the information I require for the  Recruitment module - Business process of their company which is called as a Q&A database.....which we provide the client before preparing Business Blue print to study their business processes.......
    The weblink which you have provided me is so helpful for e-Recruitment.........But our client is interested in Recruitment not e-Recruitment....
    Can you please send me any information on this regarding to my mail ID.....[email protected], if you have.......
    Thank you once again.......
    Sai

  • Does your phone let you email or post videos?

    My droid will not let me email videos or post video to facebook no matter how long they are. I also can not text any of my videos..what is going on? I am getting fusterated with this so called great phone..

    i know on my htc inc the max i can send is 1.2 megs (via text). the problem with these great cams is that the files they record are LARGE. i put the video on the lowest resolution but still can't text a vid that's more than about 12-15 seconds. as far as facebook goes....that's a fb issue. ages ago i could email video and it would post (eventually). now, nothing! i've even tried to get a response from fb twice, but they never got back to me and nobody specifically addresses this in any of the fb help forums. so i've found a fix. if you have the patience to learn a pretty cool app then go to the market and download qik. i can now take long videos and IMMEDIATELY post to fb (seriously.....it's close to a live stream). you gotta set up an account on the qik website and link it to your fb and i had to learn a bit.....but in less than an hour i was postin videos to fb and now i use it all the time. as far as sending vids via text....i am and will remain dissapointed. i could send 30 second vids on my env touch!!! i know they were poor quality, but a 12 second video is all i can get through now and that's pointless.

  • Sending smartform through email as PDF attachment

    Hi,
    I want to send a smartform through email as pdf attachment.In the code I have hardcoded the receiver mail id.But I don't want this to be sent only to a particular receiver.I want this to be sent as many people as I can without hardcoding their mail id's in the program.How can I do that?
    Regards,
    Hema

    **Data Declarations
    **Internal Table
    DATA : BEGIN OF it_spfli OCCURS 0,
              carrid LIKE spfli-carrid,
              connid LIKE spfli-connid,
           END OF it_spfli.
    DATA:   it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            it_contents     LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    storing receivers      
            it_receivers    LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    **storing file attachment data
            it_attachment   LIKE solisti1 OCCURS 0 WITH HEADER LINE,                    gd_doc_data     LIKE sodocchgi1,
            gd_error        TYPE sy-subrc,
            l_gntxt         LIKE t357g_t-gntxt,
            lv_message(100) TYPE c.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE. "storing mail body
    DATA : psubject(30) TYPE c VALUE 'Sample Mail'. "subject of the mail
    DATA : ld_format TYPE so_obj_tp , "file format
           ld_attfilename TYPE so_obj_des, "file name
           w_cnt TYPE i.
    **Selecting the data
    SELECT carrid connid INTO TABLE it_spfli FROM spfli WHERE carrid EQ 'AA'.
    **Perform for populating mail body
    PERFORM populate_message.
    **Perform for populating file attachment
    PERFORM populate_attachment.
    **Perform for populating mail characteristic info
    PERFORM populate_pack.
    **Perform for populating receivers
    PERFORM populate_receivers.
    **Perform to send mail
    PERFORM send_mail.
    *&      Form  populate_message
          text
    -->  p1        text
    <--  p2        text
    FORM populate_message .
    **Populating the body
      lv_message = 'Sample mail for testing purpose.'.
      APPEND lv_message TO it_message.
    ENDFORM.                    " populate_message
    *&      Form  populate_attachment
          text
    -->  p1        text
    <--  p2        text
    FORM populate_attachment .
    **Populating the attachment file with the data from final intenal table
      CONCATENATE 'CARRIER ID'
                  'CONNECTION ID'
                  INTO it_attachment SEPARATED BY
                  cl_abap_char_utilities=>horizontal_tab.
      CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
      it_attachment.
      APPEND it_attachment.
      LOOP AT it_spfli.
        CONCATENATE it_spfli-carrid it_spfli-connid INTO it_attachment SEPARATED BY
                 cl_abap_char_utilities=>horizontal_tab.
        CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
        it_attachment.
        APPEND it_attachment.
      ENDLOOP.
    ENDFORM.                    " populate_attachment
    *&      Form  populate_receivers
          text
    -->  p1        text
    <--  p2        text
    FORM populate_receivers .
    **Populating Mail Recepients
    **If there are more than one mail recepient then loop and append them to it_receivers
      it_receivers-receiver = '[email protected]'.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      it_receivers-express = 'X'.
      APPEND it_receivers.
    ENDFORM.                    " populate_receivers
    *&      Form  populate_pack
          text
    -->  p1        text
    <--  p2        text
    FORM populate_pack .
    **File Type
      ld_format = 'XLS'.
    **File Name
      ld_attfilename = 'File1'.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject .
      gd_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR gd_doc_data.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      READ TABLE it_attachment INDEX w_cnt.
      gd_doc_data-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_attachment ).
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    **Describe the attachment info
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_attachment LINES  it_packing_list-body_num.
      it_packing_list-doc_type = ld_format.
      it_packing_list-obj_name = ld_attfilename.
      it_packing_list-obj_descr = ld_attfilename.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      APPEND it_packing_list.
    ENDFORM.                    " populate_pack
    *&      Form  send_mail
          text
    -->  p1        text
    <--  p2        text
    FORM send_mail .
    **Function Module to send mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gd_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_packing_list
          contents_bin               = it_attachment
          contents_txt               = it_message
          receivers                  = it_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.
    ENDFORM.                    " send_mail

Maybe you are looking for

  • How we can automate the data loading from BI-BPC

    Dear  Guru's Thanks for watching this thread,my question is               How we can load the data from BI7.0 to BPC.My environment is SAP-BI 7.0 and BPC is 7.5 MS version and 2008SQL. How we can automate the data loading from  BI- BPC Ms version.Is

  • The question is about my iphone 5

                I had to send my iphone 5 to Apple Inc, 3011 Laguaga Blvd, Elk grove, CA 95756.             It is about Iphone 5 sleep/wake button replacement program.             Did you get my phone? I sent it by May 3, 2014.             Did you return

  • Contacts - imac and ipad

    trying to learn how contacts work with imac, ipad and iphone.  Added a new contact on imac but it does not show up on ipad.  I thought I had everything checked so it would sync auto. but must be missing something. Thanks

  • Where can I get ABAP trial?

    I ' am  a new student of ABAP and need a demo or trial version to practice  the programming in ABAP. Thank You

  • Smart guides not working properly

    Illustrator CC 2014 - x64 /  Win 7- x64  /  Win 8.1 - x64 Thank you for answers...