將SAP CRM WebClient UI的表格匯出成PDF
In WebClient for configTable control there is a functionality to export the whole table content as an excel.
Only simple steps are necessary to support export with PDF format as well.
The achievement would be: a new button is added to table toolbar.
Once pressed, a new PDF with all table records are displayed.
Required steps are briefly listed below.
(1) Create a new post exit on class CL_BTSRV_ADVSRL_CNTRL, method PREPARE_TOOLBAR, in order to add a new button for PDF export in table toolbar.
Post exit source code:
(2) add a new event EXPORT and implement the handler in the result view:
Source code of export implementation:
(3) Since in step 2 the reuse component GSURLPOPUP is utilized to hold rendered PDF as popup, so we need to declare it as component usage in the component of search result view:
(4) In step 2, the ICF service /sap/crm/order_print is declared but not implemented, so we have to create it in this step via tcode SICF.
Still use CL_CRM_ORDER_2_PDF as handler class,
and the main logic for PDF generation is done in method HANDLE_REQUEST of this handler class:
(5) Develop an Adobe Form to display the table content.
The table in the Adobe Form must behave as so called “data-driven” way, which means the table content in the PDF must grow according to the actual data passed into the PDF rendering processor.
First create an ABAP interface for Adobe form via tcode SFP:
The signature for this interface:
Once done, create a new Form template PF_CRM_ORDER_LIST via tcode SFP as well:
Key steps which makes the table in the form template be able to automatically grow according to the feed data source:
(1) The body page must be flowed instead of positioned:
(2) The table content row must be bound to a context node which has 0:n occurrence, and the “Repeat Row for Each Data Item” checkbox must be enabled.
As in step 4, I use a SELECT * from CRMD_ORDERADM_H as the data source for this template, which means you can bind any field in ABAP structure CRMD_ORDERADM_H to the table cell in PDF, as illustrated below.
Activate both form interface and form template and the corresponding PDF would be generated now once export button is pressed.
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2708650/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 如何將SAP WebClient UI的表格匯出成PDFWebclientUI
- SAP CRM WebClient UI表格編輯模式的除錯明細WebclientUI模式除錯
- SAP CRM WebClient UI和Fiori UI混搭並存WebclientUI
- SAP CRM WebClient UI和Hybris backoffice UI開發的相同點WebclientUI
- SAP CRM WebClient UI異常的持久化機制WebclientUI持久化
- SAP CRM WebClient UI上將text area裡的文字清空的後臺處理WebclientUI
- SAP CRM WebClient UI 支援的一些 url 引數WebclientUI
- SAP CRM WebClient UI html 格式的 Text 顯示邏輯WebclientUIHTML
- SAP CRM WebClient UI的Delta處理機制介紹WebclientUI
- SAP UI5 表格資料如何匯出成 Excel 檔案(Table Export As Excel)UIExcelExport
- SAP CRM WebClient UI和Hybris的controller是如何被呼叫的WebclientUIController
- 使用Selenium自動化測試SAP CRM WebClient UIWebclientUI
- 在SAP CRM WebClient UI中用javascript觸發ABAP eventWebclientUIJavaScript
- element-ui匯出表格UI
- SAP CRM WebClient UI Text Type 顯示的過濾邏輯WebclientUI
- SAP CRM WebClient UI的on_new_focus應該怎麼理解WebclientUI
- SAP CRM WebClient UI和Hybris Commerce的懶載入機制WebclientUI
- 在SAP CRM WebClient UI裡開啟ABAP Webdynpro頁面WebclientUI
- SAP CRM WebClient UI和ABAP Webdynpro頁面的互相跳轉WebclientUI
- SAP CRM WebClient UI Text 可編輯與否的控制邏輯WebclientUI
- SAP CRM WebClient UI cross component跳轉的一個具體例子WebclientUIROS
- php如何將資料匯出成excel表格呢?PHPExcel
- vue+element將資料匯出成excel表格VueExcel
- element-UI庫Table表格匯出Excel表格UIExcel
- Hybris service layer和SAP CRM WebClient UI架構的橫向比較WebclientUI架構
- Element-ui元件庫Table表格匯出Excel表格UI元件Excel
- SAP CRM WebClient UI上以html格式顯示note的問題討論WebclientUIHTML
- SAP WebClient UI的白屏問題分析WebclientUI
- 使用SAP Transaction Launcher將ABAP Webdynpro嵌入到WebClient UI中WebclientUI
- vue將表格匯出為excelVueExcel
- 如何把SAP CRM WebClient UI上某個欄位高亮加粗顯示WebclientUI
- Jerry答網友提問:SAP CRM WebClient UI裡的EXT,STRUCT等含義WebclientUIStruct
- 三種動態控制SAP CRM WebClient UI assignment block顯示與否的方法WebclientUIBloC
- SAP WebClient UI的會話重啟原理WebclientUI會話
- ABAP Webdynpro和CRM WebClient UI不同的UI表現機制WebclientUI
- 使用note++開發SAP WebClient UIWebclientUI
- 如何在SAP WebClient UI裡使用jChartFXWebclientUI
- Product settype在CRM WebClient UI架構中的地位WebclientUI架構