2D Barcode (PDF417) in Smartforms

Hi Gurus,
I have a Smartforms with 2D-Barcode (PDF417).
I have to use header, field separators and foot into the barcode ( [)>, RS, GS, EOT...).
I define these separators like this:
CONSTANTS:
c_head VALUE '\0X5B\0X29\0X3E',       " Complience Indicator
c_rs   VALUE '\0X1E',                 " Format Trailer Character
c_gs   VALUE '\0X1D',                 " Data Field Separator
c_eot  VALUE '\0X04'.                 " Message Trailer
and then fill my barcode variable like this:
CONCATENATE
c_head c_rs '06'              
c_gs '12SGTLVWAG01'      
c_gs '2L'   gv_werk_empf    
c_gs '1L'   label_data-ablad 
c_gs        gv_license_plate  
c_gs 'P'    label_data-kdmat   
c_gs 'Q'    gv_vemng       
c_gs 'B'    label_data-vhmku  
c_gs 'V'    label_data-eikto   
c_gs '12S'  label_data-vbeln  
*c_gs '1T'   label_data-charg  
c_gs c_rs c_eot 
INTO gv_pdf.
The problem is, when I scan my barcode I have the \ separator, and I can't delete it...
\06\12SGTLVWAG01\2L22\1L001X1\1JUN341382615100348063\P 0B1 200 345 E\Q1\B106925\V261988\12S0063397339\\
Any idea how I can delete this \ ?
Regards,
David

SAP ABAP Code to Generate PDF417 Barcodes
 Preparing SAP data to be printed as a linear barcode can be a pain at times; when 2D barcodes with proper field separators are required the pain factor goes up. Most of the problems come from trying to convince SAP to assign non-printing control characters to the output variable. So, I have written a small example which demonstrates both how to generate a PDF417 barcode and the steps required to assign special characters to a string in ABAP. SAPscript cannot handle 2D barcodes, so this code will only really work in SmartForms. 
DATA: gv_pdf417 TYPE string, 
      gv_date_old TYPE likp-wadat,
     gv_serial TYPE num9,
      gv_kdmat TYPE vwahn-kdmat,
      gv_meng TYPE char10,
     lf_masterorsingle TYPE char3,
      lf_hex_rs TYPE x LENGTH 4 VALUE '001E',
      lf_hex_gs TYPE x LENGTH 4 VALUE '001D',
      lf_hex_eot TYPE x LENGTH 4 VALUE '0004',
      lf_char_rs TYPE c,
      lf_char_gs TYPE c,
      lf_char_eot TYPE c.
FIELD-SYMBOLS: <lfs_rs>,
               <lfs_gs>,
               <lfs_eot>.
WRITE is_wahn-wadat TO gv_date_old yymmdd.
WRITE is_wahn-exidv+11(9) TO gv_serial.
" Get non-printing control characters set
ASSIGN lf_hex_rs TO <lfs_rs> CASTING TYPE c.
ASSIGN lf_hex_gs TO <lfs_gs> CASTING TYPE c.
ASSIGN lf_hex_eot TO <lfs_eot> CASTING TYPE c.
lf_char_rs = <lfs_rs>.
lf_char_gs = <lfs_gs>.
lf_char_eot = <lfs_eot>.
" Master or single label
IF is_wahn-zzmastersingle = 'M'.
        lf_masterorsingle = 'M'.
ELSE.
        lf_masterorsingle = 'S'.
ENDIF.
CONCATENATE
'[)>' lf_char_rs
'06' lf_char_gs
'P' gv_kdmat lf_char_gs
'Q' gv_menge lf_char_gs
'V' gv_lifnr lf_char_gs
'D' gv_date_old lf_char_gs
  lf_masterorsingle gv_serial
  lf_char_rs lf_char_eot
INTO gv_pdf417.
If all goes well, then the variable gv_pdf417 should contain a string like the one below (the characters in the angle brackets are the hex codes for the control characters). In SmartForms the variable should be output in a text area with using the PDF417 barcode character formatting (your basis team will have to install it if it is not already available). The barcode at the top of page is generated from the string below.

Similar Messages

  • PDF417 2D Barcode - Use in Smartform

    Hello,
    I have created a 2D barcode using symbyology PDF417, and also created a character format for this which i can use in my smartform. My problem here is that i am not clear of how i can use this barcode in the smartform when i use it in the text field.
    I have to put in the data for material number and serial number in this barcode.
    Can someone please help out in this. I have even checked SDN for this topic but with no satisfying answers.
    Regards,
    Rasika

    Hi,
        Create a style Character "Z1" in smartform  txn. and assign ur 2D barcode font in it.
        In smartform under your text window you do as follows.
    for example you want to show this field &IS_SERNR&&IS_MATNR& as Barcode, then you select completely this field &IS_SERNR&&IS_MATNR& and then select "Z1" character from the deopdown under general attributes tab.
    or change the Editor and assin as follows < z1 >&IS_SERNR&&IS_MATNR&< / >
    Also refer this image http://wiki.sdn.sap.com/wiki/download/attachments/202279604/2dbarcode.JPG
    Regards
    GK.
    Edited by: Gnana Kumar on Oct 22, 2010 1:05 PM
    Edited by: Gnana Kumar on Oct 22, 2010 1:37 PM

  • Need to print SCC-14  and UCC-128 barcodes through SAP Smartforms

    Hi all,
    I have Two labels to be printed using smart forms.
    But in one label the barcode should be of SCC-14 type
    and in other the barcode should be of UCC-128 type.
    <b>How to print SCC-14  and UCC-128 barcodes through SAP Smartforms?</b>
    As standard barcodes do not meet my requirement i have created custom barcodes in transaction se73 of required height and width .
    This is as:Se73>System Barcodes>change>Create>New-->:
    I have given bar code and short text.
    Narrow Module Width &Linear Height&Code128 Mode given default values.
    But in this process where can i set the barcode should be of SCC-14.
    > I have known that if we give Code128 Mode =
    > 'U'-->It is like UCC-128.Is it correct ?
    >
    > But how can i know for SCC-14 barcode.
    >And How many inches is euqal to 1 unit of Narrow Module Width &
    How many inches is euqal 1 unit of Linear Height?
    Please help me in this regard.It is urgent.
    All solutions from you will be fully rewarded.
    Thank you in advance.

    Hi  Rama,
    We are working to print Bar codes using Smart forms.
    Barcode is printing in label (4*6 Inch’s) using printer (Zebra Z4 M PLUS (300 DPI)) (TLP-3842) which supports ZPL Language and Device type is ZLZEB3 (300 DPI).
    We are printing bar codes successfully.
    But After testing bar code using bar code tester (BC TESTER 4.4) software tool.
    The results are failed.
    We are expecting results: Like bellow.
    Value formatted type is: EAN
    Value is “[C142007470 “
    Total Description:   420. “Ship To-Deliver to “Postal Code a Single Postal Authority 07470
    Current Situation:
    Here we are Created Bar code (Ship to Post) in SE73 with
    Bar code type is: Code 128
    Width is: 08
    Height: 300
    Mode is: A    (Even I tried with ‘N’ and ‘U’)
    UCC check: Empty.
    I added this to character format in my Smart forms.
    Text in smart form is: ,,,,<C2>&W_POSTAL_CODE&</>    for  P1 Paragraph.
    Using this functionality  we are able to print a Bar code in Label.
    But while testing using BC Tester
    Values are showing:
    Value formatted type is: EAN
    Value is “42007470 “
    Total Description Values:  Empty
    The Type is ‘EAN’ is when we select the Manually EAN Radio button (but this not capturing automatically this is problem we are facing).
    Even I tried with some changes like bellow:
    But Forcefully writing some code in Program lines  Smartform: 
                   concatenate '420' fs_zediu017-pstlz into w_postal_code
    After this forcefully adding this Value [C1  in Before W_postal_code Element text :
    Text in smart form is:        ,,,,<C2>[C1&W_POSTAL_CODE&</>    for  P1 Paragraph.
    After this we are tested using BC tester
    Every thing is displaying correct Vales which mention above when we manually select the Value formatted type radio button ‘EAN’ but this Wrong.
    Client need when testing bar code using BC TESTER 4.4 it should be display to take EAN radio button and showing all the Values.
    Please let me know if you get any idea on this ?
    Thanks,
    Bathini.

  • Printing QR-Code barcodes in SAP smartforms

    Hi,
    Is it possible to print QR-Code barcodes in SAP smartforms using system barcode font? Can anybody please let me know the font settings for QR-Code in SE73 font maintenance?
    A sample QR-Code lablel can be found [here|http://images.orkut.com/orkut/albums2/ATUAAADhaahG5MxsqQ66lcSO9oHRWD3X8zh7yv1kEakKwMtVHchChN1WfZlM__2D0_o8H7AS4_UaTTCymQQtvXHb9-q3AJtU9VCWnzkZ4gC1sVnCekVuQ90qmhzeMw.jpg].
    Regards,
    Milan

    Hi Milan,
    I'll blog in SDN about my research that I presented at TechEd during session CD119 (blog) but I'll begin sharing with you some ideas.
    Basically, without relay on any printer specific driver I would propose to follow the following steps:
    1.Generate the QR Code image file (.PNG) with one of the methods presented in the following pages
    2.Upload the image into the SAP system
    2.1 Convert the generated file (file.png) to TIFF using SAP IGS class CL_IGS_IMAGE_CONVERTER (see GRAPHICS_IGS_IMGCONV_DEMO)
    2.2.Upload. Use report RSTXLDMC to upload the image into SE78
    3.Include the image into the Form:
    3.1.SAPScript/:INCLUDE ZHEX-MARCO-name OBJECT TEXT ID ST
    If everything is clear, the missing point should now be the first one. To generate the PNG from ABAP I found some options if you like, the better I think is presented in my open source project called abap2qrcode published here http://code.google.com/p/abap2qrcode/.
    I know it's not trivial and I'm curious to know what do you think about it.
    Sergio

  • 2 of 5 barcode printing in Smartforms

    Hi,
    I am printing a 2 of 5 barcode on my smartform. When reading it using the barcode reader, I have an extra "0" showing at the beginning of the value. The extra zero is not showing on the human readable value. This is not the check digit as in the barcode font set up, I have removed the same.
    E.g. if my value is 0123456789 stored in a type NUMC of 10, I am getting 0123456789 printed beneath the barcode but the barcode reader shows 00123456789, i.e. a total of 11 characters.
    Could anyone tell me the reason behind this and what the solution could be?
    Thanks and best regards,
    Prem

    Hi,
    In standard bar code BC_125 zero will be prefixed to the value you print as bar code.
    Create a custom barcode as below
    se73->select system bar codes->change->click on create
    select new bar code technology->enter new bar code ZBC_125 and description->continue
    select Interleaved 2of5->continue->select normal->continue
    In the screen of Interleaved 2of5 parameters set 'Mod-10 Check Digit' to blank value->continue and save the bar code.
    Now select your custom bar code and test barcode(F6).
    This will resolve your problem.
    Regards
    Praveen

  • Barcode Display in SmartForm

    Hi,
    I need to display barcode in my smartform based on the Delivery No, can any body tell me the way  to do it .
    Regards,
    Srinivas

    hi srini,
    define a character format c1. there u get option in 'standard setting' to make it to barcode. choose the required bar code family.
    now save and activate this character format.
    in ur smartform pass your delivery no. with character format c1.
    ex: <c1>wa_itab-devlivery_no</> like this.
    the output u will get in barcode.
    hope this will help u.

  • Barcode option in smartform

    hi friends..
    any standard program avaliable to explain the barcode concept in smartform...
    otherwise if anyone having idea how to use barcode in smartform let me know the
    detail..
    Thanks
    Gowrishankar

    Hi gowri shankar,
    You need create a style in that the
    Character format BARCODE format needs to be enabled.
    I dono any standard program which uses it.
    Reward all helpfull answers.
    Regards
    Gowri

  • Can 2D BarCode (PDF417) be generated in Reports?

    Is it possible to generate 2D barcode (PDF417 spec) using Oracle Reports? What should I do in order to generate barcode?
    Thanks,
    Dejan Bogojevic

    Thanks for your answer, but that is not helping me generate 2D BarCode (Spec PDF417) as I mentioned before.
    Thanks,
    Dejan

  • Paper Form Barcode (PDF417)

    All
    Anyone can please tell me that what is the maximum data length we can embed in a Paper Form Barcode (PDF417)?
    In case of any queries, please feel free to contact me.
    Thanks in advance.
    Syed Hussain Itiba Naqvi

    Hi Scoot ,
    I need little help on 2Dbarcodes
    as per my understanding we have less then 800 character limit for barcode ,
    do we have any impact of duplicate data on barcode ?
    because when  i gave same input to the barcode and scan it ,i dont find any data in it ?
    for example: i gave  "9" character 6000 times , which almost generates more  8 barcodes, but when i scan the barcode i dont find any data in it .
    can you please help out  whats the issue with it ?
    you can mail me on my id :[email protected]
    Thanks,
    Satish Shirahatti

  • How to print  the barcode in a smartform satisfying specific condition

    Hi
    I have a requirement where I need to print the barcode System Bar code = BC_93
    satisfying the following requirement:
    The Bar code is made up of the concatenation of “code1 ”, “dash character”
    and “ code2”. The two codes ( that is some field in a custom table) should be
    eight char long each (put leading zero if the length of the code is shorter).
    This barcode shall be printed always apart from:
    a) code1 material type is ZCPF
    b )Is a combi order, with no code2 stored in storage location “abc”
    please help with example . its very urgent , points will be rewarded.
    Thanks

    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Hope this link ll be useful..
    http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
    go through these links and cose u r previous threads,
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    smartform - barcode
    http://www.erpgenie.com/abap/smartforms.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-basis/print-barcode-with-smartform-634396
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/printing-barcode-733550
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    Re: how to print barcode using smartform and sapscript...?

  • How to create barcode EAN13 in smartforms?

    I want to create EAN13 in smartforms,but in smartforms the EAN13  preview incorrect .
    My step is :
    1.SPAD, create Device types:ZSWIN (Copied from SWIN).
    2.SPAD, create Output Devices ZEAN,Device type is:ZSWIN,Aeecss Method:G,Host Printer:__default
    3.SE73,created ZEAN13 by old Bar Code Technology,Bar code Type :EAN13 (UNDEF also try too)
    4.SE73,in print Bar Codes ,select  ZSWIN device type,add Bar code:ZEAN13, prefix is SBP13,suffix is:SBS01. the SBP13 and SBS01 are in  system default  for EAN13 print Control.
    5. SMARTFORMS,create style ZBAR,create Character Formats C1 used bar code:ZEAN13,also create C2 used bar code:BC_EAN13.
    6. SMARTFORMS,create test form :ZTEST,create tow texts,one used the font C1,the other is C2.
    Now test run,click Prievew,Select output device:LOCL or ZEAN,the text by font ZEAN13 and BC_EAN13 are also incorrect.
    The barcode can not with the text to change.
    Above is my step.
    Please help me to check which step have problem.
    Thanks
    Sun.

    Hi ,
    While creating new system barcode form existing barcode, system will ask for create with new technology or create with old technology, in that case you have to select new technology and specify barcode terminology as EAN13. then specify other parameters like modular height and width as per your requirement.
    first define style for smartform and then use this system barcode in character format. Again by using this character format, you can able to print element whatever you want in smartform.
    Also before printing this newly developed barcode,please confirm with basis that you use correct printer which is already barcode configured.
    Hope this works for you.........
    Thanks..........

  • Barcode Printing in Smartforms

    Hi all,
             I have created a barcode via SE73 and attached it in the Smartstyles via a character Format. I have also added this character format in my Smartforms.
             When I click the preview I'm able to see the Barcode getting displayed (Zebra Printer). But when it gets printed in the Zebra Printer it does not get displayed.
    Kindly let me know if anyone has faced a similar issue related to this. It would be of great help.
    Thanks
    Ramky.G

    Hi
    check this
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Hope this link ll be useful..
    http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
    go through these links and cose u r previous threads,
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    smartform - barcode
    http://www.erpgenie.com/abap/smartforms.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-basis/print-barcode-with-smartform-634396
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/printing-barcode-733550
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    Regards
    Anji

  • 2D barcode - PDF417 in ZPL printer

    Hello All,
    I am trying to print 2D barcode in PDF417, using the below code.
    CONCATENATE '[)>' '1E' '06' '1D' 'P' w_partno
      '1D' 'Q' w_quantity
      '1D' 'V' w_supplier
      '1D' 'D' l_date
      '1D' 'M' w_serial
      '1E' '04'
      INTO w_2d.
    The barcode was printing fine. But now the client requirement is to use the seperator as 'chr(30)' intsead of 'ID'.
    Similarly 'chr(29)' instead of 'IE'. we tried changing that and now it is not printing the 2D barcode as the number of characters is exceeding.
    In the SPOOL i can see all the characters, but 2D barcode is not printed. 
    W_2d is defined as string to accomodate more characters but still not sure why it is not printing.
    Also, when we remove any fields or reduce the number of characters then we can see the barcode is printing fine. not sure with the problem happening. Can anyone help us here..
    Regards,
    T.....

    ZPL manual gives an example: [)>_1E01_1D961...
    1E and 1D must be preceded by the hex escape character indicated in the preceding ^FH command (_ is the default escape character)

  • Barcode Alignment in Smartforms

    Hi.
    We are on ECC6. I am using SMARTFORMS and trying to align a barcode in the centre of a defined window. This is not happenning. How can I achieve this. I have tried using Paragraph formats etc but it only works for text..and not barcodes. I will appreciate your assistance.Thank you.

    Hi,
    It's better to use a template with 3 equal columns. Put your bardcode in the center of the template i.e. no 2 columns.
    Thanks,
    Abhijit

  • Problem with Barcode printing in smartforms

    Hi Gurus,
    I have  made  changes to the system barcode  height in SE73 from say 1.3 to 0.7 cm. But when I take the printout  from the  barcode printer I am getting  the  barcode with old height.
    My concern is do we  need to do change anything with the  printer settings. If so, where and how? who has to do that?
    -B S B.

    Hi,
    But how do we reduce  the height.
    I changed  the  height of the system barcode (device  independent).
    Print preview looks fine. But when actual printing takes place  still the barcode retains original height.
    Could you please  explain me  in simple steps?
    SAPHelp is more  confusing.
    -B S B

Maybe you are looking for

  • How to call methods at selection screen?

    Hi all, I am developing a program in object oriented abap. i have defined a class and implementated, and we have to instantiate the class in start of selection. now the problem is how to call a method at selection screen event. i want to validate the

  • JavaCard .cap file generation throws IllegalArgumentException

    Hi all, I'm trying to generate a .cap file for some applet source provided externally, and capgen/converter are throwing an IllegalArgumentException when I attempt to generate a .cap (either straight from .opt or using capgen on a pre-generated .jca

  • JSP - Portlet communicatation

    Hi, i wish to achieve communicate between a jsp (which is placed in the header) and a portlet (which is placed in a book) in the Main Page Book. Is this possible ? I know that inter-portlet communication is possible, but I need to use a jsp in the he

  • Booklet to PDF print preset settings not saved

    I'm using ID CS4 on Vista64 Business and trying to output numerous booklet layouts to PDF for a client to print in-house at their premises. My lo-res tests work perfectly on their printer, I now need to output everything @ 300dpi etc. I've set up a p

  • Access level for Tab

    Hi, How can i define security level for each tab? i have set of users and i want a particular tab to be displayed to certain users only not to all users. i have already defined access privilege for the particular tab in the Advance option for tab gra