Sending Payment Advice to Multiple E-Mails Ids and Changing Subject line of payment advice using BTEs

By Venkat Reddy, Microexcel

Introduction

This article is intended to discuss 2 items on payment advice to Vendor-

1)     How to send payment advice to multiple e-mail ids.

2)     How to change Subject line of the payment advice.

When Accounts Payable team comes up with the requirement of sending payment advice to vendor above mentioned 2 points will be the first priority of requirements.

Based on SAP Note-1033893 we can achieve them by implementing BTE’s 2040 & 2050

Pre-Requisites : All FBZP configuration to send Payment Advice needs to be maintained.

Note – Please see the below mentioned link on how to implement BTE through FIBF in detail.

http://www.saptechnical.com/Tutorials/ExitsBADIs/Park/Index.htm

Step-by-Step Procedure to achieve

Step-1 Implementing BTE-2040 to send Payment Advice to Multiple E-Mail Ids

Go to T-Code – FIBF

Menu -> Settings -> Products -> of a customer

Create a New Entry as shown below –

Menu -> Settings -> Process Modules -> of a customer

 Create a New Entry as shown below –

Through SE37 we need to copy the standard function module SAMPLE_PROCESS_00002040 to Z.

Source Code in the Function Module –

function zsample_process_00002040.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(I_REGUH) LIKE  REGUH STRUCTURE  REGUH OPTIONAL
*"  TABLES
*"      T_FIMSG STRUCTURE  FIMSG OPTIONAL
*"  CHANGING
*"     VALUE(C_FINAA) LIKE  FINAA STRUCTURE  FINAA OPTIONAL
*"----------------------------------------------------------------------

* data declaration for address routines
  type-pools szadr.
  datal_addr1_complete type szadr_addr1_complete,
        l_adfax_line     type szadr_adfax_line,
        l_adsmtp_line    type szadr_adsmtp_line.


  DATAlv_email(130) type c.
* default: print payment advice
  c_finaa-nacha '1'.

* check that address number is available
    if not i_reguh-zadnr is initial.

*   read complete address of vendor
      call function 'ADDR_GET_COMPLETE'
        exporting
          addrnumber     i_reguh-zadnr
        importing
          addr1_complete l_addr1_complete
        exceptions
          others         4.

      if sy-subrc eq 0.
* Email to Vendor As Default.
*     check that internet address is available
        read table l_addr1_complete-adsmtp_tab into l_adsmtp_line index 1.
        if sy-subrc eq 0
       and not l_adsmtp_line-adsmtp-smtp_addr is initial.
*
*       choose message type 'I'nternet and fill email address
          c_finaa-nacha 'I'.
          c_finaa-intad l_adsmtp_line-adsmtp-smtp_addr.
          c_finaa-namep 'PAYMENT ADVICE'.
         concatenate l_adsmtp_line-adsmtp-smtp_addr 'test@abcde.com'
         into lv_email separated by space.
          c_finaa-intad = lv_email.

        elseif sy-subrc <> 0.
* FAX communication “ Uncomment if Payment Advice needs to sent by FAX
** Check if Fax number exists.
** Fax for payment Advice(2nd fax)
*          clear l_adfax_line.
*          read table l_addr1_complete-adfax_tab into l_adfax_line index 2.
*          if sy-subrc <> 0.
*            read table l_addr1_complete-adfax_tab into l_adfax_line index 1.
*          endif.
** Fax End
*          if sy-subrc eq 0
*          and not l_adfax_line-adfax-fax_number is initial.
*            c_finaa-nacha      = '2'.                 "Fax
*            c_finaa-tdschedule = 'IMM'.               "Sofort
*            c_finaa-tdteleland = l_adfax_line-adfax-country.
*            c_finaa-tdtelenum  = l_adfax_line-adfax-fax_number.
**        c_finaa-formc      = 'FI_FAX_COVER_A4'.   "SAPscript Deckblatt
*          endif.
        endif.
      endif.
    endif.

endfunction.

Click here to continue....

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image