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: 

Transferring byte Stream to SAP RFC from .NET to create attachments

Former Member
0 Kudos

Hi,

We are trying to pass a byte stream from a .NET screen to a RFC, the strucuture we intend to pass this data is to SDOKCNTBIN.

We have tried to perform some logic on the byte stream to convert into 1022 and padded it with zeroes when the byte stream ends.

Earlier we had a problem of Marshalling data to the RFC_BYTE, however when we converted to 1022 format we didnt face the problem, <b>currently the file is being created but we are unable to open the excel/pdf file which is being created as an attachment to an opportunity or business partner.</b>

Any information on details of different approaches to transfer the data or any advise on the issue of saving the attachment to an opportunity/BP is greatly appreiciated.

Thanks

1 REPLY 1

Former Member
0 Kudos

Hi,

> we didnt face the problem, currently the file is

> being created but we are unable to open the excel/pdf

> file which is being created as an attachment to an

> opportunity or business partner.

You you compare the original file with the uploaded file with

tools like COMP, WINDIFF, .. ? What is the difference ?

> Any information on details of different approaches to

> transfer the data or any advise on the issue of

> saving the attachment to an opportunity/BP is greatly

> appreiciated.

Do you use a second parameter to pass the length of byte stream

like FILE_SIZE LIKE SDOKFILACS-FILE_SIZE?

You can not cut off the file at first zero in byte stream and

not delete zeros from beginning from end.

If you system if 4.70 and greater, you can use functions modules from

group SCMS_CONV to convert between string, xstring, text, raw.

/Tibor