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

Calling Binary File thru Function Module

Former Member
0 Likes
645

Hi Experts,

I have created a function module to store a binary file.

This binary file I have to send it to the user .

I have used a funcion module 'SO_NEW_DOCUMENT_ATT_SEND_API1'

which consists of

1. Adobe layout.

2. Multiple attachments taken via custom function module.

When I call this fm in customized report...

While debugging it shows me the exact data in binary format...

Even in SOST it shows multiple attachments....

but while opening the file...it opens in encoded format....

does it requires some conversion?

Regards,

Vijaya B.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
558

passing attachments to SO_NEW_DOCUMENT_ATT_SEND_API1 is rather complex, and often leads to errors. So it may be your case here. Note that we should now use CL_DOCUMENT_BCS class instead of this FM, you'll make less errors. There is an example in sap library.

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
0 Likes
559

passing attachments to SO_NEW_DOCUMENT_ATT_SEND_API1 is rather complex, and often leads to errors. So it may be your case here. Note that we should now use CL_DOCUMENT_BCS class instead of this FM, you'll make less errors. There is an example in sap library.

Read only

0 Likes
558

Yes,

Freinds I have solved the problem.

I have called the inbuild fm into customized program itself...and looped the internal table to get the binary data.....

While call the function module so_new_document_att_send_api1....before that data gets stored in Objpack...

where its very much essential to maintain head_start and body_start....for effective multiple attachments....

Now i can see that everything is working fine....

Thanks a lot for your replies...

Regards,

Vijaya B.

Read only

Former Member
0 Likes
558

have called the inbuild fm into customized program itself...and looped the internal table to get the binary data.....

While call the function module so_new_document_att_send_api1....before that data gets stored in Objpack...

where its very much essential to maintain head_start and body_start....for effective multiple attachments....

Now i can see that everything is working fine....