Author : Prasanthi Sridhar
(http://www.linkedin.com/in/prasanthisridhar)
Summary
In order to send Dunning Mail with introductory text and subject, use BTE process
00001040
The following document lays down steps for sending dunning letters to Business Partner
e-Mail ID
Create Product
Initial Screen
T-Code: FIBF
Create a product "of a customer" under "Product"
BTE implementation will be done under this product.
Path: Settings -> Products -> ...of a customer
Create Customer Product
1. Give a Product Name(e.g. ZFTR_DUN) and corresponding text
2.Tick the checkbox
3. Click on Save
Add Process
Initial Screen
T-Code: FIBF
Create a process module "of a customer" under "Process Module"
BTE Implementation 00001040 is added here
Path: Settings -> Process Modules -> ...of a customer
Assign Customer Product
1..Enter the process Name
2.Application area being used (e.g. TR-LO)
3.Function module (e.g. ZFTR_PROCESS_00001040)
4.Product defined in earlier steps
Note: In order to find the application area being used, follow steps for "Finding Application
Area"
Fill Parameters in Customer Function Module
T-Code: SE37
Copy function module SAMPLE_PROCESS_00001040 onto your function module (e.g.
ZFTR_PROCESS_00001040)
1.Use perform "get_email_id" to get email IDs for business partners
2.Fill in details has shown
Note:
1.C_finaa-nacha = 'I' determines the correspondence type. In this case email
2.C_finaa-intad stores email ID of business partner
Subroutine to Find Email ID
Code of Subroutine GET_EMAIL_ID
Form GET_EMAIL_ID using p_i_kna1_kunnr
changing p_bp_mailid.
DATA: lt_smtp TYPE TABLE OF bapiadsmtp,
ls_smtp TYPE bapiadsmtp.
CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'
EXPORTING
businesspartner = p_i_kna1_kunnr
valid_date = sy-datum
TABLES
bapiadsmtp = lt_smtp.
IF lt_smtp[] IS INITIAL.
RAISE no_recipient .
ELSE.
SORT lt_smtp BY std_no.
READ TABLE lt_smtp INTO ls_smtp
WITH KEY std_no = 'X'
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE ls_smtp-e_mail TO p_bp_mailid.
ENDIF.
ENDIF.
endform. " GET_EMAIL_ID
Create Mail Introductory Text
Create Standard Text
T-code: SO10
1.Enter Text Name
2.Choose Text ID as “FIKO”
3.Choose Language(e.g. EN in case of English)
Mail Introductory Text
Add in the text which has to be displayed as mail content
Dunning
T-Code: F150
In order to send mails for dunning, follow the process of setting up dunning procedure for
all customer. Here for the purpose of explanation, we will use Individual Dunning Notice
method
Fill Dunning Parameters
Fill in the details
Click on Printout
Dunning Complete
Click on Continue upon successfully finishing dunning
Check SOST
T-Code: SOST
Check the dunning letter which has been generated in SOST
Mail triggered to business partner will be shown in the list.
In order to view the mail being sent,
1.Select the mail line item
2.Click on Display icon
The Mail
Introductory text and Mail attachment can be seen in the mail.
Find Application Area
T-Code: SE37
In order to find application area being used,
1.Enter function module OPEN_FI_PERFORM_00001040_P
2.Set a break point and run the dunning notice.
Inside Debugger
In debugger,
the value of I_MHNK-APPLK has the application area. (e.g. TR-LO)
Set the application area accordingly in transaction FIBF
3 Comments
Former Member
Very nice document, which made my life easy when performing this task, thanks! Small note: do not use field TDCOVTITLE for the mail subject, but TDTITLE.
Regina Tsai
This's good to reference to implement this function~
One question: can we make PDF file name vs. email subject are different? from BTE 1040 they are assigned by ITCPO-TDTITLE.
Former Member
Hi Prashanthi,
How could we add Amount in the below text of SO10.
Please help me with the coding part for the same.