cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript: Sending mail from Sapscript in 4.7

Former Member
0 Kudos

Hi all,

I would like to know how I can send a sapscript layout output to e-mail address. <b>I am looking for a sample code</b>. I saw sample code for 4.6, which is not running in 4.7 as there are changes in FM SX_OBJECT_CONVERT_OTF_PDF parameters.

After searching this forum, I come to know, I need to do the following things in order

1)convert OTF to PDF

2) Send that PDF as attachment

Please help me by posting sample code.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Vipin,

I know you are looking for sample code, but <b>you don't need to code at all!!!</b>

All you need to do is set your output transmission medium (NAST-NACHA, this needs to be first configured by a functional savvy person and then set up in master data) to 5. Also make sure that your business partner (if in SD/MM) or other entity has an email address set up. Also make sure that the SAP username which is issuing the output has an email address set up (check su01d).

Then you need to set up the appropriate configuration in SAPConnect (transaction SCOT) to automatically convert your SAPscript to PDF (it calls the function module you specified, no need to code it yourself!).

I could talk your through in detail all these steps but it would take many pages. Can I suggest you go to the documentation of both the functional side and the SAPconnect side and then come back if you have specific questions (as appropriate for functional side and for SAPconnect http://help.sap.com/saphelp_47x200/helpdata/en/2b/d925bf4b8a11d1894c0000e8323c4f/frameset.htm).

Please don't code a solution for this because its not neccessary.

Cheers,

Brad

Former Member
0 Kudos

Thank you Brad for your reply.

I am ABAP technical person. I am working for Customer Statement layout where print program name is RFKORK00.

I have run the RFKORK00 in debug mode and change the field for FINAA-NACHA to ‘I’ in debug mode, I am able to send e-mail after this. Now, Question is how to bring customer entry in NAST table and make NACHA to I or 5.

I have seen SCOT Transaction and the required settings have been maintained. Please, tell me where I can maintain the NAST-NACHA entries for a specific customer. Customer entries are not appearing in NAST table.

I can mention customer e-mail address in XD02. If you feel that the content of your reply to too large, then mail me at vipin.nagpal@gmail.com

Thank you.

Message was edited by: Vipin Nagpal

Message was edited by: Vipin Nagpal

Former Member
0 Kudos

Got a user Exit: RFKORIEX , let me find ,if this can help me.

Former Member
0 Kudos

Hi Vipin,

Just been checking out the code. Seems that FI is not so friendly as SD (no surprise there).

As you are probably aware by now, the customer statements program only allows values of 1,2, or I for NACHA.

The userexit you found should allow you to manipulate NACHA value, but if you set it to 'I' does it flow through correctly to SAPConnect? You say that you can send an email, but does it come with the PDF attachment?

Looking at the config. options in FI (and FI master data), there doesn't seem an obvious way to control the NACHA value, so I think some sort of Z table which is read in your userexit to automatically assign the correct value would be the go (no doubt by the time I write this you have already done it).

If you still have problems let me know.

Cheers,

Brad

Former Member
0 Kudos

I just endup with creating Custom Print Prog. so that i can send a e-mail to customer statement.

Custom Print prog. has increased effort on my side and for support team too. But it is never a good idea to create a custom Print Prog.

Now, i start working on EFT Remittance Advice, Tcode F110 is a print prog. Same thing, i need to send Remittance advice to Vendor e-mail address, wondering that If i need to create a custom prog. If you have idea about this, then please let me know, otherwise my search will continue. Just found a FM SAMPLE_PROCESS_00002040, but don't know how to do IMG setting for this

Thanks again for all your valuable input.

Message was edited by: Vipin Nagpal

Former Member
0 Kudos

No problem,

Good luck with the EFT Remittance Advice. Not sure I can add any extra value to help with your search.

Cheers,

Brad

Former Member
0 Kudos

Hi all,

Just found a solution for sending Customer Statement to customer's e-mail. Just read the user exit RFKORIEX Documentation. No need to create Custom Print Prog.

Limitation to this solution is that you can not control the Message body of e-mail. This will remain blank always.

Enjoy !!!

Message was edited by: Vipin Nagpal

Message was edited by: Vipin Nagpal

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi VIPIN,

Pls help me in this..even i am facing the same issue here.

i need to send email to vendors thru sample_process_00002040.pls tell mehow shud i proceed.

can we do thru this FM or we have to modify the print program?even i have tos end fax also.pls send ur code so that i can solve the issue or tell me how to do.

i have to solve this urgently.

expecting ur reply immediately.

br,

anil

Former Member
0 Kudos

00002040 Autom. pmnt transactns: Output of pmnt advice note

Is BTE you can get more details using transaction FIBF.

The function module mentioned by you is sample function for this user-exit.

Former Member
0 Kudos

Thanks,

I did the IMG settings, I am able to send e-mail to Vendor address with pdf attachment, but there is no way to control the e-mail message body & Subject. Do you know how can i do this?

Thanks

Vipin

Former Member
0 Kudos

Vipin,

I am planning on setting up the process of emailing the EFT remittances to our vendors upon the payment run. could be give me details on the img settings and/any basis settings required.

TIA,

Lokesh

Former Member
0 Kudos

Lokesh,

We are just starting a request to e-mail remittances using BTE 00002040.

I found great documentation regarding BTE's at the following link:

http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc

The BTE 00002040 has some decent documentation, although I had to debug a little to figure everything out.

We are using 4.6c. Right now, I am having a little trouble finding where to store the vendor's e-mail address.

Anyway, hope this helps.

Regards,

Ryan