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: 

Question SO_ATTACHMENT_INSERT

Former Member
0 Kudos

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 !

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

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.

5 REPLIES 5

Sandra_Rossi
Active Contributor
0 Kudos

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

Former Member

Hello Sandra,

It is a PDF file.

Thank you.

Sandra_Rossi
Active Contributor

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.

0 Kudos

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!

pokrakam
Active Contributor

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.