Front-end printing in BSP or Web Dynpro applications

[] [] [] [] [] []

Symptom
You call a Business Server Pages or Web Dynpro application in the Web browser using a URL.
When you try to print on a printer defined with access method ‘F’ or ‘G’, there is no print output and the relevant spool request remains in the ‘Is waiting’ status.
Other terms
BSP BALANCED_SCORECARD LOCL, front-end printing, WEBGUI, SAP GUI for HTML, portal, browser, IE, CRM WebUI
Reason and Prerequisites
You need a GUI connection to the front end for front-end printing. This connection is not established if the application is only called in the browser.
Solution
Use a printer that has been defined with access method S, U, L, C or E.
We support front-end printing only for the following technologies:
- SAPGUI
- JAVA GUI
- SAPGUI for HTML (ITS)
The method described in note 351230 does not work with BSP or WebDynpro applications because the HTML pages are generated by the Web Application Server (Web AS) and not by the Internet Transaction Server (ITS). This method also does not function in applications that use ITS but do not use WEBGUI. Front-end printing from applications that use the Interaction Center (IC) WebClient does not work either.
As developer of BSP applications or WebDynpro applications, you should, after the user has selected a front-end printer, convert the data to be printed to PDF using the function module CONVERT_OTF and then display the data using a PDF plug-in in the browser. To do this, proceed as follows:
1. Call the module RSPO_FRONTEND_PRINTERS_FOR_DEV with the name of the selected printer. The module returns IS_FRONTEND = ‘X’, if the printer is a front-end printer.2. Call module SSF_GET_DEVICE_TYPE to determine an appropriate device type for the desired language.
CALL FUNCTION ‘SSF_GET_DEVICE_TYPE’
EXPORTING
I_LANGUAGE = SY-langu
IMPORTING
E_DEVTYPE = devtype
Transfer the device type in the field OPTIONS-TDPRINTER to the module OPEN_FORM.3. Transfer the field TDGETOTF = ‘X’ in the structure RESULT to module CLOSE_FORM. This fills the OTFDATA return table with the OTF data.4. Transfer the OTF data in the OTF table to module CONVERT_OTF.5. Transfer the generated PDF data to a PDF plug-in in the browser.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment