Application Development 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: 

Bar Code Generation in ABAP Report

Former Member

Hi Friends,

Can anyone help me on how to generate a Bar code in Z report(not in SAP Script).

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Krzys,

I tried with the logic provided by you, but I am facing problem with Syntax error when I am tring to activate the program,with this commands('BARNO P_CAPAC') in your concatenate statement.

My requirement is in the existing classical report, I need to incorporate the logic for displaying Sales Order Number in the form of Barcode.

Can you give me more detail about this.

Regards,

Senthil

6 REPLIES 6

krzysztof_konitz4
Contributor
0 Kudos

Hi,

You should create printer for plain text in SPAD (ASCIIPR device type) and then you can use code to print in printer internal language:

DATA: CIAG(200).
  SELECT SINGLE SPLD INTO USR01-SPLD FROM USR01 WHERE BNAME = SY-UNAME.
  NEW-PAGE PRINT ON DESTINATION USR01-SPLD IMMEDIATELY 'X'
           COPIES 2.
  CONCATENATE '^XA^LH20,20^FO60,80^B3,,250,N^FD' BARNO P_CAPAC
              '^FS^FO90,380^AE^FD' '*' BARNO P_CAPAC '*'
              '^FS^XZ' INTO CIAG.
  CONDENSE CIAG.
  WRITE: CIAG.

Krzys

Former Member
0 Kudos

Hi Senthil,

Check these links.

http://searchsap.techtarget.com/tip/1,289483,sid21_gci839063,00.html

Hope this helps you.

Regards,

Anjali

0 Kudos

Hi,

Thanks for your feedback on this Query. The requirement is I need to generate Sales Order Number as Bar code in the report output.

can u provide me more detail on this.

Regards,

Senthil

Former Member
0 Kudos

Hi Krzys,

I tried with the logic provided by you, but I am facing problem with Syntax error when I am tring to activate the program,with this commands('BARNO P_CAPAC') in your concatenate statement.

My requirement is in the existing classical report, I need to incorporate the logic for displaying Sales Order Number in the form of Barcode.

Can you give me more detail about this.

Regards,

Senthil

0 Kudos

Hi,

This code was only posted as an example and is not a complete program. BARNO and P_CAPAC are simple text variables used to store number which should be printed on label.

Generally string CIAG contains command in printer internal language. Such textual language is used to create label on label printers also with bar codes.

You can only print bar codes on printers which support such activity. Mostly there are thermal label printers.

Although some other printers also support bar codes. For example HP laser jets require special cartridge in order to print bar codes.

Krzys

Former Member
0 Kudos

Hi Krzys,

If possible can you give full logic for generating Bar Code in the ABAP Report.Also suggest me in which type of printer this bar code generation will work. Most of the printers used are of device type HPLJ5SI.

Is it possible to see Bar codes in print preview.

Can u suggest me the other option also to generate bar code in standard report.

Thanks,

Senthil