cancel
Showing results for 
Search instead for 
Did you mean: 

Open the Word Document

Former Member
0 Kudos

Hi All,

I have a table, in which I have a link. On click of the link I have to convert XSTRING into Word doc.

Please help me on this.

With Regards,

Manu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

good

check this

if u want to download pdf which is in xstring format to u r local system

u can try the following code.

data: data_tab type table of x255.

call function 'SCMS_XSTRING_TO_BINARY'

exporting

buffer = XString data

tables

binary_tab = data_tab.

cl_gui_frontend_services=>gui_download(

exporting

filename = filename

filetype = 'BIN'

changing

data_tab = data_tab ).

cl_gui_frontend_services=>execute(

exporting

document = filename ).

thanks

mrutyun^

Former Member
0 Kudos

Hi

Thanks for your reply, but I have to open the word document. If you can help me in this that would be great.

With Regards,

Manu

Madhu2004
Active Contributor
0 Kudos

Hi,

use this method and it opens a word using the xstring data

cl_wd_runtime_services=>attach_file_to_response(

i_filename = lv_file_name

i_content = i_content----


is xstring

i_mime_type ='application/msword'

i_in_new_window = abap_false

i_inplace = abap_false ).

Madhu

Former Member
0 Kudos

Hi Madhu,

Thanks for the reply. It solved my problem. Just one more question, if I have to open an Image then what should be the value of I_MIME_TYPE?

Thanks in Advance,

Manu

Answers (0)