SAP abap smartform da barcode 128 kullanı mı ? EAN 128 barcode in Smartforms

EAN 128 standartın da bir barkodu (barcode) dinamik olarak smart forma koymak ile ilgili ingilizce anlatım dokümanı aşağıdaki gibidir.

GS-1 / EAN 128 barcode in Smartforms to be printed on all printer types; laser, zebra etc.

SAP Fiori

Why

When trying to gather information to print GS-1 / EAN 128 barcodes on smartforms I could not find a source with all the info. Sources on the internet only contained parts of the information needed, many weren’t conclusive (SCN threads with status ‘Unanswered’ or at best ‘Assumed answered’).

It took some trial and error to get a good result. To prevent others from having to invent the wheel again I want to share my gathered knowledge in this document.

 

 

The steps

To print GS-1 EAN128 barcodes in Smartforms we need to do the following;

 

1) Create a system barcode font with new technology, Code128, Mode N. Mode N allows us to switch between the different subsets (A, B or C). By this we can end up with the most compact barcode. This system barcode should have the proper linear height settings so the barcodes are printed with the required height.

gs1_1.JPG

If a system barcode font as shown above is not available it needs to be created (SE73).

 

In this example the system barcode named ‘ZEAN128N’ will be created;

gs1_0.JPG

gs1_11.JPG

GS1_3.png

GS1_4.png

GS1_5.png

GS1_6.png

 

With the linear height settings the output height of the printed barcode is set. 765 corresponds to 32 mm.

GS1_7.png

GS1_8.png

 

2) The system barcode font has to be added as a character format to the Smartstyle that will be used in the Smartform.

 

  • In this example Smartstyle ‘Z_STYLE’ is used (tcode SMARTSTYLES).

gsss1.png

 

  • Character format ‘GS’ is created.

gsss2.png

 

  • Our newly created system barcode font is used.

gsss3.png

 

  • Activate the style.
  • Open the Smartform, in our example ‘Z_FORM’.
  • Add the style to the Smartform.

gsss4.png

3) The code of form “STREAMLINE_BARCODE” has to be pasted in the “Form Routines” tab in the “Global Definitions” section. It is a form that converts the barcode string that is passed in, into a barcode that uses the best subsets (B or C) to make the smallest possible barcode.

 

The code is in the attached file. I found it in a thread on SAPFANS.COM , thanks for that!

GSFR1.png

4) Call the form “STREAMLINE_BARCODE” of step 3 after the content for the barcode has been composed. The necessary switches to make the barcode recognizable as EAN128 and to make it as compact as possible are added.

 

( For preparing the content of the barcode: GS-1 / EAN128 content string for the barcode consist of an application indicator (AI) followed by the relevant application content, or a series of the two. So “<AI1><Content AI1>…..<AIn><Content AIn>” )

gssst4.JPG.png

 

At position A the variable gv_barcode_product_detailsbc has the value:

 

02871734435015037000000101518062810BATCH

 

At position B the variable gv_barcode_product_detailsbc has the value:

 

>;>80287173443501503700000010151806281>60BATCH

 

 

5) For displaying the barcode: A text node with the barcode field has to be added, using the character format defined in step 2 and the content prepared in step 4.

 

gsst5.JPG

 

By following these steps a proper GS-1 / EAN128 barcode should be created in the smartform.

 

Tip 1: To check the barcode you can install a GS-1 app on your smartphone, for example the ‘iGepir’ app for IOS and android.

 

Tip 2: You can scan the barcode from a print preview on the screen which saves you a lot of printing during testing. To do so go to the PDF preview of the print.

 

Tip 3: For zebra label printer users with European languages: Only use the HELVE font for text since it is stored in the printer memory, others fonts will result in much larger print files with all the disadvantages that come with it.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)