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

Send OLE2_OBJECT to spool

Former Member
0 Likes
1,600

Hi,

I'm generating a Word document with an OLE2_OBJECT, but I want to print it to the spool instead of download it and then manage the spool order. How can I do this?

Thanks in advance,

Jordi

Hi,

I'm generating a Word document with an OLE2_OBJECT, but I want to print it to the spool instead of download it and then manage the spool order. How can I do this?

Thanks in advance,

Jordi

5 REPLIES 5
Read only

Former Member
0 Likes
1,096

i dont think so it is possible

its better write your output to list

and from there you can keep a buttons to cal ole2_object

while writting to list

use this

NEW-PAGE PRINT ON,

to print

Thanks and Regards

S.Janagar

Read only

0 Likes
1,096

i dont think so it is possible

its better write your output to list

and from there you can keep a buttons to cal ole2_object

while writting to list

use this

NEW-PAGE PRINT ON,

to print

I can't write the document. I need to generate an SPOOL order with the document to generate a PDF and send the binary content to an RFC function.

Regards,

Jordi

Read only

Former Member
0 Likes
1,096

There are any FM or something to retrieve all the available methods of an OLE2_OBJECT? Or any documentation?

Regards,

Jordi

Read only

0 Likes
1,096

Word OLE2 commands are the same as the ones you'll find in Word VBA: record a macro of what you want, then read the generated VBA code (ALT+F11), and convert it manually into OLE2 commands, refer to this thread for example: .

In the VBA editor, there is also the object browser (F2) to see all available properties and methods.

To generate the Word document into a spool (so I think you'd like to print it), I think it is impossible mission, as SAP doesn't convert document formats. SAP only accepts spools with these formats:

- ABAP list or OTF format: the only formats for which SAP provides the drivers for main printer languages,

- or directly in the printer languages (PS, PCL, etc.). But they can then only be printed on printers understanding this only language.

My recommendation is to not use spools. Install a Windows server with Word installed, which will be able to print directly Word documents to printers (I think Windows has all printer drivers). Or use an Output Management System (Dazel, Streamserve, ...) which should be able to handle your requirements.

Otherwise, there would be a huge amount of work: you could try to save the document as RTF (using OLE2), then convert it to ITF via CONVERT_TEXT (but I'm not optimistic about the results), and include this ITF (it's like a standard text) into a SAPscript or Smart Form.

Read only

purush_r
Explorer
0 Likes
1,096

Hi Jordi,

Did you found a solution for this. I too have a similar requirement. I am generating a word document using OLE and Saving it in c drive. Now i want to send this word document to Spool.

My word document has images too. Any inputs from your past experience will be so helpful for me.

I tried converting it into an binary file using GUI_UPLOAD and then tried passing the internal table to SAP spool using RSPO_OPEN_SPOOL and  RSPO_TCP_WRITE_BINARY. Then used  CONVERT_ABAPSPOOLJOB_2_PDF my program is executing fine but in the spool number of pages is '0', not sure what I am missing.

Thanks.

Purush.