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

Printing Bar code - urgent

Former Member
0 Likes
503

how to print the bar code through sap script..

how to print the bar code through sap script..

3 REPLIES 3
Read only

Former Member
0 Likes
471

Hi,

Search for the Barcode format in the SCRIPT FORMATTING OPTIONS:

We use Z for no zeros,S for no Sign,E for exponents R for right justification , I, * etc, similarly for Printing barcode there will be a format.

Regards,

Anji

Read only

Former Member
0 Likes
471

barcodes wil be generated in the printer itself, if you give <BC>&HD_GEN-MATERIAL_NUMBER&<> then you have a value for "Barcode" .

Adding Your Own Bar Code:-

http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94fc51ea11d189570000e829fbbd/content.htm

barcodes in SAP

http://help.sap.com/saphelp_nw04/helpdata/en/68/4a0d5b74110d44b1b88d9b6aa1315b/content.htm

Print Unique Indicator as a Barcode

The printing of unique indicators of elements (reference numbers of records, case indicators, or document numbers) as barcodes is controlled by SAPscript forms.

SAP delivers a common SAPscript form based on the SAP barcode type AUFNR for records, cases, documents and incoming post items.

To create another SAP barcode type, you can copy the SAPscript form RMPS_BARCODE and then adjust it to your own requirements. Then you have to define the new form using the following attribute names in the table SCMGPARAM:

From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (‘First page’, ‘Next page’, ‘Last page’) is printed as local variable symbol.

Definition in the SAPscript form:

/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO

/: USING &PAGE&

/: USING &NEXTPAGE&

/: CHANGING &BARCODE&

/: ENDPERFORM

/

/ &BARCODE&

Coding of the calling ABAP program:

REPORT QCJPERFO.

FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY

OUT_PAR STRUCTURE ITCSY.

DATA: PAGNUM LIKE SY-TABIX, "page number

NEXTPAGE LIKE SY-TABIX. "number of next page

READ TABLE IN_PAR WITH KEY ‘PAGE’.

CHECK SY-SUBRC = 0.

PAGNUM = IN_PAR-VALUE.

READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.

CHECK SY-SUBRC = 0.

NEXTPAGE = IN_PAR-VALUE.

READ TABLE OUT_PAR WITH KEY ‘BARCODE’.

CHECK SY-SUBRC = 0.

IF PAGNUM = 1.

OUT_PAR-VALUE = ‘|’. "First page

ELSE.

OUT_PAR-VALUE = ‘||’. "Next page

ENDIF.

IF NEXTPAGE = 0.

OUT_PAR-VALUE+2 = ‘L’. "Flag: last page

ENDIF.

MODIFY OUT_PAR INDEX SY-TABIX.

ENDFORM.

hope this helps you

sri

pls:award points if helpful