SAP CRM和Cloud for Customer的Excel导出功能比较

December 17, 2023
测试
测试
测试
测试
8 分钟阅读

Excel export is supported in both CRM and C4C. This blog gives a short introduction about how export is implemented in both system.

Excel export in CRM

In CRM, the exported excel has csv format which could directly be opened by any text editor:

If you would like to study how this functionality is implemented in CRM, just follow the guide below.

Open a WebClient UI component which supports excel export for example PRD01QR, double click the tag chtmlb: configTable

Then double click implementation class of this tag:

Set a breakpoint on method ADD_DOWNLOAD_TO_EXCEL:

Click Export button to trigger the breakpoint, in variable ev_script we can find the SICF service name for export function:

find this service in tcode SICF:

double click it to locate the handler class.

Set a breakpoint in its HANDLE_REQUEST method, and now you can debug how the source code of csv file is generated.

Excel export in C4C

The excel exported in C4C has postfix .xlsx, see one example below.

Rename it to ListofAccounts__EN.zip and unzip it, you will find that the .xlsx is actually a zipped package which contains several files. The actual content from C4C OWL are stored in file sheet1.xml.

Here below are the steps if you would like to explore more detail about excel export from UI perspective in C4C ( since the UI source code is open to partner & customer ).

(1) Launch C4C via Chrome, switch to debug mode via Ctrl+Alt+Shift+P.

Refresh the page and click F12 to launch Chrome development tool.

(2) Click Souces tab, press Ctrl+O and type keyword Button, click the first hit “Button-dbg.js”:

Set a breakpoint in line 154, the event handler for click:

(3) Perform Excel export in UI and breakpoint will be triggered. Debug into the code and soon you will find the url population logic is implemented in function _navigateToURL.

Inside this function you can learn how the final url for excel download is assembled by different parts:

Finally the assembled url is stored in variable url and the download is started by native API window.open. From the url we can also find the SICF service output_document, although its implementation in ABAP backend is not visible to partner & customer.

继续阅读

更多来自我们博客的帖子

如何安装 BuddyPress
由 测试 December 17, 2023
经过差不多一年的开发,BuddyPress 这个基于 WordPress Mu 的 SNS 插件正式版终于发布了。BuddyPress...
阅读更多
Filter如何工作
由 测试 December 17, 2023
在 web.xml...
阅读更多
如何理解CGAffineTransform
由 测试 December 17, 2023
CGAffineTransform A structure for holding an affine transformation matrix. ...
阅读更多