on 09-16-2010 2:59 PM
Hi Expert,
I have messy code problem while translating XString to String in XML-Format Word Doc in OfficeControl.
I upload an XML-Format template Word Doc to server as a MIME Object.
When OfficeControl is started in Web Dynpro, OfficeControl automatically open the XML-Format template.
For the first time, I get the XString-type Context attribute bind to the content of the Word Doc,
then translate it to string, I got the XML-format content, it's great!
However, after the first time, when I input any new contents in MS Word in Web Dynpro,
no matter I execute "Ctrl + S" or click the "savedocument" button,
when I translate the XString Context attribute to String, I got messy code. (but the first time, it is good plain text)
I use the function module: ECATT_CONV_XSTRING_TO_STRING (good for first time, dump after first time),
SCMS_XSTRING_TO_BINARY, SCMS_BINARY_TO_STRING (good for first time, messy code after first time).
My Demo source code is in: (system) SMV --> (local object) zhaode --> (Dynpro Component) ztest_office_control
core source code is as:
clear itab.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = lv_datas
IMPORTING
OUTPUT_LENGTH = lv_length
TABLES
binary_tab = itab.
CALL FUNCTION 'SCMS_BINARY_TO_STRING'
EXPORTING
input_length = lv_length
mimetype = 'text/plain; charset=utf-8'
IMPORTING
text_buffer = lv_datas_string
output_length = lv_data_len
TABLES
binary_tab = itab.
Can you give me some advice?
Many thanks in advance.
Best Regards,
You have already posted this same question several times (and some very similiar questions) within the forum. Please do NOT multiple post your questions. This is against the forum rules of engagement. SAP employee or not, you will find yourself banned from the forums if you don't follow the rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.