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

ABAP Spool to Printer

Former Member
0 Likes
3,012

I am reading a spool and converting it to PDF and saving it in application server.

I also want to print this PDF at the physical printer.

This will all be in background job.

Any help?

Any expert pointers would be greatly helpful.    

I am reading a spool and converting it to PDF and saving it in application server.

I also want to print this PDF at the physical printer.

This will all be in background job.

Any help?

Any expert pointers would be greatly helpful.    

11 REPLIES 11
Read only

Former Member
0 Likes
2,894

Hi Pranu,

If you are using SAP Scripts, you can print the form directly by passing input parameter for OPEN_FORM , DIALOG = '  '. This option will not popup for print preview screen and ITCPO-TDIMMED='X' to print form immediately.

Schedule your report\driver program for background job in SM37, if you are not using NACE.

Regards,

Mahidhar.

Read only

0 Likes
2,894

This is smartform.

In FICA,the bulk invoicing is done and the spools are created using the background jobs.

I need to print these spools to PDF (this is achieved) and also print it to physical printer.

Thanks    

Read only

0 Likes
2,894

Pranu,

Is this a requirement to specifically print PDF or could you print the spool request itself? If yes, try to use FM RSPO_OUTPUT_SPOOL_REQUEST.

Regards,

Edgar

Read only

0 Likes
2,894

Either way... Either print the PDF or the spool.

I need to paper print te Invoice.

Thanks. Will try the FM.         

Read only

0 Likes
2,894

Easier then.

If you know spool number is advance I guess you won't have issues:

DATA:  PRN LIKE TSP03-PADEST VALUE ‘LOCL’,

              SPOOL_NUMBER LIKE TSP01-RQIDENT.

CALL FUNCTION ‘RSPO_OUTPUT_SPOOL_REQUEST’

     EXPORTING

          DEVICE = PRN

          SPOOL_REQUEST_ID = SPOOL_NUMBER

     EXCEPTIONS

          OTHERS = 1.

Read only

0 Likes
2,894

Edgar,

I tried RSPO_OUTPUT_SPOOL_REQUEST.

This however pops up the window asking for printer selection.

This will not work in background which is my requirement.

Thanks.

I will research more but if you have a quick link on the top of your head, it wud be great to know.    

Read only

0 Likes
2,893

Pranu,

Just did a quick test and it didn't pop up, did you proper fill output device name?

I filled parameters as following:

And got output requests:

Edgar

Read only

0 Likes
2,891

Here are my inputs.

I have 4 printers installed but LOCL is pointing to the default printer.

Read only

0 Likes
2,891

While using LOCL, It is popping up.

If I useother configured printers like ZPDF or LP01, it des no popup.

I will see in the office tomorrow if it actually prints if I use LP01.

Thanks again.

You gave really nice pointers.

Will update all tomorrow.    

Read only

Former Member
0 Likes
2,891

Hi Pranu,

"print this PDF at the physical printer"

 

   Check your Output Device Settings(i.e. in your case LOCL) using SPAD T-code .

1 : Device Attributes tab ,Device type  :  ?     (Printer name like HP5100 : HP LaserJet 5100  )

2 : Access Method tab , Host printer path : ?  (Printer path )

Note : Check your device type may be the same device is default printer in your system.

Regard's

Smruti        


    

Read only

former_member491621
Contributor
0 Likes
2,891

Hi Pranu,

You can check the below link

http://help.sap.com/abapdocu_70/en/ABAPNEW-PAGE_PRINT.htm