Printing barcode lables in sap script forms
hi friends,
i am trying from long time to print barcode on Z4m barcode printer.the folowing is the requirment.
Application object is : MM07ET
Text ID : 7001 of the application object
Layout set: RM07ETIKETT .
Layout set is i copied from client 000 .
Folowing is the ZPL code i am using to get barcode print.
/ ^XA
/ CWI,U00S8_S2.FNTFS
/ FO125,10A0N,21,0CI0FRFDAES CARTEGENAFS
/ CWJ,U00O01JW.FNTFS
/ FO20,57A0N,27,0CI0FRFDMaterial Number :FS
/ CWK,T00O01JW.FNTFS
/ FO19,97A0N,27,0CI0FRFDMatl Desc :FS
/ CWJ,U00O01JW.FNTFS
/ FO20,133A0N,27,0CI0FRFDStorage Location :FS
/ CWJ,U00O01JW.FNTFS
/ FO20,175A0N,27,0CI0FRFDBin Location :FS
/ CWJ,U00O01JW.FNTFS
/ FO19,214A0N,27,0CI0FRFDValuation Type :FS
/ CWK,T00O01JW.FNTFS
/ FO19,253A0N,27,0CI0FRFDDoc Number/Item :FS
/ BY2,3.0FO64,290BCN,64,N,Y,NFRFD>:10.000.006FS
/ CWL,T00S8_S2.FNTFS
/ FO144,101A0N,21,0CI0FRFDabcdefghijklmnopqrstuvwxyzFS
/ CWI,U00S8_S2.FNTFS
/ FO154,360A0N,21,0CI0FRFD10.000.006FS
/ CWI,U00S8_S2.FNTFS
/ FO179,181A0N,21,0CI0FRFDasdf123456FS
/ CWI,U00S8_S2.FNTFS
/ FO230,137A0N,21,0CI0FRFD01234FS
/ CWI,U00S8_S2.FNTFS
/ FO220,63A0N,21,0CI0FRFD10.000.006FS
/ CWI,U00S8_S2.FNTFS
/ FO200,219A0N,21,0CI0FRFDM1FS
/ CWI,U00S8_S2.FNTFS
/ FO222,258A0N,21,0CI0FRFD5000000011FS
/ ^PQ1
/ ^XZ
i need clarification on following items.
1) Weather this zpl code i need to write in MM07ET object.? or in layoutset ZRM07ETIKETT
2) ABOVE CODE HAS BEEN CREATED BY BARONE.(OTHER WISE I CAN ALSO WRITE MY OWN ZPL LANGUAGE)
3)HOW TO SEND SEND SAME CODE IN TO PRINTER MEMOREY.(IF IT IS .ITF HOW TO SEND IT THROUGH SAPSCRIPT.)
(PLS ANSWER ANY ONE AS EARLY AS POSSIBLE).
Typically I've put the code into the MM07ET object, leaving the layout set as simple as possible.
The question I pose is how do you transport MM07ET? I have done it in the past in older versions, but it seems my notes are not valid anymore? I know you can upload and download MM07ET, but a transport is preferable.
I used to manually assign an object to the transport:
R3TR TEXT MM07ET,MM07ET_ETIKETT,7001,E
Any ideas?
Regards,
Louise Langley
Similar Messages
-
How to print Barcode in te SAP SCRIPTS?
Hi All,
Can anyone of you let me know how to print the Barcode in the SAP SCRIPT? This is the first time I'm working on the Barcode. I've to print many fields data into one barcode. Like PO number, Material Number, Plant, Company code..etc..
Best Regards,
Venkatesh Eddala.Hello Venkat,
Creating Bar code:
-->From trans code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
--> when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
-->Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
-->The place where you are using the field value use like this
<C1> &itab-field& </C1>.
You will get the field value in the form of barcode.
Which barcode printer are you using ? Can you download this file and see.
http://www.servopack.de/Files/HB/ZPLcommands.pdf.
It will give an idea about barcode commands.
SAP Barcodes
-->Barcode solution consists of the following:
barcode printer
barcode reader
mobile data collection application/program
A barcode label is a special symbology to represent human readable information such as a material number or batch number
in machine readable format.
There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
You can print barcodes from SAP by modifying an existing output form.
Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
for your reference check the below links:
http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
for smart, please check the below link:
http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
See the below program forbarcode in sapscript for your reference:
DATA: BAR_CODE1(16) VALUE `ABC01230123A01'
NEW-PAGE PRINT ON IMMEDIATELY `X'.
FORMAT COLOR OFF INTENSIFIED OFF.
If the barcode is the first element on the page, the following Write
statement is needed (otherwise you get a date in the first print
control.
WRITE:/
Turn on the barcode font, print the data, and switch back to the
printer's default font. Be sure to use NO-GAP to avoid unwanted
characters or CR/LF.
PRINT-CONTROL FUNCTION `BCPFX'
WRITE: BAR_CODE1 NO-GAP
PRINT-CONTROL FUNCTION `BCSFX'
Add a Write statement to prevent insertion of CR/LF into the barcode.
WRITE:/
Sample SAPSCRIPT
Variable BAR_CODE1 contains the barcode data, including asterisks.
The & is needed to avoid unwanted spaces or CR/LF characters
/E LINE
/: PRINT-CONTROL BCPFX
= &BAR_CODE1&
/: PRINT-CONTROL BCSFX
Venkat - Please reward points for previous therad if you feel good answer ...
Thanks
Seshu -
Printing Turkish Characters in SAP Script Form
Hi I want to print a Form where I need to Print Turkish characters from Database. Its Print Preview is coming absolutely right but there is some problem while printing. I shows # symbol in places of Turkish Characters. I have checked the printer and drivers and they are absolutely fine. Printer is printing other documents in Turkish Language but not the form. System has Turkish fonts installed. Kindly help. Thanks in advance.
Hi
See this OSS note for your problem
OSS Note: 776507
Symptom
Documents printed via SAPscript or SmartForms do not print with correct special characters, e.g. ### prints instead of Japanese or Russian characters. What to do?
Other terms
SAPscript, SmartForms, printing, device types, OTF
Reason and Prerequisites
Help required to choose proper fonts in a SAPscript or SmartForm
Solution
When using SAPscript or SmartForms to print (or email or fax) a form from a business application, many factors influence the outcome of the actual text within the form. All these factors must be checked in order to ensure a correct printout:
1) The language version of the form used to produce the printout.
Example: If you want to print a French invoice, you need to have a FR version of your SAPscript or SmartForms invoice form RVINVOICE01. And the application program must specify the corresponding language key (FR) when calling the SAPscript or SmartForms API.
2) The font selections specified in the form (possibly also in a SAPscript style or SmartStyle used in a form).
Example: In a SAPscript form or a SmartStyle you need to specify HELVE if you want to print German text in Helvetica (or similar) font. If you want to print Japanese text, HELVE is not a valid choice but you need to specify a Japanese font like JPMINCHO in your Japanese form.
3) The output character set of the device type
Every printer in transaction SPAD has a "device type" assigned. Device types used by the spooler for printing support only one single specific output character set. All text from the form has to be converted (using SAP's built-in character conversion mechanism) to this output character set.
A character set can typically support either a single language (e.g. Shift-JIS which supports only Japanese) or a set of languages (e.g. ISO 8859-1, which supports Western-European languages). It is possible that a given language (such as German) can be supported by several output character sets, e.g. you may use either ISO 8895-1 (Latin-1) or ISO 8859-2 (Latin-2) to represent German text. This is so because both character sets contain the special characters used in German.
Example: HPLJ4000 is a HP LaserJet device type supporting the ISO 8859-1 (Latin-1) character set. ISO 8859-1 can be used to represent e.g. Dutch, English, French, German, Spanish, Swedish but NOT Russian or Japanese.
As a consequence, it is ok to use HPLJ4000 to print English, German French etc. but not for Japanese or Russian.
4) The set of available printer fonts for a given device type
When formatting a document, SAPscript and SmartForms perform an automatic mapping of the font definitions in the form (e.g. "HELVE 14 point bold") and the available printer fonts of the device type. A replacement printer font is chosen, should the specified font selection not be available in the device type. Now this replacement can be problematic if a language-specific font, such as Chinese CNSONG, is specified in a form and it gets replaced by a font which does not support this language, e.g. COURIER.
To solve this problem, font families in SE73 have language attribute assigned, e.g. some fonts are characterized as being suitable only for certain languages. And when a replacement has to be chosen because the original font from the form is not available in the device type, a replacement font is chosen which has the same language attributes.
If no fonts for the language in question exist in the device type, the resulting font will not be able to print the special characters and you will see "wrong" output characters in the printout.
Note on SAPscript/SmartForms Print Preview:
The OTF Print Preview available in Windows GUI (e.g. from transaction SP01) will sometimes not show the "wrong" characters which appear on the final printout. Here is the reason: since the Print Preview runs in Windows environment, it will use Windows fonts to represent the actual printer fonts. A Windows font typically has more available characters (i.e. covers more character sets) than are actually available in a printer's resident font.
A typical example where the Print Preview will differ from the printout is here: if you have a Chinese PCL5 printer such as CNHPLJ4 and use the Western Latin font COURIER in your document, the print preview will show you Chinese characters if you (by accident) tried to format Chinese characters in COURIER font. This is because Windows will automatically choose a font that can output Chinese characters (which is actually not Courier). But when you print the job on an actual PCL5 printer with resident Western and Chinese fonts, the Courier font will not print any Chinese characters but Western special characters instead, because the printer's resident Courier font does not include Chinese characters.
Rule of thumb: all Asian device types (e.g. CNHPLJ4, JPHPLJ4, JPPOST, KPHPLJ4) support not only Asian fonts but also COURIER, HELVE and TIMES fonts. But these Latin fonts can only be used to print English text, not Chinese/Japanese/Korean characters.
Which fonts are suitable for a given language?
Language(s): Font family to use in a form:
Latin-1 (Western Europe/Americas) *******
DE,EN,FR,ES,NL,SV COURIER, HELVE, TIMES
(LETGOTH, LNPRINT)
Latin-2 (Central Europe) ****************
PL, CZ COURIER, HELVE, TIMES
ISO 8859-4 (Baltic) *********************
ET, LT, LV COURIER, HELVE, TIMES
ISO 8859-5 (Cyrillic) *******************
BG, RU, SR, UK COURCYR, HELVCYR, TIMECYR
ISO 8859-7 (Greek) **********************
EL COUR_I7, HELV_I7, TIME_I7
ISO 8859-8 (Hebrew) *********************
HE COURIER, HELVE, TIMES
ISO 8859-9 (Turkish) ********************
TR COURIER, HELVE, TIMES
Simplified Chinese **********************
ZH CNHEI, CNKAI, CNSONG
Japanese ********************************
JA JPMINCHO, DBMINCHO, DBGOTHIC
Korean **********************************
KP KPBATANG, KPDODUM, KPGULIM
KPGUNGSE, KPSAMMUL
Traditional Chinese *********************
ZF TWDPHEI, TWMING, TWSONG
Thai ************************************
TH THANGSAN, THDRAFT, THVIJIT
Arabic (Unicode systems only) ***********
AR ANDALE_J
Verify your output by examining the OTF data
When analysing printing problems of this type, be sure to check the OTF data which gets produced by SAPscript or SmartForms. OTF or "Output Text Format" is the intermediate page-description format generated from SAPscript or SmartForms. OTF will contain the final printer font names and character set/language identifiers which help to solve the problem. OTF will even name the form and the language of the form used to create the output.
The easiest way to do this is to create a spool request from your application, run transaction SP01, use menu
Goto->Display Requests->Settings
and choose
Display Mode: Raw
Now display your spool request. If this is a SAPscript or SmartForms spool request, you will see OTF data. Each line represents one OTF command, every command starts with a 2-character cmd identifier and possibly some cmd parameters follow.
Here is an excerpt from a sample OTF file where we highlight the most interesting commands:
//XHPLJ8000 0700 00000000001
IN04EALEXTEST_ZEBRA
IN05%PAGE1
OPDINA4 P 144 240 1683811906000010000100001
IN06%WINDOW2
MT0024401289
CP11000000E
FCHELVE 120 00109XSF100SF101110000067E X
UL +0000000000000
SW00067
CT00000000
ST0453037Dieses SF hat Stil ALEXTEST_ZEBRA mit
The 1st line with the // (Control) command reveals the device type usedto print: HPLJ8000
//XHPLJ8000 0700 00000000001
The 2nd line (IN = Info command) shows the name and (internal 1-char)language key of the form:
IN04EALEXTEST_ZEBRA
In this case it is the English (E = EN) SmartForm ALEXTEST_ZEBRA
The OP-line (OP = Open Page) gives the page format used in the form, it is DINA4 Portrait orientation:
OPDINA4 P 144 240 1683811906000010000100001
The CP (CodePage) cmd shows the SAP system codepage used to code the text and the active language. In our case it is codepage 1100 and language E = EN = English.
CP11000000E
Finally, the FC-cmd (Font Call) lists a printer font selected within SmartForms. Please note that every SmartForm has a designated default SmartStyle under "Form Attributes->Output Options". In addition, every text node can have a SmartStyle attached (which will override the definitions from the default style for the text). In our case the resulting printer font that was selected is HELVE 12.0 pt bold-off, italic-off.
FCHELVE 120 00109XSF100SF101110000067E X
Header Data
Release Status: Released for Customer
Released on: 22.08.2005 09:57:20
Priority: Recommendations/additional info
Category: Customizing
Primary Component: BC-CCM-PRN Print and Output Management
Secondary Components: BC-SRV-SCR SAPscript
BC-SRV-SSF Smart Forms
<b>
Reward points for useful Answers</b>
Regards
Anji -
How to print lables in SAP SCRIPT
Hi all,
Here i have a requirement in SAP Script How to print the lables instead of Hard coding the field Description. Please help me how to do.
Regards
RaghavaHi
First Create a Lable in script
Refer This link for creation of lable in SAP SCRIPT
How to create lables in SAP SCRIPTS?
Ranga -
Transport.of SAP script form , printer def and device type is not enaugh
I transported the SAP script form , printer definition and device types of a thermal printer.
On original system the printout is ok but on target system not. What should I do?Thank you for your fast answer
As the matther of fact I am technical person. I think Output type belongs to application. However the difference is visible in se71 ->Utilities->Printing test -> output device ->print preview.
As I wrote I transpored corresponding. SAP script form , printer def and device type -
How to get the last page SAP Script form
How to get the last page SAP Script form.
I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
RegardsHi
You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
From SAP Help:
This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
/: IF &NEXTPAGE& = '0'
Last page
/: ENDIF
Max -
Unable to print special characters in SAP script.
Hi,
There is an address which needs to be hardcoded in a SAP Script form.
It looks like:
Česká republika s.r.o
Karla Engliu0161e 3219/4
Česká republika
IČO: 25635972
The letters which has got a tilde and sign above them are appearing as a hash '#' in print. I have tried uploading it as an image and as standard text. But still not working. Can someone help please?
Thanks in advance,
AnitaHi Anita,
Please search in SDN,, similar issues were answered before many times...
Regards,
Aditya -
Unable to print special character in SAP script
Hi,
There is an address which needs to be hardcoded in a SAP Script form.
It looks like:
Česká republika s.r.o
Karla Engliu0161e 3219/4
Česká republika
IČO: 25635972
The letters which has got a tilde and sign above them are appearing as a hash '#' in print. I have tried uploading it as an image and as standard text. But still not working. Can someone help please?
Thanks in advance,
AnitaHello,
Is your SAP Unicode? If no, then this can get very messy. If yes, I'd start with checking if the font used by the SAPScript supports that character.
Regards,
Michael -
Enhancement for J_1IEWT_CERT sap script form.
Hi,
In T- Code J1INCERT ie TDS Certificate Print used SAP Script Form J_1IEWT_CERT. i want to do enhancement in out put of first page. A certificate is generated in preview mode with 2 lines for same challan number. In the new enhancement form a single line should be printed for the same challan number. and amount should be added. in same. hence pl advice, how to go head.
Regards
kamalDear Raghu
In the NACE tcode select the application and then click on output types and then select the output types and then processing routines.
Also, please, verify the SE71 transaction code.
Regards,
Paulo -
Perform a form routine within a sap script form
Hi!
How can I
perform a form routine within a sap script form.
Regards
sasOK,
many thanks for your kindly reply.
But basically there is a matter which I don't understand.
Which way is the better way to loop at internal table:
Solution1:
FORM xxx.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
FORM = 'ZSD_PACKING_LIST'
LANGUAGE = SY-LANGU .
LOOP AT gt_versand_plan INTO gw_versand_plan.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'SHELEM'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN' .
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'.
ENDFORM.
Solution 2:
Having the LOOP within the sapscript form -> 'ZSD_PACKING_LIST'
Regards
sas -
Hi ABAP Experts,
i got one object on SAP Script Forms, this is first time i am doing sap scripts, my issue is i created a form Debit memo from scratch and now i want to assign this form to standard print program RFK0RD00(PAYMENT NOTICE) and for this print program the standard layout form is F140_PAY_CONF_01.can u please tell what is the output type of this form and where to assign this ?
Thanks in Advance...Hello Srini,
First thing,how to find output type?
-Go to table TNAPR and enter your print program name in TNAPR-PGNAM and form name in TNAPR-FONAM.
-Look for the entry, the field value of TNAPR-KSCHL will give you the output type for your Print program and sap script form.
-TNAPR-KAPPL will give you the value for Application.
Second thing,how to assign?
-Go to transaction NACE
-Select the application(TNAPR-KAPPL).
-Press the button 'OUTPUT TYPES'
-Select the corresponding output type(TNAPR-KSCHL)
-Now select the folder 'Processing routines' on the left side.
-Enter your Program name (RFK0RD00), form routine name(mostly it is ENTRY) and then enter your form name (form designed by you from scratch).
Kinldy reply if this has helped you. -
How to print last page in sap script in ladscape format?
Hi all,
can any 1 tell me How to print last page in sap script in ladscape format?
Thanks In advance.
PravinHi Pravin Sherkar,
we can do this in SAP Scripts.
we need to create two pages, one of landscape and another of potrait.
now after filling the data at last we need to call the page which is of format landscape using START_FORM function module.
You can use condition &PAGE& = &FORMPAGES&.
Please check this link
Printing Portrait/Landscape in sapscript
Re: Landscape and potrait in same layout?
http://www.sap-img.com/ts013.htm
Best regards,
raam -
How to print Special Characters in Sap-Scripts
How to print Special Characters in Sap-Scripts
Thanks,
RaviHi
if u want print special characters we can use hot codes i.e ' ' (single inverted commas). in between these hot codes insert u r special characters.
write ' !@#$%^&*( ) '.
for the above write statement output is
output is !@#$%^&*( ) -
How to change sign negative to positive in sap script form
Hi Guru,
I had wriiten a below piece of code in my sap script form.Now I need all the negative sign to be convert to positive number means
if KOMVD-KWERT = 123,98.00- , then require 123,98.00 ..
And for this I know the synatax is
&KOMVD-KWERT(S)& .Bur the probleam is how to manage this (I13) ...Because if i am wriiting
&KOMVD-KWERT(S)(I13)& getting no value ...Please help..
IF &TNAPR-KSCHL& = 'ZD06'.
&KOMVD-KWERT(I13)&
endif.
Thanks
susriHi SUSRIKANT,
You can try this logic .
DATA : LV_KWERT TYPE STRING,
LV_LEN TYPE I,
LV_F_KWERT TYPE STRING.
LV_KWERT = KOMVD-KWERT.
LV_LEN = STRLEN( LV_KWERT ).
LV_LEN = LV_LEN - 1.
IF LV_KWERT +LV_LEN(1) = '-'.
LV_F_KWERT = LV_KWERT + 0 (LV_LEN).
ELSE.
LV_F_KWERT = LV_KWERT.
ENDIF.
I hope this logic will be helpful for your issue.
Thanks & Regards,
Kumaran Duraiswamy. -
Sap script form perform statement
HI ALL ,
CAN ANYONE HELP ME WITH SAP-SCRIPT FORM AND PERFORM SYNTAX. THAT IS WHEN U NEED TO ADD A FIELD TO AN EXISTING SAPSCRIPT, BY USING AN EXTERNAL SUBROUTINE.
i NEED THE SYNTAX BOTH FOR PERFORM AND ENDPERFORM STATEMENT AND ALSO THE FORM STSEMENT. ANOTHER TRHING IS IF CAN LET ME KNOW HOW TO USE DEFINE STATEMENT IN SAPSCRIPT. WHATS ITS USE AND IS IT RELATED TO THE QUERY ABOVE.
else,
U PLZ LET ME KNOW ANY HELPFUL LINKS TO GO THROUGH.
THANLS IN ADVANCE,
ANUPMA.Hi anupma,
1. while calling subroutines from sapscripts,
there is a special technique,
which has got its own limitations.
2.
FORM abc
TABLES
in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
ENDFORM.
3. The perform in se38 program should be of the
above format only.
4. We cannot pass internal tables.
5. Rather we need to pass
VARIABLE NAME
VARIABLE VALUE
(see the structure of itcsy in se11)
6. In this form, we have to read
the internal table in_tab
to capture the variable name and its value.
7. Similary, to return the values,
we have to put one record (for each variable)
in out_tab.
regards,
amit m.
Maybe you are looking for
-
I am not able to understand the meaning of following statement: invoice items with a small amount result in a relatively large quantity variance, and that invoice items with a large amount result in a small variance. this line is from Quantity Varian
-
Hello, I've just upgraded to Snow Leopard. It went well; the only problem was a freeze on my Time Machine backup widget when I was doing its first Snow Leopard backup, which froze all of the widgets. In attempting to fix this, I went to Library/Prefe
-
Hi, I am replacing a 7600 router with an ASR 9K. However, I wasn't able to find the correspondant EEM IOS-XR commands for the below IOS EEM: event manager applet QoS-NIGHT event timer cron cron-entry " 0 16 * * 0-7" action 1.0 cli command "enable" ac
-
Why am I getting this error message with slapconfig? Error 66
I am restoring this to the same server and from the location where it was backed up. So it does exist and it mounts when I open it. So not sure what I am doing wrong. Thanks. This is the command I used to backup. sudo slapconfig -backupdb ~/Deskt
-
How to make a caption on a JButton 2 lines
I can't seem to get a JButton to have text for 2 lines...I want the first line to say "New", and the second line to say "Merge"... I have tried several things, but I don't feel like wasting all my time figuring this out...I am sure it is something si