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

Printing PDF documents stored in Application Server

Former Member
0 Likes
2,058

Hi,

Can any one guide me in printing the PDF Document stored in Application Server (AL11) to the printer connected to SAP.

Thanks,

Vamsee

Hi,

Can any one guide me in printing the PDF Document stored in Application Server (AL11) to the printer connected to SAP.

Thanks,

Vamsee

3 REPLIES 3
Read only

Former Member
0 Likes
953

Hi,

Before creating PDF file, you should transfer internal table data to Application server using "DATASET".

REPORT ZKUN_DEL1 .

data : begin of warea ,

a type i,

b type c,

m type i,

end of warea.

Data : j type i.

Data itab like table of warea with header line.

j = 5 .

while j > 0.

itab-a = itab-a + 1.

itab-b = 'b'.

itab-m = itab-m + 1.

append itab.

j = j - 1.

endwhile.

OPEN DATASET dsn FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

" opens a file for writing; if the file is not thr in the working direct

"ory it will create one with the same name.

LOOP AT itab.

concatenate itab-fname itab-lname itab-place into rec separated by space

.

TRANSFER rec TO dsn.

rec = ''.

ENDLOOP.

CLOSE DATASET dsn.

rec = ''.

OPEN DATASET dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT.

" opens the file for reading only.

*READ DATASET dsn INTO rec.

IF sy-subrc = 0.

message i005(zmsg_kunal).

ENDIF.

*write rec.

*

WHILE sy-subrc = 0.

WRITE / rec. READ DATASET dsn INTO rec.

ENDWHILE.

  • EXIT.

CLOSE DATASET dsn.

Ram.

Read only

0 Likes
953

Hi ,

Thanks for the reply. I am not converting internal table to PDF. I have an PDF in Application Server (AL11) . I want to print that document. I am able to get the data into my program using open dataset for input in binary MODE. But How to print that data to a printer.

Thanks,

Vamsee

Read only

0 Likes
953

To print PDF to a SAP printer is not directly possible but to a frontend printer will be. See [Print PDF file directly to store printer|].

Regards Jack