Bar Code Sample Example for Usage in Smarform

Dear Experts,
We are trying to print the barcode on the Manufacturing Sheet and should contain the PART code, Serial Number and the Mfg. Date embeded in the bar code.
Can somebody share the sample  Bar Code Example for Usage in Smarforms.
I never got a chance to work on such development. We are getting different answers from our development partner and sould like to excersize this on my own.
Appreciate your help
Regards,
Ravati

Hi Ravati,  It's simple!!
Follow the example below for printing barcode in smartform .
There are some SAP standard barcodes(for ex.ARTNR,AUFNR ..etc) and also we can create our own barcode for it by using transaction code SE73.
1. Steps for using existing barcode in Smartform
For Printing Barcode in Smartform, you need to have the style with barcode active in it. So define new style where the standard settings should define the barcode that you want to use in the smartform.
For example, For product information display I use the Style as ZMFG_BARCODE.
Create paragraph & character format as "P1 - Product Description". In standard setting of character format P1, select the standard or custom defined barcode. This will ensure the printing of Product Information in Barcode format.
Now Create Smartform with output options specifying style name which you have created with Barcode active.
Complete your smartform coding, and when you want to display the information in barcode, concatinate all the required information and enclose that text in character format like,
for Product Code assuming the technical field name as mara-matnr, it should be printed as below:
<P1>&mara-matnr&</>
2. Steps to create new barcode using SE73 - SAPScript Font Maintenance.
In SE73, Select radio button "System barcode" to create new barcode.  While creation of this barcode, you have to describe the new barcode, select technology new, barcode symbology and barcode alignment.
You may also chage the barcode parameter if required.
Now follow the same steps to implement this new barcode.
Hope this will help you.
Regards,
Pravin

Similar Messages

  • Toolbox tutorial and sample examples for OAF

    Hi all ,please help me to get Toolbox tutorial and sample examples for OAF , and Jdeveloper 9i download link,
    please give me to get the above stuff. Thanks
    Thanks & Regs

    Hi,
    Looks like you are not in 11.5.9, your instance is 11.5.10.
    You can download the Patch 4573517 Oracle9i JDeveloper with OA Extension for 11.5.10 CU2
    from metalink, search with platform as Windows Clinet 32 bit.
    Then you can develop pages for your instance.
    Btw: what is the output for the following query,
    Select bug_number from ad_bugs where bug_number in ('4334965','4125550','4676589','5473858');
    Thanks.
    With Regards,
    Kali.

  • API & sample examples for the data integration to Oracle WMS.

    Hi All,
    Is there any API support for the data integration to Oracle WMS?
    and after that, we want to take the data from WMS to Oracle E-Business Suite..
    Please send the link from where we can find the API and sample examples..
    Any help would be highly appreciated
    Thanks,

    Hi Sanjitanand,
    Thanks for your reply.
    What i are trying is;
    I want to develop generic interfaces using Oracle API; which will help us in sending the RFID related data to WMS and then to EBS.
    My input will be xml or flat files, i'll parse that; get the data and want to send this RFID data to WMS and from WMS to EBS..
    If you have any sample examples/ docs / code etc , pls send me same..
    Any help would be highly appreciated
    Thanks,

  • Code Sample: cardinfo for JCOP41V22 Card

    Listed below is the code sample, cardinfo.java, deduced from loader.java for JCOP41V22 card:
    import java.io.*;
    import com.ibm.jc.*;
    import com.ibm.jc.terminal.*;
    * Sample cardinfo. Demonstrates how to use the offcard API to list applets informatoin,
    * JCOP41V22 by shrinking the loader.java code.
    * Modified by: freiheit / 13/10/2005
    public class cardinfo{
         protected static final byte[] JCOP_CARD_MANAGER_AID = { (byte) 0xa0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00};
         protected static final byte defaultInstallParam[] = { -55, 0 }; // don't know what it's for
         public static void main(String[] args){
         if (args.length == 0){
         System.out.println("cardinfo.main(): missing cap-file argument");
         System.exit(1);
         try{
         cardinfo l = new cardinfo();
         //l.load(args[0]);
         l.getcardinfo();
         }catch(Exception e){
         System.err.println("EX: msg " + e.getMessage() + ", class " + e.getClass());
         e.printStackTrace(System.err);
         System.exit(0);
    private cardinfo(){}
    //private void load(String capFileName) throws Exception{
    private void getcardinfo() throws Exception{
         //CapFile capFile = new CapFile(capFileName, null);
    /*CapFile capFile = new CapFile("C:\\Documents and Settings\\Seah Peng Chew\\workspace\\Helloworld\\bin\\com\\acme\\helloworld\\javacard\\helloworld.cap", null);
         System.out.println("Package name: " + capFile.pkg);
         byte[][] applets = capFile.aids;
         if ((applets == null) || (applets.length == 0)){
         throw new RuntimeException("no applets in cap file");
         // Get connection to terminal, we look for the simulation.
         // As you might want to use "pcsc", "4" or "tcl", "10" in case of
         // Windows or "PCSC", null in case of Linux, you should pass the name
         // of the terminal on the command line or in a properties file
         System.out.println("Open terminal ...");     
         //Make sure the simulator jcop.exe is activated before unmark this satement
         //before running
         //Issue /close command at "cm" prompt if the card is in use,, ie it should
         //have "-" prompt.
         JCTerminal term = JCTerminal.getInstance("Remote", null);
         //For real JCOP41V22 card, please unmark this statement before running
         //Issue /close command at "cm" prompt if the card is in use,, ie it should
         //have "-" prompt.
         //JCTerminal term = JCTerminal.getInstance("pcsc:4", null);
         term.open();
         term.waitForCard(5000);
         TraceJCTerminal _term = new TraceJCTerminal();
         _term.setLog(new PrintWriter(System.out));
         _term.init(term);
         term = _term;
         System.out.println("Get card ...");
         JCard card = new JCard(term, null, 2000);
         System.out.println("Select card manager ...");
         CardManager cardManager = new CardManager(card, CardManager.daid);     
         cardManager.select();
         byte[] dfltKey = c2b("404142434445464748494a4b4c4d4e4f");
         cardManager.setKey(new OPKey(255, 1, OPKey.DES_ECB, dfltKey));
         cardManager.setKey(new OPKey(255, 2, OPKey.DES_ECB, dfltKey));
         cardManager.setKey(new OPKey(255, 3, OPKey.DES_ECB, dfltKey));
         System.out.println("Authenticate to card manager ...");
         cardManager.initializeUpdate(255, 0, CardManager.SCP_UNDEFINED);
         cardManager.externalAuthenticate(OPApplet.APDU_CLR);
         cardManager.update();
         JCInfo info = JCInfo.INFO;
         System.out.println("\nCardManager AID : " + JCInfo.dataToString(cardManager.getAID()));
         System.out.println("CardManager state : " + info.toString("card.status", (byte) cardManager.getState()) + "\n");
         Object[] app = cardManager.getApplets(1, 0, true);
         if (app == null) {
         System.out.println("No applets installed on-card");
         } else {
         System.out.println("Applets:");
         for (int i = 0; i < app.length; i++) {
              System.out.println(info.toString("applet.status", (byte) ((OPApplet) app).getState()) + " " + JCInfo.dataToString(((OPApplet) app[i]).getAID()));
         Object[] lf = cardManager.getLoadFiles(0, true);
         if (lf == null) {
         System.out.println("No packages installed on-card");
         } else {
         System.out.println("Packages:");
         for (int i = 0; i < lf.length; i++) {
              System.out.println(info.toString("loadfile.status", (byte)((LoadFile) lf[i]).getState()) + " " + JCInfo.dataToString(((LoadFile) lf[i]).getAID()));
         term.close();
    static String numbers = "0123456789abcdef";
    private byte[] c2b(String s) {
         if (s == null) return null;
         if (s.length() % 2 != 0) throw new RuntimeException("invalid length");
         byte[] result = new byte[s.length() / 2];
         for (int i = 0; i < s.length(); i += 2) {
         int i1 = numbers.indexOf(s.charAt(i));
         if (i1 == -1) throw new RuntimeException("invalid number");
         int i2 = numbers.indexOf(s.charAt(i + 1));
         if (i2 == -1) throw new RuntimeException("invalid number");
         result[i / 2] = (byte) ((i1 << 4) | i2);
         return result;
    I have tested the code with JCOP Plug-in 3.1.1a in Windows environment.
    Please give your comments and feedback.

    The posted code had some errors in the part which enumerate the installed applets and packages. I corrected that.
    Second I changed the class name from "cardinfo" to "CardInfo", because of java code style.
    import java.io.PrintWriter;
    import com.ibm.jc.CardManager;
    import com.ibm.jc.JCInfo;
    import com.ibm.jc.JCTerminal;
    import com.ibm.jc.JCard;
    import com.ibm.jc.LoadFile;
    import com.ibm.jc.OPApplet;
    import com.ibm.jc.OPKey;
    import com.ibm.jc.terminal.TraceJCTerminal;
    * Sample cardinfo. Demonstrates how to use the offcard API to list applets informatoin, JCOP41V22
    * by shrinking the loader.java code. Modified by: freiheit / 13/10/2005
    public class CardInfo {
        protected static final byte[] JCOP_CARD_MANAGER_AID = { (byte) 0xa0, 0x00, 0x00, 0x00, 0x03,
                0x00, 0x00, 0x00 };
        protected static final byte defaultInstallParam[] = { -55, 0 }; // don't know what it's for
        public static void main(String[] args) {
             * if (args.length == 0){ System.out.println("cardinfo.main(): missing cap-file argument");
             * System.exit(1); }
            try {
                CardInfo l = new CardInfo();
                // l.load(args[0]);
                l.getcardinfo();
            } catch (Exception e) {
                System.err.println("EX: msg " + e.getMessage() + ", class " + e.getClass());
                e.printStackTrace(System.err);
            System.exit(0);
        private CardInfo() {
        // private void load(String capFileName) throws Exception{
        private void getcardinfo() throws Exception {
            // CapFile capFile = new CapFile(capFileName, null);
             * CapFile capFile = new CapFile("C:\\Documents and Settings\\Seah Peng
             * Chew\\workspace\\Helloworld\\bin\\com\\acme\\helloworld\\javacard\\helloworld.cap",
             * null); System.out.println("Package name: " + capFile.pkg); byte[][] applets =
             * capFile.aids; if ((applets == null) || (applets.length == 0)){ throw new
             * RuntimeException("no applets in cap file"); }
            // Get connection to terminal, we look for the simulation.
            // As you might want to use "pcsc", "4" or "tcl", "10" in case of
            // Windows or "PCSC", null in case of Linux, you should pass the name
            // of the terminal on the command line or in a properties file
            System.out.println("Open terminal ...");
            // Make sure the simulator jcop.exe is activated before unmark this satement
            // before running
            // Issue /close command at "cm" prompt if the card is in use,, ie it should
            // have "-" prompt.
            JCTerminal term = JCTerminal.getInstance("Remote", null);
            // For real JCOP41V22 card, please unmark this statement before running
            // Issue /close command at "cm" prompt if the card is in use,, ie it should
            // have "-" prompt.
            // JCTerminal term = JCTerminal.getInstance("pcsc:4", null);
            term.open();
            term.waitForCard(5000);
            TraceJCTerminal _term = new TraceJCTerminal();
            _term.setLog(new PrintWriter(System.out));
            _term.init(term);
            term = _term;
            System.out.println("Get card ...");
            JCard card = new JCard(term, null, 2000);
            System.out.println("Select card manager ...");
            CardManager cardManager = new CardManager(card, CardManager.daid);
            cardManager.select();
            byte[] dfltKey = c2b("404142434445464748494a4b4c4d4e4f");
            cardManager.setKey(new OPKey(255, 1, OPKey.DES_ECB, dfltKey));
            cardManager.setKey(new OPKey(255, 2, OPKey.DES_ECB, dfltKey));
            cardManager.setKey(new OPKey(255, 3, OPKey.DES_ECB, dfltKey));
            System.out.println("Authenticate to card manager ...");
            cardManager.initializeUpdate(255, 0, CardManager.SCP_UNDEFINED);
            cardManager.externalAuthenticate(OPApplet.APDU_CLR);
            cardManager.update();
            JCInfo info = JCInfo.INFO;
            System.out.println("\nCardManager AID : " + JCInfo.dataToString(cardManager.getAID()));
            System.out.println("CardManager state : "
                    + info.toString("card.status", (byte) cardManager.getState()) + "\n");
            OPApplet[] app = (OPApplet[]) cardManager.getApplets(1, 0, true);
            if (app == null) {
                System.out.println("No applets installed on-card");
            } else {
                System.out.println("Applets:");
                for (int i = 0; i < app.length; i++) {
                    System.out.println(info.toString("applet.status", (byte) app.getState()) + " "
    + JCInfo.dataToString(app[i].getAID()));
    LoadFile[] lf = cardManager.getLoadFiles(0, true);
    if (lf == null) {
    System.out.println("No packages installed on-card");
    } else {
    System.out.println("Packages:");
    for (int i = 0; i < lf.length; i++) {
    System.out.println(info.toString("loadfile.status", (byte) lf[i].getState()) + " "
    + JCInfo.dataToString(lf[i].getAID()));
    term.close();
    static String numbers = "0123456789abcdef";
    private byte[] c2b(String s) {
    if (s == null)
    return null;
    if (s.length() % 2 != 0)
    throw new RuntimeException("invalid length");
    byte[] result = new byte[s.length() / 2];
    for (int i = 0; i < s.length(); i += 2) {
    int i1 = numbers.indexOf(s.charAt(i));
    if (i1 == -1)
    throw new RuntimeException("invalid number");
    int i2 = numbers.indexOf(s.charAt(i + 1));
    if (i2 == -1)
    throw new RuntimeException("invalid number");
    result[i / 2] = (byte) ((i1 << 4) | i2);
    return result;

  • Sample example for Agentry

    Hi,
    i am working on the Android Mobile Application Development based on SMP using Agentry Plugin.i am new to this environment, i want to know how it works,and need a sample example to understand the structure.as of now i don't want to connect with any back end services. simple example like creating hello world in java.
    so please guide me on this? is there any link or any sample program ?
    Message was edited by: Michael Appleby

    These documents might help you:
    How-to Build an Agentry based mobile app from scratch connecting to an SAP back-end Part1
    Agentry - Build your own Apps
    Regards,
    Midhun VP

  • Sample example for with check box in iterator.

    Hi,
    I have a requirement where 5 to line items would be displayed with an iterator.
    I am able to display the output with checkbox in the iterator.
    In the next page i need to display the check items.
    How do i identify the checkbox is checked or not.
    Would be greatful if u can provide an sample example.
    Promise to reward point
    Regards,
    Jose

    data: loc_table_event type ref to cl_htmlb_event_tableview.
    Data: loc_cnt type i,
             loc_indx type 1.
    describe TABLE int_table .
    loc_cnt = sy-tfill.
    call method cl_hrrcf_iterator=>get_tv_attr
        exporting
          p_tv_id               = 'TV'
          p_component_id        = me->component_id
          po_request            = me->request
        importing
          p_visible_first_index = me->visible_first_row
          pt_selected_keys      = me->lt_selectedkeytab
          po_tv_event           = loc_table_event.
    *loc_cnt have number of records in intarnaltable, that you displayed in Table view.
    loc_indx = 1.
    do loc_cnt TIMES.
    wf   = loc_table_event->get_cell_value(
                                             row_index     = loc_indx
                                            column_index  = 1 ).
    /*  by using this you can get the value of chexk box in to wf . if wf is 'X' then that record is selected.
      /* you can fetch the record form intarnal table by using index(loc_indx)
    loc_indx = loc_indx + 1.
    enddo.
    vijay

  • Sample/example for explicit mapping for m:n (m-n) CMR

    I found examples for explicit mapping 1:n, but no complete example for m:n cmr explicit mapping.
    Is there any out there for oc4j?
    Thanks,
    - nik.

    Here is an example for employee-projects relationship
    <entity-deployment name="EmpBean" location="EmpBean"
    table="EmpBean_ormap_ormap_ejb" data-source="jdbc/OracleDS" >
    <entity-deployment name="EmpBean" table="EMP">
    <primkey-mapping>
    <cmp-field-mapping name="empNo" persistence-name="EMPNO" />
    </primkey-mapping>
    <cmp-field-mapping name="empName" persistence-name="ENAME" />
    <cmp-field-mapping name="salary" persistence-name="SAL" />
    <cmp-field-mapping name="projects">
    <collection-mapping table="PROJECT_EMP">
    <primkey-mapping>
    <cmp-field-mapping name="empNo">
    <entity-ref home="EmpBean">
    <cmp-field-mapping name="empNo"
    persistence-name="EMPLOYEE_NO" />
    </entity-ref>
    </cmp-field-mapping>
    </primkey-mapping>
    <value-mapping type="hr.ProjectLocal">
    <cmp-field-mapping name="projectNo">
    <entity-ref home="ProjectBean">
    <cmp-field-mapping name="projectNo"
    persistence-name="PROJECT_NO" />
    </entity-ref>
    </cmp-field-mapping>
    </value-mapping>
    </collection-mapping>
    </cmp-field-mapping>
    </entity-deployment>
    <entity-deployment name="ProjectBean" location="ProjectBean"
    table="ProjectBean_ormap_ormap_ejb" data-source="jdbc/OracleDS" >
    <primkey-mapping>
    <cmp-field-mapping name="projectNo" persistence-name="PROJECTNO" />
    </primkey-mapping>
    <cmp-field-mapping name="projectName" persistence-name="PNAME" />
    <cmp-field-mapping name="employees">
    <collection-mapping table="PROJECT_EMP">
    <primkey-mapping>
    <cmp-field-mapping name="projectNo">
    <entity-ref home="ProjectBean">
    <cmp-field-mapping name="projectNo"
    persistence-name="PROJECT_NO" />
    </entity-ref>
    </cmp-field-mapping>
    </primkey-mapping>
    <value-mapping type="hr.EmpLocal">
    <cmp-field-mapping name="empNo">
    <entity-ref home="EmpBean">
    <cmp-field-mapping name="empNo"
    persistence-name="EMPLOYEE_NO" />
    </entity-ref>
    </cmp-field-mapping>
    </value-mapping>
    </collection-mapping>
    </cmp-field-mapping>
    regards
    debu

  • Bar code is compresed for some numbers

    HI ,
           here i am printing barcode which is printing fine in on printer(laser printer).
           then i am going for dot matrix printer. it is printing but it is compressing.
    can any one sugust me what change i can do for this.
    Thanks and Regards,
    S.Srinivasulu Reddy.

    Hi
    It is the problem with that printer(dot matrix)
    some printer won't suggest certain fonts.
    so no need to worry
    ask your basis person to configure the settings of that printer similar to the one which is coming fine.
    Reward points for useful Answers
    Regards
    Anji

  • Who can use dbapi.jar?Can you give some examples for usage?

    Recently ,I want to develop something about oracle sql script.Then ,I think sqldeveloper,dbapi.jar.It will provide some perfectable intefaces.I want to use them,but no examples.
    who can have them?
    Please send to [email protected]
    Thanks.
    he yong

    Sorry, but I don't understand.
    Are you trying to develop an extension to sqldev, or reverse engineer it? What exactly are you trying to do?
    K.

  • Check if a generated document can have a unique bar code for tracking.

    Is it possible to check if a generated document can have a unique bar code for tracking?......We r using the Adobe Central Output Server 5.5 version on windows xp........

    I know of nothing built into the software that is specifically for the purpose of generating a unique value.
    External of the server there are a couple things that might work.
    1) The source of the data file could create a field in the file that contains a unique value that would be the value for the bar code field. For example, the source program could access a database (Access, SQL, whatever) and grab a numeric field for the value while incrementing the field for the next time. If it isn't practical for the source program to do this, then a "custom agent" could be written that would run prior to printing the form that would do this database access and add the field to the data file before passing it on to the print agent.
    2) You could reference the built-in date & time variables (see the Print Agent manual for $date & $time) to use as the value for the variable to be the value for the bar code field. Depending on how long your print job takes to process you could use the time variable that includes the hundredths of a second or not. For example, having the following in the data file:
    b ^field UniqueBarcode
    b @$date1.@$time3.
    would result in a value of
    b 05021506511429
    for the year (05), month (02), day (15), hour (06), minute (51), second (14), and hundredths (29) of the date & time I typed this in. If you wanted the millenium & century you could just hard-code it by placing "20" in front of the @$date1. reference. Of course, depending on the particular bar code you use, a 14 or 16 digit bar code could be too long for what you want.
    One caution with this method, though. If your Central server is set up for processing multiple instances of Central, it would be possible to get duplicates since two (or more) jobs, running in different instances, could start at the same time.

  • For each sample example  in OSB without Split join

    Hi,
    Any body have sample example for For each in OSB without Split join......Thanks in advance

    I know this is an old thread, but I just ran into this same problem. Wow! That's a crappy 'feature'. I wasted 4 hours this morning on this thinking it was me doing something wrong in my xpath, but nope, you need to cast the counter to an int .......
    I hope they fix things like this in the next major release.
    Thanks for the solution.

  • Example scenarios for usage of scripting

    Hi,
    sapian
         Can any of you give me some typical examples for usage of scripting in sap BODS except the sql statements.Like i need examples for error handling and for some other scenarios where i can use scripting.
    Please suggest me some scenarios with examples for the same.
    Thanks in advance
    Regards,
    Kishor Kumar s

    Check this -
    How to capture error log in a table in BODS

  • Examples for converting multiple form output to single pdf

    Hi all ,
         I need sample code or examples for converting multiple smart form outputs (more than 1)  to single pdf. Can someone provide that? Reply  ASAP 
    Thanks & Regards,
    Pavan.

    Hi,
    check this:
    [How to merge multiple spools into single PDF file?;
    [Merge multiple PDF Files;
    [https://www.sdn.sap.com/irj/scn/advancedsearch?query=multipleformoutputtosinglepdf++]
    hope u'll get some idea.
    Regards,
    Sneha.

  • Why do some of my emails have blue squares with a question mark instead of a picture or bar code?

    Why do some of my emails have blue squares with a question mark instead of a picture or bar code?

    No app installed that will view the pics and bar codes.  
    Which email client are you using?  Which version? 
    File suffix of the pics & bar codes?  Example:  .pic, .bmp, .jpg, etc. 

  • Bar Code entry while trying to create one through FB03

    Hi Guru
    We recently had techical upgrade to ECC6.0. While trying to create a barcode entry for a document through FB03 I am getting the following error message
    oa280 - Bar code not active -system administration .
    All the configuration are in place in OAC5,OBD2 . I couldnt able to find any relevant notes regarding to this issue . Can some one help me out in fixing this issue
    Thanks
    Auroar

    Hi
    I raised the question to SAP and they provided me the notes 173521 as suggested by  you . But  following this note will open bar code entry access for all user and for all accounting document which will be an issue .  After few trial and error I was able to get an solution for this issue .  I created an entry in oac5  with barcode active  for object type and user specified and an another entry with barcode inactive for object type ,document type FIIInvoice and user .  This enabled only the authorized user for bar code entry to make changes . One drawback is that it does allow permitted user for all document type
    Thanks all for your suggestion
    Regards
    auroar

Maybe you are looking for