‎2010 May 19 2:21 AM
I'm trying to print ZPL code from a Smart Form. One of the lines of
the ZPL code is more than 255 chars. Since Smart Forms have a line
limit of 255 chars, I split the line into 2 separate lines in an internal table. This line
is a 2D barcode. Basically, the internal table that has all the ZPL code is passed to the SMARTFORM function module. The smart form loops through each line in the table and outputs the zpl code on each line. The label prints and the barcode looks OK. However, when you scan the 2D barcode, the line that was split has extra spaces
after the CR/LF. If I don't use smart forms or sapscript and I just send the data
directly to the printer, it works just fine.
=============================================================================================
Here is what is returned from the 2D barcode scanner(Notice the spaces after the text "DO NOT SHIP**"):
=============================================================================================
[)> 01 02T0G0L0 124 492 000000000000000 FDEB 0000000 138 1/1 10.0LB N 1 MAIN ST. DANVILLE AB TONY 06 10ZGI004 11ZJOH DOE 12Z7037278577 14Z*TEST LABEL - DO NOT SHIP*<<10 spaces here>>
18Z510087100 EX 23ZN 22Z N 20Z 0 99ZGIBI02 840 1 USD LASKFDJ NO EEI 30.36 010 S 510087801 EX Y 26Z368f
=============================================================================================
Here is the ZPL code that is represented as an internal table in the abap program:
=============================================================================================
XACF,0,0,0PR12MD30PW800POICI13LH0,20
FO0,147GB800,4,4^FS
FO0,401GB800,4,4^FS
FO0,736GB800,4,4^FS
FO35,12AdN,0,0FWNFHFDFrom:FS
FO35,31AdN,0,0FWNFHFDJohn DoeFS
FO35,51AdN,0,0FWNFHFDLong Beach Shipping PointFS
FO35,71AdN,0,0FWNFHFD22 Main AveFS
FO35,92AdN,0,0FWNFHFDFS
FO35,132AdN,0,0FWNFHFD(800) 323-0749FS
FO490,72AdN,0,0FWNFHFDCAD: 100016603/WSXI2450FS
FO43,193A0N,25,27FWNFHFDJOH DOEFS
FO43,228A0N,25,27FWNFHFD1 MAIN ST.FS
FO43,263A0N,25,27FWNFHFD*TEST LABEL - DO NOT SHIP*FS
FO35,112AdN,0,0FWNFHFDLong Beach, CA 90808FS
FO490,31AdN,0,0FWNFHFDShip Date: 18MAY10FS
FO490,51AdN,0,0FWNFHFDActWgt: 10.0 LBFS
FO43,158A0N,25,27FWNFHFDTONYFS
FO615,156AdN,0,0FWNFHFD(703) 727-8577FS
FO43,296A0N,30,30FWNFHFDDANVILLE, AB T0G0L0FS
FO530,296A0N,35,45FWNFHFD(CA)FS
FO725,216AdN,0,0FWNFHFDGroundFS
FO670,238GB105,10,10^FS
FO670,248GB10,112,10^FS
FO765,248GB10,112,10^FS
FO670,360GB105,10,10^FS
FO476,3GB4,145,4^FS
FO650,173A0N,50,55FWNFHFDFedExFS
FO690,256A0N,130,130FWNFHFDGFS
FO80,771BY4,2BCN,290,N,N,N,NFWNFD>;>89612492000000000000000FS
FO30,1192A0N,20,18FWNFHFDEEI: NO EEI 30.36FS
FO135,1083A0N,25,27FWNFHFD(9612492) 0000000 00000000FS
FO783,258A0N,15,15FWBFHFDJ10101002222124FS
FO10,162A0N,20,18FWNFHFDTOFS
FO25,1108A0N,50,55FWNFHFDINT-GNDFS
FO25,1150A0N,35,45FWNFHFDBILL-RECPFS
FO300,1115A0N,35,45FWNFHFDFS
FO300,1149A0N,35,45FWNFHFDFS
FO30,428BY2,2B7N,10,5,12FHFWNFH^FD[)>_1E01_1D02T0G0L0_1D124_1D492_1D000000000000000_1DFDEB_1D0000000_1D138_1D_1D1/1_1D10.0LB_1DN_1D1 MAIN ST._1DDANVILLE_1DAB_1DTONY_1E06_1D10ZGI004_1D11ZJOH DOE_1D12Z7037278577_1D14ZTEST LABEL - DO NOT SHIP_1D
18Z510087100_1CEX_1D23ZN_1D22Z_1CN_1D20Z_1C0_1D99ZGIBI02_1C840_1C1_1CUSD_1CLASKFDJ_1CNO EEI 30.36_1C010_1CS_1C510087801_1CEX_1CY_1D26Z368f_1C_1D_1E_04^FS
FO635,1098GB120,58,58^FS
FO645,1103A0N,60,55FRFWNFDETDFS
FO16,358A0N,15,15FWNFH^FDRef: ^FS
FO16,373A0N,15,15FWNFH^FDINV: ^FS
FO16,388A0N,15,15FWNFH^FDPO: ^FS
FO406,388A0N,15,15FWNFH^FDDept: ^FS
FO625,495A0N,20,35FWNFHFD1FS
FO640,535A0N,20,35FWNFHFDofFS
FO625,575A0N,20,35FWNFHFD1FS
^PQ1
^XZ
Edited by: Tony Raimo on May 19, 2010 3:21 AM
Edited by: Tony Raimo on May 19, 2010 3:22 AM
Edited by: Tony Raimo on May 19, 2010 3:22 AM
Edited by: Tony Raimo on May 19, 2010 3:23 AM
‎2010 May 19 3:57 AM
Hello,
You can check SAP note 497380.
Let's say that you have a barcode text with length 500 characters,
which is stored in symbol &text&. Usually you use a character
format (let's call it <BC>) to print the barcode, so you want
to print <BC>&text&</>.
Now there is a restriction in Smartforms that the length of
a symbol cannot be longer than 255 characters. So to get the
whole barcode text into the barcode, the field 'text' must
be split into two fields of length 255: text1 = text(255).
text2 = text+255. (can be done in an ABAP node). After this
the barcode can be printed as <BC>&text1&&text2&</>.
Now there is another problem: If you go in transaction SMARTFORMS
into a text node, you cannot enter <BC>&text1&&text2&</>.
The graphical editor, which you find in the overview screen,
will automatically convert this text to: <BC>&text1&</><BC>&text2&</>
(so you will get two barcodes).
The workaround is described in note 497380: You may fill
text1 and text2 via an ABAP node as I described above. Then you
can create a standard text via transaction SO10 with the following
contents:
<BC>&text1&&text2&</>
(because transaction SO10 uses the full screen editor, you can
enter this text). After this print the standard text with
a text node. On this way you should be able to print the barcode.
Regards,
David
‎2010 May 19 11:43 PM
OK. I was able to get passed the wrapping issue. I used a smartform and passed in a table of type TLINE with TDFORMAT = "". I created a "Dynamic Text Element" and assigned my internal table to it. Everything works great. However, any line in my internal table that has two commas gets ommitted from the output. For example:
^FS FT300,618BY3BCN,103,N,N,,AFV420908083006^FS
changes to
^FS FT300,618BY3BCN,103,N,NAFV420908083006^FS
any clue why? Is this like sapscript where ,, is a TAB or something else?
Thank you,
‎2010 May 21 1:57 AM
‎2010 Jul 19 3:11 PM
Hi,
I see the ZPL code you have in the internal table. You mention it is in your "program." How do you get it in the Smart Form? Is it in a text module? Please be specific. Thank you.
-Ken