This is an step by step guide on how to print bar codes in SAP using smartforms. This is the new procedure of printing bar codes without using any special hardware in the printer. In the traditional bar code printing in SAP, special SIMM modules had to be used in the printer and can only be developed with SAPScripts. In the new procedure bar code is defined in transaction se73 and used in the smartform/smartstyle. To find out the differences between old method and the new method check my post “Bar Code Printing Overview“.
Below are the steps on printing bar codes with the new procedure. In the example material number would be printed as a bar code.
Step 1: Define the bar code with transaction se73. Go to se73 transaction and define the format of the bar code. Bar code characteristics such as barcode format, orientation, module width, height and mode are set here.
- Go to se73 select “System Bar Codes” and “Change”.
- Click create, then select the “New” to define the barcode with the new procedure.
- Set the bar code name and description. Make sure to set the bar code prefix as “Z” to identify user defined custom bar codes.
- Select the bar code symbology.
- Set the alignment. Normal is without rotation, rotated is with 90 degree rotation, inverted 180 degree rotation and bottom-up is with 270 rotation.
- Set the “Narrow Module Width”, “Liner Height” and “Character Mode”. Narrow width of the bar code is the width of the narrowest module in the bar code. Liner height is the maximum height. Character mode in 128 can be either A, B or C. A is used to represent all uppercase ASCII. B for upper and lower case ASCII. Code C for digit pairs.
Step 2: Create smartstyle.
- Go to transaction smatforms and create smartstyle. Then define character format.
- Set the barcode definition for the created character format.
- Create paragraph format and assign the same to the header paragraph.
- Save and activate.
Step 3: Create smartform.
- Create the smartform and assign the smartstyle.
- Create text element and set the material number variable with the character format.
Step 4: Create driver program which feeds data to smartform and the material number will be printed as a bar code.