Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Barcode PDF-417 print using XSTRING (Hex Data)

nikos_c
Explorer
0 Likes
1,694

Dear experts,

I currently have a requirement of creating a PDF417 barcode using Hex-data (XSTRING).

I have already created the data in an XSTRING and also read the note 645158.

Inside the note it says that if we want to render data in Hex mode, we should use the \BYTEMODE prefix.

My data is the following (in an XSTRING)

DATA: l_barcodedata_x TYPE XSTRING VALUE '000002024801000100313134D742756C6CF'

Some of this data contain hex values that don't have an iso 1100 equivalent.

Does anyone know how it is possible to generate a barcode in human readable format, using the above hex values?

I tried creating a string variable and adding the the \BYTEMODE prefix, but it didn't work.

Any ideas will be helpful.

Thank you!

2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,403

The note 645158 - New bar code technology says:

  • "\BYTEMODE at the start of the bar code data: The entire bar code uses binary mode
    to encode the data (see SAP Note 2040530).
    Prerequisite: The kernel patch from SAP Note 2040530 has been applied in the system."

The note 2040530 - PDF417 Barcode: accommodate 1100 bytes as input says:

  • "Although the PDF417 2-D Barcode ISO specification allows for 1100 raw bytes to be output in a single barcode, the barcode generation for SAPscript/Smart Forms (see note 645158) cannot generate such a barcode because the built-in encoding algorithm switches between Text and Byte compaction modes, which allows for only about 1040 raw byte values in total."

In fact, I don't understand what the note says, but I don't understand why you say "iso 1100". In the note, 1100 is the number of bytes, not the SAP code page 1100 (iso-8859-1).

The variable inside the PDF417 barcode character format should contain:

 \BYTEMODE000002024801000100313134D742756C6CF

and that should generate the barcode correctly (provided that the kernel is installed).

Hexadecimal "00" does not correspond to "human-readable format" in any way, so I don't understand what your question is.

Read only

nikos_c
Explorer
0 Likes
1,403

Hello,

Thank you for the answer.

By "human readable" I mean that when scanned, the barcode must show any ISO8859-1 characters (1100) converted in human readable format (for e.g. its should show "This is a test" instead of "54 68 69 73 20 69 73 20 61 20 74 65 73 74").

I tried with the approach you mentioned, but the system created a barcode with HEX info only.

Maybe, I'm missing the KERNEL installation in this case?

Thanks once again.