SAP Knowledge Base Article - Public

3448573 - How to Add a New Field to Existing Office Templates in SAP ByDesign

Symptom

A new field needs to be added to a Microsoft Office Template Maintenance

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental." 

Environment

SAP Business ByDesign

Resolution

The solution is possible in the work center Application and User Management under the view Master template > Microsoft Office Template Maintenance.

This solution is explained with the following use case/example: To add the field Time Type to the template Employee Activity List - Quick Activity (Billable Projects).

A. Prerequisite

To customize an existing template you would need the following two tools.

  • A Zip tool (i.e WinRar, WinZip,7-Zip, etc)
  • A tool to Modify XML Files

1. Download the existing template to our local desktop from the Application and User Management Work Center >  Microsoft Office Template Maintenance >- Employee Activity List - Quick Activity (Billable Projects). In the example a template for English language is downloaded

2. Open the file in excel and switch to the "Developer" tab and click on "Source".

3. If you don’t have the developer tab in your Excel, please go to “File” -> “Options” -> “Customize Ribbon” and enable the check box for "Developer":

4. Once you click on the source button, you should see the underlying data structure associated with it. To determine which cell is mapped to which attribute, select the cell and you can see the mapping on your right-hand side. This also works vice-versa. To map a cell to an attribute simply right-click on the XML field and click "map element". To remove the mapping click "remove element". The bold attributes are mapped to cells in the sheet.

B. Add new fields to the template

To add a new field the data structure needs to be enhanced first. To do so perform the following steps.

1. Locate the "Excel" file stored on your local desktop.

2. Right click and change the extension to .zip.

3. Open it with your preferred Zip-Tool and navigate to the folder "XL".

4. Copy the file xmlMaps.xml and paste it in a new location on your local desktop.

5. Open the “xmlMaps.xml” file that is there on your local desktop with your preferred XML-editor (e.g. Notepad++) 

6. Bound the new field "Time Type" to the field of the ECO.

7. Under the complex type add the new field "Time Type".

8. Save the XML file.

9. Now copy the XML file which was saved in step h and replace the xmlMaps.xml file in step d with this new file.

10 Change the extension of the file from ".Zip" to ".XLSX".

C. Modification of the excel template


Proceed with the below steps to modify the excel template.

1. Add the new field "Time Type" in the excel file.

2. Open the developer tab and click on Source.

3 Locate the "Time Type" in the XML source.

4. Bind the newly added field in step a to the "Time Type" in XML. Right-click and click map element in the XML.

5. Now  the new field is added to the excel. At run time the value is passed on to the UI designer field, which in turn gets filled up with the value coming from the ECO/BO. This ultimately gets filled in the excel since it is bound to the field in the UI designer.

D. Upload the new template


Once the changes are ready in the excel file, you need to perform the following steps to ensure that the downloaded content has the new field Time Type added:

1. Under Application and User Management  > Microsoft Office Template Maintenance> of SAP Business ByDesign.

2. Open Employee Activity List - Quick Activity (Billable Projects) Language English and upload and publish the excel file.

3. Once this is done, the download of the excel file will have the newly added field "Time Type" in it.

Keywords

Office Forms, Master template Office, Excel. , KBA , AP-RC-OUT , Output Management , Problem

Product

SAP Business ByDesign all versions

Attachments

Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png