The following template is missing: sap_sm.xls
When I try to export ALV grid data to Excel using toolbar icons, I got "Contact your system administrator. The following template is missing: sap_sm.xls" error message recently on a new installed SAP system client.
After data is displayed on an SAP ALV grid in your ABAP program, click on Excel icon
Following error occurs.
Contact your system administrator. The following template is missing: sap_sm.xls
Message no. 0K407
For the solution an ABAP programmer can simply execute following ABAP report BCALV_BDS_IMPORT_SAP_TEMPLATE titled as "ALV Import of SAP_STANDARD_TEMPLATE from Client 000" which copies standard templates for ALV from 000 client to current client.
After executing ABAP program BCALV_BDS_IMPORT_SAP_TEMPLATE using SE38 or SA38 transaction codes, after the Excel button is clicked data will be displayed within an Excel document.