2008 Jul 19 10:47 AM
hi,
requirement is that when remittance memo is created using f-58 then i want that payment advice to be send to the vendor mail id.....
how can this be done......do BTE 2040 will be used for this...can any body explain in detail.
2008 Jul 22 8:00 AM
Hi,
Yes, BTE 2040 could be used for your requirements. Below are the steps:
1. Go to FIBF
2. Choose menu Settings-Identification-Partner then create a partner
3. Choose menu Settings-Products-of a partner-Edit, create a product
4. Choose menu Settings-Products-of a partner-Activate, list the product created here so it is recognized as active product
5. Choose menu Settings-P/S Function Modules-of a partner
6. List event 00002040 with the partner and product created above. Specify the custom FM for event 2040 here.
7. Go to SE37
8. You can use sample FM SAMPLE_PROCESS_00002040 as the basis. Below is the sample code for custom FM.
FUNCTION ZFM_PAYMENT_REMITTANCE_2040.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_REGUH) LIKE REGUH STRUCTURE REGUH
*" TABLES
*" T_FIMSG STRUCTURE FIMSG
*" CHANGING
*" VALUE(C_FINAA) LIKE FINAA STRUCTURE FINAA
*"----------------------------------------------------------------------
* data declaration for address routines
TYPE-POOLS szadr.
DATA: l_addr1_complete TYPE szadr_addr1_complete,
l_adsmtp_line TYPE szadr_adsmtp_line.
* 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/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
* READ TABLE l_addr1_complete-adsmtp_tab INTO l_adsmtp_line INDEX 1. "Delete ECDK900445
READ TABLE l_addr1_complete-adsmtp_tab "Insert ECDK900445
INTO l_adsmtp_line "Insert ECDK900445
WITH KEY adsmtp-flgdefault = 'X'. "Insert ECDK900445
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.
ENDIF.
ENDIF.
ENDIF.
* if email was not possible: try fax (message type 2)
*Delete Begin ECDK900445
* IF c_finaa-nacha NE 'I'.
* IF NOT i_reguh-ztlfx IS INITIAL.
* c_finaa-nacha = '2'. "Fax
* c_finaa-tdschedule = 'IMM'. "Sofort
* c_finaa-tdteleland = i_reguh-zland. "Land der Faxnummer
* c_finaa-tdtelenum = i_reguh-ztlfx. "Faxnummer
* c_finaa-formc = 'FI_FAX_COVER_A4'. "SAPscript Deckblatt
* ENDIF.
* ENDIF.
*Delete End ECDK900445
ENDFUNCTION.
You could also use event 2050 for change the email subject.
Below is the sampe code.
FUNCTION ZFM_PAYMENT_REMITTANCE_2050.
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_REGUH) LIKE REGUH STRUCTURE REGUH
*" VALUE(I_GJAHR) LIKE REGUD-GJAHR
*" VALUE(I_NACHA) LIKE FINAA-NACHA
*" VALUE(I_AFORN) LIKE T042B-AFORN
*" CHANGING
*" VALUE(C_ITCPO) LIKE ITCPO STRUCTURE ITCPO
*" VALUE(C_ARCHIVE_INDEX) LIKE TOA_DARA STRUCTURE TOA_DARA
*" DEFAULT SPACE
*" VALUE(C_ARCHIVE_PARAMS) LIKE ARC_PARAMS STRUCTURE ARC_PARAMS
*" DEFAULT SPACE
*"--------------------------------------------------------------------
DATA: l_tdtitle LIKE itcpo-tdtitle,
txt_zeile(132) TYPE C.
l_tdtitle = text-001.
WRITE i_reguh-zaldt TO txt_zeile DD/MM/YYYY.
REPLACE '&' WITH txt_zeile INTO l_tdtitle.
c_itcpo-tdtitle = l_tdtitle.
ENDFUNCTION.
Regards,
Teddy
2008 Jul 22 11:12 AM
hi teddy,
but i think the bte 2040 & 2050 are for automatic payment transactions (F110) and not for f-58 (manual payment)
...........if i am wrong then do correct me...
thanks for the help so far....
2010 Aug 30 12:26 PM
Hi shailendra,
i have the same requirement as yours. need to send the remittance advice through email using f-58.
please tell me how did you solve it.
thanks in advance.
2010 Nov 04 8:56 PM
How to check whether the remittance to the vendor has been sent . And pls advice me how to send remittance for particular vendor.
Thanks,
Kishore
2010 Nov 04 10:55 PM
Hi,
Basically for remitance advice you have to configure in FBZP transaction where you will tell this is your driver and this is your remittance form. Then throught that you can email it.
Nabheet
2011 May 12 9:06 PM
This is an old thread but it comes up as one of the first links on the subject in Google search, so I thought I'd update it.
No disrespect to Teddy, but the steps above are a bit off. It is not required to create the partner. Instead we can start with creating a product "of a customer" (not partner). And instead of P/S Modules, the menu 'Settings -> Process Modules -> of a customer' needs to be used.
Relevant OSS notes are: 521587, 836169, 1033893. There are also more threads on SDN, which may be found by searching. I recommend using Google with 'site:sap.com' addition to your search keywords.
Good luck!