Barcode 128 interpreter in NAV Classic Client
frytach
Member Posts: 8
Hi,
we're working a lot with barcodes. Generating is easy and we print a lot of documents with barcodes. Also we scan our own barcodes and can use it within NAV.
Now we want to read barcodelabels from our suppliers. They use the standard GS1-128 Barcode with severel information. E.g. itemno, weight, bbd etc.
Every information has it's own identifier.
Does anyone have a NAV programmcode to "interpret" or "parse" the GS1-128 Code and separate it into the different information? We have a lof of suppliers and the information in the barcode is not the same all the time.
The NAV programmcode should'nt be too difficult but it is a lot of work to look for all possibilities. Maybe someone can help me not to reinvent the wheel again.
Thank you
Jörn
we're working a lot with barcodes. Generating is easy and we print a lot of documents with barcodes. Also we scan our own barcodes and can use it within NAV.
Now we want to read barcodelabels from our suppliers. They use the standard GS1-128 Barcode with severel information. E.g. itemno, weight, bbd etc.
Every information has it's own identifier.
Does anyone have a NAV programmcode to "interpret" or "parse" the GS1-128 Code and separate it into the different information? We have a lof of suppliers and the information in the barcode is not the same all the time.
The NAV programmcode should'nt be too difficult but it is a lot of work to look for all possibilities. Maybe someone can help me not to reinvent the wheel again.
Thank you
Jörn
0
Comments
-
Hi Jörn,
I cannot provide you with code, but it's not that much code to write either, at least to handle conforming barcodes. What you need is a table with field definitions (AI, description, length, Type, variable length Y/N) and most likely a buffer table to hold the recognized AI/value pairs.
The two main challenges are- geting the barcode reader to send the FNC1 code (variable length field terminator) is such a way that you can see it from within NAV
- handling barcodes that do not adhere to the standard, e.g using wrong field lengths, not using an FNC1 symbol where one was required, using wrong AIs ...Usually you need a table with field compositions to handle those illegal codes (something like: if the value with AI xx is equal to xyz then the length of AI yy is z), unless you can either ignore them or force your vendors to send you correct codes.
0 -
For a transport customer we created a special definition file to recognize barcodes from suppliers, some kind of IFTMIN it is called:
Barcodes like for example UNH+647016597422895+IFTMIN:D:96B:UN+DHL3.1/BMF1.01'BGM+787+64701659+9'DTM+186:20071016:102'TSR+++01'TOD+Z01++CPT:::etc.,etc.,etc.
are recognized with below commands:
=IFT(1;TSR+;3;1)=POS(1;10) ----> (first TSR+, third field, element 1) -> (Position 1 t/m 10)
=POS(1;5)
=HNO(Length)
=STR(Value)
=EQU(Value)
=TRM(Value;Type) Type=0=Left, 1=Right, 2=Left and Right, 3=All
=LEF(Length), =LEF(StartPosition, Length)
=RIG(Length), =RIG(StartPosition, Length)
It took us a few days to create it but with more then 60 different definitions to handle it saved the customer from a lot of developer hours with every change.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 329 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
