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

coversion problem

Former Member
0 Likes
595

Hi All,

I am uploading documents and storing that in a database table as <b>Xstring</b>.

Now I have to convert that <b>to string</b>.

I am using a function module <b>'ECATT_CONV_XSTRING_TO_STRING'</b> . It works fine if the documet uploaded is type '.txt', but if I upload a '.doc' file and then use this FM , it gives conversion error.

Can anybody help?

Thanks in advance,

Pragya

3 REPLIES 3
Read only

Former Member
0 Likes
517

Hi

here is the code I am using

CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'

EXPORTING

IM_XSTRING = XCONTENTS

IMPORTING

EX_STRING = CONTENTS.

Here I am not exporting encoding type. So, it takes 'UTF-8' by default.

What type should I use so as to make it work for '.doc ' files?

Regards,

Pragya

Read only

0 Likes
517

which version are u using

i dont see that FM in 4.7

chk this webblogs where the FM was used

/people/alessandro.guarneri/blog/2006/03/05/managing-bulky-flat-messages-with-sap-xi-tunneling-once-again--updated

/people/sravya.talanki2/blog/2005/12/21/convert-any-r3-structure-to-xsd-made-easy-was-60

Read only

Former Member
0 Likes
517

Hi

I am using 4.6

Regards,

Pragya