Dynamic determination of e-mail Recipient

Lola Oluwa lola.oluwa at nokia.com
Mon Apr 23 03:10:42 EDT 2001


hmm... Unfortunately, we do not have any organisation structures/access to
HR data. We determine the agent responsible for the subsequent task at
runtime using Task: TS30001203. I am aware that this is like driving a
Ferrari with a Ford engine, but we have to live with this for now. The email
maintanance I mentioned in my earlier mail was done for each user master
data at time of creation and this is what I have to work with.
 
Lola.
 
-----Original Message-----
From: ext Van der Burg, Jeroen JA SSI-GRFE-3
[mailto:Jeroen.J.vanderBurg at si.shell.com]
Sent: Monday, April 23, 2001 9:47 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Dynamic determination of e-mail Recipient
 
 
Lola,
 
Not sure if this is the most efficient method, but to make sure we do not
have to maintain email addresses and office settings (the silly forwarding
bit) at user level I just created a little method which retrieves the email
addresses for all relevant personel numbers from IT0105 at runtime and then
uses the resulting multiline element to send email(s) in the next step.
 
See below, code is not live yet and needs optimising and exception handling
(when no address is found):
------
BEGIN_METHOD GETEMAILADRESS CHANGING CONTAINER.
DATA: begin of Personnelnumber occurs 0,
         personnelnumber like p0001-pernr,
      end of PERSONNELNUMBER.
 
data: begin of EMAILADDRESS occurs 0,
            emailaddress LIKE SOXNA-FULLNAME,
      end of emailaddress.
 
Data  P_0105 type PA0105.
Tables: pa0105.
 
 
  SWC_GET_TABLE CONTAINER 'PersonnelNumber' PERSONNELNUMBER.
 
* Get email addresses
loop at personnelnumber.
 select single * from pa0105 into p_0105 where
    subty eq '0010' and
    pernr eq personnelnumber-personnelnumber and
    begda le sy-datum and
    endda ge sy-datum.
 
 
 if sy-subrc eq 0.
    emailaddress = p_0105-usrid_long.
    append emailaddress.
 endif.
endloop.
 
 
* Set receivers for email
  SWC_SET_TABLE CONTAINER 'EMailAddress' Emailaddress.
 
END_METHOD.
 
 
 
 
 
-----Original Message-----
From: Lola Oluwa [mailto:lola.oluwa at nokia.com]
Sent: 22 April 2001 20:11
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Dynamic determination of e-mail Recipient
 
 
Hi W.f.'s,
 
I would like to be able to dynamically determine the internet address of a
mail notification recipient at runtime (mail sending is background task).
Can anyone tell me if this is feasible and how? The system is 45B and
internet address is maintained for all users.
 
Thanks in advance,
Lola.
 


More information about the SAP-WUG mailing list