(http://www.linkedin.com/in/prasanthisridhar) Firm : Fourth Signal (I) Pvt Ltd Focused SAP Financials Business Solutions Contact us : www.fourthsignal.com www.linkedin.com/company/fourth-signal +91 22 265 11872 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 Table of Contents Create Product 3 Initial Screen 3 Create Customer Product 4 Add Process 5 Initial Screen 5 Assign Customer Product 6 Fill Parameters in Customer Function Module 7 Subroutine to Find Email ID 8 Code of Subroutine GET_EMAIL_ID 8 Create Mail Introductory Text 10 Create Standard Text 10 Mail Introductory Text 11 Dunning 12 Fill Dunning Parameters 13 Dunning Complete 14 Check SOST 15 The Mail 16 Find Application Area 17 Debug Application Area 18 Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 2 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 Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 3 Create Customer Product 1. Give a Product Name (e.g. ZFTR_DUN) and corresponding text 2. Click on Save Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 4 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 Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 5 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 dened in earlier steps Note: In order to nd the application area being used, follow steps for "Finding Application Area" Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 6 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_naa-nacha = 'I' determines the correspondence type. In this case email 2. C_naa-intad stores email ID of business partner Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 7 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. Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 8 ENDIF. ENDIF. endform. " GET_EMAIL_ID Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 9 Create Mail Introductory Text Create Standard Text T-code: SO10 1. Enter Text Name 2. Choose Text ID has FIKO 3. Choose Language (e.g. EN in case of English) Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 10 Mail Introductory Text Add in the text which has to be displayed as mail content Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 11 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 Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 12 Fill Dunning Parameters Fill in the details Click on Printout Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 13 Dunning Complete Click on Continue upon successfully nishing dunning Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 14 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 Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 15 The Mail Introductory text and Mail attachment can be seen in the mail. Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 16 Find Application Area T-Code: SE37 In order to nd application area being used, 1. Enter function module "OPEN_FI_PERFORM_00001040_P" 2. Set a break point and run the dunning notice. Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 17 Debug Application Area In debugger, the value of I_MHNK-APPLK has the application area. (e.g. TR-LO) Set the application area accordingly in transaction FIBF Dunning- Mail Subject and Content Fourth Signal (I) Pvt Ltd (www.fourthsignal.com) 18