Aquiller Development Guide

Creating Custom Variables

An Aquiller Custom Variable is predefined and protected space for Customers to define their own fields for use within Aquiller.

Custom Variables are created as Methods. Each Custom Variable has a small piece of ABAP code which retrieves the contents of a specific field. Because these utilise ABAP, there is also the possibility of defining more complex logic and calling functions modules to identify and retrieve data.

Variables names start with CUST followed by  your own variable name. This is shown in the example: <<CUST-VARIABLE NAME.>> *Note that the variable name, shown here in bold may not be more than 25 characters.


Double System Installation

If you have Aquiller and SAPHR installed on different systems, a Z function will need to be created to the fetch the data for the custom variable from the remote HR system during the letter generation step.

Create Z Function module in the remote HR System

Create a Z function module called 'Z_FLMCG_READ_TABLE_DATA'  in the remote HR system. The required code for this FM has already been shipped in FLMCG namespace (Aquiller Namespace) and can be found in the SAP system where Aquiller is installed as '/FLMCG/GET_TABLE_DATA'


Generate Classes for Custom Variables

Before a Custom Variable can be created, Aquiller requires sufficient classes to be available.

If the message "Insufficient classes" appears when creating a new Custom Variable (or Template User Exit) the available classes have all been used.

1. Navigate to transaction SPRO and to Aquiller under the Cross-Application Settings > General Application Functions > Aquiller > Global Settings > Technical Settings >Generate Classes for Userexits >Generate 5 classes to begin with. Select /FLMCG/CUST as the package when prompted.

*Note* Repeat Step 1 if you run out of classes while creating Custom Variables


Structure of Custom Variables in Aquiller System

  1. Each Custom Variable follows the same format as shown in the table below.
  2. The first line of the Custom Variable should refer to the destination (rfc) system if you are using a double system.
  3. A number of standard Custom Variables are delivered with Aquiller that can be copied, renames and modified to create new Custom Variables.
  4. The Custom Variables use standard context variables provided by Aquiller to retrieve values.
Get the destination of the HR data (if not on the same box)
Build the condition based on which field will be fetched from the table
Get the action type and description
Build field list to select from the table
Build condition based on which field will be fetched from the table


Creating a new Custom Variable

Watch the short Video Tutorial Video Tutorial on creating custom variables:  Custom Variables Video Tutorial.

The steps shown in the Video Tutorial are outlined below.

  1. Navigate  to Aquiller under the Cross-Application Settings > General Application Functions > Aquiller > Dynamic Variables Management > Maintain Custom Variables

2. Click on New Entries.

3. Copy and paste Variable name and description from the Custom Variables Table List (Table 1.1) below into appropriate columns of the maintenance screen. CustCode column should be    auto filled with Aquiller Customer Code.

4. Click Save and press "Yes" when prompted with a dialog as the screenshot below.

5. Click Define Variable Button-> copy and paste code from the <Variable Name>.txt file from the table (Table 1.1) below and paste into the method.

*Tip* - Switch off modification assistant to enable CTRL+V action to paste code into the editor, Go to Edit on the toolbar->Modification Operation->Switch off assistant

6. Activate the method.

7. Repeat Step 3-7 to add a new custom variable.

*Note* If an information dialog pops-up during the activation step, exit SPRO and try going back into the transaction to activate the method containing the custom variable.


Standard Aquiller Custom Variables

Aquiller is installed with a standard list of Custom Variables. The list of variables and their code may be viewed here: Standard Custom Variables.

The code provided may need to be modified dependant on the whether Aquiller is installed in a double or single system installation.


Changing the Source Date in a Custom Variable

Custom variables by default pick up data that is valid at the current date on which the letter gets processed. If you wish to retrieve data from a different validity period, then you should tailor the custom variables method to use the source date that gets passed on from the letter processing engine in runtime as an import parameter.

IM_DATA is a standard import parameter structure that is available in every custom variable method. This parameter carries the context data(metadata) of the letter being processed.
The parameter SRC_DATE of IM_DATA structure carries the source date selection (if selected by the user) in the frontend application. By default IM_DATA-SRC_DATE will be blank. Sample usage logic to read data that’s valid on the source date and which will be added to the Custom Variable is shown below:



Creating Template User Exits

Template User Exits are designed to allow user to modify the presentation of system and other data in Aquiller.

Each Template User Exits looks for fields with a specific type of format. Most commonly, Template User Exits are used to modify dates read from SAP.

Date Format

  • As standard Aquiller outputs dates exactly as they are held on the SAP database table.
  • This format is YYYYMMDD for example 07 March 2012 would be output in the letter as “20120307”
  • The date format is required to be given in a more ‘recognisable’ format e.g. 07-MAR-2012.
  • Alternative dates formats can be presented to the end user by means of a “Template User Exit”
  1. Naviate to Aquiller > Dynamic Variables Management>Maintain Template User Exit
  2. Select the New Entries and give the User Exit a Name
  3. Save the User Exit
  4.  Select Edit Routine to add/modify the example ABAP code provided Template User Exit for Date.txt
  5. Save the User Exit
  6. Navigate to Aquiller> Dynamic Variable Management > Refresh Variable Hierarchy and refresh the variables.
  7. Select the  Refresh Variables button. Press execute.

This action will delete all existing Aquiller customizing activity and replace the HCM Variables from the infotype maintenance screen,  Template User Exit Variables, Custom Variables and System Variables. These will be refreshed and loaded  into the Aquiller memory.


  1. Open the Aquiller Letter Assembler module
  2. Click on the Search button to display a list of Templates
  3. Double click to select any template on the list
  4. Click on the Configuration tab >Advanced Configuration >Template User Exit drop down
  5. Confirm the Template User Exit appears in the drop-down list


Saving Letters against the Employee Master Record

Aquiller letters can be saved against the employee master record's services for objects as a PDF attachment by use of posting adaptor /FLMCG/FPE_AQU_UPDATE_295_700. Before this adaptor can be used, please perform the following steps in your HR system:

  1. Create function group Z_FLMCG_SUPP_FUNCTIONS in transaction se37. Add “Aquiller: Support Functions” as the Short text and assign the function group to a Z* package of your choice.

  2. Create function module Z_FLMCG_REMOTE_UPDATE in transaction se37.

    • Function group: Z_FLMCG_SUPP_FUNCTIONS

    • Short text: Aquiller: Attach letter to emp master record

    • In the “Attributes” tab, make sure the “Remote-Enabled Module” option is set

    • Add import, export and tables parameters as per the following screenshots:

    • Paste the source code from the following file: Z_FLM_REMOTE_UPDATE source code.txt