Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

A documentation on creating System Bar Code and using it in SAPscript layout for printing

Creating a System Bar Code

  • Transaction SE 73 is to be run to enter into 'SAPscript Font Maintenance: Initial screen.
  • 'System bar codes' radio button is to be selected and change mode is to be clicked for entering data. A new screen named 'SAPscript Font Maintenance: Change System Bar Codes' will appear.
  • In 'SAPscript Font Maintenance: Change System Bar Codes' screen, 'System bar Codes' is to be selected from the 'Header list' and 'Create' option is to be clicked. A new screen 'SAPscript Font Maintenance: Create/Change System Bar Code' will appear.
  • In 'SAPscript Font Maintenance: Create/Change System Bar Code' screen, all details of barcode viz. Bar code, Description, Bar code type, Minimum character number, Maximum character number, Bar code width, Unit of measurement, Bar code height and Unit of measurement are to be provided as per requirement. Thus any system bar code of desired type can be created.

Including System Bar Code in SAPscript

Create Character format based on system bar code

Standard attributes like Character format, Description and Bar code type are to be provided in Character Format of the layout. Bar code type is already defined during its creation whereas Character format and Description are to be given as per standards.

Enter text based on character format

Here the text to be "barcoded" is to be included. For e.g. if character format is AD and L1 is a paragraph format then in Page Window it should be :

/E ITEM_LINE
L1 <AD> &LTAP-MATNR& </>

In paragraph L1, any sort of tab setting, font setting can be done as per requirement. All these will be reflected in barcode.
Now the System Bar Code is ready for printing.

Changing standard bar code height and width

Since the printer used was of device type HPLJ4000, SAP note 45643 - Barcode control sequences for JetCAPS/Jetmobile BarDIMM is to be referred.

The note contains the explanation of the control sequences that are stored in the SBPxx print controls in R/3.

First, a custom barcode is created by copying the system bar code C128A_00 using transaction SE73.

Next, corresponding to the printer device type HPLJ4000, our bar code ZC128A_0 is included. Each printer barcode has to contain a prefix and a suffix. Prefix is like SBPxx and suffix are like SBSxx. Print control sequences are maintained in both prefix and suffix. But for our requirement, we need to consider the control sequence for the prefix only.

For the standard device type of HPLJ4000, the prefix for C128A_00 was SBP25 and the suffix was SBS01. For ZC128A_0, the suffix is kept as SBS01. For prefix, a new prefix ZBP25 was created by copying the control sequence of SBP25 and then changing it. The logic for changing the control sequence has been explained below.

The original control sequence for SBP25 was like this:
1B2873317030303068313476352C313062352C313073323437303154

Within this control sequence, height of this barcode is represented by 313476 i.e. 14 point i.e. 14 * 1 / 72 inches. In order to create a barcode of height 3 cm, this was changed to 383476 i.e. 84 point i.e. 84 * 1 / 72 inches.

While increasing the width and the spacing of the barcode, it has to be remembered to do it proportionately otherwise barcode won't be scannable.

Within this control sequence, width of the (first and second) bars have been represented by 352C313062 i.e. 5 & 10 respectively, i.e. 5 * 1 / 600 inches and  10 * 1 / 600 inches respectively.
We changed it to 31322C323462 i.e. 12 & 24 i.e. 12 * 1 / 600 inches and 24 * 1 / 600 inches respectively.

Within this control sequence, width of the (first and second) spaces have been represented by 352C313073 i.e. 5 & 10 respectively, i.e. 5 * 1 / 600 inches and 10 * 1 / 600 inches respectively.
We changed it to 31322C323473 i.e. 12 & 24 i.e. 12 * 1 / 600 inches and 24 * 1 / 600 inches respectively.

The changed control sequence for prefix ZBP25 looks like this:
1B287331706838347631322C32346231322C323473323437303154