Application Development and Automation 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: 
Read only

Question SO_ATTACHMENT_INSERT

Former Member
0 Likes
2,185

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
Read only

Sandra_Rossi
Active Contributor
1,561

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
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,561

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

Read only

Former Member
1,561

Hello Sandra,

It is a PDF file.

Thank you.

Read only

Sandra_Rossi
Active Contributor
1,562

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.

Read only

0 Likes
1,561

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!

Read only

pokrakam
Active Contributor
1,561

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.