email sending functionality for different business process in sap1

9
Email Sending Functionality for Different Business Process in Sap created by Vijay Simha on Nov 18, 2013 6:40 AM, lat modi!ied by  Vijay Simha on "an 21, 2014 #:4$ AM Verion 1 Email Sending Functionalit y for Different Business Process in Sap Nov, 2013  ntroduction Every Business Process in SAP Follow different communication types to communicate with its Business partner s like Print and send via post, Fax, and Email (Internet!Several E"mail communications need to #e sent to $endors % &ustomers who are the #usiness partners for the or'aniation which contains several Business Processes like Payment Advice, )unnin' forms and P*+s etc!, with P)F and Excel as attachment, which is a very eco!friendly "ay! Presently many are usin' the process of takin' a print out and sendin' it throu'h the post! his Process has lot of paper wasta'e! So instead of this we can send a mail which saves lot of paper wasta'e !his process ena#les the #o green nitiative and reduces lot of manual effort! -ith the recent releases in SAP all the Business process are enhanced with Email sendin' functionality! ntroduction to Email Processes Every Sta nda rd FI process lik e )unnin' and Pay ment and collection adv ice has a default way of sendin' there notices to the customer or vendor #y post! Sendin' a mail is not a standard SAP functional ity. in order to achi eve this nonstandard Functiona lity we haveB$E! hi s is an enhanc emen t tec hni /ue (*pen FI that was developed for Financial Accountin' component! his functionality is primarily used in FI in the areas of dunnin', Payment advice &ustomer and $endor Statement etc! Each of them has their own Function modules which will not interfere with each other!  Each of these has a BE+ s ena#led to fi ll the FI00A" 0A&1A struc ture to determine whether the output should #e sent as fax, print via post or email, i!e!, if FI0AA"0A&1A 2 3 " print via post and FI0AA"0A&1A 2 4I+ its email and if its 45+ FA6! his )ocument contains how this mail functionality can #e achieved #y usin' the BE+s for )ifferent applications in FI! 1% Application Area: FI - Accounts payable and Accounts receivable – Dunning  &pplication of t'e process B$E event (000010)0( ! % his process BE is useful durin' a dunnin' run when a dunnin' notice needs to #e sent to the customer #y the medium of an electronic form (E7AI8! As a default property, the dunnin' notice 'ets printed and is sent to the customer either #y scannin' the copy or via 9P*S9! % his same dunnin' notice could #e a very #eneficial if it is sent #y means of electronic form directly after the dunnin' has #een carried out!

Upload: swati-singh

Post on 03-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 1/9

Email Sending Functionality for

Different Business Process in Sapcreated by Vijay Simha on Nov 18, 2013 6:40 AM, lat modi!ied by Vijay Simha on "an 21, 2014 #:4$ AMVerion 1inShare1

Email Sending Functionality for Different Business Process in

SapNov, 2013

 

ntroduction

Every Business Process in SAP Follow different communication types to communicate

with its Business partners like Print and send via post, Fax, and Email(Internet!Several E"mail communications need to #e sent to $endors % &ustomers

who are the #usiness partners for the or'aniation which contains several BusinessProcesses like Payment Advice, )unnin' forms and P*+s etc!, with P)F and Excel as

attachment, which is a very eco!friendly "ay! Presently many are usin' the process oftakin' a print out and sendin' it throu'h the post! his Process has lot of paper

wasta'e! So instead of this we can send a mail which saves lot of paper wasta'e !hisprocess ena#les the #o green nitiative and reduces lot of manual effort! -ith the recent

releases in SAP all the Business process are enhanced with Email sendin' functionality!

ntroduction to Email Processes

Every Standard FI process like )unnin' and Payment and collection advice has adefault way of sendin' there notices to the customer or vendor #y post! Sendin' a

mail is not a standard SAP functionality. in order to achieve this nonstandardFunctionality we haveB$E! his is an enhancement techni/ue (*pen FI that was

developed for Financial Accountin' component! his functionality is primarily used in FIin the areas of dunnin', Payment advice &ustomer and $endor Statement etc! Each ofthem has their own Function modules which will not interfere with each other!

  Each of these has a BE+s ena#led to fill the FI00A"0A&1A structure todetermine whether the output should #e sent as fax, print via post or email, i!e!, ifFI0AA"0A&1A 2 3 " print via post and FI0AA"0A&1A 2 4I+ its email and if its 45+ FA6!

his )ocument contains how this mail functionality can #e achieved #y usin' the BE+sfor )ifferent applications in FI!

1% Application Area: FI - Accounts payable and Accounts receivable – Dunning

  &pplication of t'e process B$E event (000010)0( !

% his process BE is useful durin' a dunnin' run when a dunnin' notice needs to #esent to the customer #y the medium of an electronic form (E7AI8!

As a default property, the dunnin' notice 'ets printed and is sent to the customereither #y scannin' the copy or via 9P*S9!

% his same dunnin' notice could #e a very #eneficial if it is sent #y means of electronicform directly after the dunnin' has #een carried out!

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 2/9

% So, to achieve this non"standard functionality we need to enhance the standardprocess!

  $ransaction ! FBF !* Environment !* nfo systems +Processes

% &lick on execute,

 

% Select the BE ::::3:;: as it deals with the *utput device<medium

% &han'e the Already Present function module to = function 7odule!

0ow, technically the BE is ready to work as we have re'istered the BE!

As a functional aspect, the followin' thin's are needed to #e taken care of!

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 3/9

% Standard communication option " to 9E7AI89 in the 9>eneral9 a# in customer master96):5<:39!

% After confi'urin' these #asic steps, the BE is complete to tri''er for dunnin' run for

this particular customer!

  Dunning -un

% SAPF3?:)5"his Pro'ram can #e used to execute the )unnin' form #y 'ivin' the @un

date and identification and the lo'ic in the F79s can #e checked #y placin' thede#u''er!

% Best way is to check in the de#u''er,

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 4/9

& FN&&!N&./& ! For .ommunication edium +! nternet, 1!Print ut, 2!Fa

& FN&&N$&D 4 Email &ddress to send t'e PDF

 

& Process the next step #y confirmin' the 9Send to mail9 dialo',

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 5/9

& If 9&FI0AA"I0A)9 is left #lank the system will pick from the customer master 9&lerksinternet9, else it will take from the value 9&FI0AA"I0A)9! his ena#les the P)F sendin'

functionality which ena#les is standard process and the lo'ic to send excel can #e writtenin the a#ove F7 only! Also if you need to fill the Su#ect of Email use itcpo"tdtitlestructure which of ?: characters! If we need to send the Body also 7aintain the standardtext as mentioned in the #elow screen shot!

N$E5 If we need to send many attachments other than P)F we have to write the codein the a#ove F7 call the common mail sendin' functionality! In this case first a mail will

#e sent with Excel or some other as attachment then the standard P)F functionality iscalled!

$'is is a very eco!friendly means of informing t'e customers for t'eir over!due items%

 

2% Application Area: FI – Payment Advice and Collection Advice:

  &pplication of t'e process B$E event (000020)0( 4 

his BE is called in the standard include @FF*@I:C as shown #elow!

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 6/9

% In the transaction FIBF Select the BE ::::5:;: as it deals with the *utputdevice<medium sampleprocess::::5:;: will #e assi'ned!

 

% Since this is not a standard functionality we need to enhance the F7 so copy the

sampleprocess::::5:;: into =sampleprocess::::5:;:!

6ogic in t'e F

&heck if customer or $endor has Email 7aintained in the 7aster )ata! If it+smaintained then

% he structure cfinna included the internet address!

  'e et the tranmiion medi(m to )*+ a belo-

  c.!inaa/nacha *-  c.!inaa/intad l.mt.addr130- 5he email 7btained !rom the mater data

% 8ater the mail sendin' functionality can #e called after the closeform as shown inthe #elow screen shot or By *F data and excel can #e created usin' the ta#re'up

structure in the form avisschrei#en!

3% Application Area: FI – Customer/Vendor Balance Conirmation:

  &pplication of t'e process B$E event (00002)10( 4 

% his process BE is useful durin' a &ustomer<$endor Balance &onfirmation form

which needs to #e sent to the &ustomer<$endor #y an electronic form (E7AI8! By

default, the form is sent to the &ustomer<$endor either #y Fax or via 9P*S9!

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 7/9

% But as an environmental aspect to avoid wasta'e of paper, the same Statement could#e sent #y means of electronic form directly after the &ustomer<$endor Statement run

has #een carried out!

% So, to achieve this functionality we need to enhance the standard process!

  !ransaction - FIBF -" #nvironment -" Ino $ystems %Processes&

% &lick on Execute!

% Select BE ::::5;3: as it deals with )eterminin' the *utput )evice

% &lick on Sample Function 7odule! he F7 9SA7P8EP@*&ESS::::5;3:9 is assi'ned!In order to include the mail sendin' functionality, &opy the Function 7odule into a =

Function 7odule and make the re/uired chan'es to ena#le the mail sendin'functionality!

  6ogic in t'e F5

&heck if the &ustomer or $endor has Email 7aintained in the 7aster )ata! If it is

maintained then

% he structure cfinna includes the internet address!

-e set the transmission medium to 4I+ as #elow!

  &finaa"nacha 2 9I9!

  &finaa"intad 2 lsmtpaddr(3D:! Email *#tained from the master data

% 8ater the mail sendin' functionality can #e called after the &loseform as shown in

the #elow screen shot or By *F data, and excel can #e created usin' the Structure1BSI)1 for &ustomer and 1BSIG1 for $endor!

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 8/9

4% /o" to ac'ieve ail Functionality $ec'nically5

.reate a .ommon Functionality for sending mail using classes

i& For sending t'e sub(ect greater t'an )** c'aracters

% At reent (in9 the M S7.;7<=M>N.S>N;.A?*1 ha the caability o! endin9 only #0 character b(t (in9 the belo method o! the cla the (bject more than 2## character-

% So cl#cs class is used for the #elow purpose!

% here is also any option of chan'in' the sender I) in case the re/uirement is not to

use the

% SAP master Hser I) usin' the cl#cs class!

% &reate the #elow o#ect of type cl#cs and call the method

setmessa'esu#ect

wsendre/uest PE @EF * cl#cs $A8HE IS I0IIA8,&A88 7E1*) wsendre/uest"Jsetmessa'esu#ect

  E6P*@I0>  ipsu#ect 2 su#ect!

ii For Sending ultiple &ttac'ments li7e PDF and Ecel

% In case multiple attachments the #elow method addattachment attachment can #e

used #y loopin' on the attachments o#tained to this function module!

  fAA&17E0S PE @7PSP*S&*0E0

8/12/2019 Email Sending Functionality for Different Business Process in Sap1

http://slidepdf.com/reader/full/email-sending-functionality-for-different-business-process-in-sap1 9/9

  wdocument PE @EF * cldocument#cs $A8HE IS I0IIA8,

  8**P A attachments I0* fattachment!

  wattachmentsu#ect 2 fattachment"su#ect!  wfilesie 2 fattachment"docsie!

% his 7ethod will have the option to take input as method su#ect, filesie and  wdocument"Jaddattachment(

  E6P*@I0>  iattachmenttype 2 fattachment"doctype

  iattachmentsu#ect 2 wattachmentsu#ect  iattachmentsie 2 wfilesie  iattcontenttext 2 fattachment"conttext !

  E0)8**P!

  iii& For $ending #mail to multiple recipients li+e !o, BCC and CC,

% he #elow 8o'ic can applied to provide cc #cc and to as like multiple receivers! hemethod

addrecipient has the option to 'ive #lindcopy, &opy and recipient!

wrecipient PE @EF * ifrecipient#cs $A8HE IS I0IIA8,

% 8oop at the multiple receivers

8**P A receivers I0* freceivers!

  wrecipientmail 2 freceivers"receiver !

% he #elow method sets them mail I) of the @eceiver!

  wrecipient 2 clcamaddress#cs2Jcreateinternetaddress(  wrecipientmail!

  wsendre/uest"Jaddrecipient(  E6P*@I0>

  irecipient 2 wrecipient  iexpress 2 969

  icopy 2 freceivers"copy  i#lindcopy 2 freceivers"#lindcopy!E0)8**P!