Barcode support

Floe can work with a barcode generator utility in various ways:

  1. Dynamically construct hyperlink for client-side barcode rendering
  2. Trigger server-side generation and add link to published file
  3. Trigger server-side generation and embed the image in the e-mail.

1. Dynamically construct hyperlink for client-side barcode rendering

On-line barcode generation is available from companies such as 

The HTML block will contain the URL hyperlink to the barcode generator, including Variables that Floe will substitute at run-time:

1:
2:
3:
4:
5:
<a href="http://www.barcodesinc.com/generator/">
<img
src="http://www.barcodesinc.com/generator/image.php?code=&DL_NUM&&style=165&type=C39&width=245&height=65&xres=1
&font=5" alt="&DL_NUM&" border="0">
</a>

The variable is filled with the number for the barcode generator to use to create the barcode image.

2. Trigger server-side generation and add link to published file

Some barcode generation tools will generate a barcode and publish it on a web server.

To integrate Floe with this kind of solution, trigger the barcode generator from the Email Data User-Exit, and fill a variable with the filename or URL hyperlink of the generated image.

Then simply use the variable in an HTML block as the image source.

3. Trigger server-side generation and embed the image in the e-mail.

Some barcode generation tools will return the generated image.

In order to publish the generated image you can develop code to save the generated image to a web server.  In this scenario, trigger the barcode generator from the Email Data User-Exit, and fill a variable with the source URL.

Alternatively you can embed the generated image into the e-mail body.  In this scenario, trigger the barcode generator from the Image User-Exit, and fill a variable with a content ID for the image.

There are various ways to generate a barcode image within SAP that can be run on an ABAP stack only:  

Example. This is how to use Rbarc+ to generate a barcode image (XSTRING) from the Image User-Exit:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
*------------------------------------------------------------------------------*
* Declarations for RBARC+ Interface
*------------------------------------------------------------------------------*

TYPES: ty_content TYPE xstring, 
       ty_checksum(5) TYPE c, 
       ty_encoding(256) TYPE c. 

TYPES: BEGIN OF ty_bc_struc,
           content TYPE ty_content,
           checksum TYPE ty_checksum,
           encoding TYPE ty_encoding,
        END OF ty_bc_struc.

DATA: barcode1 TYPE ty_bc_struc.

*------------------------------------------------------------------------------*
* Interface to RBARC+
*------------------------------------------------------------------------------*
PERFORM gen_barcode(zaf_bc_settings12)
        USING '1234567890'
              'BARCODE01'
        CHANGING barcode1-content
                 barcode1-checksum
                 barcode1-encoding.

This returns the barcode in the field barcode1-content, ready to be added to the images table.