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: 

Retrieving email address value from XK02 / FK02 transaction

Former Member
0 Kudos

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.

2 REPLIES 2

brad_bohn
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

get your ADRNR value from table LFA1, the look up SMTP ADDR in table ADR6 by addressnumber.