cancel
Showing results for 
Search instead for 
Did you mean: 

Sending attached files with invoice email

TMNielsen
Contributor
0 Kudos

Hi

We have an invoice output type configured to send invoice as email. This is almost SAP standard setup.

Users sometimes uploads documents to the invoice via the "Services for object" button in the invoice. This can be excel, word or pdf documents.

Is it possible to attach these documents to the same email as the one containing the actual invoice.

Best regards

Thomas Madsen Nielsen

Accepted Solutions (1)

Accepted Solutions (1)

andrs_sarcevic
Contributor
0 Kudos

Here you go... In this example I'm retrieving a Private Note attached to a Functional Location:

  • Accessing notes, private notes, files, etc. attached to objects. FLoc example:


Table SRGBTBREL:

->RELTYPE = PNOT              
->INSTID_A = ?0100000000000001246
->TYPEID_A = BUS0010
<-INSTID B = USER001     FOL18          4 RAW34000000001261

Table SOOD:

OBJTP = RAW          
OBJYR = 34           
OBJNO = 000000001261

FM SO_OBJECT_GET_CONTENT:

OBJTP = RAW          
OBJYR = 34           
OBJNO = 000000001261

I guess from here you can make your way in sending the attachment via e-mail.

Cheers,

Andres.

TMNielsen
Contributor
0 Kudos

Hi Andrés

Thanks for your reply. It is really valuable, but this solution requires that I take control of the emailing of the invoice it self - by getting OTF data from the output and converting it to email and then send it - but today this is handle by SAP standard program.

I was hoping for a easier solution, but I guess I can't be lucky always.

Best regards

Thomas Madsen Nielsen

andrs_sarcevic
Contributor
0 Kudos

Thomas,

Isn't it possible that you can find an Exit within the Standard program that sends the invoices? If yes, perhaps you can add that code and attach the document along with the e-mail created by the standard program.

Cheers,

Andres.

Answers (1)

Answers (1)

andrs_sarcevic
Contributor
0 Kudos

I think it is possible.

You'll need to access those attached documents. I can't remember the FM's now, but I know I have those names somewhere... I'll look for them and get back to you.

After you reach the attached objects, getting them into the e-mail should be easy enough.

Cheers,

Andres.