cancel
Showing results for 
Search instead for 
Did you mean: 

Sending smartform through email

Former Member
0 Kudos

Hi,

I have to send a smartform o/p through email as PDF attachment.The logic to send the mail is working fine.But,I want to send the mail to the recipient whose mail id is present in VD03 transaction.Can anyone help me how to find the recipient mail id present in VD03 transaction and use it in the program?

Regards,

Hema

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Field SMTP_ADDR from table ADR6 should be used

Regards,

Nageswar

Former Member
0 Kudos

Hi ,

Get the customer nr from kna1 table,then select the adress based on the customer number fro mkna1 table ,later take the smtp_adrnr from adr6 table based on the above adress it will surely work.copy and paste the below code it will work,if not let me know.

data: l_kunnr type kna1-kunnr.

data: l_kunnr1 type vbak-kunnr.

data: l_email type soli-line.

data: l_email1 type soli-line.

data: l_adrnr like kna1-adrnr.

select single kunnr from kna1 into l_kunnr1

where ADRNR = kna1-adrnr.

select single adrnr from kna1 into l_adrnr

where kunnr = l_kunnr1.

check sy-subrc is initial.

select single smtp_addr from adr6 into l_email

where addrnumber = l_adrnr.

x_receivers-recextnam = l_email.

reward if usefull

MNGowda

Former Member
0 Kudos

Hi,

To fetch the email id you can use the field SMTP_ADDR from table ADR6.

Regards.