Skip to Content
0

Question SO_ATTACHMENT_INSERT

Feb 02 at 09:03 PM

66

avatar image

Hello all,

I have a question regarding the e-mail attachment..I have a requirement to add another attachment (Terms and Conditions) to an E-mail that already contains an PDF (Smartform).

The new attachment is an existing file from application server- so I use OPEN DATASET IN BINARY MODE - and the output is an SOLIX_TAB internal table..my question is how do I convert this format to an OTF format , so that I will be able to use SO_ATTACHEMENT_INSERT( this is the FM used to attach first PDF ) - to attach second attachment to the existing e-mail? Can someone provide an example of OPEN DATASET used with SO_ATTACHEMENT_INSERT ?

Thank you !

10 |10000 characters needed characters left characters exceeded

What is the format of the "file from application server"?

0

Hello Sandra,

It is a PDF file.

Thank you.

1
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sandra Rossi Feb 02 at 10:30 PM
1

SO_ATTACHMENT_INSERT also works with PDF (and any other format). You don't need to convert it into OTF (it's impossible anyway).

You'd better call SO_ATTACHMENT_INSERT_API1 to pass directly your internal table of type SOLIX_TAB, containing the PDF, to the parameter CONTENTS_HEX.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello,

Indeed, SO_ATTACHMENT_INSERT worked for me :

1. I used SO_SOLIXTAB_TO_SOLITAB to pass from type solix to soli;

2.I passed the content of my internat table (type soli ) + attach_type = 'BIN' as parameter.

Thank you both for your time!

0
Mike Pokraka Feb 03 at 05:45 PM
2

SO_* function modules are pretty ancient, CL_BCS* classes are a bit more friendly to work with and there are plenty of examples here and in the system.

Share
10 |10000 characters needed characters left characters exceeded