Using MICR font in SAP Adobe form
Use of MICR Font:
Magnetic Ink Character Recognition(MICR) is specialized font used to print details like bank code, bank account number, check number and control indicator (on-us, transit) at the bottom of checks.
MICR reader will scan MICR font and read the information directly into a data-collection device which is less time consuming process than using any other fonts.
Requirement is to assign MICR (Magnetic ink character recognition) format for fields using adobe forms.
Existing standard payment checks are developed using either SAPscript or smartforms. SAPscript and smartforms are having MICR font as in-built.
Adobe form is having designing flexibility and user interaction option. Currently form related requirements are getting fulfilled by adobe forms.
For Adobe form MICR font is not available as in-built. So font has to be purchased and configured. The font can be purchased from any third party vendor available in websites.
For example www.idautomation.com is a third party selling MICR and OCR fonts.
Before purchasing, demo font from the vendor can be downloaded and checked for its accuracy.
Note: Example taken here is a print form and only the MICR line is designed on form as per the scope.
- SAP GUI and Adobe LiveCycle Designer installed in system
- Adobe Document Services (ADS) installed and configured on the server
- Adobe Reader
- Font file MICR E-13B of TrueType or OpenType format
- Configure MICR E-13B font on ADS server
- Install the same font in front end system
- Create form interface
- Create form object
- Design and assign MICR E-13B font to the required fields
- Execute and check the resultant format.
The MICR E-13B font file of .ttf or .otf type can be purchased from third party vendor.
Note: Font taken here is a demo font of .ttf type.
The user with read and write permission on below directory can configure fonts on ADS server,
/usr/sap/<SID>/SYS/global/AdobeDocumentServices/. Where SID – SAP system ID
Path to place the font file (refer help.sap.com),
- Subdirectory name ‘fonts’ should be created under path
- Create subdirectory ‘customer’ under the ‘fonts’ folder
- Place the fonts file inside ‘customer’ folder which created by previous step
- Restart below services and applications
- Document services font manager
- XML form module
- Application – com.adobe/AdobeDocumentServices
In order to get MICR font in “font option” of adobe form, it has to be installed in front-end system.
- Get the MICR E-13B font file which is configured on ADS.
- Open the font file and click on install.
3. After installation same font name can be found from path Windows -> Run -> fonts
Note: User should have admin access otherwise error will be raised while installing. Otherwise “Invalid file format error” will be caused.
- Go to Transaction code SFP and select Interface and enter Interface name ZSAMPLE_MICR_INTERFACE. Click on Create.
2. Fill mandatory fields as shown below and press Save.
3. We are going to use REGUH table to fetch necessary fields. Take import parameters as shown below.
4. We are going to use REGUH-UBKNT, REGUH-UBHKT and REGUH-UBNKY fields to design MICR line.
Take these three fields as global data and code to fetch values for them under Code Initialization.
In designing MICR line, the main thing is availing on-us and transit characters.
To get on-us character we need to concatenate the required field with “C”,
To get transit character we need to concatenate the field with “A”
For Character “amount” – concatenate letter “B” with field.
For Character “dash” – concatenate letter “D” with field.
Write select query to fetch UBKNT, UBHKT and UBNKY fields from REGUH table. Concatenate the fields with C or A as shown below.
CONCATENATE ‘C’ wa_micr-ubknt ‘C’ INTO gv_ubknt.
CONCATENATE ‘A’ wa_micr-ubhkt ‘A’ INTO gv_ubhkt.
CONCATENATE wa_micr-ubknt ‘C’ INTO gv_ubnky.
- Go to Transaction code SFP and select Form and enter form name ZSAMPLE_MICR_FORM. Click on Create.
2. Fill mandatory fields as shown below and press Save.
3. Drag and drop the global data of interface to form context.
To get MICR line we need to design three text fields and then assign MICR E-13B fonts to the fields. Go to layout tab.
- Drag and drop Text object on design view and give text as “Sample MICR format”.
2. Drag and drop Text field object
3. Right click on text field and select palettes->Objects tab. Remove the caption and change Appearance to None. Save.
4. Go to Binding Tab (objects -> Binding) and do bind with GV_UBKNT as shown below.
Now the value for the text field is assigned. We can check this by visiting Binding tab.
5. Go to Layout Tab and set Reserve value to 0cm.
6. Right Click on the text field. Go to Palettes and select Font. Font pop-up will be displayed on design area.
Click on font drop down and search for the font name which we installed earlier. Select the font and set the font size as 10 or 12.
Save and activate the form.
7. Drag and drop two text fields and do step 5 for these text fields.
During step 5.d, for second text field bind GV_UBHKT and for third text field bind GV_UBNKY.
Save and activate.
Once activated press F8 and pass values to IM_LAFUD, IM_LAFUI and IM_LIFNR. Click on Execute. The resultant displayed will be in MICR format.
Here I have directly passed numbers from 0 to 9 as the inputs to UBKNT, UBHKT and UBNKY fields to show how the numbers and concatenated C and A characters are converted to MICR font.
Note: Character “C” in first and third fields converted to “on-us” and Character “A” in second converted to “transit”. The font file which I have taken is a demo file so number 5 is displayed as DEMO.