Print & Print Preview is supported by SAP only for SAP Smartforms. It’s really strange for me why SAP does not have any standard approach for providing Adobe forms on WebUi, some how it works in SAPGUI of SAP CRM. Adobe forms are more interactive and much intuitive and easy to create, modify, update forms. It has slight edge over smart forms. May be SAP will come up in future to support adobe forms in CRM webui. But as of CRM 7.0 EHP1 this is not available. I did put up my own efforts to crack through this requirement and finally came up with impressive solution which is quiet easy to implement. The actual SAP Smart forms required Actions to be defined and implemented, where as in my approach of adobe forms action definitions are NOT required.
Here we go…..
Steps in nutshell:
- Enhance the underlying Event Handler method of the Print Preview Button, UI Component BT112H_SC (service contract)
- Create a BSP ICF Service, similar to the standard print service CRM_PDF_PRINT, call it as ZCRM_PDF_PRINT
- In the even handler method (Step 1), construct the URL based on the Service defined in Step 2 and call the popup.
- Set up a Handler class for the service defined in Step 2, call it as ZCL_CRM_PREVIEW_PDF (Prototype CL_CRM_PREVIEW_PDF)
- In its handler method, call the method which is responsible to bring the pdf output in Xstring format.
- Set the pdf content to the response of the service with the application as ‘pdf’.
Let’s discuss the above steps in more detail fashion…..
Please refer my blog for more details.