Expense User is a named (per-user) license for Employee Portal. A Employee Portal installation must be completed first, then these additional Expense User steps can be applied to complete the implementation.

Architecture Overview

Expense User is installed with Employee Portal.
Expense User is installed with Employee Portal.

Installation Instructions

Expense User is installed with Employee Portal, so no installation-specific steps are needed, however configuration is required to enable Expense User features.

Apply general Expense User Setup settings

Expense User Setup can be applied using the Manager Add-On in SAP Business One. Go to: zedSuite Manager > Administration > Employee Portal Setup > Expense User Setup tab.

Configure Expense User settings as described below. A full description of each field can be found in Employee Portal Web Configuration Options - Email Setup.

Expense User Setup
Expense User Setup
  • Set missing Approver notification settings. This is used to notify an admin user when a manager’s email address is missing. For more information, see the Notify on missing Approver email address section of Employee Portal Configuration - Expense User tab.
  • Enable Expense Requests, Expense Claims, or both using the options in each section. By default, neither are enabled, which prevents the Expense User dashboard from being accessible to any user. See the Expense Request and Expense Claims sections of Employee Portal Configuration - Expense User tab.
  • Configure Credit Card Importing details if desired. Enable Credit Card Import allows administrator access to Credit Card Import functionality, while Enable End User allows general user access to Credit Card Import functionality. Users must be configured with the appropriate roles to have access to this feature.
  • Enable Project Tracking Support if desired. This allows for Expense Claims, Expense Requests and their detail lines to be associated with a specific project.

Register Expense User User-Defined Objects (UDOs)

Expense User for Employee Portal uses SAP Business One User Defined Objects (UDOs), to manage the core Approval, Expense Request and Expense Claim data records. Manual installation of these UDOs is required (as outlined below). (This is due to current limitations in our meta-data installation code for UDOs in B1 9.2. A future release may address this by automatically creating UDOs during license assignment.)

UDOs are built upon User Defined Tables (UDTs) and User Defined Fields (UDFs) added to those UDTs. The UDTs and UDFs required for Approvals, Expense Requests and Expense Claims are installed in B1 as part of the metadata install that occurs when the Employee Portal license is assigned. The final step to complete the UDO registration must be completed in SAP Business One using the User Defined Object Registration Wizard.

See SAP’s online documentation for details from SAP on how to register UDOs in Business One. Our walk-through below shows how to set up the Expense User UDOs required for Expense User functionality.

For Expense User functionality the key UDO requirement is that the UDOs be registered with the right names and with the child tables linked to the correct header tables. The additional settings for the Find form and Edit form are helpful for viewing UDOs in B1 but not related to their access through the B1WebAPI.

UDO Registration Walkthrough

The required UDOs with their respective child tables are:

  • Approvals (ZEDS_APPROVAL)
  • Expense Requests (ZEDS_EXPREQHEADER)
  • Expense Claims (ZEDS_EXPFORMHEADER)

Approvals (ZEDS_APPROVAL)

  • UniqueID & Name = ZEDS_APPROVAL
  • Type = Document
  • Document Table = ZEDS_APPROVAL
  • Rows Table = ZEDS_APPROVALS

The following screen shows show the recommended settings to use when registering the Approvals UDO in B1. The key requirement for system compatibility is that the Name of the UDO match the ZEDS_APPROVAL name from the screen shots.

Expense Requests (ZEDS_EXPREQHEADER)

  • UniqueID & Name = ZEDS_EXPREQUEST
  • Type = Document
  • Document Table = ZEDS_EXPREQHEADER
  • Rows Table = ZEDS_EXPREQLINES (Detail)
  • Rows Table = ZEDS_EXPREQATT (Attachments)
  • Rows Table = ZEDS_EXPREQATTLINE (Attachments to Lines)
  • Rows Table = ZEDS_EXPREQGLALLOC (GL Allocations)
  • Rows Table = ZEDS_EXPREQLINES (Request Lines)

The following screen shows show the recommended settings to use when registering the Expense Form in B1. The key requirement for system compatibility is that the Name of the UDO match the ZEDS_EXPREQHEADER name from the screen shots.

Only one of the following child tables may be configured. It doesn’t matter which one.

Expense Claims (ZEDS_EXPFORMHEADER)

  • UniqueID & Name = ZEDS_EXPCLAIM
  • Type = Document
  • Document Table = ZEDS_EXPFORMHEADER
  • Rows Table = ZEDS_EXPFOPMATT (Attachments)
  • Rows Table = ZEDS_EXPFORMATTLINE (Attachments to Lines)
  • Rows Table = ZEDS_EXPFORMCCLINES (Credit Card Lines)
  • Rows Table = ZEDS_EXPFORMGLALLOC (GL Allocation)
  • Rows Table = ZEDS_EXPFORMLINES (Detail)

The following screen shows show the recommended settings to use when registering the Expense Claim in B1. The key requirement for system compatibility is that the Name of the UDO match the ZEDS_EXPFORMHEADER name from the screen shots.

Only one of the following child tables may be configured. It doesn’t matter which one.

Configure zedExpenseUser Windows Service

The zedExpenseUser Windows Service is the component of the Employee Portal responsible for converting approved “Company Paid Expense Request Lines” and “Expense Claims” into Purchase Orders (POs) in SAP Business One. The service is installed on the Employee Portal web server and can be found in the Employee Portal web application’s Service folder (typically C:/Program Files (x86)/zedIT/zed Employee Portal/Service/). It uses the B1WebAPI web service to create Attachments and POs in SAP Business One.

The zedExpenseUser service requires configuration. Specifically there is a config file (ExpensePortalService.exe.config) in the application directory that needs to be edited (by default: C:/Program Files (x86)/zedIT/zed Employee Portal/Service/ExpensePortalService.exe.config). This location can be changed during the installation.

Expense User Service File Location.
Expense User Service File Location.

Inside the config file there are two sections which need to be configured:

  1. B1ClientEnabler section

  2. Entries in the appSettings sections

    ExpensePortalService.exe.config
    ExpensePortalService.exe.config

Configuring b1ClientEnabler

The b1ClientEnabler section is the same configuration section that you find in the Employee Portal web.config file. It specifies where exactly to find the B1WebAPI that is providing access to the SAP Business One database this portal is associated with. For the purposes of the Windows Service, only three of the settings are relevant, as shown in the details below:

  • enablerHost - This is the base URL for the B1WebAPI to use to access the B1 company. If this URL points at the root of the B1WebAPI web then this will attach to the default company connection defined in that B1WebAPI’s enabler.config file (e.g. http://localhost:4033). If you wish to attach to a specific B1 company defined then append the Connection name to the end of this url (e.g. http://localhost:4033/OEC_Test). The screenshot below identifies where you can see what Connection names are in the enabler.config file. This screen can be accessed through the Vision33 Server Tools application on the server, selecting the B1Config button.
  • enablerUserName - This is the B1WebAPI username as configured in the enabler.config file. See the top right markers on the screenshot below.
  • enablerPassword - This is the B1WebAPI password as configured in the enabler.config file. See the top right markers on the screenshot below.
B1WebAPI Config Editor
B1WebAPI Config Editor

Configuring appSettings

The appSettings section of the Employee Portal config file contains configurable settings used by the service.

Required settings

These settings must be configured as part of all Expense User implementations.

  • POTaxCode: By default this is set to a tax code called Exempt. It is expected that this will be changed during the implementation to an appropriate tax code from the SAP Business One database that this portal is connected to. This will be the tax code that will be set for all lines added to the POs by the service.

  • AttachDir: This is the fully qualified path to the temporary directory folder for the B1WebAPI. This must match the B1WebAPI Temp Directory Setting in b1enabler.config DI-API will copy attachments from this directory.

Additional settings

This section contains additional configurable settings used by the service. These settings will generally work fine as-is, but can be tweaked.

  • LogFileName: This is the name of the Log4Net configuration file. It is generally log4net.xml which is the default value and therefore does not typically need to be changed.

  • LogFileDir: This is the full path to the folder which contains the log4net configuration file. It defaults to Config which is a sub-folder to the service folder. Unless fully qualified, this is assumed to be local path based on the current service executables file location. This value should also generally not need to be changed.

  • TransactionTimer: This is the number of milliseconds to wait before checking for new pending POs being queued for creation. By default it is set to 100,000 which is 100 seconds.

  • ShowXML: This specifies whether the complete XML for B1 objects being inserted\updated by the service should be dumped into the log files for the service. When set, it will significantly expand the size of the logs and provide better documentation for troubleshooting integration issues.

What’s Next?

Visit the Expense User Configuration Guide for a walkthrough of advanced configuration and typical admin tasks.