How to Print PDF in background from SAP directory
Hi,
My PDF file is there in SAP directory, I want to Print the PDF file without opening it . how can i Print in background mode.
Please help me ASAP.
thanks in advance
Hey,
i'm having a similar problem here: I want to print a PDF from KW_Storage in background. Any ideas?
Jens
Similar Messages
-
How to print PDF files directly from SAP?
We have created output that is being saved in a PDF format. We can store it on any drive or send it through email. However, we would like to be able to print a PDF file directIy without any manual intervention. Now users still have to open the file and hit the print button and we want to avoid this. So basically we want to be able to create e.g. a sales order, generate an order confirmation in PDF format and send it directly to the output device that we stored in output master data. I have a feeling it is not possible to print directly because output device has to be like a PDF1 to create the PDF file itself and there is no space left somewhere to store the physical output device. We use ECC 5.
kind regards
Angelique HeutinckYou can use this custom FM -:)
FUNCTION Z_PDF_DOWNLOAD.
*"*"Interfase local
*" IMPORTING
*" REFERENCE(FILENAME) TYPE STRING
SELECT RQIDENT
INTO (T_TSP01-RQIDENT)
FROM TSP01
WHERE RQOWNER EQ SY-UNAME
AND RQCLIENT EQ SY-MANDT.
APPEND T_TSP01.
ENDSELECT.
SORT T_TSP01 DESCENDING.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = T_TSP01-RQIDENT
NO_DIALOG = ''
IMPORTING
PDF_BYTECOUNT = NUMBYTES
PDF_SPOOLID = PDFSPOOLID
BTC_JOBNAME = JOBNAME
BTC_JOBCOUNT = JOBCOUNT
TABLES
PDF = PDF
EXCEPTIONS
ERR_NO_OTF_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DSTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12.
IF SY-SUBRC EQ 0.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = NUMBYTES
FILENAME = FILENAME
FILETYPE = 'BIN'
TABLES
DATA_TAB = PDF
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6.
IF SY-SUBRC EQ 0.
DELETE FROM TSP01 WHERE RQIDENT EQ T_TSP01-RQIDENT.
ENDIF.
ENDIF.
ENDFUNCTION.
Greetings,
Blag. -
How to print PDF file content from ABAP in background?
Hi,
Is it possible to print PDF file content from ABAP in background?
I have some PDF content which I need to print it, these PDF files are generated outside the SAP.
Please have you any suggestions?
Thank you
Tomas<b><u>Solution:</u></b><br>
<br>
The target output device must support PDF print, this is only one limitation.<br>
<br>
REPORT z_print_pdf.
TYPE-POOLS: abap, srmgs.
PARAMETERS: p_prnds LIKE tsp01-rqdest OBLIGATORY DEFAULT 'LOCL',
p_fname TYPE file_table-filename OBLIGATORY LOWER CASE,
p_ncopi TYPE rspocopies OBLIGATORY DEFAULT '1',
p_immed AS CHECKBOX.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
DATA: lv_rc TYPE i,
lv_filter TYPE string.
DATA: lt_files TYPE filetable.
FIELD-SYMBOLS: <fs_file> LIKE LINE OF lt_files.
CONCATENATE 'PDF (*.pdf)|*.pdf|' cl_gui_frontend_services=>filetype_all INTO lv_filter.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
file_filter = lv_filter
CHANGING
file_table = lt_files
rc = lv_rc
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0 AND lv_rc EQ 0.
MESSAGE 'Error' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
READ TABLE lt_files ASSIGNING <fs_file> INDEX 1.
IF sy-subrc EQ 0.
p_fname = <fs_file>-filename.
ENDIF.
AT SELECTION-SCREEN.
DATA: lv_name TYPE string,
lv_result TYPE boolean.
lv_name = p_fname.
CALL METHOD cl_gui_frontend_services=>file_exist
EXPORTING
file = lv_name
RECEIVING
result = lv_result
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
IF lv_result NE abap_true.
MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
START-OF-SELECTION.
END-OF-SELECTION.
PERFORM process.
FORM process.
DATA: lv_name TYPE string,
lv_size TYPE i,
lv_data TYPE xstring,
lv_retcode TYPE i.
DATA: lt_file TYPE srmgs_bin_content.
lv_name = p_fname.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lv_name
filetype = 'BIN'
IMPORTING
filelength = lv_size
CHANGING
data_tab = lt_file
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
MESSAGE 'Read file error!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = lv_size
IMPORTING
buffer = lv_data
TABLES
binary_tab = lt_file
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE 'Binary conversion error!' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
PERFORM print USING p_prnds lv_data CHANGING lv_retcode.
IF lv_retcode EQ 0.
WRITE: / 'Print OK' COLOR COL_POSITIVE.
ELSE.
WRITE: / 'Print ERROR' COLOR COL_NEGATIVE.
ENDIF.
ENDFORM. " PROCESS
FORM print USING iv_prndst TYPE rspopname
iv_content TYPE xstring
CHANGING ev_retcode TYPE i.
DATA: lv_handle TYPE sy-tabix,
lv_spoolid TYPE rspoid,
lv_partname TYPE adspart,
lv_globaldir TYPE text1024,
lv_dstfile TYPE text1024,
lv_filesize TYPE i,
lv_pages TYPE i.
CLEAR: ev_retcode.
CALL FUNCTION 'ADS_SR_OPEN'
EXPORTING
dest = iv_prndst
doctype = 'ADSP'
copies = p_ncopi
immediate_print = p_immed
auto_delete = 'X'
IMPORTING
handle = lv_handle
spoolid = lv_spoolid
partname = lv_partname
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CALL FUNCTION 'ADS_GET_PATH'
IMPORTING
ads_path = lv_globaldir.
CONCATENATE lv_globaldir '/' lv_partname '.pdf' INTO lv_dstfile.
OPEN DATASET lv_dstfile FOR OUTPUT IN BINARY MODE.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
TRANSFER iv_content TO lv_dstfile.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CLOSE DATASET lv_dstfile.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CALL FUNCTION 'ZBAP_RM_PDF_GET_PAGES'
EXPORTING
iv_content = iv_content
IMPORTING
ev_pages = lv_pages.
lv_filesize = XSTRLEN( iv_content ).
CALL FUNCTION 'ADS_SR_CONFIRM'
EXPORTING
handle = lv_handle
partname = lv_partname
size = lv_filesize
pages = lv_pages
no_pdf = ' '
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
CALL FUNCTION 'ADS_SR_CLOSE'
EXPORTING
handle = lv_handle
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
ev_retcode = 4.
RETURN.
ENDIF.
ENDFORM. " PRINT -
I want read PDF file from SAP directory and create a spool request or print
Hi all,
I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body help me in this.
Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
Thanks in advance,
SunnyHi Sunny,
Check these links.
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
http://www.erpgenie.com/sap/abap/pdf_creation.htm
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
Hope this resolves your query.
Reward all the helpful answers.
Regards -
How to print PDF file with hp-ux 11.31 on itanium
We finished upgrade from 11.5.7 to 12.1.1.
With 11.5.7 ( pa-risc hp-ux 11.23 ) we print our pdf file in using acroread to convert them in postscript and print them to printer.
In our 12.1.1 environment ( itanium hp-ux 11.31 ) ; acroread is not available on itanium.
Which tool can we use to be able to print PDF file on itanium ( itanium pdf to postscript tool ) free
Thanks
MarcPl see MOS Doc 778970.1 (How to Print PDF/UTF8 in R12?)
HTH
Srini -
How to print PDF files????
Please see FAQ: How to print a PDF file from Adobe Reader Touch.
If you don't see the Print button in the toolbar, please update to the latest version of Adobe Reader Touch.
FAQ: How to update Adobe Reader Touch to the latest version
The latest version (1.2) also includes newly supported features such as Commenting (adding Sticky Notes, Highlight, Strikeout, and Underline), Save/Save As, and Go to Page.
Here's the blog post by Dennis Griffin (Product Manager for Adobe Reader for Tablets and Smartphones).
Adobe Reader Touch for Windows 8 adds Comments and More -
How do I remove the background from a movie / sound problems
Apologies, not really sure what I’m doing…
How do I remove the background from a movie I made?
I imported a QT movie at 368/272 pixels, but for whatever
reason the HTML jumps up to 550/400.
The movie is still 368/272 but there is a background border
making it 550/400. Tried all sorts of settings in Publish but
can’t get rid of it. Can I keep the movie (and controller)
and not the background?
I can get round it by changing the background colour, but
surely there must be another way.
Also: My QT file was fine but the .flv has a stuttering
sound, any idea what could cause that?
Thanks, and Thanks!If you want to remove a background and add a new one Photoshop Element for Mac makes it rather easy to do:
OT -
How to print " Duplicate " in FORM ( either Sap Script or Smart Forms )
hi,
How to print " Duplicate " in FORM ( either Sap Script or Smart Forms ) if trying to take second Print Out and the FORM is already Printed.
Please let me know the condition that we should go for.If possible let me know the SAMPLE code since this will be used in most of the FORMS.
Regards
AviHi
It depends on which print you're working.
If it's a print of standard document you can check the NAST (VSTAT field) table in order to know if the document was printed.
If a message is created you can find the hit in NAST table:
VSTAT = 0, document not printed;
VSTAT = 1, documment printed
VSTAT = 2, print is failed
If you mean a custom print I believe you need to create a log like NAST table.
Max -
How we will pull the data from Sap-Bi to sap-Bpc
Dear Experts,
Thanks for watching this thread.The whole data is available in SAP-BI.
My system environment is SAP-BPC MS7.5.
Now i want to load the data from Sap-Bi to Sap-Bpc ms.For that we need any Interfaces.
How we will pull the data from SAP-BI to BPC-MS for Master data and Transaction Data.
could you please provide me step by step guide.
Please guide me what should i do.
Regards,
Srinivasan.
Edited by: srinivasan.singari on Jul 22, 2011 8:20 AMTough Ask..
Because i have done dashboarding thru scritping (Dyanamic fashion tough) ..It is very good ..But when, coming to the one you asked i have the idea how it works but cannot really tell you wich would be better.
Each Route has its own limitations.That really depends on what exaclty your client is looking after..
So if you new to xcelsius and eager to learn ..I suggest you to give a go at all those..May be you can let me know wich is the best one..
1. QAWS,
2. Bex Query --> Crystal Reports --> Live office --> DashBoard.
3. Bex Query --> WebI --> Live Office --> Dashboard..
4. Webservices consuming BI Query,
5. Xcelsius SAP Netwever Connector.
But i suggest as of now use Xcelsius SAP netweaver Connnection... -
How to delete G/L account from Sap?
Hello gurus,
Can any one please suggest me the procedure how to delete the gl account from SAP?
Regards
K.srinivasraoDear K.srinivasrao
If there are any Transactions posted in GL Account you cannot delete the GL Account unless the balnce of the GL Account
Go to OBR2 and delete the GL Account
In FS00 U can Mark the GL Account for deletion
hope this will help
Regards
CA.Prasad -
How to print PDF documents on Unix(Solaris)
Hi ,
I wanted to know how to print PDF documents on Unix(Solaris)?
Is there a document or white paper that i can refer to start printing PDF document.
What kind of drivers/utilities will be required to achieve the objective?
KiranHave you tried FOXIT? I think there is a trialversion. I tried Adobereader 2.5 but there is still no option to print.
‡Thank you for hitting the Blue/Green Star button‡
N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009 -
How can distribute 5 lakhs records from sap R/3 setup tables ?
How can distribute 5 lakhs records from sap R/3 setup tables in to multiple requests in sap BI?
Hello,
what is "lakhs" ?
Please use plain English words on a world wide forum...
Regards,
Olivier -
Generating PDF form16's from SAP HR system
Hi,
I have to explore the possibility of generating PDF form16's from SAP HR system. My clinet is currently using SAP ECC6.0 version.
Please let me know if any one has any idea on the same.
Thank you.Hello buddies,
Is there a *new note released to take care of F4 help on the main screen of Form 16?
We have applied all the required notes, however, when we are testing the Form 16, we are unable to upload the temse file for data on Page 3 of Form 16. This is because there is no F4 help on the main screen.
Please someone help as this is a very important requirement from the client side and we are stuck with the testing.
Thanks in advance.
Evangelist@ -
How to print PDF files using java print API
Hi,
I was goign throw lot of discusion and reading lot of forums related to print pdf files using java api. but nothing seems to be working for me. Can any one tell me how to print pdf files using java api.
Thanks in advanceMike,
Can't seem to get hold of the example described in your reply below. If you could let us have the URL to get then it would be great.
My GUI application creates a pdf document which I need to print. I want to achieve this using the standard Java class PrinterJob (no 3rd party APIs I'm afraid, commercial restraints etc ..). I had a stab at it using the following code. When executed I get the pretty printer dialog then when I click ok to print, nothing happens!
boolean showPrintDialog=true;
PrinterJob printJob = PrinterJob.getPrinterJob ();
printJob.setJobName ("Contract.pdf");
try {
if (showPrintDialog) {
if (printJob.printDialog()) {
printJob.print();
else
printJob.print ();
} catch (Exception PrintException) {
PrintException.printStackTrace();
Thank you and a happy new year.
Cheers,
Chris -
How to print Pdf files using Adobe Reader
How to print Pdf files using Adobe Reader
Open the PDF file with File > Open... in Adobe Reader and print it with File > Print
Maybe you are looking for
-
Adding to WHERE based on an IF statement in a procedure
Is this legitimate? select CRIME_CLASSIFICATION_ID, crime_type, nvl(count(CRIME_CLASSIFICATION_ID),0) as CRIMECNT From vaps.vw_offenses where location_id in (vaLoc) If fromdate is not null Then AND offense_date >= to_date(fromdate, 'm
-
Strange WLAN issue - can't access secure sites
Hi! I've just bought a Toshiba L100-120. Everything is fine except the following. I can't access secure sites with the built-in Intel 3945abg device. Other sites are OK. If i connect LAN, everything is fine. If I insert my PCMCIA-wireless card, also
-
How to register AS Java in Solman SLD right?
Hello Community, i have little difficulties with our solution manager (7.01). I want to register a java system (netweaver portal 7.3) for implementing support package stacks. But i don't know how to do it right. I tried it manually. At first i create
-
Alternate to this PM_ORDER_DATA_READ
Hi is there any other alternate for thisFM PM_ORDER_DATA_READ either in bapi also. with regards, jayasankar.
-
ColdFusion 9 Enterprise - Error Connecting to Oracle
Hi, I'm in the process of configuring our production server with ColdFusion 9 Enterprise. The prod build is carried out according to the same build document used to implement our DEV and QA environments which are working correctly. When setting up th