PSF/AIX:SAP Printing (codepage problem)

ITEM: RTA000145645



Q:                                                                              
Customer is having problems with SAP R/3 printing on NP12 AFP printer.          
They are using SAP R/3 Release 3 and Access Method Z with PSF/AIX.              
They would like to print reports in ABAP format on this TCP/IP                  
connected printer.  Somehow however, there seems to be some                     
codepage problem.                                                               
                                                                                
The printer within SAP is defined to use the ISO-8819 character set.            
The ABAP file contains a backslash character, with hex code '5C'.               
Using SAP2AFP gives us a line data file, where this character                   
has changed into hex code 'EC'.                                                 
                                                                                
Now hex code 'EC' corresponds with a backslash character in the                 
German EBCDIC codepage (273), but it gives a wrong character                    
on the printer.  Instead of the backslash, we get an O umlaut                  
actually corresponding with hex code '5C' in codepage 500                       
(the international one used for AFP).                                           
                                                                                
Question is why 273 is used, and how this can be changed ?                      
                                                                                
Secondly, while choosing for a font to use in the pagedef.tab                   
file, one seems to be obliged to choose from a predefined set                   
of character set and codepage, together known as font.                          
Can this be changed, in order to get a character set with another               
codepage ?                                                                      
                                                                                
Thanks in advance ...                                                           
                                                                                
A:                                                                              
The codepage is not ISO8819, but rather ISO-8859-1 (corresponding to           
codepage 1148 or 9148 on the SAP R/3 system).                                   
                                                                                
Because the data is ABAP, sap2afp converts it from ASCII to EBCDIC              
using the mappings in defcp.tab.  Thus it makes sense that the x5C              
(decimal 92) is getting converted to xEC (decimal 236).  (Just for the          
sake of completeness, let me state that for OTF data, sap2afp uses the          
00000000.tab to convert from ASCII to EBCDIC.)                                  
                                                                                
sap2afp uses the *PJPAPER information in the ABAP to pick up the                
values for pagedef, formdef, and coded font name from the matching              
"Paper" line in pagedef.tab, and acif's and prints the file with those          
values (see the /usr/lpp/psf/sap2afp/AIXLD shell script which sap2afp           
invokes for ABAP data).                                                         
                                                                                
So, the ASCII backslash (x5C, dec 92) is getting transformed to EBCDIC         
xEC,dec 236 by defcp.tab.  If you are using the default pagedef.tab             
instead of having copied over the euro.pagedef.tab, that would explain          
why you're getting a font at print time that uses T1V10500 (since 50D0          
and those coded fonts reference a codepage of T1V10500, except for GT24,        
which references T1D0BASE).  T1V10500 does indeed have the uppercase            
umlaut O at xEC (whereas T1V10273 has the backslash at xEC).                    
                                                                                
On the other hand, if you were using the euro.pagedef.tab, you'd still          
be having problems, because GT2A and those fonts (except GT24) use              
T1DABASE which has yet a different (graphic SF090000) character at xEC.         
So that simple a change won't help.                                             
                                                                                
To answer your first question, "is why 273 is used, and how this can be         
changed?"  I believe that 273 is the basis for the values in defcp.tab.         
However, at print time, T1V10273 is not used for ABAP data.  Rather,           
fonts for the printing of ABAP are being picked up from the pagedef.tab         
entry for that PJPAPER value.  (Although the fonts.tab uses T1V10273 by         
default, that's only for OTF jobs, not ABAP.)                                   
                                                                                
Thus to get the backslash to print correctly, you have a couple of              
options:                                                                        
                                                                                
1)  You can leave the defcp.tab as it is, and instead change the                
pagedef.tab to point to a coded font that combines the character set            
2nd codepage with the correct mappings (like T1V10273).  You will be            
limited to four characters on the coded font name in pagedef.tab because        
sap2afp extracts those values and passes the as variables on the CHARS          
command in AIXLD (and CHARS is limited to a four character coded font           
name).  You will need to find or create (or copy or link) a coded font          
with a four character name that references T1V10273, and put that coded        
font name into pagedef.tab for the right paper type.  Then the xEC (dec         
236) will indeed call out a backslash.  (There's a list of valid                
character sets for that codepage in S544-3802-01, AFP Technical                 
Reference for Code Pages, page 4 and 40.)                                       
                                                                                
2)  Alternatively, if you have a specific print codepage you wish to use        
you can modify defcp.tab to do the appropriate ASCII-EBCDIC translation.        
For example, if the coded font you want to use references T1D0BASE or           
T1DBBASE, the Belgian codepage, where the backslash is at xE0, you              
could modify defcp.tab to change the ASCII dec 92 to EBCDIC dec 224 to          
make that happen.  This is potentially riskier, because a future PTF            
could overwrite the defcp.tab file.                                             
                                                                                
If possible, I would recommend using the first option.  I hope this             
helps.  Thanks for using WWQ&A.                                                
                                                                                
S e a r c h - k e y w o r d s:                                                  
psf/6000 psf/aix sap psf aix sap2afp codepage defcp.tab ABAP OTF                
SAPscript mapping infoprint manager ipmgr pod ascii ebcdic infoprint            
access method z aixld r/3                                                       
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000145645 ITEM: RTA000145645
Dated: 07/1999 Category: XPSF6000
This HTML file was generated 2000/11/30~13:34:08
Comments or suggestions? Contact us