Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Payment advice via email/fax

Former Member
0 Kudos
1,161

Hi gurus,

Currently i am working on soem enhancement related to FI payment advice ,tobe send thru email(if email number exists)or fax(if fax exists)otherwise i have to print that advice which will be in sap script format.For this i need to enhance the FM SAMPLE_PROCESS_00002040 .I am not having any clue to do from this FM.Can anybody already worked on this type of enhancement pls let me know how shud i do and if anybody know have the coding of FM's pls reply me asap. Its an urgent requirement for me.

thanks,

anil,,

1 ACCEPTED SOLUTION

Former Member
0 Kudos
258

hi

good

FU SAMPLE_PROCESS_00002040

____________________________________________________

Functionality

This function module is an interface description only and does not contain any instructions. It is intended for developers of those additional components that provide their own function module at Event 00002040 (Pmnt transactions: Issuing advice notes (mess.type)).

Function module SAMPLE_PROCESS_00002040 must not be changed.

If you want to create your own function module that is to be accessedat the callup point mentioned above, proceed as follows:

1. Copy the function module to your own name range.

2. Do not change any transfer parameters !!

3. Write your own coding in the copied function module.

4. Save and activate your function module.

5. Carry out the necessary settings in Customizing. Business Transaction Events

Process

This process is used to determine the output device (printer or faxmachine) to be used for the payment advice note. It is also possible tooverride the payment advice form defined in Customizing for the paymentprogram.

Interface

The system can use the transferred payment data (I_REGUH) to determinewhether the customer/vendor should receive the payment advice note bymail or by fax. The fax number from the customer/vendor master record(ZTLFX) can be referred to.

The message type (1 for a printout, 2 for a fax) is transferred back,as well as the alternative form (where applicable) and the detailsrequired for the fax (C_FINAA). For more details, see the structure FINAA.

If you are using a fax cover sheet (such as FI_FAX_COVER_A4), you should enter the company code address (Edit -> Address) and the accounting clerk's address. Thecustomer/vendor address is taken from the master record.

Messages issued in the log for the called payment medium program canalso be transferred.

Parameter

I_REGUH

C_FINAA

T_FIMSG

Exceptions

Function group

BFFMSMPL

thanks

mrutyun^

6 REPLIES 6

Former Member
0 Kudos
259

hi

good

FU SAMPLE_PROCESS_00002040

____________________________________________________

Functionality

This function module is an interface description only and does not contain any instructions. It is intended for developers of those additional components that provide their own function module at Event 00002040 (Pmnt transactions: Issuing advice notes (mess.type)).

Function module SAMPLE_PROCESS_00002040 must not be changed.

If you want to create your own function module that is to be accessedat the callup point mentioned above, proceed as follows:

1. Copy the function module to your own name range.

2. Do not change any transfer parameters !!

3. Write your own coding in the copied function module.

4. Save and activate your function module.

5. Carry out the necessary settings in Customizing. Business Transaction Events

Process

This process is used to determine the output device (printer or faxmachine) to be used for the payment advice note. It is also possible tooverride the payment advice form defined in Customizing for the paymentprogram.

Interface

The system can use the transferred payment data (I_REGUH) to determinewhether the customer/vendor should receive the payment advice note bymail or by fax. The fax number from the customer/vendor master record(ZTLFX) can be referred to.

The message type (1 for a printout, 2 for a fax) is transferred back,as well as the alternative form (where applicable) and the detailsrequired for the fax (C_FINAA). For more details, see the structure FINAA.

If you are using a fax cover sheet (such as FI_FAX_COVER_A4), you should enter the company code address (Edit -> Address) and the accounting clerk's address. Thecustomer/vendor address is taken from the master record.

Messages issued in the log for the called payment medium program canalso be transferred.

Parameter

I_REGUH

C_FINAA

T_FIMSG

Exceptions

Function group

BFFMSMPL

thanks

mrutyun^

Former Member
0 Kudos
258

Hi,

Thanks,

I have copied already...and i have set bte cofigurations also..and what i need now is ..

I need to send an email with attached sap-script(payment advice) to the vendor or vendors or customers.but my problem is i am not able to fetch the email number(tell me how can i get that?).So as per ur mail i understood that no need to write extra coding for fax,is that correct?..if you say ok i will send you my complete requirement for your personal id..pls send.

do help me plssss.

br,

anil

0 Kudos
258

hi

good

sounds great.

you can send me the requirement,herewith i am sending one link which carries a doc file, which ll give you details about SAMPLE_PROCESS_00002040 function module, and hope help you to solve your problem

http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc

Reward points if helpful.

thanks

mrutyun^

0 Kudos
258

hi,

finding out the mail-no. is in the sample:

*   read complete address of vendor/customer
    CALL FUNCTION 'ADDR_GET_COMPLETE'
         EXPORTING
              addrnumber     = i_reguh-zadnr
         IMPORTING
              addr1_complete = l_addr1_complete
         EXCEPTIONS
              OTHERS         = 4.

    IF sy-subrc EQ 0.

*     check that internet address is available
      <b>READ TABLE l_addr1_complete-adsmtp_tab INTO 
l_adsmtp_line INDEX 1.</b>   
   IF sy-subrc EQ 0

A.

Former Member
0 Kudos
258

HI mruthyun/anderson

I am sending my detail requirement..pls go thru it..

Requirement:...

Upon creation of payment media (via execution of programs RFFO* and variants as specified in transaction F110 and F111) the associated payment advice should be sent by:

a) Email (if Email address present)

b) By Fax (assuming Email address is not present and a fax number is present)

c) By print (assuming that neither an Email address or fax number is present).

Note 1: Payments advice notes will cover the following groups of business partners:

3rd party vendors

Intergroup vendors and Intragroup customers

Employees

Customers (refunds for example)

Note 2: The Email and Fax number will be taken from the address screen of the vendor and customer masters. There are legitimate reasons why multiple Email and Fax numbers need to be maintained in the address screen, typically there may be one or several entries for logistics reasons (to support sending of sales orders, billing invoices, purchase orders etc) and another entry to support finance reasons (e.g. this CIP dealing with sending of payment advice notes). With respect to multiple entries a default must be specified on the address screen, the default is important as this is the entry that is copied into the logistics documents (sales orders, purchase orders etc) and subsequently used for transmission (assuming an output condition record has been maintained to support Fax/Email), the default can be manually changed in the logistics documents (but typically this is something that is only done on an occasional basis). When adding an entry for finance reasons the default for any existing entry should not be changed as this would have a potential impact for logistics (this is no doubt already clear to the person/group that maintains address data given that multiple entries already exist). If the Email address or Fax number is the same for both logistics and finance then a separate entry is nevertheless required and the “notes field” for the finance entry should contain a description containing at least the word “FIPAYADV” in capital letters in order that the payment advice BTE (business transaction event) can identify the entry as being relevant for “Payment Advice” and select and use it accordingly.

Note 3: It is assumed that a fax cover sheet is not required for the fax option.

Note 4: It is assumed that the standard SAP Email description of the file meets requirements, this format is “Payment advice note from XX.XX.XXXX” where XX.XX.XXXX is the date upon which the payment advice is sent.

Note 5: The basis team will need to be informed of all users ID that execute F110 or F111 and they will need to be provided with their respective Email address in order that the data is maintained under transaction SU3. The SU3 Email address is used as the sender address, should the SU3 entry not be maintained then SAP will generate and use an Email address for the sender which will be in the following format Adrian Foster (AFOX06@dbciWES.wartsila.com) where user executing F110 or F111 was AFOX06.

Note 6: This CIP deals with method of transmissions and not whether a payment advice note should be output or not. If there are requirements to limit the issuing of payment advices notes for certain payment methods (J, 7 etc) and/or company codes these should be limited via the RFFO* variants or alternatively not limited but instead output to a dummy printer or dummy Email address.

Former Member
0 Kudos
258

HI,

And also..

6Design

6.1 Create Function module:

Copy function module SAMPLE_PROCESS_00002040 and save as ZFI_PAYMENTADVICE. Change Function group to ZFIPAYM00.

6.2 Create a new customer product (BTE)

Via transaction FIBF (Business transaction events) select the following menu path:

Settings – Products – of a customer.

Insert the following entry:

Product Text RFC destination Active

ZFIPAYAD Outgoing payments - payment advice X

6.3 Assign function module in configuration

Via transaction FIBF (Business transaction events) select the following menu path:

Settings – Processing Modules – of a customer.

Insert the following entry:

Process Ctr Appl. Function Module Product

00002040 ZFI_PAYMENTADVICE ZFIPAYAD

6.4 Program function module ZFI_PAYMENTADVICE.

The sample function module SAMPLE_PROCESS_00002040 provides an excellent framework for developing the required code. The basic approach in the sample needs to be maintained and only minor changes are required, this approach being:

a) First Email is attempted, if no Email address is found then try fax

b) Secondly fax is attempted, if no fax number is found then print

c) If Email and fax are not possible then the payment advice is printed.

The sample function module code takes the first email number (this is achieved in the sample code via statement “READ TABLE l_addr1_complete-adsmtp_tab INTO l_adsmtp_line INDEX 1” *where INDEX 1 is the first entry) and the fax number from internal table entry i_reguh-ztlfx.

The code needs to be modified such that the email number (c_finaa-intad) is populated from the address screen of the vendor or customer where the field “Notes Field” contains characters “FIPAYADV” (in capital letters) any where in the string, e.g. “FIPAYADV Joe Bloggs”, “Joe Bloggs “FIPAYADV” or “Joe “FIPAYADV” Bloggs”. This code should be straight forward given that table “l_addr1_complete” is available and contains all Email addresses (component ADSMTP_TAB, field ADSMTP-SMTP_ADDR) and the related ”notes field” text (Component ADSMTP_TAB, field ADSMTP-REMARK).

The code needs to be modified such that the fax number (c_finaa-tdtelenum) and fax country (c_finaa-tdteleland) are taken from the address screen of the vendor or customer where the field “Notes Field” contains characters “FIPAYADV” (in capital letters) any where in the string, e.g. “FIPAYADV Joe Bloggs”, “Joe Bloggs “FIPAYADV” or “Joe “FIPAYADV” Bloggs”. This code should be straight forward given that table “l_addr1_complete” is available and contains all fax numbers and fax countries (component ADFAX_TAB, fields ADFAX-FAX_NUMBER and ADFAX-COUNTRY) and also the related ”notes field” text (Component ADFAX_TAB, field ADFAX-REMARK). Note: As a fax cover sheet is not required code “c_finaa-formc = 'FI_FAX_COVER_A4'.” should be commented out.

.