04-13-2011 12:54 PM
Hi Gurus,
In my requirement for sending an Email for payment advice, I am using BTE 2040 to complete this req. I need to get the email
address of the vendor from XK02 / FK02 transaction.
So I have created a FM of ZSAMPLE_PROCESS_00002040. Please let me know how to retrieve the email address of the vendor from the transaction inorder to proceed with sending the email.
The fields shown in the transaction are of type structure.
Thanks,
Gopi Gs.
04-13-2011 3:19 PM
Use one of the address functions such as ADDR_GET_COMPLETE for the address number in I_REGUH-ZADNR.
* Read complete address of vendor/customer
CALL FUNCTION 'ADDR_GET_COMPLETE'
EXPORTING
ADDRNUMBER = I_REGUH-ZADNR
IMPORTING
ADDR1_COMPLETE = LS_ADDR1_COMPLETE
EXCEPTIONS
OTHERS = 4.
P.S. You might want to change the name of that function, i.e., take 'SAMPLE' out and give it a meaningful name.
04-13-2011 3:20 PM
get your ADRNR value from table LFA1, the look up SMTP ADDR in table ADR6 by addressnumber.