on 02-10-2016 5:18 PM
Hi Gurus,
I encounter this situation that I will try to describe.
The form used for the Payment Advice note, is a custom one launched by program RFFOAVIS_FPAYM, through F110 (automatic payment program)
I already know the possibility that my abaper should check the coding for Function Module 'SAMPLE_PROCESS_00002040' in tcode SE37, within the mentioned program, in order to implement the sending of the form via email. This idea I successfully found within this forum. Thanks
We still need to check from where this automatic email trigger to vendor, that is, where do I have to save the email address so that the payment advice program can get that email address and send the payment advice note. However, I suspect it is the field in Vendor General Data, within address Tag:
Can anybody confirm this to me?.
However, my particular issue with the email address is that my client already used that General field for the email sending of the Purchasing order form. Now, my client is adding a new company code to its SAP systems that needs to send as well the Payment advise note (something not used before) to a different email address, but the email recipient is already occupied for a different purpose, despite you can add more than one email address.
So my core question is: is it possible to save elsewhere ANOTHER email address, different from the one saved at General Data (perhaps at company code level or purchasing organisation level) so that the program RFFOAVIS_FPAYM could get that email and send the Financial form to the email address for the payment advise note? I mean, using standard implementation in Program RFFOAVIS_FPAYM...
Please give advice on how to handle this situation of 2 different emails: one email is already in place, and it is exactly the field at General data (Address), used for the sending of the PO form.
Where can we save a different email address so that the Payment Advice program can easily trigger it and send the financial form? At company level, at Purchase organisation level??
Many thanks in advance!
You can use the "Notes" field in the email address to control the utilization of an email-address.
For ex.
Email Notes
teddy.tester@mr.com PAYM <- receiver of the payment avis
tom.trial@mr.com PO <- receiver of the PO
Your Abaper should be able to adjust the involved programs to fetch the appropriate email address.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
We have already fetched an email address from the box containing emails at Vendor General data. RFFOAVIS_FPAYM already gets the email and sends the Payment Advice form
The problem my abaper has encountered and therefore stopshim, is that if there is another email address inside that box, simple 2040 gets all the emails and send the Payment advice to all of them, and he is unable to program (via simple 2040), to select which email should be ONLY selected from the box, in case there is more than one.
Please, is this possible? Maybe using the Note space? He doesn´t know what code to insert via sample 2040.
If it is possible, could you give some coding advice to this?
Kind regards,
Patxi
Using notes field to mark relevant email-addresses in master data and use code similar like that.
SELECT SINGLE adrnr INTO lv_adrnr FROM lifa
WHERE lifnr EQ i_reguh-lifnr.
IF sy-subrc EQ 0.
SELECT * FROM adrt INTO CORRESPONDING FIELDS OF TABLE lt_paymaddr
WHERE addrnumber = lv_adrnr
AND comm_type = 'INT'
AND remark = 'PAYM' "<-- Extract only marked email addresses!
AND date_from <= sy-datum
AND langu = sy-langu.
IF sy-subrc EQ 0.
LOOP AT lt_paymaddr INTO ls_paymaddr.
* get email adresses
SELECT SINGLE smtp_addr FROM adr6 INTO l_email1
WHERE addrnumber = ls_paymaddr-addrnumber
AND persnumber = ls_paymaddr-persnumber
AND date_from = ls_paymaddr-date_from
AND consnumber = ls_paymaddr-consnumber.
IF sy-subrc = 0.
CONCATENATE l_emails l_email1 INTO l_emails SEPARATED BY ' '.
IF l_emails(1) = ' '.
SHIFT l_emails LEFT DELETING LEADING ' '.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
Appreciate much your valuable hints indeed!
When you say:
SELECT SINGLE adnr INTO lv_adnr FROM lifa
What´s lifa? Shouldn´t it be lfa1?
So when you say....AND remark='PAYM', is because you are considering we are going to insert in nots the letters PAYM, don´t you?
And this is implemented inside famous sample 2040?
Do you want to add something else?
I will get back to my abaper.
Thanks a lot
Patxi Albisu wrote:
Appreciate much your valuable hints indeed!
When you say:
SELECT SINGLE adnr INTO lv_adnr FROM lifa
What´s lifa? Shouldn´t it be lfa1? <- You are right a typo correct LFA1
So when you say....AND remark='PAYM', is because you are considering we are going to insert in nots the letters PAYM, don´t you? <- Yes assumed you might use PAYM, but you can use any other marker.
And this is implemented inside famous sample 2040? <- Yes must be implemented in BTE 2040
Do you want to add something else? <- Provided coding is only a sample to give you an idea how to implement. It might be that adjustments are necessary for final solution. But your Abaper should be able to do.
I will get back to my abaper.
Thanks a lot
Please see my answers in blue colored.
Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, refer SAP note 1033983
You can also refer this link
http://www.saptechnical.com/Tutorials/ExitsBADIs/BTE/Index.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajay,
But if I use the Note field within the email region at General Data (address tag), I have to write the words within the Note field (ex. PAYM, PO...ETC.), so that my program can distinguish the correct email, because I cannot use any matchcode in the field.
Could it be possible to save the email in another place?
Hi
Yes you must SAVE the EMAIL in the Vendor Master..
May be you can enter both EMAIL addresses with a / as separator.. Then Code your BTE 2040 accordingly
Ajay M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajay,
My abaper is encountering problems while implementing SAMPLE 2040. Although we have copied the original FM onto a custom one, and have changed its paremeter from 1 to I, while executing payments through F110 system is not sending the Paym. Adv. form to the email saved at Vendor General data.
SOST tray does not generate any sending.....
We can only see the form at the spool site, same as always.
The link you gave me was very accurate in description, but still we haven´t made any progress. Form is still not being sent automatically when executing F110, only visible via spool.
Do we have to insert something special in the Variant used for the program RFFOAVIS_FPAYM?. Our variant is only containing company code and payment method. Just that....
Please, could help me? Or anyone else Reading our issue...
Thanks in advance
Hi Ajay,
My abaper has already connected the payment advice to be sent via email.
However, we have found it is impossible (at least via sample 2040), to get rid of an email address saved at Email General maintenance. Payment advice is ALWAYS sent to an email saved there, an another one you want.
Do you know if it possible to avoid the sending of the payment advice to an email saved there, because there is another place, another field where another email address has been saved?
Thanks in advance
User | Count |
---|---|
102 | |
14 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.