{"id":5197,"date":"2015-08-11T08:11:15","date_gmt":"2015-08-11T06:11:15","guid":{"rendered":"http:\/\/www.karadere.com\/blog\/?p=5197"},"modified":"2015-08-11T08:11:15","modified_gmt":"2015-08-11T06:11:15","slug":"sap-abap-smartform-da-barcode-128-kullani-mi-ean-128-barcode-in-smartforms","status":"publish","type":"post","link":"https:\/\/www.karadere.com\/blog\/sap-abap-smartform-da-barcode-128-kullani-mi-ean-128-barcode-in-smartforms.html","title":{"rendered":"SAP abap smartform da barcode 128 kullan\u0131 m\u0131 ? EAN 128 barcode in Smartforms"},"content":{"rendered":"<div class=\"jive-rendered-content\">\n<h2>EAN 128 standart\u0131n da bir barkodu (barcode) dinamik olarak smart forma koymak ile ilgili ingilizce anlat\u0131m dok\u00fcman\u0131 a\u015fa\u011f\u0131daki gibidir.<\/h2>\n<h4>GS-1 \/ EAN 128 barcode in Smartforms to be printed on all printer types; laser, zebra etc.<\/h4>\n<p><a href=\"http:\/\/www.karadere.com\/blog\/uploads\/\/2010\/02\/sap-abap-logo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-309\" src=\"http:\/\/www.karadere.com\/blog\/uploads\/\/2010\/02\/sap-abap-logo.png\" alt=\"SAP Fiori\" width=\"230\" height=\"121\" \/><\/a><\/p>\n<h2><\/h2>\n<h2><\/h2>\n<h2><\/h2>\n<h2>Why<\/h2>\n<p>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&#8217;t conclusive (SCN threads with status &#8216;Unanswered&#8217; or at best &#8216;Assumed answered&#8217;).<\/p>\n<p>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.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>The steps<\/h2>\n<p>To print GS-1 EAN128 barcodes in Smartforms we need to do the following;<\/p>\n<p>&nbsp;<\/p>\n<h6>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.<\/h6>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514730\/gs1_1.JPG\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514730\/620-237\/gs1_1.JPG\" alt=\"gs1_1.JPG\" width=\"620\" height=\"237\" \/><\/a><\/p>\n<p>If a system barcode font as shown above is not available it needs to be created (SE73).<\/p>\n<p>&nbsp;<\/p>\n<p>In this example the system barcode named &#8216;ZEAN128N&#8217; will be created;<\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514758\/gs1_0.JPG\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514758\/429-281\/gs1_0.JPG\" alt=\"gs1_0.JPG\" width=\"429\" height=\"281\" \/><\/a><\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514759\/gs1_11.JPG\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514759\/582-124\/gs1_11.JPG\" alt=\"gs1_11.JPG\" width=\"582\" height=\"124\" \/><\/a><\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514777\/GS1_3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514777\/384-182\/GS1_3.png\" alt=\"GS1_3.png\" width=\"384\" height=\"182\" \/><\/a><\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514787\/GS1_4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514787\/413-215\/GS1_4.png\" alt=\"GS1_4.png\" width=\"413\" height=\"215\" \/><\/a><\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514788\/GS1_5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514788\/219-234\/GS1_5.png\" alt=\"GS1_5.png\" width=\"219\" height=\"234\" \/><\/a><\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514789\/GS1_6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514789\/190-207\/GS1_6.png\" alt=\"GS1_6.png\" width=\"190\" height=\"207\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>With the linear height settings the output height of the printed barcode is set. 765 corresponds to 32 mm.<\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514793\/GS1_7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514793\/208-143\/GS1_7.png\" alt=\"GS1_7.png\" width=\"208\" height=\"143\" \/><\/a><\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-514794\/GS1_8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-514794\/288-171\/GS1_8.png\" alt=\"GS1_8.png\" width=\"288\" height=\"171\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h6>2) The system barcode font has to be added as a character format to the Smartstyle that will be used in the Smartform.<\/h6>\n<p>&nbsp;<\/p>\n<ul>\n<li>In this example Smartstyle &#8216;Z_STYLE&#8217; is used (tcode SMARTSTYLES).<\/li>\n<\/ul>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-515590\/gsss1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-515590\/248-170\/gsss1.png\" alt=\"gsss1.png\" width=\"248\" height=\"170\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Character format &#8216;GS&#8217; is created.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-515594\/gsss2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-515594\/267-207\/gsss2.png\" alt=\"gsss2.png\" width=\"267\" height=\"207\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Our newly created system barcode font is used.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-515595\/gsss3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-515595\/441-278\/gsss3.png\" alt=\"gsss3.png\" width=\"441\" height=\"278\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Activate the style.<\/li>\n<\/ul>\n<ul>\n<li>Open the Smartform, in our example &#8216;Z_FORM&#8217;.<\/li>\n<\/ul>\n<ul>\n<li>Add the style to the Smartform.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-515596\/gsss4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-515596\/396-192\/gsss4.png\" alt=\"gsss4.png\" width=\"396\" height=\"192\" \/><\/a><\/p>\n<h6>3) The code of form \u201c<span lang=\"EN-GB\">STREAMLINE_BARCODE<\/span>\u201d has to be pasted in the \u201cForm Routines\u201d tab in the \u201cGlobal Definitions\u201d 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.<\/h6>\n<p>&nbsp;<\/p>\n<p>The code is in the attached file. I found it in a thread on <a class=\"jive-link-external-small\" href=\"http:\/\/www.sapfans.com\/forums\/viewtopic.php?f=14&amp;t=329507\">SAPFANS.COM<\/a> , thanks for that!<\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-515603\/GSFR1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-515603\/620-343\/GSFR1.png\" alt=\"GSFR1.png\" width=\"620\" height=\"343\" \/><\/a><\/p>\n<h6>4) Call the form &#8220;STREAMLINE_BARCODE&#8221; 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.<\/h6>\n<p>&nbsp;<\/p>\n<p>( 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 &#8220;&lt;AI1&gt;&lt;Content AI1&gt;\u2026..&lt;AIn&gt;&lt;Content AIn&gt;&#8221; )<\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-516358\/gssst4.JPG.png\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-516358\/533-399\/gssst4.JPG.png\" alt=\"gssst4.JPG.png\" width=\"533\" height=\"399\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>At position A the variable <span lang=\"EN-GB\">gv_barcode_product_details<\/span><span class=\"l0s701\"><span lang=\"EN-GB\">&#8211;<\/span><\/span><span lang=\"EN-GB\">bc<\/span> has the value:<\/p>\n<p>&nbsp;<\/p>\n<p>02871734435015037000000101518062810BATCH<\/p>\n<p>&nbsp;<\/p>\n<p>At position B the variable <span lang=\"EN-GB\">gv_barcode_product_details<\/span><span class=\"l0s701\"><span lang=\"EN-GB\">&#8211;<\/span><\/span><span lang=\"EN-GB\">bc<\/span> has the value:<\/p>\n<p>&nbsp;<\/p>\n<p>&gt;;&gt;80287173443501503700000010151806281&gt;60BATCH<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h6>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.<\/h6>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/showImage\/102-57172-1-516372\/gsst5.JPG\"><img loading=\"lazy\" decoding=\"async\" class=\"jive-image jive-image-thumbnail\" src=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/downloadImage\/102-57172-1-516372\/620-262\/gsst5.JPG\" alt=\"gsst5.JPG\" width=\"620\" height=\"262\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>By following these steps a proper GS-1 \/ EAN128 barcode should be created in the smartform.<\/p>\n<p>&nbsp;<\/p>\n<p>Tip 1: To check the barcode you can install a GS-1 app on your smartphone, for example the &#8216;iGepir&#8217; app for IOS and android.<\/p>\n<p>&nbsp;<\/p>\n<p>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.<\/p>\n<p>&nbsp;<\/p>\n<p>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.<\/p>\n<\/div>\n<div class=\"jive-attachments\">\n<ul>\n<li class=\"clearfix\">\n<div class=\"j-attachment-info clearfix\"><a href=\"http:\/\/scn.sap.com\/servlet\/JiveServlet\/download\/57172-1-330640\/STREAMLINE_BARCODE.txt.zip\">STREAMLINE_BARCODE.txt.zip<\/a><span class=\"j-attach-meta font-color-meta\">1.7 Kb<\/span><\/div>\n<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>SAP abap smartform da barcode 128 kullan\u0131m\u0131 ? EAN 128 barcode in Smartforms<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[2,47],"tags":[],"class_list":["post-5197","post","type-post","status-publish","format-standard","hentry","category-2015-2016","category-sap-nedir","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"views":2413,"_links":{"self":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/comments?post=5197"}],"version-history":[{"count":0,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5197\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/media?parent=5197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/categories?post=5197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/tags?post=5197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}