How  to get Mail  address  of  an Employee in  Workflow  ?

Hello Everybody ,
I want  to send mail  to employee   through  workflow    . I  have  Employee  number  PERNR  but  which method and  B.O   should i used  to get   email  address  of  that  employee   .?
Any solution .?
Regards,
Sandeep Jadhav

hi:
Try the function module HR_FBN_GET_USER_EMAIL_ADDRESS
else Create a Z_function module and put the following code as
ORM find_email_address USING    p_uname
                        CHANGING p_recextnam LIKE soos1-recextnam.
  DATA:   t_pernr LIKE pa0105-pernr,
          t_email LIKE pa0105-usrid_long.
STEP 1 - Find personnel number for UNAME
  SELECT SINGLE pernr INTO t_pernr
    FROM pa0105
    WHERE subty = '0001' AND
          endda >= sy-datum AND
          begda <= sy-datum AND
          usrid = p_uname.
Employee record found
  IF sy-subrc = 0.
STEP 2 - Find email address for personnel number
    SELECT SINGLE usrid_long INTO t_email
      FROM pa0105
      WHERE pernr = t_pernr AND
            subty = '0022' AND
            endda >= sy-datum AND
            begda <= sy-datum.
    IF sy-subrc = 0.
      IF NOT p_recextnam IS INITIAL.
        CONCATENATE p_recextnam t_email
          INTO p_recextnam SEPARATED BY ','.
      ELSE.
        p_recextnam = t_email.
      ENDIF.
    ELSE.  "Never found an email address for employee
WHO SHOULD WE SEND TO HERE??? ***
    ENDIF.
Employee number not found. Search in ADR6 table
  ELSE.
See if user name is in the username table.
i.e. The user is not an employee
    SELECT SINGLE addrnumber persnumber
      INTO (usr21-addrnumber, usr21-persnumber)
      FROM usr21
      WHERE bname = p_uname.
    IF sy-subrc = 0.
Found user name now let's get the email address
      SELECT SINGLE smtp_addr INTO t_email
        FROM adr6
        WHERE addrnumber = usr21-addrnumber AND
              persnumber = usr21-persnumber.
      IF sy-subrc <> 0 OR t_email IS INITIAL.
WHO SHOULD WE SEND TO HERE??? ***
      ELSE.  "Found email
        IF NOT p_recextnam IS INITIAL.
          CONCATENATE p_recextnam t_email
            INTO p_recextnam SEPARATED BY ','.
        ELSE.
          p_recextnam = t_email.
        ENDIF.
      ENDIF.
    ELSE.   "UNAME just does not have an email address addigned at all
WHO SHOULD WE SEND TO HERE??? ***
    ENDIF.
  ENDIF.
Regards
Shashi

Similar Messages

  • How to get mail address into a specific address group folder

    I need to be able to copy an email address from Mail and when saving it into Address Book, have it automatically go into a specific folder.
    Seems pretty obvious but I'm not seeing how to do this.
    Or is my only option to save to Address Book then manually drag the address into the intended folder?
    Thanks.

    Mail will only add an address to the main Address Book list. You could write an Applescript to perform the operation or possibly an Automator script.

  • How to get mail from Outlook to SAP GUI (workflow)

    Hi All ,
    How can we get a mail from outlook or personal mail into SAP GUI .
    can it be used as an event for 'wait for event step ' in workflow . ?
    Thanks ,
    Naval bhatt

    Hi Naval,
    I just want to clarify some areas from your question:
    1. Will a workflow be triggered because of the email from Outlook to SAP? Does it always have to start from the Outlook side?
    The integration of SAP Workplace (thru Workflow) and Outlook is possible using the Extended Notification (tcode SWNCONFIG). Here, you can send an email from SAP to Outlook then execute a function from your Outlook message and then you will be directed to the tcode of SAP side (SAP GUI).
    Regards,
    Reymar

  • How to get Manager id automatically when Employee Id is given.

    How to get Manager id automatically when Employee Id is given.
    1) I created a simple BO with two elements namely
        1.Employee Id
        2.Manager id
    How to get employee's first name and last name?
    And how will i get manager id  automatic when i click employee id in element field.
    Anbu.

    Have you tried to use "APPS.FND_CONCURRENT" API?
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE%20BODY
    Thanks,
    Hussein

  • Access - How to create Mail Address only list?

    Printing envelopes from mail lists - via Microsoft Excel? Access - How to create Mail Address Only list?
    Bearing my "new boy" status, step by step instruction would be appreciated.

    Hi
    This is a question only about the Microsoft products and has nothing to do with Toshiba notebooks but I have investigated a little bit in the net and found this useful sites:
    http://support.microsoft.com/kb/q141991/
    https://www.nahu.org/member/using%20excel%20to%20create%20lists%20and%20labels .pdf

  • In mdx how to get max date for all employees is it posible shall we use group by in mdx

    in mdx how to get max date for all employees is it posible shall we use group by in mdx
    example
    empno  ename date
    1         hari        12-01-1982
    1         hari        13-06-2000
    by using above data i want to get max data

    Hi Hari3109,
    According to your description, you want to get the max date for the employees, right?
    In your scenario, do you want to get the max date for all the employees or for each employee? In MDX, we have the Max function to achieve your requirement. You can refer to Naveen's link or the link below to see the details.
    http://www.sqldbpros.com/2013/08/get-the-max-date-from-a-cube-using-mdx/
    If this is not what you want, please provide us more information about the structure of you cube, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to get MAC address from IP address in LAN

    Hi all,
    How to get MAC address from IP address in LAN (windows or any OS), I would have all IP addresses of my LAN, so I would like to know all MAC address.
    Code examples are highly appreciated.
    Thanks & Regards,
    abel...

    abel wrote:
    Yeah that is only working for local system, but how to get remote system's MAC ..?
    Thanks for quick reply ...
    Edited by: abel on Jan 28, 2009 12:10 AMIt is my understanding that only one person ever found the holy grail which you seek. But sadly [_he's dead_|http://forums.sun.com/profile.jspa?userID=649366]
    As a curious aside how did you manage to get the list of IPs?

  • How to get second maximum salary from employee table(sql query)

    how to get second maximum salary from employee table(sql query)

    dude there is no matter of structure .........that user already said its from employee table ...............its basic table in sql and there is no need to specify the table structure
    .........i think u got my point I think you are the one who didn't understand Sarma's point.
    Give a man a fish and you feed him once. Teach a man how to fish and you feed him a life long.
    >
    and the query is
    select max(sal) from emp where sal<(select max(sal)
    from emp);
    this will give the 2nd max salary from the emp tableBtw: You solution is bad, because it needs to scan and sort the table emp twice. And a better solution has been given already.
    Message was edited by:
    Sven W. - reordered statements

  • How to get IP address of wp8 device

    How to simply retrieve IP address of wp8 device?
    microsoft.Phone.Net.NetworkInformation has too many classes related to networkinfo but none of them give IP address.

    see this link
    http://www.c-sharpcorner.com/UploadFile/2b876a/how-to-get-ip-address-in-windows-phone-8/

  • How to get Work schedule repor of employees

    Hi all
    Can any one help me out in
    how to get work schedule report of employees who are works in different shifts in an organization.
    Thnks in Advance
    Anusha

    Hi Anush,
    Find the SAP Standard reports for Work schedules:
    - PT03 - Display Work Schedule
    - PT63 - Personal Work Schedule (even PT61 also helpful as biswajit said)
    - PT_DSH20 - Daily Work Schedule
    Otherwise you have Time Manager’s Workplace/ Ad Hoc Query reports to view detail reports, which are user friendly for maintain time data.
    TC for Time manager’s workplace is PTMW
    TC for Ad-hoc query is S_PH0_48000513
    I suggest you to go with Ad-hoc and select all fields that what ever output you want and view the results (even you can upload also)
    Cheers,
    TG
    Message was edited by: TG

  • How to get Mail to recognize "Dad"?

    In my Address Book, I have my father marked down as his real name. How can I get Mail to automatically fill his e-mail address in a new message when I type in "Dad" without deleting his name, or do I just replace his name with Dad?

    Use Card/Add Field/Nickname on his entry in your address book, then type "Dad" into the new field.

  • How would e-mail address change affect forum?

    How company recently changed e-mail addresses for all the employees.  Both the format of the username and the domain changed as well.  Our old address will still work for 2 years before they wipe it out, but of course they want us to start using the new address now.
    Many websites, including NI discussion forums, use a person's e-mail address as the login name.  When the e-mail address becomes inactive, how does that affect my interaction on the discussion forums?  Obviously, I could still login using the old e-mail address.  But any e-mails from the forum for things such as subscriptions to threads would no longer work.  I could not find any place in my profile settings to update my e-mail address for subscription purposes.  Of course, I expect it to be difficult to change the forum login name since that would be my unique identifier in the forum.
    This shouldn't really cause me any problems for almost 2 years.  And I'm sure I'll have to deal with it on other websites that use your e-mail address as the login name such as sites that I purchase products from.
    Anyone else had similar problems with e-mail address changes?  It makes me wonder, if the new e-mail address is supposed to be better, why didn't they use the new format way all along.

    The profile is site wide and not specific to the forums. To change the email address associated with the user, click the MyNI link at the top of each page and then the Modify Profile link.
    Try to take over the world!

  • How to confg mailing address in recuitment....

    Hi,
    How to configure nailing address in recruitment for sending a mail to internal employees.......
    Wether we need to configure and also required Dynamic actions....
    pls let me know the exact process to overcome this issue..
    Regrads:
    Kumar.G

    Check the IT10105 Communication. Here u have to maintain for each applicant in PB40 or PB30.

  • How to get delivery address for PO

    I have a problem.
    I am working on a SAP Script , which is for PO(Zmedruck_po) , which is a copy of
    MEDRUCK.
    I am asked to print the delivery adress in a window .
    The scenario is like this .
    In ME23N , under item details , there is a tab called DELIVERY ADDRESS
    this has option to enter the adress details or a delivery number in the  address text box .
    If the address number is present i have to print that address , else i have to print the address which is entered in the delivery address tab.
    If the delivey address number is there i have no problem in printing it ,But if address number is not there ,I need to know how to get the delivery address,
    is it the plant address, company code address ... ?
    I debuged ,but could not find out.
    Can anyone help please .

    Hi,
    I don't know the table that is used to store the manual address on the PO but if you get your ABAPer to checkl the code in ME21N they should be able to tell you.
    Or better still, if one of the other experts here know the table that is used they will post the solution.
    Steve B

  • I set up two identities, the default & one more. How to get mail from the second one?

    I have two different e-mail addresses that I want to get mail from. So the main/default one worked just fine. So I went to options, account settings, identities and set up the second one. But this second one doesn't appear on the start page and still when I Get Mail, it only brings in the mail from the default one. So what do I do?

    You do not place your second account in Identities.
    You go to the Menu Bar and select '''File-New-Existing Mail Account''' and add it there.
    No Menu Bar? Press the alt key.
    If using the '''AppMenu button''', click that and select''' New Message-Existing Mail Account'''

Maybe you are looking for