SlideShare a Scribd company logo
lZi ez{ŒE b‡|G
3DOR $OWR DOLIRUQLD
ZlZiŒ|‹‚‰
fz}~ ^zŒ’
Z l~‰F{’Fl~‰ `Ž‚}~ ˆ _ˆ‹† ]~Œ‚€‡
z‡} i‹‚‡ˆŽ ‚‡ kHL
Š
ˆ‰’‹‚€
© 1999 by SAP AG. All rights reserved.
Neither this documentation nor any part of it may be copied or reproduced in
any form or by any means or translated into another language, without the
prior consent of SAP AG.
]‚Œ|…z‚†~‹
SAP AG makes no warranties or representations with respect to the content
hereof and specifically disclaims any implied warranties of merchantability or
fitness for any particular purpose. SAP AG assumes no responsibility for any
errors that may appear in this document. The information contained in this
document is subject to change without notice. SAP AG reserves the right to
make any such changes without obligation to notify any person of such
revision or changes. SAP AG makes no commitment to keep the information
contained herein up to date.
m‹z}~†z‹„Œ
SAP, the SAP logo, R/2, R/3, SAPscript, ABAP, and other SAP related
products mentioned herein are registered or unregistered trademarks of SAP
AG. All other products mentioned in this document are registered or
unregistered trademarks of their respective companies.
Simplification Group
SAP Labs, Inc.
3475 Deer Creek Road
Palo Alto, CA 94304
ZZZVDSODEVFRPVLPSOH
VLPSOLIU#VDSFRP
Printed in the United States of America.
ISBN 1-893570-14-2
2 1 7 ( 1 7 6
b‡‹ˆ}Ž|‚ˆ‡ JJ
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JJ
pz bŒ ‚Œ `Ž‚}~ Z{ˆŽX G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JK
pˆ lˆŽ…} k~z} ‚Œ `Ž‚}~X G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JK
$VVXPSWLRQV                                                  
aˆ ˆ nŒ~ ‚Œ `Ž‚}~X G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JL
+RZ ,V WKH *XLGH 2UJDQL]HG                                    
3DUW  /HDUQLQJ 6$3VFULSW %DVLFV                               
3DUW  0RGLILQJ 6$3VFULSW )RUPV                              
3DUW  XVWRPL]LQJ $SSOLFDWLRQV IRU 6$3VFULSW )RUPV                
3DUW  $SSHQGL[HV                                          
pz@Œ g~ ‚‡ ‚Œ `Ž‚}~X G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JM
ˆ‡~‡‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JN
iz‹ JS e~z‹‡‚‡€ lZiŒ|‹‚‰ [zŒ‚|Œ
z‰~‹ JS lZiŒ|‹‚‰ _ˆ‹†ŒS m~ [‚€ i‚|Ž‹~ JR
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KI
pz Z‹~ lZiŒ|‹‚‰ _ˆ‹†ŒX G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KI
([DPSOHV RI 6$3VFULSW )RUPV                                     
pz bŒ ~ Z‹|‚~|Ž‹~ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX G G G G G G G G G G G G G G G G KJ
aˆ Z‹~ lZiŒ|‹‚‰ _ˆ‹†Œ i‹ˆ|~ŒŒ~}X G G G G G G G G G G G G G G G G G G G G G G KL
pz Z‹~ ~ ]‚~‹~‡ lˆŽ‹|~Œ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX G G G G G G G G G G KL
6WDQGDUG 6$3VFULSW )RUPV 6RPH ([DPSOHV
M SAPscript Made Easy | Release 4.6
3UHFRQILJXUHG 6$3VFULSW )RUPV 6RPH ([DPSOHV                      
p~‹~ ˆ _‚‡} ~ lZiŒ|‹‚‰ _ˆ‹†Œ ’ˆŽ g~~} G G G G G G G G G G G G G G G G KN
z‰~‹ KS lZiŒ|‹‚‰ _ˆ‹†ŒS m~ [zŒ‚|Œ KP
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KQ
pz Z‹~ _ˆ‹† fz‡z€~†~‡ mˆˆ…ŒX G G G G G G G G G G G G G G G G G G G G G G G KQ
)RUP 3DLQWHU                                                  
$FFHVVLQJ WKH )RUP 3DLQWHU                                    
3 (GLWRU                                                     
$FFHVVLQJ WKH 3 (GLWRU YLD )RUP 3DLQWHU                         
$FFHVVLQJ WKH 3 (GLWRU YLD 6WDQGDUG 7H[W                        
Z|‚z‚‡€ ~ `‹z‰‚|z… _ˆ‹† iz‚‡~‹ z‡} i ^}‚ˆ‹ G G G G G G G G G G LM
pz Z‹~ ~ _ˆ‹† ˆ†‰ˆ‡~‡ŒX G G G G G G G G G G G G G G G G G G G G G G G G G G LN
+HDGHU                                                      
3DUDJUDSK )RUPDWV                                             
KDUDFWHU )RUPDWV                                              
3DJH /DRXW                                                  
9DULDEOHV                                                  
'RFXPHQWDWLRQ                                                
iz‹ KS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†Œ
z‰~‹ LS `~‚‡€ lz‹~} ‚ _ˆ‹†Œ MP
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G MQ
pˆ‹„‚‡€ ‚ lZiŒ|‹‚‰ _ˆ‹†ŒS _‚‹Œ l~‰Œ G G G G G G G G G G G G G G G G G G G MQ
:KDW $UH WKH 0HWKRGV IRU ,PSRUWLQJ )RUPV                         
)RUPV $YDLODEOH RQ DQ 5 OLHQW                               
)RUPV $YDLODEOH DV 6HSDUDWH )LOHV                              
+RZ WR KRRVH WKH %HVW 0HWKRG                                  
ˆ‰’‚‡€ _ˆ‹†Œ {~~~‡ …‚~‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G MR
i‹~‰z‹‚‡€ ˆ‰‚~} _ˆ‹†ŒS Z}}‚‚ˆ‡z… mzŒ„Œ G G G G G G G G G G G G G G G G G G NK
2ULJLQDO /DQJXDJH                                             
KDQJLQJ 3DJH )RUPDW RI D )RUP                                  
b†‰ˆ‹‚‡€ _ˆ‹†Œ ‹ˆ† z _‚…~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G NQ
Contents N
z‰~‹ MS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS m~ [zŒ‚|Œ OL
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G OM
ˆ‰’‚‡€ z _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ON
m~Œ i‹‚‡‚‡€ z _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G OP
fz‡‚‰Ž…z‚‡€ ~ ez’ˆŽ ˆ z _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G OR
UHDWLQJ D 1HZ :LQGRZ                                        
5HQDPLQJ D :LQGRZ                                           
KDQJLQJ :LQGRZ 3RVLWLRQ RU 6L]H 8VLQJ 'HVLJQ :LQGRZ              
KDQJLQJ :LQGRZ 3RVLWLRQ RU 6L]H 8VLQJ $GPLQLVWUDWLYH 6FUHHQ          
5HPRYLQJ D :LQGRZ                                            
$OLJQLQJ :LQGRZV WR WKH *ULG                                    
fz‡‚‰Ž…z‚‡€ _ˆ‹† ˆ‡~‡ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G QK
0RYLQJ D )LHOG                                                
0RYLQJ D 7DE                                                 
,QVHUWLQJ RU 'HOHWLQJ D /LQH                                       
'HOHWLQJ :LQGRZ 7H[W 8VLQJ WKH 3 (GLWRU                        
'HOHWLQJ :LQGRZ 7H[W XVLQJ WKH 7H[W (GLWRU                       
5HPRYLQJ D )LHOG                                               
/RRNLQJ 8S D )LHOG                                             
$GGLQJ D 1HZ )LHOG                                           
$GGLQJ D )LHOG WR WKH 3ULQW 6WUXFWXUH                               
z‰~‹ NS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS Z}z‡|~} mˆ‰‚|Œ JJL
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JJM
i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ Ap‚‡}ˆŒ [fi _ˆ‹†zB G G G G G G G G G G G JJM
6WHS  ,PSRUW WKH *UDSKLF LQWR WKH 'RFXPHQW 6HUYHU                  
6WHS  3UHYLHZ WKH *UDSKLF 3ULQWRXW                              
6WHS  ,QFOXGH WKH *UDSKLF LQ D )RUP                             
UHDWLQJ *UDSKLF 2EMHFWV DQG *UDSKLF ,'V                         
i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ A[zŒ~…‚‡~ mb__ OGI _ˆ‹†zB G G G G G G G G G JKM
,QFOXGLQJ WKH RPSDQ /RJR RQ WKH )RUP                          
RQYHUWLQJ %DVHOLQH 7,))  )RUPDW WR 6$3VFULSW 6WDQGDUG 7H[W      
,QFOXGLQJ 6WDQGDUG 7H[W LQ D )RUP                             
,QFOXGLQJ WKH RPSDQ /RJR DV D 0DFUR RQ 3/ 3ULQWHUV             
RSLQJ D 6WDQGDUG 3ULQWHU 7SH                              
'HILQLQJ D 3ULQW RQWURO IRU WKH 0DFUR                          
,QFOXGLQJ WKH 3ULQW RQWURO LQ WKH )RUP                          
i‹‚‡‚‡€ [z‹ ˆ}~Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JML
Z}}‚‡€ z [ˆ‘ ‚ lz}‚‡€ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JMR
UHDWLQJ 0XOWLSOH %R[HV                                        
i‹‚‡‚‡€ m~‘ o~‹‚|z……’ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JNO
O SAPscript Made Easy | Release 4.6
z……‚‡€ Z[Zi lŽ{‹ˆŽ‚‡~Œ nŒ‚‡€ ~ i^k_hkf ˆ††z‡} G G G G G JNP
iz‹ LS ŽŒˆ†‚“‚‡€ Z‰‰…‚|z‚ˆ‡Œ ˆ‹ lZiŒ|‹‚‰
_ˆ‹†Œ
z‰~‹ OS ŽŒˆ†‚“‚‡€ lz…~Œ z‡} ]‚Œ‹‚{Ž‚ˆ‡ ˆ‹ i‹‚‡ _ˆ‹†Œ JOJ
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JOK
Z||~ŒŒ‚‡€ ~ bf` G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JOK
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ lz…~Œ ]ˆ|ކ~‡Œ G G G G G JOL
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ l‚‰‰‚‡€ ]ˆ|ކ~‡Œ G G JON
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ [‚……‚‡€ ]ˆ|ކ~‡Œ G G G G JOR
l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ l~‡}~‹E a~z}~‹E z‡} _ˆˆ~‹ G G G G JPJ
6SHFLILQJ 6WDQGDUG 7H[W SHU 6DOHV 2UJDQL]DWLRQ                    
$OORFDWLQJ 6WDQGDUG 7H[W SHU 6KLSSLQJ 3RLQW                        
0DLQWDLQLQJ 6WDQGDUG 7H[W IRU )RUPV                              
fz‚‡z‚‡‚‡€ i‹‚|‚‡€ ˆ‡}‚‚ˆ‡Œ ˆ Z‰‰~z‹ ‚‡ ~ hŽ‰Ž G G G G G G JPP
z‰~‹ PS ŽŒˆ†‚“‚‡€ fz~‹‚z…Œ fz‡z€~†~‡ ˆ‹ i‹‚‡ _ˆ‹†Œ JQJ
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JQK
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ ]ˆ|ކ~‡Œ G G G G G G G G G G JQK
fz‚‡z‚‡‚‡€ ]ˆ|ކ~‡ m~‘ ˆ‹ i‹‚‡‚‡€ G G G G G G G G G G G G G G G G G G G G JQM
:KHUH WR 6WDUW 0DLQWHQDQFH                                     
0DLQWDLQLQJ 7H[W IRU 'RFXPHQW +HDGHU                            
$GGLQJ D 1HZ (QWU IRU 'RFXPHQW +HDGHU 7H[W                  
'HOHWLQJ DQ (QWU IRU 'RFXPHQW +HDGHU 7H[W                     
9HULILQJ WKH 3ULQW 6HTXHQFH IRU 'RFXPHQW +HDGHU 7H[W            
0DLQWDLQLQJ ,WHP 7H[W                                          
$GGLQJ D 1HZ (QWU IRU ,WHP 7H[W                              
'HOHWLQJ DQ ,WHP 7H[W                                       
9HULILQJ WKH 3ULQW 6HTXHQFH IRU ,WHP 7H[W                       
0DLQWDLQLQJ 6XSSOHPHQW 7H[WV                                   
$GGLQJ D 1HZ (QWU IRU 6XSSOHPHQW 7H[W                        
'HOHWLQJ D 6XSSOHPHQW 7H[W                                  
9HULILQJ WKH 3ULQW 6HTXHQFH IRU 6XSSOHPHQW 7H[W                  
0DLQWDLQLQJ KDQJH 7H[WV                                      
0DLQWDLQLQJ +HDGLQJV                                          
fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ G G G G G G G G G G G G G G G G G G G G G G KIL
Contents P
z‰~‹ QS ŽŒˆ†‚“‚‡€ _‚‡z‡|‚z… Z||ˆŽ‡‚‡€ ˆ‹ i‹‚‡ _ˆ‹†Œ KIP
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KIQ
ZŒŒ‚€‡‚‡€ z i‹‚‡ i‹ˆ€‹z† ˆ ~|„Œ G G G G G G G G G G G G G G G G G G G G G G KIQ
ZŒŒ‚€‡‚‡€ _ˆ‹†Œ ˆ ~|„Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KIR
l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ a~z}~‹E _ˆˆ~‹E l‚€‡zŽ‹~
z‡} l~‡}~‹ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KJJ
fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ G G G G G G G G G G G G G G G G G G G G G G KJM
l‰~|‚’‚‡€ ~|„ i‹‚‡‚‡€ h‰‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G KJO
iz‹ MS Z‰‰~‡}‚‘~Œ
Z‰‰~‡}‚‘ ZS lZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ KKJ
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KKJ
h~‹‚~ ˆ lZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ G G G G G G G G G G G G G G G G G KKK
h~‹‚~ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G KKK
l’‡z‘ ˆ ˆ‡‹ˆ… ˆ††z‡}Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G KKL
$''5(66±(1'$''5(66 )RUPDWWLQJ RI $GGUHVVHV                  
%27720 'HILQH )RRWHU 7H[W LQ D :LQGRZ                         
%2; 326,7,21 6,=( %R[HV /LQHV 6KDGLQJ                       
$6( DVH 'LVWLQFWLRQ                                         
'(),1( 9DOXH $VVLJQPHQW WR 7H[W 6PEROV                         
+(; +H[DGHFLPDO 'DWD                                        
,) RQGLWLRQDO 7H[W 2XWSXW                                      
,1/8'( ,QFOXGH 2WKHU 7H[WV                                   
1(:3$*( ([SOLFLW )RUP )HHG                                  
1(::,1'2: 1H[W :LQGRZ 0$,1                            
3(5)250 DOOLQJ $%$3 6XEURXWLQHV                             
35,1721752/ ,QVHUW 3ULQW RQWURO KDUDFWHU                     
3527(7 3URWHFW IURP 3DJH %UHDN                               
5(6(7 ,QLWLDOL]H 2XWOLQH 3DUDJUDSKV                               
6(7 28175 RXQWU6SHFLILF )RUPDWWLQJ                        
6(7 '$7( 0$6. )RUPDWWLQJ RI 'DWH )LHOGV                         
6(7 6,*1 7KH 3RVLWLRQ RI                                     
6(7 7,0( 0$6. )RUPDWWLQJ RI 7LPH )LHOGV                         
67/( KDQJH 6WOH                                           
6800,1*                                                  
723 6HW +HDGHU 7H[W LQ 0$,1                                   
l’‡z‘ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G KMR
KDQJLQJ WKH 9DOXH RI D RXQWHU                                 
RXQWU 'HSHQGHQW )RUPDWWLQJ
Q SAPscript Made Easy | Release 4.6
'DWH 0DVN                                                   
([SRQHQW IRU )ORDWLQJ 3RLQW 1XPEHUV                              
)LOO KDUDFWHUV                                                
,JQRULQJ RQYHUVLRQ 5XOHV                                      
/HDGLQJ 6LJQ WR WKH /HIW                                         
/HDGLQJ 6LJQ WR WKH 5LJKW                                       
1XPEHU RI 'HFLPDOV                                           
2IIVHW                                                      
2PLWWLQJ /HDGLQJ =HURV                                         
2PLWWLQJ WKH /HDGLQJ 6LJQ                                       
2PLWWLQJ WKH 6HSDUDWRU IRU ³7KRXVDQGV´                            
2XWSXW /HQJWK                                                
3UHFHGLQJ DQG 6XEVHTXHQW 7H[W                                  
5LJKW-XVWLILHG 2XWSXW                                          
6SDFH RPSUHVVLRQ                                           
6XSSUHVVLQJ ,QLWLDO 9DOXHV                                       
7LPH 0DVN                                                   
l’Œ~† oz‹‚z{…~Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOI
Z‰‰~‡}‚‘ [S lz†‰…~ _ˆ‹†Œ KOL
h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOL
Z||ˆŽ‡ lz~†~‡ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOM
‹~}‚ f~†ˆ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KON
]~{‚ f~†ˆ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOO
]~…‚~‹’ gˆ~ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOP
b‡ˆ‚|~ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOQ
i‹~‡Ž†{~‹~} ~|„ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOR
n‡‡Ž†{~‹~} ~|„ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KPI
k~†‚z‡|~ Z}‚|~ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KPJ
lz…~Œ h‹}~‹ ˆ‡‚‹†z‚ˆ‡ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G KPK
Z‰‰~‡}‚‘ S m‚‹}Fiz‹’ lˆ…Ž‚ˆ‡Œ KPL
Z_iS _ˆ‹†l|z‰~Û G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KPM
)RUP6FDSH RPSRQHQWV                                        
URVV3ODWIRUP )HDWXUHV                                         
7KH RQFHSW                                                 
RQWDFW ,QIRUPDWLRQ                                            
aiS i‹ˆ~ŒŒ‚ˆ‡z… i‹‚‡‚‡€ lˆ…Ž‚ˆ‡Œ ˆ‹ lZi kHL ^‡‚‹ˆ‡†~‡Œ G KPP
3URIHVVLRQDO (OHFWURQLF )RUPV 3ULQWLQJ                              
RQWDFW ,QIRUPDWLRQ
Contents R
aiS c~Zil b‡~……‚€~‡ [z‹ ˆ}~ lbff G G G G G G G G G G G G G G G G G G G G KPR
6ROXWLRQ                                                     
)HDWXUHV                                                    
6XSSRUWHG %DU RGHV                                          
6XSSRUWHG +3 3ULQWHU 0RGHOV                                    
6$3 56SHFLILF ,QIRUPDWLRQ                                    
RQWDFW ,QIRUPDWLRQ                                           
aiS _…zŒ lbff ˆ‹ ai ezŒ~‹c~ i‹‚‡~‹Œ G G G G G G G G G G G G G G G G G G G KQJ
6ROXWLRQ                                                     
)HDWXUHV                                                    
6XSSRUWHG 3ULQWHUV                                             
0DQDJHPHQW 6RIWZDUH 6VWHPV 5HTXLUHPHQWV                       
RQWDFW ,QIRUPDWLRQ                                           
c~_ˆ‹†S c~_ˆ‹† hŽ‰Ž iz„ ˆ‹ lZi kHL G G G G G G G G G G G G G G G G G G KQK
-HW)RUP 'HVLJQ                                               
-HW)RUP HQWUDO                                               
-HW)RUP 6$3VFULSW IRUPV IRU 5                                  
-HW)RUP )RUPV IRU 5                                         
+RZ ,W :RUNV                                                
7KH 3ULQW 3URFHVV                                              
)HDWXUHV                                                    
RQWDFW ,QIRUPDWLRQ                                           
l‹~z†l~‹~S l‹~z†l~‹~ ˆ‡‡~|‚‚’ iz|„ ˆ‹ kHL G G G G G G G G KQP
6WUHDP6HUYH 2XWSXW )RUPDW RQYHUWHU IRU 5                      
)HDWXUHV DQG %HQHILWV                                          
RQWDFW ,QIRUPDWLRQ
Sap script made easy
, 1 7 5 2 ' 8  7 , 2 1
b‡‹ˆ}Ž|‚ˆ‡
h~‹‚~
Forms streamline the process of conducting business. Invoices, credit
memos, and delivery notes are just a few examples of the types of
forms companies routinely use.
With SAPscript, SAP’s programming tool, you can easily design,
build, and print a wide variety of business forms. R/3 comes with a
library of predesigned forms that can be quickly customized to fit the
needs of every business.
Filled with step-by-step instructions and screenshots, this guidebook
helps you understand how to use SAPscript to design and print
business forms.
JK SAPscript Made Easy | Release 4.6
pz bŒ ‚Œ `Ž‚}~ Z{ˆŽX
This guidebook is all about SAPscript forms. Using this guidebook,
you will be able to:
n Use graphical tools (Form Painter and PC Editor) to quickly adapt
SAPscript forms for your needs
n Reduce the consulting time and effort required to develop or
modify SAPscript forms
The topics covered in this guidebook will help you:
n Modify the layout of SAPscript forms
n Modify the content of SAPscript forms
n Customize R/3 application for SAPscript forms
pˆ lˆŽ…} k~z} ‚Œ `Ž‚}~X
This guidebook is written for:
n R/3 application consultants
n R/3 implementation team members
n Individuals with little or no knowledge of SAPscript
ZŒŒŽ†‰‚ˆ‡Œ
To help you get the most out of this guidebook, the following
assumptions are being made:
n Forms are intended for the U.S., Canadian, and Australian
markets.
n Except checks, U.S. and Australian companies do not routinely use
preprinted forms. A company logo is usually the only preprinted
item on a form.
n Implementation teams are using the latest version of the
predeveloped forms.
To download preconfigured forms, go to
KWWSZZZVDSODEVFRPIRUPV
Introduction JL
This guide does not cover the following topics. Consult your system
administrator for more information.
n Using the Change and Transport System (CTS)
n Uploading predeveloped forms into your system
n Using the Online Support Service to get an access key to modify
R/3 objects
aˆ ˆ nŒ~ ‚Œ `Ž‚}~X
If you are a new SAPscript user, you should read parts 1 and 2 to
familiarize yourself with SAPscript.
If you are a more experienced SAPscript user, you should read part 2.
You may choose to skim part 1.
All examples and step-by-step intructions covered in part 2 are based
on the SAPscript standard form for sales order confirmation (technical
name RVORDER01).
gˆ~
Although you can use parts of this guide as a tutorial, it is not intended to be a
substitute for the SAP training course BC 460 SAPscript: Forms Design and Text
Management in R/3.
aˆ bŒ ~ `Ž‚}~ h‹€z‡‚“~}X
iz‹ JS e~z‹‡‚‡€ lZiŒ|‹‚‰ [zŒ‚|Œ
n Chapter 1: SAPscript Forms: The Big Picture
Understanding concepts, architecture, and runtime environment
of SAPscript forms
n Chapter 2: SAPscript Forms: The Basics
Form management tools and types of form components
iz‹ KS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†Œ
n Chapter 3: Getting Started with Forms
Importing predeveloped forms into your system landscape
n Chapter 4: Modifying SAPscript Forms: The Basics
Modifying windows and content
JM SAPscript Made Easy | Release 4.6
n Chapter 5: Modifying SAPscript Forms: Advanced Topics
Logos, bar codes and other advanced topics
iz‹ LS ŽŒˆ†‚“‚‡€ Z‰‰…‚|z‚ˆ‡Œ ˆ‹ lZiŒ|‹‚‰ _ˆ‹†Œ
n Chapter 6: Customizing Sales and Distribution for Print Forms
n Chapter 7: Customizing Materials Management for Print Forms
n Chapter 8: Customizing Financial Accounting for Print Forms
iz‹ MS Z‰‰~‡}‚‘~Œ
n Appendix A: SAPscript Control Commands
n Appendix B: Sample Forms
n Appendix C: Third-Party Solutions
pz@Œ g~ ‚‡ ‚Œ `Ž‚}~X
Since the publication of the SAPscript Made Easy guidebook for
Release 4.0B, the following new topics have been added:
nŒ‚‡€ ~ €‹z‰‚| †z‡z€~†~‡ ˆˆ… ˆ ‚‡|…Ž}~ €‹z‰‚| ‚…~Œ ‚‡ z
ˆ‹†
You learn how to import a graphic file (in Windows BMP format ) into
the document server, preview the graphic, and include the graphic in
a form using the new graphic management tool. Additionally, you
learn how to organize your own folder structure within the document
server.
For more information, see Chapter 5, “Modifying SAPscript Forms:
Advanced Topics” on page 113.
i‹‚‡‚‡€ ~‘ ~‹‚|z……’
You learn how to print text vertically using print controls.
For more information, see Chapter 5, “Modifying SAPscript Forms:
Advanced Topics” on page 113.
Introduction JN
nŒ‚‡€ ~ i^k_hkf |ˆ††z‡} ‚‡Œ~z} ˆ |z‡€‚‡€ ~ ‰‹‚‡
‰‹ˆ€‹z†
You learn how to use the SAPscript PERFORM command to receive
additional data during the printing process. Often it is easier to use
the PERFORM command than changing the print program.
For more information, see Chapter 5, “Modifying SAPscript Forms:
Advanced Topics” on page 113.
i‹~‰z‹‚‡€ ˆ‹†Œ ˆ‹ †ˆ}‚‚|z‚ˆ‡
Language and page format differences exist for SAP standard forms
and preconfigured forms used in the U.S. and Canadian markets. If
you use the standard or preconfigured forms, you learn how to
change the original language and page format for certain forms.
For more information, see Chapter 3, “Getting Started with Forms” on
page 47.
ˆ‡~‡‚ˆ‡Œ
Throughout this guide, you will find the symbols shown below. These
mark special information that supplements the main discussion or
theme.
m~|mz…„: This symbol flags information that is highly technical. It is
included for those who want to dig deeper into particular concepts or
explore background theory.
m‚‰Œ ? m‹‚|„ŒS This symbol flags suggestions, hints, and practical
techniques to help you become more efficient in the way you use the
R/3 System.
zŽ‚ˆ‡S This symbol flags information that can help you steer clear
of common pitfalls. It demands careful reading.
TechTalk
Tips  Tricks
Caution
JO SAPscript Made Easy | Release 4.6
In the table below, you will find some of the text conventions used
throughout this guide.
Figure 0–1 Sample Enjoy R/3 (Release
4.6) screen
Figure 0–2 Detailed screen elements
Text convention What it means
VDQVVHULI Command syntax.
sans-serif italic Screen names or on-screen objects (buttons, fields, etc.).
monospace User input (text the user types verbatim).
name1 → name2 Menu selection. name1 is the menu name, and name2 is
the item on the menu.
Workplace
Workplace Menu
Standard Menu BarStandard Menu Bar
Status Bar
Screen Title
Application Menu Bar
Standard Menu Bar
Application Menu Bar
Status Bar
Screen Title
3 $ 5 7 2 1 (
[e~z‹‡‚‡€ lZiŒ|‹‚‰
[zŒ‚|Œ
Sap script made easy
+ $ 3 7 ( 5
JlZiŒ|‹‚‰ _ˆ‹†ŒS m~ [‚€ i‚|Ž‹~
KI SAPscript Made Easy | Release 4.6
h~‹‚~
This chapter provides an overview of SAPscript forms. After reading
this chapter, you will be able to answer the following questions:
n What are SAPscript forms?
n What is the architecture of SAPscript forms?
n How are SAPscript forms processed?
n What are the different sources of SAPscript Forms?
n Where can you find the SAPscript forms you need?
pz Z‹~ lZiŒ|‹‚‰ _ˆ‹†ŒX
To help you build the business forms (for example, invoices, purchase
orders, etc.) you need, the R/3 System provides you form
management tools and SAPscript forms.
A SAPscript form is a template that simplifies the process of designing
business forms. It supplies the layout (for example, page size) and
content (for example, sales data for an invoice) for your business
forms. You need SAPscript forms to print, distribute, or display the
business forms.
^‘z†‰…~Œ ˆ lZiŒ|‹‚‰ _ˆ‹†Œ
Some examples of SAPscript forms are shown in Figure 1–1:
n Sales order confirmations
n Invoices
n Purchase orders
n Prenumbered and unnumbered checks
n Accounting statements
n Packing and picking lists
SAPscript Forms: The Big Picture KJ

Figure 1–1 Sample SAPscript forms
pz bŒ ~ Z‹|‚~|Ž‹~ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX
Each SAPscript form consists of two main components:
n Layout: The layout is defined by a set of windows in which the
content appears.
n Content: The content is either text (for example, business data for
an invoice) or graphics (for example, a company logo).
Figure 1–2 shows an invoice created with a standard SAPscript form.
There are seven separate windows which define the overall layout of
the invoice. Windows house the form content. To help you
understand the architecture of a SAPscript form, the contents of the
Payment Information window have been highlighted.
KK SAPscript Made Easy | Release 4.6
Figure 1–2 Understanding the
architecture of a SAPscript form
The central object in a SAPscript form is the window. You can define
the size, position, and content of each window in a form. As shown in
Figure 1–3, a SAPscript form derives its structure from a set of
windows (for example, logo, billing address, and information
windows), each with its own content. For more information, see
“What Are the Form Components?” on page 35.
Figure 1–3 The role of windows in
SAPscript forms
Logo
Window
Main Window
Payment Information
Document Number 9000167
Document Date 06/03/1999
Purchase Order No. RJC-893
Purchase Order Date 06/02/1999
Packing List Number 80000145
Sales Order Number 180
Payment Terms Net 30
Billing Date 06/03/1999
Layout
Content
Window
SAPscript Form
Form
Windows
Content
Top-Down Strategy
SAPscript Form
Logo Window
Billing Address
Window
Address Window
Information
Window
Invoice Details
Window
(Main Window)
SAPscript Forms: The Big Picture KL

aˆ Z‹~ lZiŒ|‹‚‰ _ˆ‹†Œ i‹ˆ|~ŒŒ~}X
The SAPscript runtime environment coordinates the processing of
SAPscript forms.
As shown in Figure 1–4, the SAPscript runtime environment:
n Retrieves layout and content data from the SAPscript form
n Collects the necessary business data from the R/3 database
n Generates the final SAPscript form
The resulting business form can be printed, e-mailed, faxed, or
displayed.
Figure 1–4 How SAPscript forms are
processed in the R/3 System
pz Z‹~ ~ ]‚~‹~‡ lˆŽ‹|~Œ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX
SAP provides you with two different sources for SAPscript forms:
n Standard SAPscript forms: Standard SAPscript forms are
delivered with the SAP standard client (usually referred to as client
000).
n Preconfigured SAPscript forms (also called preconfigured forms):
Developed for the U.S. and Canadian markets, the preconfigured
SAPscript forms are delivered with the Preconfigured Client
(PCC).
Database
Business
Data
SAPscript
Runtime
Environment
SAPscript Form
R/3 System
Printer
Onscreen
E-mail
Fax
SAPscript Form
KM SAPscript Made Easy | Release 4.6
n Current Preconfigured SAPscript forms: You can download
current versions of the preconfigured forms from the Internet at:
KWWSZZZVDSODEVFRPIRUPV.
n SAPscript forms for R/3 Release 3.x: SAPscript forms are also
available as separate files. For R/3 releases 3.0E, 3.0F, and 3.1H,
SAP provides sets of SAPscript forms you can download from the
Internet at: KWWSZZZVDSODEVFRPIRUPV
lz‡}z‹} lZiŒ|‹‚‰ _ˆ‹†ŒS lˆ†~ ^‘z†‰…~Œ
Here are some examples of standard SAPscript forms that are
delivered with client 000:
Table 1–1 Examples of standard SAPscript forms
Form Description Standard Form Name
Sales Order Confirmation RVORDER01
Packing List RVDELNOTE
Invoice RVINVOICE01
Purchase Order MEDRUCK
Prenumbered Check F110_PRENUM_CHCK
SAPscript Forms: The Big Picture KN

i‹~|ˆ‡‚€Ž‹~} lZiŒ|‹‚‰ _ˆ‹†ŒS lˆ†~ ^‘z†‰…~Œ
Here are some examples of preconfigured forms delivered with the
Preconfigured Client:
p~‹~ ˆ _‚‡} ~ lZiŒ|‹‚‰ _ˆ‹†Œ ’ˆŽ g~~}
Use Table 1–3 to help you find the SAPscript form you need.
Table 1–2 Preconfigured SAPscript forms
Form Description Preconfigured Form Name
Sales Order Confirmation YPCC_ORDCONF_STD
Packing List YPCC_PACKLIST
Purchase Order YPCC_CHECK_NUM
Invoice YPCC_INVOICE_STD
Remittance Advice YPCC_REMITT_STD
Account Statement / Open Item List YPCC_STATEMT_STD
Balance Carried Forward Statement /
Open Item List
YPCC_STMBCF_STD
Unnumbered Check YPCC_CHECK_UNN
Prenumbered Check YPCC_CHECK_NUM
Table 1–3 Where to find the SAPscript forms you need
For... Go to...
Standard SAPscript forms
(complete list, organized
along the application
component hierarchy)
From the SAP standard menu, choose Tools →
SAPscript → SE71 - Form. From the Form Painter:
Request screen choose at right of the Form
name field. The SAPscript Form Tree (Display
Mode) screen shows the complete list.
Preconfigured forms
(updates and current
development)
KWWSZZZVDSODEVFRPIRUPV
SAPscript forms
(for R/3 releases 3.0E, 3.0F,
and 3.1H)
KWWSZZZVDSODEVFRPIRUPV
Sap script made easy
+ $ 3 7 ( 5
KlZiŒ|‹‚‰ _ˆ‹†ŒS m~ [zŒ‚|Œ
KQ SAPscript Made Easy | Release 4.6
h~‹‚~
This chapter introduces you to the basics of SAPscript forms. To
understand the “how-to’s” described in later chapters, you first need
to become familiar with the following:
n What are the form management tools in R/3?
n What are the main components of SAPscript forms?
For more information about SAPscript, see the R/3 online
documentation (Basis → Basis Services/Communication Interfaces →
SAPscript).
pz Z‹~ _ˆ‹† fz‡z€~†~‡ mˆˆ…ŒX
The task of managing forms typically involves layout and content
considerations. To manage SAPscript forms, the R/3 System provides
the following tools:
n Form Painter – a graphical tool to manage form design and layout
n PC Editor – a text-based tool to manage business content
_ˆ‹† iz‚‡~‹
You use the Form Painter to manage the page layout of SAPscript
forms.
Z||~ŒŒ‚‡€ ~ _ˆ‹† iz‚‡~‹
mzŒ„
6WDUW ZRUNLQJ ZLWK )RUP 3DLQWHU
SAPscript Forms: The Basics KR

JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
Depending on your display settings, the SAP Easy Access screen on your
system may look different from the one shown above. To specify display
settings, choose Extras → Settings. Then, select the desired options (for
example, Show technical name).
Tips  Tricks
LI SAPscript Made Easy | Release 4.6
KG On the Form Painter: Request screen:
zG Enter a form name and language (for example, ZVORDER01 as the
form and EN (English) as the language).
{G Choose a form component option (for example, Header) in the
Subobjects section.
|G Choose Display or Change.
The Form Painter consists of two screens:
n Administrative Screen
n Design Window
You can modify each form component using the Administrative Screen.
The Design Window (synchronized with the Administrative Screen) only
appears, if you choose the form component Page Layout.
For more information, see “What Are the Form Components?” on
page 35.
i ^}‚ˆ‹
You use the PC Editor to modify the content of SAPscript forms. With
the PC Editor you can modify text elements or SAPscript command
controls, and standard text.
In the Subobjects section, select the
form component you want to process as
well as the processing mode (displaying
or changing mode).
The default setting under Subobjects is Header. To modify a form layout
immediately, choose Page layout. Both synchronized screens of the graphical
Form Painter appear. For more information, see “Page Layout” on page 40.Tips  Tricks
SAPscript Forms: The Basics LJ

You can access the PC Editor in one of two ways:
n Using the Form Painter
n Using Standard Text
To simultaneously modify form layout and content (for example, text
elements or control commands), SAP recommends option 1 (see
“Accessing the PC Editor via Form Painter” on page 31).
To modify standard text only, use option 2 (see “Accessing the PC
Editor via Standard Text” on page 32).
Z||~ŒŒ‚‡€ ~ i ^}‚ˆ‹ ‚z _ˆ‹† iz‚‡~‹
mzŒ„
$FFHVVLQJ WKH 3 (GLWRU IURP )RUP 3DLQWHU
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter a form name and language (for example, ZVORDER01 as the
form and EN (English) as the language).
{G Select Page Layout in the Subobjects section.
|G Choose Display or Change.
LG To start the PC Editor directly from the Administrative Screen in Form
Painter, choose .
To access the PC Editor for the currently
selected window, choose .
The name of the currently selected
window is displayed in the Name field.
LK SAPscript Made Easy | Release 4.6
On the Administrative Screen, the PC Editor shows the content of the
currently selected window.
Z||~ŒŒ‚‡€ ~ i ^}‚ˆ‹ ‚z lz‡}z‹} m~‘
If you only want to change standard text, start the PC Editor without
using Form Painter. Using Standard text is quicker than accessing
through Form Painter, but you need the technical name of the text
object you want to edit.
mzŒ„
2SHQ WKH 3 (GLWRU XVLQJ 6WDQGDUG WH[W
JG From the SAP standard menu, choose Tools → SAPscript → SO10 -
Standard Text.
SAPscript Forms: The Basics LL

KG On the Standard Text: Request screen:
zG Choose the standard text by specifying Text name, Text ID and
Language.
{G Choose Change.
The PC Editor appears for the chosen standard text.
LM SAPscript Made Easy | Release 4.6
Z|‚z‚‡€ ~ `‹z‰‚|z… _ˆ‹† iz‚‡~‹ z‡} i ^}‚ˆ‹
The Form Painter provides graphical functionality for manipulating
forms (see “Manipulating the Layout of a Form” on page 69). Before
using the graphical Form Painter and the graphical PC Editor, you
have to activate them.
mzŒ„
$FWLYDWH WKH JUDSKLFDO )RUP 3DLQWHU DQG 3 (GLWRU
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen, choose Settings → Form Painter.
This screen already shows the Form
Painter. If the Form Painter is not
activated yet, the screen may differ
from the one shown.
SAPscript Forms: The Basics LN

LG On the User-Specific Settings screen:
zG Make sure the Graphical Form Painter checkbox is selected.
{G Make sure the Graphical PC Editor checkbox is selected.
|G To activate user specific settings, choose .
pz Z‹~ ~ _ˆ‹† ˆ†‰ˆ‡~‡ŒX
SAPscript provides functions for form manipulation in the following
areas:
Table 2–1 SAPscript form components
Form Component Description See Page
Header General information and default settings 36
Paragraph formats Font and tab information for paragraphs 37
Character formats Font information within a paragraph 38
Page layout Page names with page flow information,
position, and size of windows on the
pages
40
Documentation Technical documentation about the form
components
43
LO SAPscript Made Easy | Release 4.6
a~z}~‹
The header consists of either administrative data for the form or basic
settings that can be overridden in other parts of the form.
The two elements most important to your customization are font and
page format within the basic settings.
Except for checks, the page format for the U.S. and Canada is LETTER
and DIN A4 for Australia.
The only purpose for the values “Lines per inch” and
”Characters/inch” is to convert the measures specified in lines and
characters to absolute values.
Do not change the values for “Lines per inch” and “Characters/inch” because
you will readjust all tabs and window coordinates. We will discuss fonts later in
this section.Caution
The Lang. attributes section gives
you important information about the
called form. The Language field
shows the language version you
specified when you called the form.
The Original lang. field shows the
language to which you can change
the form. It is usually the language
in which the form was originally
created.
You can easily move to other components without leaving the above screen by
choosing the related button of a component in the menu bar. For example, to
move from the header to the page layout, choose Layout in the menu bar.Tips  Tricks
SAPscript Forms: The Basics LP

iz‹z€‹z‰ _ˆ‹†zŒ
A paragraph contains all the information needed to format text. In
forms, not all of the formatting possibilities are used because most
form paragraphs consist of only a line or a word.
Font and tabs are the important paragraph formats. If you do not
specify a font, the form uses the default font from the form header. If
you want to create columns for outputting line items of a document,
specify a list of tabs.
The following screenshot illustrates the font attributes of a paragraph
definition.
If a paragraph uses a small font, set the line spacing to less than one line.
Ensure that the printer can print more than six lines per inch.
Tips  Tricks
LQ SAPscript Made Easy | Release 4.6
The following screenshot illustrates the tab attributes of a paragraph
definition. Tab positions are specified as the number of characters
from the left. The system uses the characters per inch value in the
header basic settings to convert the number of characters into an
absolute value. For this conversion, font size does not matter.
z‹z|~‹ _ˆ‹†zŒ
Character format overrides paragraph settings for specific words in
a paragraph. For example, you might want to italicize a single
word and not the entire paragraph.
You can assign character formats to bar code printing. The standard
attributes show:
n Whether a character format is used for bar code printing
n Which bar code format is used (you can choose predefined bar
code formats form a list)
To apply character strings within a paragraph using the PC Editor, mark the
specific text and select the desired character format from the character string
box.
To apply character strings using the text editor, turn on the settings for the
character string by enclosing the character string name in angle brackets  
before the specific text. To return to the standard paragraphs settings, insert a
slash within angle brackets / at the end of the specific text. For example:
BThese words will be bold/.
TechTalk
SAPscript Forms: The Basics LR

For more information about bar code printing, see Chapter 5,
“Modifying SAPscript Forms: Advanced Topics” on page 113.
To access the font attributes of a character string, choose Font.
For Font attributes, radio buttons can be used to underline, italicize,
or bold the typeface.
Retain means that underline, italic, or bold settings are retained from
the paragraph. If a character string has no specified font, the
paragraph font is used.
The following screenshot displays the character string B, which
changes the format to Bold, while the settings for Italics and
Underline are retained from the paragraph.
MI SAPscript Made Easy | Release 4.6
iz€~ ez’ˆŽ
In page layout you can define or change windows.
A window contains SAPscript text, which consists of text elements
and the to-be-printed variables.
There is one special window, MAIN, that contains the output of the
document line items.
Except for MAIN, the window type can be either variable (VAR) or
constant (CONST). SAPscript does not distinguish between the
two window types, although both types are mentioned in the
SAPscript documentation.
If you activate the Form Painter and choose Page layout from the Form
Painter: Request screen, the following two screens appear:
n Form: Change Page Layout screen (also referred to as the
Administrative Screen)
n Graphical Form Painter (also referred to as the Design Window)
Figure 2–1 shows the synchronized screens you work with to modify
page layout. You can easily move between screens by clicking on the
desired screen.
SAP online documentation on window types:
Variable window content is regenerated on every new page. The content of a
constant window is generated once and printed on every page.
This means that, for better performance, windows that contain different
information on different pages must be VAR; all others are CONST. The content
of the window is defined in the SAPscript editor.
TechTalk
SAPscript Forms: The Basics MJ

Figure 2–1 Form Painter screens
On the Administrative Screen, choose to move to the window text.
In this example the Window: INFO screen appears.
n A gray shaded section represents SAPscript commands (including
variables).
n A white section shows you the content and layout.
Design WindowDesign WindowDesign WindowDesign WindowDesign WindowDesign WindowDesign WindowDesign Window
Administrative Screen
MK SAPscript Made Easy | Release 4.6
oz‹‚z{…~Œ
A variable name consists of the name of a DDIC structure, a hyphen,
and a field name. All variable names must also be enclosed in
ampersands (). If you want to output variables, you may format
them. This step is necessary if you do not want the standard
formatting of the variables coming from the data dictionary.
For a detailed list of formatting options, see Appendix A, “SAPscript
Control Commands” on page 221.
Table 2–2 Common formatting options
Common formatting options Syntax
Truncating the variable length table-field(n)
prints the first n characters of the
variable
Specifying the number of decimals table-field(.l)
prints the variable with l decimals
Outputting the variable with an offset table-field+m
prints the rest of the variable after the
first m characters
Omitting leading zeros table-field(Z)
omits the leading zeros
Only the combinations of the first three formatting options are allowed. The
syntax used to combine all three formatting options is: table-
field+m(n.l)Tips  Tricks
SAPscript Forms: The Basics ML

]ˆ|ކ~‡z‚ˆ‡
Storing technical documentation for forms is a useful feature of
SAPscript. Here, you can look for information about form variables,
know when the print program fills the variables, and easily describe
all your changes. We highly recommend using this feature, especially
if you want to modify a form.
In this example, we chose the display mode for the documentation. In
the Display Documentation screen, you will find useful information
about the form. The form, usage of windows, and text elements are
described.
Sap script made easy
3 $ 5 7 7 : 2
Zfˆ}‚’‚‡€ lZiŒ|‹‚‰
_ˆ‹†Œ
Sap script made easy
+ $ 3 7 ( 5
L`~‚‡€ lz‹~} ‚ _ˆ‹†Œ
MQ SAPscript Made Easy | Release 4.6
h~‹‚~
In the previous chapters you learned how SAPscript forms supply the
basic layout and structure for your business forms. You are now ready
to take the first step toward customizing SAPscript forms.
To help you get started with SAPscript forms, this chapter covers the
following:
n What are the methods for importing (or copying) forms?
n How to choose the best method for importing (or copying) forms?
n How to import or copy forms?
pˆ‹„‚‡€ ‚ lZiŒ|‹‚‰ _ˆ‹†ŒS _‚‹Œ l~‰Œ
SAPscript forms are client-dependent. Before you can customize a
SAPscript form, you must import (or copy) the form into the
appropriate R/3 client.
pz Z‹~ ~ f~ˆ}Œ ˆ‹ b†‰ˆ‹‚‡€ _ˆ‹†ŒX
Depending on how the forms are available, there are two different
methods for importing forms into your appropriate client.
_ˆ‹†Œ Zz‚…z{…~ ˆ‡ z‡ kHL …‚~‡
If the forms are already available on an R/3 client (for example, on the
SAP standard client 000, a preconfigured client, or another client), you
must execute a client copy to import the forms into the appropriate
client. For more information, see “Copying Forms between Clients”
on page 49.
_ˆ‹†Œ Zz‚…z{…~ zŒ l~‰z‹z~ _‚…~Œ
If the forms are available at a file location (for example, on the D
drive), you must first import the forms into your client. For more
information, see “Importing Forms from a File” on page 58.
Getting Started with Forms MR

aˆ ˆ ˆˆŒ~ ~ [~Œ f~ˆ}X
Use the table below to determine which import method applies to
your situation. Each number represents a different procedure. If more
than one procedure is applicable, try to use the one with the lower
number.
If you are using the Preconfigured Client, simply copy the forms from
the PCC client to your client. For more information, see “Copying
Forms between Clients” on page 49.
U.S. and Canadian customers not using the Preconfigured Client may
want to begin by importing the forms from a file. For more
information, see “Importing Forms from a File” on page 58.
ˆ‰’‚‡€ _ˆ‹†Œ {~~~‡ …‚~‡Œ
If you want to use preconfigured forms or standard forms that are
available in another client than your specific development client, you
have to copy the forms between clients. Since we assume you will not
perform any development directly in the preconfigured client or
standard client, you have to copy the forms—either from the standard
client 000 or the preconfigured client—to your specific development
client.
The task in this section describes how to copy forms from one client to
another. You will learn to execute a client copy for standard forms
between the standard client 000 and the client you are currently
logged on to.
Table 3–1 Choosing the best method to import forms
Type of Forms Needed Using Preconfigured Client Using SAP Client
U.S. or Canadian 0
1
2
Copy preconfigured form from PCC
client to yours
Copy standard form from client 000 to
yours
Import from file
1
2
Copy standard form from client 000 to
yours
Import forms from file
All other countries 1
2
Copy standard form from client 000 to
yours
Import forms from file
1
2
Copy standard form from client 000 to
yours
Import forms from file
Before modifying forms, make sure that you only modify copies.
Caution
NI SAPscript Made Easy | Release 4.6
If you are using the Preconfigured Client, you may have to copy
preconfigured forms from the PCC to another client. Copying forms
from the PCC is analog to copying forms from standard client 000;
you only have to replace the client number 000 with the client number
of your preconfigured client.
mzŒ„
RS IRUPV EHWZHHQ FOLHQWV
The following procedure describes how to copy the form
RVORDER01 for sales order confirmation.
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen, choose Utilities → Copy from
client.
Make sure you are working
in the client that is going to
receive the forms.
Getting Started with Forms NJ

LG On the Copy Forms Between Clients screen:
zG Enter the form name (for example, RVORDER01) in the Form name
field.
{G Enter the target form name, replacing the first letter of the form
name with Z (for example, ZVORDER01), in the Target form field.
|G Choose .
MG On the Create Object Directory Entry screen:
zG Enter a development class.
{G Choose .
The new name of a copied
form (target form) must
begin with Y or Z, because
the form name must be located in the
customer name space to be
modifiable later.
The default value for the Source
client field is the SAP standard
client number 000. If you are
copying the forms from the
preconfigured client (for example,
the preconfigured client number is
010), you have to overwrite the
source client number 000 (for
example, with 010).
NK SAPscript Made Easy | Release 4.6
You have now copied the form from one client to another. The system
displays an action log.
NG Go Back three times to return to the SAP standard menu.
i‹~‰z‹‚‡€ ˆ‰‚~} _ˆ‹†ŒS Z}}‚‚ˆ‡z… mzŒ„Œ
Every time you copy forms between clients, you have to consider two
important attributes of the form: The original language and the
assigned paper size.
n Standard SAPscript forms are delivered with original language DE
(German) and paper size DIN A4 (210 x 297 mm.).
n Preconfigured SAPscript forms are delivered with original
language EN (English) and paper size LETTER (215 x 279 mm.).
gˆ~
Since the forms delivered with the Preconfigured Client use English, you do not have
to change the original language for forms copied from the PCC.
h‹‚€‚‡z… ez‡€Žz€~
You can modify forms only in the original language. Before you
change a copied form, make sure you choose the correct language
version of the form. Since the SAP standard forms currently use DE
Getting Started with Forms NL

(German) as the original language, you may want to change the
original language to EN (English). The following task shows how to
change the original language for a form.
mzŒ„
KDQJH WKH RULJLQDO ODQJXDJH *HUPDQ '(
RI WKH FRSLHG VWDQGDUG
IRUP =925'(5 WR RULJLQDO ODQJXDJH (QJOLVK (1
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER01 in the Form field.
{G Enter DE in the Language field.
|G Choose Change.
If you activate the Change and Transport System (CTS), put your new
form ZVORDER01 on a correction request.
NM SAPscript Made Easy | Release 4.6
LG Choose Utilities → Convert orig. lang. to change the original language
of the copied form.
MG In the Convert Original Language window:
zG Enter EN in the To original language field.
{G Choose .
The system converts the original language from DE to EN, as shown
in the message displayed in the status bar.
If a message is not displayed in a
separate information window, the
message will be displayed in the
window’s status bar.
Getting Started with Forms NN

z‡€‚‡€ iz€~ _ˆ‹†z ˆ z _ˆ‹†
Since the preconfigured forms are developed with page format
LETTER and the standard forms with page format DIN A4, you may
want to change the page format for a form. You can easily convert the
page format DIN A4 to LETTER and vice versa by executing the
program RSTXFCON.
The program RSTXFCON converts the current form page format to
the specified page format checking the position and size of each
window on each page. In general, the program tries to hold the
position and size of a window. The program first moves the window,
and only if necessary, reduces the window size. It is important to
understand the program will never enlarge a window. In general, you
should execute the conversion program only for page formats that are
very similar. The more different the page format, the more additional
manual changes are necessary after executing the program.
mzŒ„
KDQJH WKH SDJH IRUPDW ',1 $ WR /(77(5 IRU IRUP =925'(5
JG From the SAP standard menu, choose Tools → ABAP Workbench →
Development → SE38 – ABAP Editor.
KG On the ABAP Editor: Initial Screen:
zG In the Program field, enter RSTXFCON.
{G Choose .
Before you change the
page format, make sure the
form is active.
NO SAPscript Made Easy | Release 4.6
LG On the SAPscript: Conversion of Page Format for Forms screen:
zG In the Form name field, enter the desired form name (for example,
ZVORDER01).
{G In the New page format field, enter the desired page format (for
example, LETTER).
|G Make sure that the check box Test run, do not save is selected.
}G Choose .
~G Review the action protocol for the test run.
G Go Back.
Print the protocol to have a copy of the parameters that will be changed by the
conversion program.
Click at the right of the
New page format field and
then choose the desired
page format from the list of available
standard page formats.
Tips  Tricks
Getting Started with Forms NP

MG If you want to change the paper format, execute the conversion
program again, by deselecting the check box Test run, do not save and
choose .
NG If you do not want to change the paper format, go Back twice to return
to the SAP standard menu.
NQ SAPscript Made Easy | Release 4.6
b†‰ˆ‹‚‡€ _ˆ‹†Œ ‹ˆ† z _‚…~
The following section describes how to import forms from a file.
Importing from a file is a very practical way to start your form
development process in order to save time and money.
Importable files with SAPscript forms can be found on the Internet at:
KWWSZZZVDSODEVFRPIRUPV.
The easiest way to import forms into your R/3 System is to make the
files available on the presentation server (that is, the computer where
the SAPGUI is running).
gˆ~
You may also place the files on the application server. However, this process is
somewhat complicated, particularly if the R/3 System is running on a multi-server
machine.
mzŒ„
,PSRUW D IRUP IURP D ILOH LQWR RXU FOLHQW
JG Log on to the presentation server where you want to make the forms
available.
KG Copy the to-be-imported forms to the desired drive of your
presentation server.
LG Log on to the client that is going to receive the imported forms.
MG From the SAP standard menu, choose Tools → ABAP Workbench →
Development → SE38 - ABAP Editor.
Forms are client dependent. Therefore, the upload program only creates forms
in the client where the program has been executed.
TechTalk
Getting Started with Forms NR

NG On the ABAP Editor: Initial Screen:
zG Enter RSTXSCRP in the Program field. RSTXSCRP is the name of
the upload program in the R/3 System.
{G Choose .
Although the RSTXSCRP report is an easy and quick way to get a form into
the R/3 System, there are some restrictions. Make sure that you also read
SAPNet - R/3 frontend note 3355 to learn more about this and similar import
functions for forms.
TechTalk
OI SAPscript Made Easy | Release 4.6
OG On the SAPscript Export to Dataset / SAPscript Import from Dataset
screen:
zG Enter the object name of the form (for example, ZVORDER01) in the
Object name field.
{G Enter IMPORT in the Mode field.
|G If you use the presentation server, select From/on frontend,
otherwise select From/on application server.
}G Enter the name of the dataset and the path (for example,
C:order01.scr) in the Dataset name field.
~G Choose .
PG In the Import from a Local File window:
zG Enter the full path to the file containing the desired dataset in the
File name field.
{G Choose Transfer.
The file transfer is now complete. To import other forms, repeat the
steps shown in this task.
Getting Started with Forms OJ

The result of the file transfer is the protocol displayed below.
QG Go Back three times to return to the SAP standard menu.
Sap script made easy
+ $ 3 7 ( 5
Mfˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS
m~ [zŒ‚|Œ
OM SAPscript Made Easy | Release 4.6
h~‹‚~
In the previous chapter you learned how to import SAPscript forms in
your development client. You already know the form management
tools Form Painter and PC Editor and how to access them. You are
now ready to start modifying forms.
This chapter focuses on basic form modifications as:
n Copying a form
n Test printing a form
n Modifying the layout of a form (creating, renaming, moving,
resizing, or deleting a window)
n Modifying the content of a form (moving fields or tabs, looking up
a field in the data dictionary, adding fields to your form, or adding
fields to a print structure)
To make your next system upgrade easier and smoother, do not modify the
standard forms or the forms from the disk. Copy these forms and modify the
copies, not the standard forms.Caution
Modifying SAPscript Forms: The Basics ON

ˆ‰’‚‡€ z _ˆ‹†
Forms must be copied before changes are made. The following
example shows how to copy a form.
mzŒ„
RS D IRUP IRU D VDOHV RUGHU FRQILUPDWLRQ
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter the name of the new form in the Form field. This name
should be as similar as possible to the old name and has to begin
with Z or Y, since the new form name has to be in the name range
for customer objects (for example, the new name for the Sales
Order Confirmation is ZVORDER02).
{G Enter EN in the Language field.
|G Choose Create.
OO SAPscript Made Easy | Release 4.6
LG Choose to accept the message displayed in the popup window.
MG On the Administrative Screen:
zG Enter Sales Order Confirmation in the Description field.
{G From the menu bar, choose Form → Copy from.
NG In the popup window:
zG Enter ZVORDER01 in the Form field.
{G Enter EN in the Language field.
|G Choose .
Modifying SAPscript Forms: The Basics OP

OG On the Form: Change Header: ZVORDER02 screen:
zG Save form ZVORDER02.
If your system is connected to the Change and Transport System
(CTS), the new form must be written on a correction request. (The
instructions for writing a correction request are not included in this
guide.)
{G To activate the changes, choose .
|G Go Back to return to the SAP standard menu.
m~Œ i‹‚‡‚‡€ z _ˆ‹†
Test prints provide an easy way to check modified forms. On a test
print, SAPscript prints a string of Xs for all of the variables used in the
form. For example, if a variable is 5 characters in length, SAPscript
prints XXXXX in its place.
All windows, except MAIN, are printed as they appear in the
actual output. MAIN contains a list of all defined text elements.
To test the form during sales order customizing, specify that form. ZVORDER02
should be used to print all sales order confirmations. For more information, see
Chapter 6, “Customizing Sales and Distribution for Print Forms” on page 161.
If you activate the form, it is not
necessary to save the form in
step 6a, because the form is
saved during activation in step 6b.
Tips  Tricks
OQ SAPscript Made Easy | Release 4.6
mzŒ„
([HFXWH D SULQW WHVW RI D IRUP
JG From SAP standard menu, choose Tools → SAPscript → SE71 - Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G From the menu bar, choose Utilities → Test print.
Modifying SAPscript Forms: The Basics OR

LG On the Print screen:
zG Enter a printer name (for example, LP01) in the OutputDevice
field.
{G Select Print immediately.
|G Choose Print.
MG On the Form Painter: Request screen, go Back to return to the SAP
standard menu.
fz‡‚‰Ž…z‚‡€ ~ ez’ˆŽ ˆ z _ˆ‹†
Manipulation of the layout of a form can be subdivided into the
following operations:
n Creating a new window
n Renaming a window
n Changing the position of a window
n Changing the size of a window
n Removing a window
n Aligning a window
PI SAPscript Made Easy | Release 4.6
gˆ~
The following sections describe the manipulation of a form using the graphical Form
Painter. It is always possible to manipulate the forms by conventional means in the
Administrative Screen, that is, by specifying the coordinates of windows by numerical
values. For instructions switching over to the graphical Form Painter, see “Activating
the Graphical Form Painter and PC Editor” on page 34.
‹~z‚‡€ z g~ p‚‡}ˆ
mzŒ„
$GG D QHZ ZLQGRZ WR D IRUP
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
LG In the Design Window, right-click to access the form layout
manipulation menu and choose Create window.
The window can also be
created by choosingEdit →
Windows → Create →
Variables window from the menu on
the Administrative Screen.
Modifying SAPscript Forms: The Basics PJ

MG Click on the Administrative Screen.
NG To activate the changes, choose .
In general, you will proceed with:
n Renaming the newly created window (see “Renaming a Window”
on page 72)
n Changing the size of the newly created window (see “Changing
Window Position or Size Using Design Window” on page 75)
n Changing the position of the newly created window (see
“Changing Window Position or Size Using Design Window” on
page 75)
The new window is
automatically named
WINDOW1 and placed in
the top left corner of the page.
PK SAPscript Made Easy | Release 4.6
k~‡z†‚‡€ z p‚‡}ˆ
mzŒ„
KDQJH WKH QDPH DQG GHVFULSWLRQ
RI WKH H[LVWLQJ ZLQGRZ IRU
H[DPSOH :,1'2: WR $''5(66
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
Modifying SAPscript Forms: The Basics PL

LG In the Design Window:
zG Select WINDOW1.
{G Right-click to access the form layout manipulation menu and
choose Rename.
MG On the Rename window:
zG Enter a name (for example, ADDRESS2) in the to field.
{G Choose .
NG Click on the Administrative Screen.
PM SAPscript Made Easy | Release 4.6
OG On the Administrative Screen:
zG Enter a description for the renamed window (for example,
Shipping Address) in the Description field.
{G To activate the changes, choose .
|G Go Back twice to return to the SAP standard menu.
The window can also be
renamed by choosing Edit
→ Windows → Rename
from the menu bar on the
Administrative Screen.
Modifying SAPscript Forms: The Basics PN

z‡€‚‡€ p‚‡}ˆ iˆŒ‚‚ˆ‡ ˆ‹ l‚“~ nŒ‚‡€ ]~Œ‚€‡ p‚‡}ˆ
mzŒ„
(QODUJH RU VKULQN WKH VL]H RI D ZLQGRZ RU SODFH D ZLQGRZ DW DQRWKHU
SRVLWLRQ LQ WKH IRUP
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
PO SAPscript Made Easy | Release 4.6
LG In the Design Window:
zG To move a window, grab the window by pressing the left mouse
button. Move the window to the new position while keeping the
left mouse button pressed. Release the left mouse button at the
new position.
{G To change the size of a window, position the cursor on the corner
or edge of the window and press the left mouse button. Keep the
left mouse button pressed while changing the window size.
Release the left mouse button when the new size is adjusted.
MG Click on the Administrative Screen.
zG To activate the changes, choose .
{G Go Back twice to return to the SAP standard menu.
Modifying SAPscript Forms: The Basics PP

z‡€‚‡€ p‚‡}ˆ iˆŒ‚‚ˆ‡ ˆ‹ l‚“~ nŒ‚‡€ Z}†‚‡‚Œ‹z‚~ l|‹~~‡
mzŒ„
KDQJH WKH SRVLWLRQ RU VL]H RI D ZLQGRZ E FKDQJLQJ WKH PDUJLQ
SRVLWLRQ RU WKH ZLGWK DQG KHLJKW RI D ZLQGRZ
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
LG Click on the Administrative Screen.
PQ SAPscript Made Easy | Release 4.6
MG In the Windows section of the Administrative Screen:
zG Choose a window by clicking the arrow in the Name field.
{G Choose the desired window name.
|G To change the position of the chosen window, change the values in
the Left margin and Upper margin fields.
}G To change the size of the chosen window, change the values in the
Window width and Window height fields.
~G To activate the changes, choose .
G Go Back twice to return to the SAP standard menu.
Modifying SAPscript Forms: The Basics PR

k~†ˆ‚‡€ z p‚‡}ˆ
mzŒ„
'HOHWH WKH ZLQGRZ $''5(66 IURP WKH IRUP
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
QI SAPscript Made Easy | Release 4.6
LG In the Design Window:
zG Select ADDRESS2.
{G Right-click to access the form layout manipulation menu and
choose Delete.
MG Click on the Administrative Screen.
NG On the Administrative Screen:
zG To activate the changes, choose .
{G Go Back twice to return to the SAP standard menu.
Z…‚€‡‚‡€ p‚‡}ˆŒ ˆ ~ `‹‚}
You will notice a grid in the background of the Design Window. You
can adjust the grid step size by specifying the step width (from 0 to 10)
and the unit of measurement (for example, inches, millimeters, etc.). If
you activate the automatic alignment in the Form Painter, the precise
position or size of the windows will be defined by the grid.
Modifying SAPscript Forms: The Basics QJ

mzŒ„
$GMXVW WKH JULG VWHS VL]H RI D IRUP
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
LG On the Administrative Screen, choose Utilities → Options.
MG In the Options window:
zG Adjust the new Step size for the grid with a value between 0 (zero)
and 10.
{G Select Align automatically to grid.
|G Choose .
The grid measurement unit
can also be changed here
(for example, in the Unit of
measure field, change MM to IN).
QK SAPscript Made Easy | Release 4.6
gˆ~
You activated the Align automatically to grid option. Next time you change the position
or size of a window, the system automatically aligns the window to the grid you
defined in step 4a.
fz‡‚‰Ž…z‚‡€ _ˆ‹† ˆ‡~‡
This section highlights the major features available for manipulating
the content of a window, for example its text fields. The following
functions will be described in detail:
n Moving a field
n Removing a field
n Looking up a field
n Adding a new field
n Adding a field to the print structure
fˆ‚‡€ z _‚~…}
Text appearing in the form output can be moved as follows:
n If it is the only text in a window, move the window (as described
in “Changing Window Position or Size Using Design Window” on
page 75).
n If it is positioned with a tab, move the tab.
n If it has to be moved vertically, insert or delete an empty line.
The following sections describe how to manipulate the content of a window with
the PC Editor. Of course, it is always possible to manipulate the content in the
conventional way (that is, by specifying the position of a field with numerical
values).
Caution
Modifying SAPscript Forms: The Basics QL

fˆ‚‡€ z mz{
mzŒ„
,Q WKH WDEOH KHDGHU RI OLQH LWHPV IRU DQ RUGHU FRQILUPDWLRQ PRYH WKH
WH[W Material RQH FKDUDFWHU WR WKH ULJKW
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
In this example, we move one word in the table header of line items in a sales
order one character to the right. The complete task would be also to move the
corresponding line item variable to match the columns for both the table header
and line items.
Tips  Tricks
QM SAPscript Made Easy | Release 4.6
LG In the Design Window:
zG Activate the MAIN window.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
If any unknown paragraph formats are used in the window, the Form Painter
cannot call the PC Editor; it launches the text editor instead. A message
indicating the names of the unknown formats appears in the status line of the
Administrative Screen where the text editor is located. In general, you should
assign a paragraph format, which is already defined for the form, to each
paragraph with an unknown paragraph format.
TechTalk
Modifying SAPscript Forms: The Basics QN
MG On the Window MAIN screen:
zG Scroll down until you see /E ITEM_HEADER.
{G Look at the line where Material is printed in paragraph format IL.
Material is printed after the first tab, which is represented by a set of
double commas. To move the word one character to the right, you
must increase the tab by 1.
NG Go Back to return to the Administrative Screen.
If a window uses an
unknown paragraph format,
the Form Painter can not
call the PC Editor. You have the
following alternatives:
n Work with the line editor as
described in the example. This
needs a little practice, because
the technique is different from
the way you work with the PC
Editor.
n Create paragraph formats for
the unknown formats.
QO SAPscript Made Easy | Release 4.6
OG On the Administrative Screen:
zG Choose Paragraph formats.
{G Select IL by double-clicking on its line. The paragraph format will
be highlighted after selection.
|G Choose Tabs.
Modifying SAPscript Forms: The Basics QP

PG In the Form: Change Paragraphs: ZVORDER02 window, in the Tabs
block:
zG The first tab entry means that the first tab position is 7 characters
from the left border of the form, and the corresponding text will
be printed with left alignment.
{G To move Material one character to the right, increase the first tab
by one and overwrite 7.00 with 8.00.
|G To activate the changes, choose .
}G Go Back twice to return to the SAP standard menu.
QQ SAPscript Made Easy | Release 4.6
b‡Œ~‹‚‡€ ˆ‹ ]~…~‚‡€ z e‚‡~
mzŒ„
2Q DQ RUGHU FRQILUPDWLRQ LQVHUW D EODQN OLQH EHWZHHQ ³VKLSWR
DGGUHVV´ DQG ³DGGUHVV´
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
Modifying SAPscript Forms: The Basics QR

LG In the Design Window:
zG Right-click the INFO1 window.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
|G Position the cursor where you want to insert an empty line. In this
example, it is following the Ship-to address.
MG Press Enter on your keyboard.
A new line is inserted behind the cursor position as shown in the
illustration below.
NG Go Back to return to the Administrative Screen.
Note that the ship-to
address is printed only if
the variable for the ship-to
country, VBDKA-LAND1, is filled.
Character string s (small font) is
used to print the Ship-to address.
RI SAPscript Made Easy | Release 4.6
OG To activate the changes, choose .
]~…~‚‡€ p‚‡}ˆ m~‘ nŒ‚‡€ ~ i ^}‚ˆ‹
n To delete the content of a line in a window, highlight and delete the
content. Then place the cursor on the empty line and delete the
line.
n To delete an entire block, highlight and delete the block.
]~…~‚‡€ p‚‡}ˆ m~‘ ŽŒ‚‡€ ~ m~‘ ^}‚ˆ‹
n To delete a line in a window, overwrite the line (including the
format column) using spaces.
n To delete an entire block of lines, mark the block by double-clicking
on the format columns of the first and last lines. Choose Delete.
k~†ˆ‚‡€ z _‚~…}
There are several different cases to consider when removing a field.
Case 1: The field is not located with other fields in a command line.
You can remove the field by deleting the command line.
Case 2: The field is located with other fields in a command line. Tabs
do not separate the fields. You can remove the field by changing the
command line. In the command line, highlight the field and delete it.
Case 3: The field is located in a line item table. Tabs separate the
different table columns.
For example, to remove the item number from a sales order
confirmation delete the text ITEM and the subsequent tab in the item
header and move the text Material and Description. Next, delete the
item number variable and move the material number and the
description variables.
After overwriting a line
with spaces, do not
choose Enter because it
will insert an empty line. To exit the
text editor, choose Back.
A command line is
highlighted gray in the PC
Editor.
Modifying SAPscript Forms: The Basics RJ

mzŒ„
5HPRYH WKH LWHP QXPEHU IURP D VDOHV RUGHU FRQILUPDWLRQ
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
RK SAPscript Made Easy | Release 4.6
LG In the Design Window:
zG Activate the MAIN window.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
The PC Editor for the MAIN window is displayed on the
Administrative Screen.
Modifying SAPscript Forms: The Basics RL

MG On the Window MAIN screen:
zG Scroll down until you see the command line ITEM_HEADER.
{G From the menu bar, choose Format → Paragraph on/off to display
the tabs in the PC Editor.
NG Highlight the text Item and the subsequent tab (represented by an
arrow) and delete both (press the Delete key on your keyboard).
If you do not know the
paragraph format which is
used for a text element in
the PC Editor, you can display the
paragraph format by choosing
Formats. For the first text
element displayed under the
command line ULINE (71), the
paragraph format is IL (line item).
RM SAPscript Made Easy | Release 4.6
OG On the Window MAIN screen:
zG Scroll down until you see the command line ITEM_LINE. All lines
within this section have the paragraph format IL (line item).
{G Click the variable VBDPA-POSNR.
|G Choose to delete the variable.
PG Delete the tab that follows VBDPA-POSNR.
Modifying SAPscript Forms: The Basics RN

QG Delete the first tab in the four lines that follow.
The screenshot shows the result of the changes.
Since you deleted the first tab in the paragraph format IL (line item),
you have to adjust the tabs for this paragraph format.
RG Go Back to return to the Administrative Screen.
JIG On the Administrative Screen:
zG Choose Paragraph formats.
{G Double-click paragraph format IL.
|G Choose Tabs.
RO SAPscript Made Easy | Release 4.6
}G To delete the first tab you have to overwrite the first tab position
7.00 with blanks.
~G To move the second tab to the left you have to adjust the second
tab position by overwriting 26.00 with 19.00.
Since the first tab was positioned seven characters from the left,
the second tab has to be moved nineteen characters to the left (26
minus 7).
G To activate the changes, choose .
€G Go Back twice to return to the SAP standard menu.
gˆ~
The system automatically removes blank tab lines by shifting the entries of the
second tab line (Number 2) to the first tab line (Number 1).
eˆˆ„‚‡€ n‰ z _‚~…}
To add a new field, first make sure that the new field is “printable.”
Only data dictionary defined fields can be used as printable fields. So,
before adding a new field, determine whether the field name is part of
the data dictionary.
Some of the structures have user exits for additional to-be-printed
fields. Although it is sometimes enough to add the user exit field to
the structure, some ABAP programming may be necessary.
All R/3 documents have at least two structures defined in the data dictionary.
These structures are used to print header and line item document data. The
fields of these structures can be used as variables in the layout set.Tips  Tricks
Modifying SAPscript Forms: The Basics RP

mzŒ„
/RRN XS WKH ³VDOHV RIILFH´ ILHOG LQ WKH GDWD GLFWLRQDU
JG From the SAP standard menu choose Logistics → Sales and Distribution
→ Sales → Order → VA02 - Change to locate the Sales office field.
KG On the Change Sales Order: Initial Screen:
zG In the Order field, enter a sales order (for example, 5040).
{G Choose Sales.
LG On the Change OR Standard Order OR ...: Overview screen, choose
Goto → Header → Sales from the menu bar.
MG On the Change OR Standard Order OR ...: Header Data screen:
zG Place the cursor in the field to determine that field’s technical
name (for example, Sales office).
{G Press F1 or Help.
NG On the Help - Change OR Standard Order OR ...: Header Data window,
choose Technical info.
RQ SAPscript Made Easy | Release 4.6
On the Technical Information window you find the technical name of
the Sales office field in the Field name field. In our example the
technical name is VKBUR.
The next step is to decide if the field Sales office belongs to the
document header or the document items. In this example, Sales office
belongs to the header because it was accessed via the path Goto →
Header → Sales on the Change Standard Order: Overview screen.
The next task is to find out if the field is designated for output.
Table 4–1 shows the structures used to print header and item data. A
field is flagged as an output field only if it is included in one of the
structures shown in Table 4–1.
The technical name of a field is
displayed in the Field name.
Modifying SAPscript Forms: The Basics RR

gˆ~
The Prenumbered Check print program also provides REGUD, a structure for bank
data.
mzŒ„
'HWHUPLQH ZKHWKHU WKH ILHOG 9.%85 LV LQFOXGHG LQ WKH WDEOH 9%'.$
JG From the SAP standard menu, choose Tools → ABAP Workbench →
Development → SE11 - ABAP Dictionary.
Table 4–1 Structures used to print header and item data
Item Data Dictionary Structure
Sales Order Confirmation VBDPA
Packing List VBDPL
Picking List VBLKP
Invoice VBDPR
Purchase Order EKPO
Prenumbered Check REGUP
PP Goods Issue Slip RESBD
PP Pick List RESBD
PP Confirmation Slip AFVGD
PP Time Ticket AFVGD
PP Goods Receipt List RESBD (In addition for co-products with
settlement: AFPOD)
PP Operations Control Ticket AFVGD
PP Object List AFVGD
PP Kanban Card KARTE
JII SAPscript Made Easy | Release 4.6
KG On the Dictionary: Initial Screen:
zG Enter VBDKA in the Database table field.
{G Choose Display.
The result is a list of all fields in table VBDKA.
LG From the SAP standard icon bar, choose .
Modifying SAPscript Forms: The Basics JIJ

MG On the Dictionary: Display Structure dialog window:
zG Enter VKBUR.
{G Choose .
NG On the Dictionary: Display Structure screen, the cursor will be
positioned automatically on the field name VKBUR.
If the field name is not found, the message String ‘...’ not found
appears.
If the field name was found, follow the steps in “Adding a New Field”
on page 102.
If the field name was not found, proceed to the “Adding a Field to the
Print Structure” on page 106 and then follow the steps in the “Adding
a New Field” on page 102.
JIK SAPscript Made Easy | Release 4.6
Z}}‚‡€ z g~ _‚~…}
mzŒ„
$GG WKH ³VDOHV RIILFH´ ILHOG WR WKH ERWWRP RI WKH ,1)2 ZLQGRZ
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
Modifying SAPscript Forms: The Basics JIL

LG In the Design Window:
zG Select INFO.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
JIM SAPscript Made Easy | Release 4.6
MG On the Window INFO screen:
zG Scroll down to the last line, position the cursor behind the last
character, and press Enter to create a new line.
{G Enter Sales Office (the header of the new variable).
|G Format the newly entered text by marking it.
}G Choose the paragraph format AS (standard paragraph) and the
character format S (small key word).
~G Choose Enter.
G Enter VBDKA-VKBUR (the variable name is enclosed in
ampersands).
After creating the new line, the paragraph is automatically set to AS. This is the
last paragraph used in this window. All headers are printed in a smaller font,
defined with the character string S.
A variable name is the name of the structure followed by a hyphen (“-”) and the
field name. Variable names must be enclosed in ampersands.
TechTalk
Tips  Tricks
Modifying SAPscript Forms: The Basics JIN
NG Go Back to return to the Administrative Screen.
OG On the Administrative Screen:
zG To activate the changes, choose .
{G Go Back twice to return to the SAP standard menu.
JIO SAPscript Made Easy | Release 4.6
Z}}‚‡€ z _‚~…} ˆ ~ i‹‚‡ l‹Ž|Ž‹~
This section provides directions on how to add a new field to a print
structure. If a field is not included in a print structure, follow the step-
by-step example in this section.
For example, field XBLNR is not included in the sales order header
print structure. For more information, refer to the Standard Order:
Header → Business Data → Billing Details screen. XBLRN is the
Reference No. field in the Financial Accounting section.
The following table shows the names of structures that you can add
field names to:
If you want to include the field XBLNR to the sales order header add
it to the substructure VBDKAZ.
mzŒ„
$GG WKH ;%/15 ILHOG WR SULQW VWUXFWXUH 9%'.$=
JG From the SAP standard menu, choose Tools → ABAP Workbench →
Overview → SE84 - Information System → ABAP Dictionary → Basic objs
→ Structures.
These steps only apply to
SD documents. No steps
exist for other documents.
However, the structures for the other
documents already contain most, if
not all, of the required fields.
Table 4–2 Names of structures to which field names can be added
Document Structure
Sales Order Header VBDKAZ
Sales Order Item VBDPAZ
Packing List Header VBDKLZ
Packing List Item VBDPLZ
Picking List Header VBLKKZ
Picking List Item VBLKPZ
Invoice Header VBDKRZ
Invoice Item VBDPRZ
SD structures include
substructures. By adding a
field to a substructure and
activating it, a field is automatically
added to the structure. These
substructures are treated as user
exits, and SAP does not overwrite
them during an upgrade.
Modifying SAPscript Forms: The Basics JIP

KG On the R/3 Repository Information System: Structures screen:
zG Enter VBDKAZ in the Structure name field.
{G Choose .
LG On the Structures (1 Hits) screen:
zG Select the structure VBDKAZ.
{G Choose .
JIQ SAPscript Made Easy | Release 4.6
MG A 20-digit object access key must be specified to register the object as
modified.
Next, proceed with the whole object reparation procedure. During the
procedure, you must specify the object you want to modify. In this
example, you must enter R3TR TABL VBDKAZ in the Object registration
screen.
NG On the Dictionary: Maintain Structure screen:
zG Choose a blank line.
{G Enter XBLNR in the first Comp field. In this example, the field
represents the object‘s field name.
|G Enter XBLNR in the second Comp field. In this example, the field
represents the object‘s data element name.
}G To activate the changes, choose .
Now VBDKA-XBLNR is a valid variable that can be added to the
form. Note that the name of the structure is still VBDKA, not
VBDKAZ.
If the original language and the logon language are different a dialog window
appears. You can maintain the structure VBDKAZ in its original language or in
the logon language.TechTalk
If you do not know where to
get this object access key
or you are not familiar with
the object reparation procedure, see
your system administrator.
Normally, the field name
and the data element
name are the same.
Modifying SAPscript Forms: The Basics JIR

The next step is to find out whether or not additional ABAP
programming is needed to fill the variable, or if the new variable has
been automatically filled in. When you look up the field name, notice
the table name where the field is stored. For XBLNR, the table is
VBAK.
Table 4–3 shows the name of all tables where no additional ABAP
programming is necessary:
If additional ABAP programming is necessary, the following
programs have been provided to fill the variables. However, this
guide does not provide programming instructions.
Table 4–4 shows the user exit program names:
In the sales order print program, the header data is collected in
VBDKA. The item data structure is POS.
Table 4–3 Tables that do not require ABAP programming
Document Tables
Sales Order Header VBAK
Sales Order Item VBAP
Packing List Header LIKP
Packing List Item LIPS
Picking List Header LIKP
Picking List Item LIPS
Invoice Header VBRK
Invoice Item VBRP
Table 4–4 User exit program names
Document Program
Sales Order V05DZZEN
Packing List V05OZZEN
Picking List V05AZZEN
Invoice V05NZZEN
JJI SAPscript Made Easy | Release 4.6
^‘z†‰…~
This is an example for a sales order user exit, where data was first selected to be
added to the header and then to be added to the items.

 6HOHFW ILHOG IURP GEWDE DQG SXW LW LQWR QHZILHOG LQ
YEGND
6HOHFW VLQJOH 
 IURP GEWDE ZKHUH YEHOQ YEGNDYEHOQ
,I VVXEUF 
9EGNDQHZILHOG GEWDEILHOG
(QGLI

 6HOHFW ILHOG IURP GEWDE DQG SXW LW LQWR QHZILHOG LQ
YEGSD
/RRS DW SRV
6HOHFW VLQJOH 
 IURP GEWDE ZKHUH YEHOQ YEGNDYEHOQ
$QG SRVQU SRVSRVQU
,I VVXEUF 
3RVQHZILHOG GEWDEILHOG
0RGLI SRV
(QGLI
(QGORRS
n In the packing list print program, the header data is collected in
VBDKL. The structure for the item data is VBDPL_TAB.
n In the picking list print program, the header data is collected in
VBLKK_WA, and the item data structure is VBLKP_TAB.
n In the invoice print program, the header data is collected in
VBDKR, and the item data structure is LVBDPR.
Modifying SAPscript Forms: The Basics JJJ
Sap script made easy
+ $ 3 7 ( 5
Nfˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS
Z}z‡|~} mˆ‰‚|Œ
JJM SAPscript Made Easy | Release 4.6
h~‹‚~
This chapter builds further on what you learned in the previous
chapter. This chapter covers the following topics:
n Printing company logos (in Windows BMP and TIFF 6.0 format)
n Inserting bar code information
n Adding a box with shading
n Printing text vertically
n Calling ABAP subroutines (using the PERFORM command)
i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ Ap‚‡}ˆŒ [fi _ˆ‹†zB
Starting with Release 4.6, SAPscript offers you a new tool for
importing graphics —in the Windows bitmap format—into your
forms (for example, logos). Called SAPscript Graphic Management,
this new solution:
n Gives you more flexibility in creating graphics
n Helps you manage your graphics with ease
n Helps you easily include graphics in forms
n Updates the former complex process for importing graphics
The SAPscript Graphic Management can also manage graphics saved
as Baseline TIFF 6.0 format. Although we highly recommend using
the new process, the processes for Baseline TIFF 6.0 format are still
available. We describe these in the section “Printing a Company Logo
(Baseline TIFF 6.0 Format)” on page 124.
To make a system upgrade easier and smoother, do not modify the standard
forms or the preconfigured forms. Copy these forms and modify the copies.
Caution
The SAPscript Graphic Management Tool supports Windows bitmap format
(*.bmp) and Baseline TIFF 6.0 format (*.tif). Make sure that you save graphics in
these formats.TechTalk
Modifying SAPscript Forms: Advanced Topics JJN

To include a graphic in your form, perform the following steps:
1. Import the graphic into the document server.
2. Preview the graphic printout.
3. Include the graphic in a form.
l~‰ JS b†‰ˆ‹ ~ `‹z‰‚| ‚‡ˆ ~ ]ˆ|ކ~‡ l~‹~‹
mzŒ„
0DNH D JUDSKLF %03 IRUPDW
DYDLODEOH RQ WKH GRFXPHQW VHUYHU E
LPSRUWLQJ WKH JUDSKLF
JG From the SAP standard menu, choose Tools → SAPscript →
Administration → SE78 - Graphic.
KG From the workplace menu, choose Stored on document server →
GRAPHICS → BMAP.
SAPscript enables you to import graphics in the Windows bitmap format into
your forms. To make this process independent of any graphics tool and ensure
flexibility, no graphic tool is included with SAPscript itself. Therefore, you cannot
modify graphics within SAPScript. Graphics modifications have to be executed
with a graphics tool that allows you to save your graphic in the Windows bitmap
format.
Caution
Graphic objects
Graphic ID
JJO SAPscript Made Easy | Release 4.6
LG On the SAPscript graphics management window, choose .
MG On the Import graphic window:
zG In the File name field, enter the file location (on your presentation
server) where the import program can find the graphic (for
example, C:SAPlogo.bmp).
{G In the Name field, enter a name for the graphic (for example,
LOGO_01).
|G In the Description field, enter a description (for example, COMPANY
LOGO).
}G Choose .
NG Choose Exit to return to the SAP standard menu.
Graphics stored in the document server are separated into graphic objects and
graphic IDs. In the example, only the graphic object GRAPHICS and the graphic
ID BMAP are available. You can create new graphic objects and IDs (see
“Creating Graphic Objects and Graphic IDs” on page 120).
Tips  Tricks
gˆ~
You will refer to this name, if you
include the graphic in a form (as
described in “Step 3: Include the
Graphic in a Form” on page 118).
Modifying SAPscript Forms: Advanced Topics JJP

l~‰ KS i‹~‚~ ~ `‹z‰‚| i‹‚‡ˆŽ
mzŒ„
3UHYLHZ WKH JUDSKLF SULQWRXW RQ WKH GRFXPHQW VHUYHU
JG From the SAP standard menu, choose Tools → SAPscript →
Administration → SE78 - Graphic.
KG From the workplace menu, choose Stored on document server →
GRAPHICS → BMAP.
LG On the SAPscript graphics management screen:
zG Enter the graphic name in the Name field (for example, LOGO_01).
{G To preview the graphic, choose .
|G Choose Exit to return to the SAP Easy Access screen.
You may want to insert a graphic from other documents (for example, your
company web side) into a form by using a copy and paste approach. SAPscript
does not support this technique.
You must copy the graphic to your local drive, import the graphic into the
document server as describe in this task, and include the graphic in the form (as
described in step 3 (see page 118).
Caution
The graphic is displayed in the workplace
area.
A color graphic can be viewed
only in color.
JJQ SAPscript Made Easy | Release 4.6
l~‰ LS b‡|…Ž}~ ~ `‹z‰‚| ‚‡ z _ˆ‹†
To include your company logo in a form, you must create a graphic.
SAPscript creates a new window and places it automatically on the
top left corner of the page.
mzŒ„
,QFOXGH D JUDSKLF LQ D IRUP E FUHDWLQJ D JUDSKLF ZLQGRZ
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG In the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
Modifying SAPscript Forms: Advanced Topics JJR

LG In the Design Window, right-click to access the form layout
manipulation menu and choose Create graphic.
MG On the Include graphic screen:
zG Enter the name of the graphic (for example, LOGO_01).
The name of the graphic is the name you defined when you
imported the graphic onto the document server (see “Step 1:
Import the Graphic into the Document Server” on page 115).
{G Choose .
You can specify the
resolution of the graphic by
entering the number of dots
per inch (dpi).
The ratio between the resolution you
entered and the original resolution in
which the graphic was scanned
determines the printed size of the
graphic on the form.
^‘z†‰…~
The graphic was originally scanned
with a resolution of 300 dpi. If you
enter a resolution of 150 dpi, the
width and height of the graphic will
be doubled. If you enter a resolution
of 600 dpi, the graphic’s width and
height will be halved.
JKI SAPscript Made Easy | Release 4.6
The new graphic is always positioned in the top left corner of the
form.
NG Select the Administrative Screen.
OG On the Administrative Screen:
zG To activate the changes, choose .
{G Go Back twice to return to the SAP standard menu.
‹~z‚‡€ `‹z‰‚| h{ƒ~|Œ z‡} `‹z‰‚| b]Œ
You can easily create your own object structure on the document
server by defining your own graphic objects and graphic IDs.
mzŒ„
UHDWH D QHZ JUDSKLF REMHFW DQG JUDSKLF ,' XVLQJ 6$3VFULSW VHWWLQJV
JG From the SAP standard menu, choose Tools → SAPscript →
Administration → SE75 - Settings.
You can move the graphic window easily using the drag-and-drop technique, but
you cannot resize the graphic within SAPscript. You have to resize the graphic
using a graphics tool outside SAPscript. You must then import the graphic onto
the document server and include it in your form.
Tips  Tricks
Modifying SAPscript Forms: Advanced Topics JKJ

KG On the SAPscript Settings screen:
zG Select Graphical objects and IDs.
{G Choose Change.
LG On the Information window, choose .
MG On the Change graphics IDs screen, choose .
NG On the Create Object dialog window:
zG In the Graphic object field, enter a name for the object (for example,
Z_GRAPHIC).
{G Enter a description.
|G Choose .
The new object is displayed in the list of all available graphic objects.
gˆ~
Make sure your graphic object names
begin with a Y or Z.
JKK SAPscript Made Easy | Release 4.6
OG On the Change graphics IDs screen, double-click on the object
Z_GRAPHIC to open the object’s graphic IDs.
PG On the Change graphics IDs for object … screen, choose .
QG On the Create ID dialog window:
zG In the Graphic ID field, enter the ID’s name (for example, ZLOG).
{G Enter a description.
|G Choose .
RG On the Change graphics IDs for object … screen, save the graphic ID.
The graphic object will also be saved.
gˆ~
Make sure your graphic ID names
begin with a Y or Z.
Modifying SAPscript Forms: Advanced Topics JKL

If you use the CTS, specify a transport request after saving.
JIG Go Back three times to return to the SAP standard menu.
JJG Choose Tools → SAPscript → Administration → SE78 - Graphic.
JKG On the SAPscript graphics management screen, in the workplace
menu, expand Stored on document server.
The graphic object Z_GRAPHIC is displayed.
Graphic ID
Graphic object
JKM SAPscript Made Easy | Release 4.6
i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ A[zŒ~…‚‡~ mb__ OGI _ˆ‹†zB
To print a company logo, either include it in the form or as a macro on
a PCL-5 printer. The following rules help you to determine which
method is most appropriate.
n If you cannot provide your logo in the Baseline TIFF 6.0 format, the
company logo should be a macro on the printer (see “Including the
Company Logo as a Macro on PCL-5 Printers” on page 132”).
n If you do not have a PCL-5 printer, include the company logo in the
form (see “Including the Company Logo on the Form” below).
n In all other cases, include the company logo in the form (see
“Including the Company Logo on the Form” below).
The following procedures are also documented in the SAPNet
Frontend notes 39031, 18045, and 5995.
b‡|…Ž}‚‡€ ~ ˆ†‰z‡’ eˆ€ˆ ˆ‡ ~ _ˆ‹†
Create your company logo with a graphic program and save it in the
Baseline TIFF 6.0 format. To include your company logo in a form,
first convert your Baseline TIFF 6.0 file into SAPscript standard text.
Next, include the standard text in the form (see “Including Standard
Text in a Form” on page 127).
If you followed the directions exactly and no logo is printed, the format of the
logo file format is probably not Baseline TIFF 6.0. SAPscript does not give an
error message if an incorrect file format is used.
gˆ~
Many paint programs support the
Baseline TIFF 6.0 format.
Tips  Tricks
Modifying SAPscript Forms: Advanced Topics JKN

ˆ‡~‹‚‡€ [zŒ~…‚‡~ mb__ OGI _ˆ‹†z ˆ lZiŒ|‹‚‰
lz‡}z‹} m~‘
mzŒ„
RQYHUW RXU %DVHOLQH 7,))  IRUPDW FRPSDQ ORJR LQWR 6$3VFULSW
VWDQGDUG WH[W
JG From the SAP standard menu, choose Tools → ABAP Workbench →
Development → SE38 – ABAP Editor.
KG On the ABAP Editor: Initial Screen:
zG Enter RSTXLDMC in the Program field.
{G Choose .
LG On the Upload TIFF files to SAPscript texts screen:
zG In the File name field, enter the filename and its path (for example,
C:SAPlogo.tif).
{G In the Type field, enter the appropriate type of raster image.
• BMON stands for a black and white raster image. Use BMON for
monochrome printers because they normally do not perform a
gray-level conversion.
• BCOL stands for a color raster image with up to 256 colors.
gˆ~
UNIX file names are case-sensitive.
JKO SAPscript Made Easy | Release 4.6
|G Enter a name for the standard text in the Text name field.
The name must begin with the prefix ZHEX-MACRO-, which is
the default value for the field (for example, ZHEX-MACRO-LOGO).
}G Choose .
The upload may take some time. The result should be a protocol as
shown.
MG Go Back four times to return to the SAP standard menu.
Text name: ZHEX-MACRO is the
technical name under which the logo is
stored. You can freely define the name
of the file by adding some characters
(for example, ZHEX-MACRO-TEST).
The filename and text name do not have
to be the same.
File name: enter the filename and its
path as it appears on the C or A drive.
At the end of the protocol, the Text
ZHEX-MACRO-LOGO, Language
EN, Object TEXT, Id ST saved
successfully messageindicatesthatthe
standard text was created.
Modifying SAPscript Forms: Advanced Topics JKP

b‡|…Ž}‚‡€ lz‡}z‹} m~‘ ‚‡ z _ˆ‹†
mzŒ„
,QFOXGH WKH VWDQGDUG WH[W =+(;0$52/2*2 LQ WKH VDOHV RUGHU
FRQILUPDWLRQ IRUP =925'(5
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
You can easily display the created standard text.
1. From the SAP standard menu, choose Tools → SAPscript → SO10
Standard Text.
2. In the Text name field, enter ZHEX-MACRO-LOGO.
3. Choose Display.
The print preview does not display the logo.
For additional information about report RSTXLDMC, access the report
documentation:
1. From the SAP standard menu, choose Tools → ABAP Workbench →
Development → SE38 - ABAP Editor.
2. In the Program field, enter RSTXLDMC.
3. Select Documentation.
4. Choose Display.
Tips  Tricks
TechTalk
JKQ SAPscript Made Easy | Release 4.6
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
LG In the Design Window, right-click to access the form layout
manipulation menu and choose Create window.
The new window is automatically named Window1.
Modifying SAPscript Forms: Advanced Topics JKR

MG In the Design Window:
zG Select Window1.
{G Right-click to access the form layout manipulation menu and
choose Rename.
NG On the Rename window:
zG Enter a new name for the window (for example, LOGO).
{G Choose .
OG Define the position of the new window LOGO using the graphical
Form Painter.
The new window is automatically
named Window1.
With graphics or macros, the system considers only the window position, not the
window size. The Left margin must be specified in CH (characters) and the
Upper margin must be specified in LN (lines).TechTalk
JLI SAPscript Made Easy | Release 4.6
PG In the Design Window:
zG Select LOGO window.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
The PC Editor for the LOGO window appears.
QG From the PC Editor tool bar, choose .
RG On the Creating Additional Information screen:
zG Select Command.
{G Enter INCLUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the
Command line.
|G Choose .
Modifying SAPscript Forms: Advanced Topics JLJ

JIG Go Back to return to the Administrative Screen.
The text changes are automatically transferred by the system.
JJG On the Administrative Screen:
zG In the Description field, enter a short explanation text for the
window LOGO (for example, Company Logo).
{G To activate the changes, choose .
The new command line
appearsinthe PCEditor.
JLK SAPscript Made Easy | Release 4.6
b‡|…Ž}‚‡€ ~ ˆ†‰z‡’ eˆ€ˆ zŒ z fz|‹ˆ ˆ‡ ieFN i‹‚‡~‹Œ
To include a company logo as a macro on a PCL-5 printer:
1. Copy a standard printer type to modify it (see “Copying a
Standard Printer Type” on page 133).
2. Define a print control for the macro (see “Defining a Print Control
for the Macro” on page 135).
3. Include the print control in a form (see “Including the Print
Control in the Form” on page 138).
Your company logo appears on the first page of form ZVORDER02 using the
standard text ZHEX-MACRO-LOGO and the LOGO window for the print output.
To display the company logo on subsequent pages, you must copy the LOGO
window to page NEXT.
You must repeat the following procedure for all defined pages:
1. On the Administrative Screen, choose the LOGO window.
2. Copy the window.
3. Choose page NEXT.
4. Insert the window.
The position and size of the LOGO window defined for page FIRST apply to
the other pages.
5. Activate the form.
Tips  Tricks
In R/3, the following printer types (or a copy of the printer type) represent PCL-5
printers:
n HPLJIIID
n HPLJ4
n HPLJ5SI
n HPLJMI
n IBMAFP
n IBMAFP3
n IBMEFP
n IBMEFP3
n LX4039
n SNI20XX8
Includingacompanylogoas
a macro works only on a
PCL-5 printer.
TechTalk
Modifying SAPscript Forms: Advanced Topics JLL

gˆ~
Several third parties offer logos as a PCL-5 macro and describe how to bring the logo
to the printer.
ˆ‰’‚‡€ z lz‡}z‹} i‹‚‡~‹ m’‰~
mzŒ„
RS D VWDQGDUG SULQWHU WSH IRU PRGLILFDWLRQ
JG To determine the device type to use, from the SAP standard menu
choose Tools → CCMS → Spool → SPAD - Spool administration.
KG On the Spool Administration: Initial Screen, choose the Devices / servers
tab and choose the Output devices button.
A list of all available output devices appears.
The macro file can be loaded onto the printer by printing the file once from the
operating system level (for example, using UNIX command lp). The
disadvantage is that macros are lost when you turn off the printer. To avoid this,
load the macro onto a Flash-Memory cartridge.
TechTalk
JLM SAPscript Made Easy | Release 4.6
LG Each printer name has a corresponding device type name.
MG Go Back to return to the Spool Administration: Initial Screen.
NG From the Spool Administration: Initial Screen, choose Utilities → For
device types → Copy device type.
OG On the Copy device type screen:
zG Enter the name of the device type in the Copy device type field (for
example, HPLJ4).
{G Enter the name for copied device type in the to device type field (for
example, Z_HPLJ4).
|G Choose .
In this example, the device type
name for printer DCBM is HPLJ4
(HP Laserjet 4 series PCL-5).
Make sure the name of the copied
device type starts with Y or Z (customer
name range)
Although you are free to define the
name of the copied device type, we
recommend using a name that is as
close as possible to the original name.
Modifying SAPscript Forms: Advanced Topics JLN

PG Confirm all the subsequent popup windows.
If you use the Change and Transport System (CTS), specify a transport
request.
The result is shown on the Copy device type screen.
QG Go Back three times to return to the SAP standard menu.
]~‚‡‚‡€ z i‹‚‡ ˆ‡‹ˆ… ˆ‹ ~ fz|‹ˆ
mzŒ„
'HILQH D SULQW FRQWURO IRU RXU PDFUR
JG From the SAP standard menu, choose Tools → CCMS → Spool →
SPAD - Spool administration.
gˆ~
In our example, the macro has a macro ID of 100. The macro ID, which is set when
you bring the macro to the printer, must be between 100 and 999.
To get your ID, ask your system administrator.
JLO SAPscript Made Easy | Release 4.6
KG On the Spool Administration: Initial Screen, choose Full administration.
LG On the DeviceTypes tab, click on Device types.
Modifying SAPscript Forms: Advanced Topics JLP

MG On the Spool Administration: List of Device Types screen:
zG Scroll down until you find the desired device type (for example,
Z_HPLJ4).
{G Select the device type.
|G Choose Print Controls.
JLQ SAPscript Made Easy | Release 4.6
NG On the Spool Administration: Edit Print Controls screen:
zG Choose .
Since the system switched to the change mode, the icons
displayed on the screen changed.
{G Overwrite the first row of the PrCtl column with the newest print
control (for example, ZM100).
|G Overwrite the first row of the Control character sequence column
with the control character sequence (for example,
1B2666313030793358).
}G Save the new print control.
OG Go Back four times to return to the SAP standard menu.
b‡|…Ž}‚‡€ ~ i‹‚‡ ˆ‡‹ˆ… ‚‡ ~ _ˆ‹†
mzŒ„
,QFOXGH WKH SULQW FRQWURO IRU H[DPSOH ZM100
LQ WKH VDOHV RUGHU
FRQILUPDWLRQ IRUP =925'(5
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
Make sure your print control starts
with Y or Z. We recommend that the
macro ID is also part of the name.
The control character
sequence contains the
macro ID in hexadecimal
representation. The sequence is
1B2666...793358, where the three
dots are the hexadecimal
representations of the macro ID
letters. In general, the hexadecimal
representations for 0 to 9 are 30 to 39.
The sequences are printer
dependent. You will find the
sequences in your printer manual.
^‘z†‰…~
If the macro ID is 100, the three dots
will be 313030.
Modifying SAPscript Forms: Advanced Topics JLR

KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page layout.
}G Choose Change.
LG In the Design window, right-click to access the form layout
manipulation menu and choose Create window.
JMI SAPscript Made Easy | Release 4.6
MG In the Design Window:
zG Select Window1.
{G Right-click to access the form layout manipulation menu and
choose Rename.
NG On the Rename window:
zG Enter a new name for Window1 (for example, LOGO).
{G Choose .
OG Define the position of the LOGO window using the graphical Form
Painter.
The new window is automatically
named Window1.
With graphics or macros,
the system considers only
the window position, but not
the size. The left margin must be
specified in CH (characters) and the
upper margin must be specified in LN
(lines).
Modifying SAPscript Forms: Advanced Topics JMJ

PG In the Design Window.
zG Select the LOGO window.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
The PC Editor for the LOGO window appears.
QG From the PC Editor tool bar, choose .
RG On the Creating Additional Information screen:
zG Select SAP characters.
{G Enter 32 in SAP characters.
|G Choose .
JIG From the PC Editor tool bar, choose .
JMK SAPscript Made Easy | Release 4.6
JJG On the Creating Additional Information screen:
zG Select Command.
{G Enter PRINT-CONTROL ZM100 in the Command line.
|G Choose .
JKG Go Back to return to the Administrative Screen
The text changes are automatically transferred by the system.
The new command lines appear in
the PC Editor.
Modifying SAPscript Forms: Advanced Topics JML

JLG On the Administrative Screen:
zG In the Description field, enter a short explanation text for the
window LOGO (for example, Company Logo).
{G To activate the changes, choose .
i‹‚‡‚‡€ [z‹ ˆ}~Œ
The easiest way to print bar codes is to use a Kyocera laser printer
because you do not need additional hardware or software. You just
add the bar code to the form.
Your company logo appears on the first page of form ZVORDER02 using the
print control ZM100 and the LOGO window for the print output. If the company
logo should be displayed on the subsequent pages, you must copy the LOGO
window to page NEXT.
You have to repeat the following procedure for all defined pages:
1. On the Administrative Screen, choose the LOGO window.
2. Copy the window.
3. Choose page NEXT.
4. Insert the window.
The position and size of the LOGO window defined for page FIRST apply to the
other pages.
5. Activate the form.
Tips  Tricks
JMM SAPscript Made Easy | Release 4.6
With an HP laser printer, the solution is also simple — it is basically a
“plug-and-play.” Add the JetCAPS BARSIMM to an HP Laserjet 4 or 5
printer and then add the bar code to the form.
Most other solutions require more work. To keep bar code printing
easy, this guide covers only Kyocera and HP laser printers. For HP
laser printers, insert the SIMM into your HP Laserjet 4 or 5 and
make sure that your printer is an HPLJ4 in R/3. If you do not know
your printer type, ask your system administrator.
mzŒ„
'HILQH WKH PDWHULDO QXPEHUV RQ WKH VDOHV RUGHU FRQILUPDWLRQ
=925'(5 DV D ³ RI ´ EDU FRGH ZLWK D FKHFN GLJLW
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Character formats.
}G Choose Change.
LG On the Form: Change Character Strings: ZVORDER02 screen, choose
Edit → Create Element.
With the SIMM, you receive a list of print controls that tell you how to switch
the bar codes on and off. These print controls are already defined for the
HPLJ4.Tips  Tricks
Modifying SAPscript Forms: Advanced Topics JMN

MG On the Create Element screen:
zG Enter a name for the character format (for example, B3).
{G Enter a description (for example, Bar code 3 of 9 w/check).
|G Choose .
NG On the Form: Change Character Strings: ZVORDER02 window:
zG In the Standard attributes section, enter a description in the
Description field (for example, Bar code 3 of 9 w/check).
{G In the Bar code field, choose .
The new character format appears in
the Character formats section.
JMO SAPscript Made Easy | Release 4.6
OG From the Name of an SAP bar code screen:
zG Select the desired bar code (for example, BC_CD39C).
{G Choose .
PG On the Form: Change Character Strings: ZVORDER02 window:
zG Save the new character format.
{G Choose Layout.
If you want to print a bar
code vertically, you can
choose a SAP bar code
that has been defined for vertical
bar code printing. You will
recognize such a bar code on the
rotation parameter. The rotation
parameter has the value 090.
Rotation values of 000, 090, 180, and
270 degrees are possible values for
this parameter, however, the value
090 is delivered for several SAP
standard bar codes.
Bar codes are rotated in a
counter-clockwise direction.
If, for example, a bar code is
rotated by 90 degrees, it is tilted to the
left when printed.
For example, r=090 indicates a rotation
value of 90 degrees.
A character format B3 for the bar
code format BC_CD39C is now
defined and can be used.
Modifying SAPscript Forms: Advanced Topics JMP

QG In the Design Window:
zG Select the Main window.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
RG On the PC Editor for the Window MAIN window:
zG Scroll down until you see the ITEM_LINE section (highlighted
gray).
{G In the first line of the ITEM_LINE section, place the cursor on the
symbol VBDPA-MATNR and mark it.
Make sure the symbol is marked (it must not blink).
|G In the list box for character formats, choose B3 Bar code 3 of 9
w/check.
JIG Go Back to return to the Administrative Screen.
JJG On the Administrative Screen, choose to activate the changes.
gˆ~
Next, we have to adjust the output
of the MAIN window. In the example
you assign the new character
format B3 to the symbol VBDPA-
MATNR in the ITEM LINE section.
You can check the assigned formats for the symbol VBDPA-MATNR by
clicking on the symbol and choosing Formats. The Formats window
appears and shows the assigned formats.
Choose to close the Formats window.
Tips  Tricks
JMQ SAPscript Made Easy | Release 4.6
Some of the bar codes are higher than one line, which may cause the previous
lines to overlap. To avoid overlapping, add blank lines before the line with the
bar code. Assign a paragraph format to the blank lines. Make sure the
paragraph format is not defined to automatically suppress or compress blank
lines.
To check the paragraph settings, go to standard attributes and ensure that the
No blank lines checkbox is deselected.
It is not possible to change the height of a bar code within a form. To change the
height of a bar code you have to define your own bar code. To define your own
barcode, you can use the font maintenance transaction SE73. Your barcodes
must begin with Y or Z.
For more information, see the R/3 online documentation (Basis →
BasisService/Communication Interfaces → SAPscript.
In our example, notice the bar code, which reserves space for the entire material
number field (this field is 18 characters long). If you do not use all 18 characters
and do not want to waste space, delimit the field length by using the output
length formatting option. The symbol definition should be VBDPA-
MATNR(8)
In a numerical bar code, some scanners cannot read special characters. For
these scanners, omit the special characters inserted by SAPscript during
formatting. An example of a special character is the delimiter for “Thousands”
that is used for some numerical fields. For more information on formatting
options, see “Overview of Formatting Options” on page 222 and “Syntax of
Formatting Options” on page 249.
Tips  Tricks
TechTalk
TechTalk
Modifying SAPscript Forms: Advanced Topics JMR

Z}}‚‡€ z [ˆ‘ ‚ lz}‚‡€
In this section, we want to have a box around an entire window and to
shade the first line of this window.
mzŒ„
'UDZ D ER[ DURXQG WKH VKLSWR DGGUHVV DQG VKDGH WKH VKLSWR DGGUHVV
RQ WKH VDOHV RUGHU FRQILUPDWLRQ RXWSXW
JG From the SAP standard menu, choose Tools → SAPscript → SE71 -
Form.
KG On the Form Painter: Request screen:
zG Enter ZVORDER02 in the Form field.
{G Enter EN in the Language field.
|G Select Page Layout.
}G Choose Change.
gˆ~
For more information, see the R/3 online documentation (Basis → Basis
Service/Communication Interfaces → SAPscript.
JNI SAPscript Made Easy | Release 4.6
LG In the Design Window:
zG Select the INFO1 window.
{G Right-click to access the form layout manipulation menu and
choose Edit text.
MG With the PC Editor on the Window INFO1 screen:
zG Position the cursor at the end of the first line.
{G Choose .
Only if the variable VBDKA-
LAND1_WEisfilled,willthe
INFO1 window be printed in
the output. Likewise, the box and
shading will only be printed if this
variable is filled. (We will insert the
box and shading commands between
the first and second line of the PC
Editor.)
Modifying SAPscript Forms: Advanced Topics JNJ

NG On the Create Additional Information window:
zG Select Command.
{G Enter POSITION XORIGIN ’-0.5’ CH YORIGIN ’-0.25’ LN in
the Command line.
|G Choose .
OG In the PC Editor on the Window INFO1, choose .
This command positions the
cursorahalfcharacteranda
quarter line off the upper left
corner of the window. This is the
starting point for the next command,
which will be the sizing of the box.
Place the cursor off the window to
avoid overwriting the window’s
content with the box.
JNK SAPscript Made Easy | Release 4.6
PG On the Creating Additional Information window:
zG Select Command.
{G Enter SIZE WIDTH ‘+1’ CH HEIGHT ‘+0.5’ LN in the
Command line.
|G Choose .
QG In the PC Editor on the Window INFO1, choose .
This command defines a
new window one character
wider and half a line higher
than the window. Size the box bigger
than the window to avoid overwriting
the window’s content with the box.
The line inserted in step 7b creates a
new window, which overlaps the
INFO1 window by half a character on
the left and right sides and by a
quarter line on the top and bottom of
the window.
Modifying SAPscript Forms: Advanced Topics JNL

RG On the Creating Additional Information window:
zG Select Command.
{G Enter BOX FRAME 10 TW in the Command line.
|G Choose .
In the PC Editor on the Window INFO1, choose .
This command paints the
boxinthepreviouslydefined
size. The box line thickness
isspecified as10twips(one-twentieth
of a point).
JNM SAPscript Made Easy | Release 4.6
JIG On the Creating Additional Information window:
zG Select Command.
{G Enter BOX HEIGHT ‘1.5’ LN INTENSITY 20 in the Command
line.
|G Choose .
The PC Editor for the Window INFO1 appears.
JJG Go Back to return to the Administrative Screen.
JKG To activate the changes, choose .
‹~z‚‡€ fŽ…‚‰…~ [ˆ‘~Œ
By default, a box is oriented to the window coordinates. Therefore,
you should create a new window for every box you want to include in
the output. Instead of creating boxes for just parts of a window, the
box should fill out the entire window. If you want multiple boxes on a
page, you do not have to create a window for every box.
This command shades the
first one and a half lines of
the box with the intensity of
20%gray.Shading morethanoneline
is necessary because the box begins
a quarter line above the window. With
a shading level of 1.5 lines, the first
line of the window, a quarter line
above the first line, and a quarter line
below the first line are shaded.
Modifying SAPscript Forms: Advanced Topics JNN

The following example shows how to create multiple boxes in one
window.
^‘z†‰…~
The following is a simple example of multiple boxes on one window:
 326,7,21 :,1'2:

 )LUVW %R[

 326,7,21 ;25,*,1 ¶· + 25,*,1 ¶· /1 ´7KLV LV WKH
GHIDXOW
 6,=( :,'7+ ¶·+ +(,*+7 ¶· /1
 %2; )5$0(  7:

 6HFRQG %R[
 326,7,21 ;25,*,1 ¶· + 25,*,1 ¶· /1
 6,=( :,'7+ ¶·+ +(,*+7 ¶· /1
 %2; )5$0(  7:

 7KLUG %R[
 326,7,21 ;25,*,1 ¶· + 25,*,1 ¶· /1
 6,=( :,'7+ ¶·+ +(,*+7 ¶· /1
 %2; )5$0(  7:
This code will generate three boxes relative to the size of the page window.
Here is one possible configuration based on the example above:
JNO SAPscript Made Easy | Release 4.6
i‹‚‡‚‡€ m~‘ o~‹‚|z……’
Sometimes you may want to print text vertically. SAPscript itself is
not able to print text vertically, but you can inform the printer to do
this. To rotate the window during the printing, you need two separate
print controls. You have to include the print controls so that they
enclose the content (text, bar codes, graphics) you want to print
vertically.
The content of the window should have the following structure.
35,1721752/ =0

 7H[W WR SULQW YHUWLFDO

35,1721752/ =0
The print control ZM200 informs the printer to print the following text
vertically. The print control ZM300 informs the printer to return to
horizontal printing.
The specific print sequences for the print controls can be found in the
documentation of your printer type.
SAPscript, however, interprets the window’s content as horizontal
text. Therefore, if you execute the test printing function in SAPscript,
the text will be printed horizontal. To check the printout, you have to
print the form starting the print program from the application.
To print text vertically, perform the following steps in the
recommended order:
1. If necessary, copy a standard printer type (see “Copying a
Standard Printer Type” on page 133).
2. Create the print control that informs the printer to print vertically
(see “Defining a Print Control for the Macro” on page 135).
3. Create the print control that informs the printer to return to
horizontal printing (see “Defining a Print Control for the Macro”
on page 135).
4. Create a new window for vertical printing.
Make sure that the window does not overlap with other windows
or stand out of the page during the printing.
5. Include the print controls in the new window (see “Including the
Print Control in the Form” on page 138).
gˆ~
Make sure your print control starts
with Y or Z. We recommend that the
macro ID is also part of the name.
Modifying SAPscript Forms: Advanced Topics JNP

z……‚‡€ Z[Zi lŽ{‹ˆŽ‚‡~Œ nŒ‚‡€ ~ i^k_hkf ˆ††z‡}
In SAPscript, you can use the PERFORM command in a window to
call an ABAP subroutine to:
n Obtain data from the database that is needed at print time
n Carry out complex ABAP calculations
n Format data
Often, without modification, the above operations cannot be executed
by the print program assigned to your form. Instead of modifying the
print program, you can use the PERFORM command to execute
additional operations during the printing. Calling an ABAP
subroutine from a SAPscript form causes a slight drop in performance
during the printing. The delay depends on the complexity of the
operations executed in the called subroutine.
The PERFORM command is executed when the form is formatted for
printing. Communication between the called ABAP subroutine and
the form is by the way of symbols whose values are set in the ABAP
subroutine.
l’‡z‘ ˆ ~ i^k_hkf Œz~†~‡ ‚‡ z ˆ‹† ‚‡}ˆG
3(5)250 IRUP! ,1 352*5$0 SURJ!
86,1* ,19$5
86,1* ,19$5

+$1*,1* 2879$5
+$1*,1* 2879$5

(1'3(5)250
INVAR1 and INVAR2 are variable symbols and may be any of the
four SAPscript symbol types. You can use as many symbols as you
want. All symbols that are transferred from the SAPscript form to the
ABAP subroutine are listed in the PERFORM command using the
keyword USING.
OUTVAR1 and OUTVAR2 are local text symbols and must, therefore,
be character strings. The restriction to text symbols avoids the
unintentional change of system symbols. Parameters transferred back
to SAPscript forms from internal tables in subroutines are received by
the PERFORM command as text using the keyword CHANGING.
The ABAP subroutine form called via the PERFORM command
must be defined in the ABAP program prog as follows:
Do not confuse the
SAPscript PERFORM
command with the ABAP
PERFORM statement.
JNQ SAPscript Made Easy | Release 4.6
l’‡z‘ ˆ ~ Z[Zi ŒŽ{‹ˆŽ‚‡~ Uˆ‹†WG
)250 IRUP! 7$%/(6 ,1B7$% 6758785( ,76
287B7$% 6758785( ,76

(1')250
^‘z†‰…~
In the example, we will retrieve a customer name from table SCUSTOM. We assume
this table is not defined in the print program. The SAPscript form calls the subroutine
GET_NAME in the ABAP program ZREADCUSTOM.
IRUP! *(7B1$0(
SURJ! =5($'86720
,19$5 867
2879$5 1$0(
,1B7$% ,177$%
287B7$% 2877$%
ˆ}‚‡€ ‚‡ ~ lZiŒ|‹‚‰ ˆ‹† ‚‡}ˆS
3(5)250 *(7B1$0( ,1 352*5$0 =5($'86720
86,1* 867
+$1*,1* 1$0(
(1'3(5)250

1$0(
ˆ}‚‡€ ‚‡ ~ Z[Zi ‰‹ˆ€‹z†S
5(3257 =5($'86720
7$%/(6 686720

 

 )RUP *(7B1$0(

 
)250 *(7B1$0( 7$%/(6 ,177$% 6758785( ,76
2877$% 6758785( ,76

 UHDG ILUVW OLQH RI LQWWDE
5($' 7$%/( ,177$% ,1'(; 

VHOHFW IURP VFXVWRP DQG PRGLI RXWWDE ZLWK QHZ GDWD
6(/(7 6,1*/(
 )520 686720
:+(5( ,' ,177$%9$/8(
,) 668%5 
5($' 7$%/( 2877$% ,1'(; 
029( 6867201$0( 72 2877$%9$/8(
02',) 2877$% ,1'(; 67$%,;
(/6(
5($' 7$%/( 2877$% ,1'(; 
029( ¶QR QDPH· 72 2877$%9$/8(
02',) 2877$% ,1'(; 67$%,;
(1',)
(1')250
You can only use internal
tables of structure ITCSY in
the form routine. The
structure is composed of two fields,
NAME and VALUE. Text fields are
transferred into the NAME field and
text field contents into the VALUE
field.
Create the subroutine in your
customer namespace.
3 $ 5 7 7 + 5 ( (
[ŽŒˆ†‚“‚‡€
Z‰‰…‚|z‚ˆ‡Œ ˆ‹
lZiŒ|‹‚‰ _ˆ‹†Œ
Sap script made easy
+ $ 3 7 ( 5
OŽŒˆ†‚“‚‡€ lz…~Œ z‡} ]‚Œ‹‚{Ž‚ˆ‡
ˆ‹ i‹‚‡ _ˆ‹†Œ
JOK SAPscript Made Easy | Release 4.6
h~‹‚~
Before you can use print forms with your application, certain
customizing steps may be needed.
This chapter covers the following two activities related to customizing
Sales and Distribution (SD) for print forms:
n How to use a modified form instead of a standard form
n How to get printing results that cannot be achieved by modifying
the form
Z||~ŒŒ‚‡€ ~ bf`
Since customizing is done through the Implementation Guide (IMG),
it serves as the starting point for chapters 6 through 8.
All of the IMG-related procedures in this guide begin with the Display
IMG screen for the SAP Reference IMG.
mzŒ„
$FFHVV WKH 6$3 5HIHUHQFH 'LVSOD ,0* VFUHHQ
JG From the SAP standard menu, choose Tools → AcceleratedSAP →
Customizing → SPRO Edit Project.
The Customizing: Edit Project screen appears and displays all of the
customizing projects defined in your system.
KG On the Customizing: Edit Project screen, choose SAP Reference IMG.
Usually you use a current Project IMG instead of the SAP Reference IMG. A
Project IMG is a subset of the SAP Reference IMG or the Enterprise IMG.
Depending on your customizing projects you may see fewer topics on your
screen.
Tips  Tricks
Customizing Sales and Distribution for Print Forms JOL

The Display IMG screen appears and displays the SAP Reference IMG.
The sample Display IMG screen below shows how to execute an IMG
activity. For example, to execute Configure transaction-related display
characteristics for fields, you start at the Display IMG screen. Next, you
choose General Settings → Field Display Characteristics → Configure
transaction-related display characteristics for fields.
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ lz…~Œ ]ˆ|ކ~‡Œ
Before you can use your modified form for printing, you must assign
it to the print program. If you do not assign your modified form, the
system will use the standard form for printing.
In this section you will learn how to:
n Access the relevant customizing activity for sales documents
n Assign a modified form to a sales order confirmation
You may change the print program used to collect and print data but
it is not mandatory. You can also specify the print program and form
for each output type and medium.
To expand subsequent IMG nodes, click
this arrow.
To collapse subsequent IMG nodes,
click this arrow.
To read the documentation for a specific
IMG activity, click this icon at the
beginning of a line.
To execute a specific IMG activity, click
this icon at the beginning of a line.
When expanding the IMG structure, not all nodes may be visible on the Display
IMG screen. If the expanded list becomes too long, you may need to scroll up or
down to view the nodes that are no longer on the screen.Tips  Tricks
JOM SAPscript Made Easy | Release 4.6
You can use the standard form RVORDER01 for inquiry, quotation,
sales order confirmation, contract, and scheduling agreement.
mzŒ„
$VVLJQ D QHZ IRUP WR VDOHV GRFXPHQWV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG On the Display IMG screen, choose Sales  Distribution → Basic
Functions → Output Control → Output Determination → Output
Determination Using the Condition Technique → Maintain Output
Determination for Sales Documents → Maintain Output Types.
LG On the Display View “Output Types”: Overview screen, choose to
switch to the Change Mode.
MG On the Change View “Output Types”: Overview screen:
zG Select an output type in the Output Types table (for example, BA00
Order Confirmation).
{G From the workplace menu, double-click Processing routines.
Instead of the SAP standard form RVORDER01, you may want to use the
preconfigured form YPPC_ORDCONF for the U.S. and Canadian markets. You
can use YPPC_ORDCONF for inquiry, quotation, sales order confirmation,
contract, and scheduling agreement confirmation.
Tips  Tricks
Customizing Sales and Distribution for Print Forms JON

NG On the Change View “Processing routines”: Overview screen:
zG Enter the form name (for example, ZVORDER02) for the medium
you want to use.
{G Save the changed processing routine.
If you use the Change and Transport System (CTS) specify a
transport request after saving.
|G Go Back twice to return to the Display IMG screen.
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ l‚‰‰‚‡€ ]ˆ|ކ~‡Œ
Now you will see similar customizing steps for other SD documents,
such as delivery notes (packing lists) and picking lists. You will find
these forms now in the section Logistics Execution. The most important
output types are LD00 (delivery note/packing list) and WMTA
(automatic TA/picking list).
Since Release 4.5, the output type EK00 (picking list) has been
replaced with the output type WMTA (automatic TA).
This step-by-step guide shows sales order confirmation output only. However,
the standard form, RVORDER01, or the form, YPPC_ORDCONF_STD, can be
used for all other output types.TechTalk
JOO SAPscript Made Easy | Release 4.6
mzŒ„
$VVLJQ D QHZ IRUP IRU SDFNLQJ OLVW GHOLYHU QRWH
WR VKLSSLQJ
GRFXPHQWV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Logistics Execution → Shipping → Basic Shipping Functions→
Output Control → Output Determination → Maintain Output
Determination for Outbound Deliveries → Maintain Output Types.
LG On the Display View “Output Types”: Overview screen, choose to
switch to the Change Mode.
MG On the Change View “Output Types”: Overview screen:
zG In the Output Types table, select the output type LD00.
{G From the workplace menu, double-click Processing routines.
Customizing Sales and Distribution for Print Forms JOP

NG On the Change View “Processing routines”: Overview screen:
zG In the Form field, enter the form name for the medium you want to
use.
{G Save the changed processing routine.
If you use the Change and Transport System (CTS), specify a
transport request after saving.
|G Go Back twice to return to the Display IMG screen.
mzŒ„
$VVLJQ D QHZ IRUP IRU SLFNLQJ OLVW WR VKLSSLQJ GRFXPHQWV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Logistics Execution → Shipping → Basic Shipping Functions→
Output Control → Output Determination → Maintain Output
Determination for Outbound Deliveries → Maintain Output Types.
JOQ SAPscript Made Easy | Release 4.6
LG On the Display View “Output Types”: Overview screen, choose to
switch to the Change Mode.
MG On the Change View “Output Types”: Overview screen:
zG In the Output Types table, select the output type WMTA (Automatic
TA).
{G From the workplace menu, double-click Processing routines.
Customizing Sales and Distribution for Print Forms JOR

NG On the Change View “Processing routines”: Overview screen:
zG Enter the form name for the medium you want to use.
{G Save the changed processing routine.
If you use the Change and Transport System (CTS), specify a
transport request after saving.
|G Go Back twice to return to the Display IMG screen.
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ [‚……‚‡€ ]ˆ|ކ~‡Œ
mzŒ„
$VVLJQ D QHZ IRUP IRU LQYRLFHV WR ELOOLQJ GRFXPHQWV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Sales  Distribution → Basic Functions → Output Control →
Output Determination → Output Determination Using the Condition
Technique → Maintain Output Determination for Billing Documents →
Maintain Output Types.
LG On the Display View “Output Types”: Overview screen, choose to
switch to the Change Mode.
gˆ~
If only one processing routine is defined,
the Change View “Processing routines”:
Details screen is displayed immediately.
Go Back to return to the Change View
“Processing routines”: Overview screen.
JPI SAPscript Made Easy | Release 4.6
MG On the Change View “Output Types”: Overview screen:
zG In the Output Types table, select the output type RD00 (Invoice).
{G From the workplace menu, double-click Processing routines.
NG On the Change View “Processing routines”: Overview screen:
zG Enter the form name (for example, YPCC_INVOICE_STD) for the
medium you want to use.
{G Save the changed processing routine.
If you use the CTS, specify a transport request after saving.
Customizing Sales and Distribution for Print Forms JPJ

|G Go Back twice to return to the Display IMG screen.
l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ l~‡}~‹E a~z}~‹E z‡} _ˆˆ~‹
Standard text can be selected as output. The forms are configured to
print standard text as headers, footers, and mailing addresses. The
mailing address is printed above the greeting; the header and footer
are printed at the top and bottom of the page respectively.
Sales order confirmations, packing lists, and invoices use different
standard text for each sales organization, and picking lists use
different standard text for each shipping point.
If you do not specify standard text, or if the specified standard text
does not exist, there is no resulting error.
l‰~|‚’‚‡€ lz‡}z‹} m~‘ ‰~‹ lz…~Œ h‹€z‡‚“z‚ˆ‡
mzŒ„
$VVLJQ VWDQGDUG WH[W IRU VHQGHU KHDGHU DQG IRRWHU SHU VDOHV
RUJDQL]DWLRQ
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Sales and Distribution → Basic Functions → Output Control →
Output Determination → Process Output and Forms → Assign Form Texts.
LG To specify the standard text for sales order confirmations, packing
lists, and invoices, double-click on Assign form texts per sales
organization.
JPK SAPscript Made Easy | Release 4.6
MG On the Change View “Organizational Unit: Sales Organizations - Output”:
Overv screen:
zG Enter the standard text names for Addr (sending address), Lett
(letter header), and Foot (footer text).
Make sure the text names start with “Y” or “Z.”
{G Save the standard text names.
If you use the CTS, specify a transport request after saving.
|G Go Back to return to the Choose activities popup window.
NG On the Choose Activity screen, choose to return to the Display IMG
screen.
The system marks the activity with a check, indicating that you have
already assigned form texts per sales organization.
This screen displays the sales organizations
that you have defined.
To allocate form texts per shipping
point, double-click on the desired
activity and do not choose Cancel.
Customizing Sales and Distribution for Print Forms JPL

Z……ˆ|z‚‡€ lz‡}z‹} m~‘ ‰~‹ l‚‰‰‚‡€ iˆ‚‡
mzŒ„
$OORFDWH VWDQGDUG WH[W IRU VHQGHU KHDGHU DQG IRRWHU SHU VKLSSLQJ
SRLQW
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Sales and Distribution → Basic Functions → Output Control →
Output Determination → Process Output and Forms → Assign Form Texts.
LG On the Choose Activity screen, to specify the standard texts for a
picking list, double-click on Allocate form texts per shipping point.
JPM SAPscript Made Easy | Release 4.6
MG On the Change View “Organizational Unit: Shipping Points - Output
Determination screen:
zG Enter the standard text names for Addr (sending address), Lett
(letter header), and Foot (footer text).
Make sure the text names start with “Y” or “Z.”
{G Save the standard text names.
|G Go Back to return to the Choose activities popup window.
NG On the Choose Activity screen, choose to return to the Display IMG
screen.
fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ
Forms use standard text for recurring header, footer, sender, greetings,
and other printed information. These standard texts are inserted in a
form by the INCLUDE command.
This screen displays the shipping points that
you defined.
To assign form text per sales
organization,double-clickon thedesired
activity and do not choose Cancel.
The system marks the activity with a
check, indicating that you have already
allocated form texts per shipping point.
Customizing Sales and Distribution for Print Forms JPN

If you create a new standard text, make sure that the form can refer to
this new standard text. You have to create or change a INCLUDE
command in the form.
The following task shows you how to create or change standard text
using the PC Editor.
mzŒ„
UHDWH RU FKDQJH VWDQGDUG WH[W
JG From the SAP standard menu, choose Tools → SAPscript → SO10 -
Standard text.
KG On the Standard Text: Request screen:
zG In the Text name field, enter Z_ADRS_HEADER.
In this example, use the text name Z_ADRS_HEADER, specified
for letter header in the section Specifying Standard Text for
Sender, Header, and Footer.
{G In the Text ID field, enter ADRS.
|G If the standard text does not exist, choose Create.
If the standard text already exists, choose Change.
Since the forms use ADRS, it is easier to use this text ID here. If you use
another text ID, you need to change the corresponding command line in the
forms.Tips  Tricks
JPO SAPscript Made Easy | Release 4.6
LG On the Change Standard texts for adr.Include: Z_ADRS_Header Language
EN screen:
zG Enter the desired text.
{G Save the new or changed standard text.
|G Go Back to return to the Standard Text: Request screen.
}G Go Back to return to the SAP standard menu.
MG If you create a new standard text, make sure that there is an INCLUDE
command in the SAPscript form, which refers to the new standard
text.
This screenshot shows some examples of
text formatting created with SAP-delivered
paragraph and character formats.
If you replace an existing standard text, which is already referred by an
INCLUDE command in a form, you do not have to create a new INCLUDE
command, just replace the name of the standard text.Tips  Tricks
Customizing Sales and Distribution for Print Forms JPP

fz‚‡z‚‡‚‡€ i‹‚|‚‡€ ˆ‡}‚‚ˆ‡Œ ˆ Z‰‰~z‹ ‚‡ ~ hŽ‰Ž
Pricing conditions can be marked to appear in the output, either at the
item level or as a sum. During customizing, you can specify if the
pricing conditions should appear:
n After each item
n As a sum at the end of all the items
mzŒ„
0DLQWDLQ SULFLQJ SURFHGXUHV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Sales and Distribution → Basic Functions → Pricing → Pricing
Control → Define and Assign Pricing Procedures.
LG On the Choose Activity screen, double-click on Maintain pricing
procedures.
JPQ SAPscript Made Easy | Release 4.6
gˆ~
Repeat steps 4 and 5 for relevant pricing procedures.
MG On the Change View: “Procedures”: Overview screen:
zG In the Procedures table, select the box in front of a pricing
procedure.
{G From the workplace menu, choose Control.
Customizing Sales and Distribution for Print Forms JPR

NG On the Change View: “Control”: Overview screen:
zG In the P column in the Control table, do one of the following
subordinated steps:
• If the pricing condition should not appear on the output,
delete X or S.
• If the pricing condition should appear for every item, enter X.
• If the pricing condition should appear as a sum, enter S.
{G Save the controls.
|G From the workplace menu, choose Procedures.
The Change View: “Procedures”: Overview screen appears again.
gˆ~
To maintain another pricing procedure, repeat steps 4 and 5.
OG Go Back to return to the Choose Activity screen.
PG On the Choose Activity screen, choose to return to the SAP
Reference IMG screen.
Column P in the Control Table
Sap script made easy
+ $ 3 7 ( 5
PŽŒˆ†‚“‚‡€ fz~‹‚z…Œ
fz‡z€~†~‡ ˆ‹ i‹‚‡ _ˆ‹†Œ
JQK SAPscript Made Easy | Release 4.6
h~‹‚~
Before you can use print forms with your application, certain
customizing steps may be needed.
This chapter covers the following two activities related to customizing
Materials Management (MM) for print forms:
n How to use a modified form instead of a standard form
n How to get printing results that cannot be achieved by modifying
the form
ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ ]ˆ|ކ~‡Œ
Before you can use your modified form for printing, you must assign
it to the print program. If you do not assign your modified form, the
system will use the standard form for printing.
A print program to collect and print data can also be specified.
However, the print program does not need to be changed.
mzŒ„
$VVLJQ D QHZ IRUP IRU SXUFKDVH RUGHUV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Materials Management → Purchasing → Messages → Forms
(Layout Sets) for Messages → Assign Form (Layout Set) and Print Program
for Purchase Order.
Customizing Materials Management for Print Forms JQL

The Change View: “Output Processing Programs”: Overview screen
appears.
LG In the Output Processing Programs table, enter a form name in the Form
field for each output type and medium you want to use.
For example, to send output to both printer and fax, use the
preconfigured form YPCC_PURCHORD_STD instead of the standard
form MEDRUCK.
MG Save the changes.
If you use the CTS, specify a transport request after saving.
The Med column shows the different
outputmedia usedforanoutput type
(“1” for printer and “2” for fax).
NEU is the output type for the purchase
order.
The
Form
column
JQM SAPscript Made Easy | Release 4.6
NG Go Back to return to the Display IMG screen.
fz‚‡z‚‡‚‡€ ]ˆ|ކ~‡ m~‘ ˆ‹ i‹‚‡‚‡€
The text from the purchase order, header, and item levels can appear
in the output. Even if materials are included in the item, all material
text can be selected to appear in the output at the item level of the
purchase order.
You can maintain document text for:
n Document header
n Document item
n Document supplement
n Change text
n Headings
Figure 7–1 Purchase order
(preconfigured SAPscript form)
Document supplement text is usually
printed at the end of all purchase order
items.
Document item text
Document header text
Headings contain the document title,
purchase order number, and date.
The headings are printed in both first
lines of the standard SAPscript form
MEDRUCK for purchase order.
Document title
Change text explains
why it is necessary to
reprint a purchase order
once it has been
changed.
Customizing Materials Management for Print Forms JQN

p~‹~ ˆ lz‹ fz‚‡~‡z‡|~
The starting point for maintaining document text is the Messages:
Purchase Order screen, where you can select the desired document
text.
mzŒ„
$FFHVV WKH 0HVVDJHV 3XUFKDVH 2UGHU VFUHHQ
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Materials Management → Purchasing → Messages → Texts for
Messages → Define Texts for Purchase Order.
LG On the Choose Activity screen, double-click on Document Printout
Purchase Order.
MG On the Messages: Purchase Order screen, choose the desired document
text.
JQO SAPscript Made Easy | Release 4.6
Table 7–1 provides an overview of the IMG activities related to
maintaining document texts for purchase orders. To learn more about
adding and deleting objects, or verifying print sequences, go to the
appropriate page number.
Table 7–1 Overview of IMG activities related to document texts
Name of object Adding an entry Deleting an entry Verifying a print sequence
Texts for document header See page 187 See page 189 See page 189
Texts for document item See page 191 See page 194 See page 194
Texts for document supplement See page 196 See page 198 See page 198
Change texts See page 200
Headings See page 201
Customizing Materials Management for Print Forms JQP

fz‚‡z‚‡‚‡€ m~‘ ˆ‹ ]ˆ|ކ~‡ a~z}~‹
Z}}‚‡€ z g~ ^‡‹’ ˆ‹ ]ˆ|ކ~‡ a~z}~‹ m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen. For more information,
see “Where to Start Maintenance” on page 185.
LG On the Messages: Purchase Order screen, choose Texts for document
header.
MG On the Change View: “Messages: Header Texts”: Overview screen:
zG Review the text selected to appear in the output.
This text is a subset of all text defined on the header level of the
purchase order and comes either from the purchase order header
or is individual text.
{G Choose New Entries.
EKKO is the Object and F01 (Header
text) is the Text ID for text coming from
the purchase order header.
TEXT is the Object and ST (Standard
text) is the Text ID for individual text.
The most important lines are those with
document type NB (Standard PO).
The important operations are:
n New purchase order: 1
n Changed purchase order: 2
JQQ SAPscript Made Easy | Release 4.6
NG On the New Entries: Details of Added Entries screen:
zG In the Print operation field, enter 1 (New purchase order) or 2
(Changed purchase order).
{G In the Purchasing doc. type field, enter NB (Standard purchase order).
|G In the Text object field, enter EKKO (Purchasing document header
texts) or TEXT (standard text).
}G In the Text ID field, enter F02 (Header note) or ST (standard text).
~G In the Print sequence field, enter a number that determines the text
printing sequence for the text.
G If you use TEXT in the Text object field, enter a name for a standard
text in the Text name field.
€G Select Print title to print the text title.
G Save the new entry.
If you use the CTS, specify a transport request after saving.
‚G Go Back to return to the Change View: “Messages: Header Texts”:
Overview screen.
OG Go Back to return to the Messages: Purchase Order screen.
PG Choose twice to return to the SAP Reference IMG screen.
The print sequence determines the
sequence in which text will be printed.
The numbers you enter can be used only
once, but you are not required to enter
numbers in sequence.
For example, thefollowing sequences are
valid:
n 1, 3, 4, 6, and 8
n 1, 2, 3, 4, and 5
n 3, 5, 6, and 9
Customizing Materials Management for Print Forms JQR

]~…~‚‡€ z‡ ^‡‹’ ˆ‹ ]ˆ|ކ~‡ a~z}~‹ m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Texts for document
header.
MG On the Change View: “Messages: Header Texts”: Overview screen:
zG Select the box at the beginning of the lines that you want to delete.
{G Choose .
|G Save the changes.
NG Go Back to return to the Messages: Purchase Order screen.
OG Choose twice to return to the SAP Reference IMG screen.
o~‹‚’‚‡€ ~ i‹‚‡ l~ŠŽ~‡|~ ˆ‹ ]ˆ|ކ~‡ a~z}~‹ m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Texts for document
header.
JRI SAPscript Made Easy | Release 4.6
MG On the Change View: “Messages: Header Texts”: Overview screen:
zG Select the box at the beginning of the line you want to verify.
{G Choose .
NG On the Change View “Messages: Header Texts”: Details screen:
zG In the Print sequence field, you can change the number that
determines the text printing sequence.
{G Save the changes.
If you use the CTS, specify a transport request after saving.
|G Go Back to return to the Change View: “Messages: Header Texts”:
Overview screen.
OG Go Back to return to the Messages: Purchase Order screen.
PG Choose twice to return to the SAP Reference IMG screen.
The print sequence determines the
sequence in which text will be printed.
The numbers you enter can be used only
once, but you are not required to enter
numbers in sequence.
For example, the following sequences are
valid:
n 1, 3, 4, 6, and 8
n 1, 2, 3, 4, and 5
n 3, 5, 6, and 9
Customizing Materials Management for Print Forms JRJ

fz‚‡z‚‡‚‡€ b~† m~‘
Text printed at the item level comes from various item categories. The
most important item categories are:
Text printed at the item level comes from various objects. The most
important objects are:
Z}}‚‡€ z g~ ^‡‹’ ˆ‹ b~† m~‘
mzŒ„
$GG D QHZ HQWU IRU SXUFKDVH RUGHU LWHP WH[W
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
Table 7–2 Item category indicators
Indicator Description
(blank) Standard item
B Limit item
K Consignment item
L Subcontracting item
S Third-party item
T Text item
U Stock transfer item
D Service item
Table 7–3 Objects at item level
Object Description
EKPO Purchase order items
MATERIAL Materials
EINE Purchasing info records
VBBP Sales order items in case of a third-party item
ASMD Service master records
ESLL Services
TEXT Standard texts
JRK SAPscript Made Easy | Release 4.6
LG On the Messages: Purchase Order screen, choose Texts for document item.
MG On the Change View: “Messages: Item Texts”: Overview screen:
zG Review the text selected to appear in the output.
This text is a subset of all text defined on the item level of the
purchase order.
{G Choose New Entries.
The most important lines are those with
document type NB (Standard PO).
The output can be distinguished by
item categories in the I column
(see Table 7–2 on page 191).
The important operations are:
n New purchase order: 1
n Changed purchase order: 2
Text printed at the item level comes from
various objects (see Table 7–3 on
page 191).
Customizing Materials Management for Print Forms JRL

NG On the New Entries: Details of Added Entries screen:
zG In the Print operation field, enter 1 (New purchase order) or 2
(Changed purchase order).
{G In the Purchasing document type field, enter NB (Standard purchase
order).
|G In the Item category field, enter the letter for the desired item
category.
}G In the Text object field, enter EKPO (Purchasing document item texts)
or TEXT (Standard text).
~G In the Text ID field, enter F03 (Material PO text) or ST (Standard
text).
G If you use TEXT in the Text object field, enter a name for a standard
text in the Text name field.
€G In the Print Sequence field, enter a number that determines the
printing sequence for the text.
The Printing priority field can remain empty.
G Select Print title to print the text title.
‚G Save the new item text.
If you use the CTS, specify a transport request after saving.
ƒG Go Back to return to the Change View: “Messages: Item Texts”:
Overview screen.
OG Go Back to return to the Messages: Purchase Order screen.
PG Choose twice to return to the SAP Reference IMG screen.
Sequence and Printing
priority determine the
sequence in which text
should be printed. It is a two-level
sequence. Therefore, if the input for
Sequence is equal for two text items,
the Printing priority field determines
the sequence. However, Sequence
can accept up to 99 numbers, which
is sufficient to determine a unique text
sequence. Accordingly, we
recommend that you leave Printing
priority empty.
You must enter an increasing
sequence in the Sequence and
Printing priority fields. But within the
sequence, you may skip numbers.
For example, both “1, 2, 3, 4, and 5”
and “3, 5, 6, and 9” are valid
sequences.
JRM SAPscript Made Easy | Release 4.6
]~…~‚‡€ z‡ b~† m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Texts for document item.
MG On the Change View: “Messages: Item Texts”: Overview screen:
zG Select the box at the beginning of the lines that you want to delete.
{G Choose .
|G Save the changes.
NG Go Back to return to the Messages: Purchase Order screen.
OG Choose twice to return to the SAP Reference IMG screen.
o~‹‚’‚‡€ ~ i‹‚‡ l~ŠŽ~‡|~ ˆ‹ b~† m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Texts for document item.
Customizing Materials Management for Print Forms JRN

MG On the Change View: “Messages: Item Texts”: Overview screen:
zG Select the box at the beginning of the line you want to verify.
{G Choose .
The Change View “Messages: Item Texts”: Details screen appears.
NG On the Change View “Messages: Item Texts”: Details screen:
zG In the Print Sequence field, you can change the number that
determines the text printing sequence.
{G In the Printing priority field, you can change the number that
determines the text printing priority.
This field can remain empty.
|G Save the changes.
If you use the CTS, specify a transport request after saving.
}G Go Back to return to the Change View: “Messages: Item Texts”:
Overview screen.
OG Go Back to return to the Messages: Purchase Order screen.
PG Choose twice to return to the SAP Reference IMG screen.
You must enter an increasing sequence in
the Printing priority field.
You must enter an increasing sequence in
the Print Sequence field, but, you may
skip numbers.
For example, the following sequences are
valid:
n 1, 2, 3, 4, and 5
n 3, 5, 6, and 9
JRO SAPscript Made Easy | Release 4.6
fz‚‡z‚‡‚‡€ lމ‰…~†~‡ m~‘Œ
Z}}‚‡€ z g~ ^‡‹’ ˆ‹ lމ‰…~†~‡ m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Texts for supplement
text.
MG On the Change View: “Messages: Supplement Texts”: Overview screen:
zG Review the text selected to appear in the output at the end of all
purchase order items.
{G Choose New Entries.
The most important lines are those with
document type NB (Standard PO).
The important operations are:
n New purchase order: 1
n Changed purchase order: 2
gˆ~
Text, printed as supplements, comes
either from the purchase order header
or is standard text.
For a purchase order header, EKKO
is the Object and the supplement text
ID varies (for example, F06).
For standard text, TEXT is the Object
and ST is the Text ID (not shown).
Customizing Materials Management for Print Forms JRP

NG On the New Entries: Details of Added Entries screen:
zG In the Print operation field, enter 1 (New purchase order) or 2
(Changed purchase order).
{G In the Purchasing doc. type field, enter NB (Standard purchase order).
|G In the Text object field, enter EKKO (Purchasing document header
texts) or TEXT (standard text).
}G In the Text ID field, enter the desired text ID (for example F06).
~G In the Print sequence field, enter a number that determines the text
printing sequence.
G If you use TEXT in the Text object field, enter a standard text name
in the Text name field.
€G Select Print title to print the text title.
G Save the new entry.
If you use the CTS, specify a transport request after saving.
‚G Go Back to return to the Change View: “Messages: Supplement
Texts”: Overview screen.
OG Go Back to return to the Messages: Purchase Order screen.
PG Choose twice to return to the SAP Reference IMG screen.
The print sequence determines the
sequence in which text will be printed.
The numbers you enter in the Print
sequence field can be used only once, but
you are not required to enter numbers in
sequence.
For example, the following sequences are
valid:
n 1, 3, 4, 6, and 8
n 1, 2, 3, 4, and 5
n 3, 5, 6, and 9
JRQ SAPscript Made Easy | Release 4.6
]~…~‚‡€ z lމ‰…~†~‡ m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Texts for supplement
text.
MG On the Change View: “Messages: Supplement Texts”: Overview screen:
zG Select the box at the beginning of the lines you want to delete.
{G Choose .
|G Save the changes.
If you use the CTS, specify a transport request after saving.
NG Go Back to return to the Messages: Purchase Order screen.
OG Choose twice to return to the SAP Reference IMG screen.
o~‹‚’‚‡€ ~ i‹‚‡ l~ŠŽ~‡|~ ˆ‹ lމ‰…~†~‡ m~‘
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Texts for supplement
text.
Customizing Materials Management for Print Forms JRR

MG On the Change View: “Messages: Supplement Texts”: Overview screen:
zG Select the box at the beginning of the line you want to verify.
{G Choose .
NG On the Change View “Messages: Supplement Texts”: Details screen:
zG In the Print sequence field, change the number that determines the
text printing sequence.
{G Save the changes.
If you use the CTS, specify a transport request after saving.
|G Go Back to return to the Change View: “Messages: Supplement
Texts”: Overview screen.
OG Go Back to return to the Messages: Purchase Order screen.
PG Choose twice to return to the SAP Reference IMG screen.
The print sequence determines the
sequence in which text will be printed.
The numbers you enter in the Print
sequence field can be used only once, but
you are not required to enter numbers in
sequence.
For example, the following sequences are
valid:
n 1, 3, 4, 6, and 8
n 1, 2, 3, 4, and 5
n 3, 5, 6, and 9
KII SAPscript Made Easy | Release 4.6
fz‚‡z‚‡‚‡€ z‡€~ m~‘Œ
The change text explains why a change in a purchase order makes it
necessary to reprint the purchase order. If it is applicable, this text
appears in the output.
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Change texts.
MG On the Change View: “Messages: Change Texts”: Overview screen:
zG Review the change texts.
{G To change the text, overwrite it.
|G Save the changes.
If you use the CTS, specify a transport request after saving.
NG Go Back to return to the Message: Purchase Order screen.
OG Choose twice to return to the SAP Reference IMG screen.
Customizing Materials Management for Print Forms KIJ

fz‚‡z‚‡‚‡€ a~z}‚‡€Œ
You can change the title of the output, the field headings for the
purchase order number, and the purchase order date.
The content of the title and the document type are printed in the first
two lines of purchasing documents outputted with the standard
SAPscript form MEDRUCK.
The content of the heading document number is printed above the
document number or document date.
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Access the Messages: Purchase Order screen (see “Where to Start
Maintenance” on page 185).
LG On the Messages: Purchase Order screen, choose Headings.
MG On the Change View “Messages: Headings”: Overview screen:
zG Select the box at the beginning of the lines that you want to
change.
{G Choose .
The important operations are:
n New purchase order: 1
n Changed purchase order: 2
The most important lines are those with
document type NB (Standard PO).
KIK SAPscript Made Easy | Release 4.6
NG On the Change View “Messages: Headings”: Details screen:
zG Overwrite the title and heading for the document number and
date.
{G Save the changes.
If you use the CTS, specify a transport request after saving.
|G Go Back to return to the Change View “Messages: Headings”:
Overview screen.
OG Go Back to return to the Message: Purchase Order screen.
PG Choose twice to return to the SAP Reference IMG screen.
Changesin the heading for
the document number and
date can cause changes in
the form. Before changing the
headings, see where the variables
for the document number and date
are used in the form, and if the form
needs to be changed.
Customizing Materials Management for Print Forms KIL

fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ
In the previous tasks, you might have created new entries using the
text object TEXT and specified text names for standard texts. The
following steps show how to create or change standard texts. In this
example, use the text name Z_PURCHORD_HEADER and the text ID
ST.
mzŒ„
0DLQWDLQLQJ VWDQGDUG WH[W
JG From the SAP standard menu, choose Tools → SAPscript → SO10 -
Standard text.
KG On the Standard Text: Request screen:
zG In the Text name field, enter Z_PURCHORD_HEADER.
{G In the Text ID field, enter ST.
|G If the standard text does not exist, choose Create.
If the standard text already exists, choose Change.
KIM SAPscript Made Easy | Release 4.6
LG On the Change Standard text: ... Language ... screen:
zG Enter the desired text.
{G Save the new or changed standard text.
|G Go Back to return to the Standard Text: Request screen.
MG Go Back to return to the SAP standard menu.
NG If you create a new standard text, make sure that there is an ,1/8'(
command in the SAPscript form, which refers to the new standard
text.
This screen shows some examples of text
formatting created with SAP-delivered
paragraph and character formats.
If you replace an existing standard text, which is already referred to by an
,1/8'( command in a form, you do not have to create a new ,1/8'(
command. Simply replace the name of the standard text.Tips  Tricks
Customizing Materials Management for Print Forms KIN
Sap script made easy
+ $ 3 7 ( 5
QŽŒˆ†‚“‚‡€ _‚‡z‡|‚z… Z||ˆŽ‡‚‡€
ˆ‹ i‹‚‡ _ˆ‹†Œ
KIQ SAPscript Made Easy | Release 4.6
h~‹‚~
Before you can use print forms with your application, certain
customizing steps may be needed.
This chapter covers the following two activities related to customizing
Financial Accounting (FI) for print forms:
n How to use a modified form instead of a standard form
n How to get printing results that cannot be achieved by modifying
the form
ZŒŒ‚€‡‚‡€ z i‹‚‡ i‹ˆ€‹z† ˆ ~|„Œ
If you copy and modify the standard print program for checks, you
must inform the system that you want to use this new print program
for printing checks. The following example shows how you can assign
a print program to checks for a specific country.
mzŒ„
$VVLJQ D QHZ SULQW SURJUDP WR FKHFNV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Financial Accounting → Accounts Receivable and Accounts
Payable → Business Transactions → Outgoing Payments → Automatic
Outgoing Payments → Payment Method/Bank Selection → Configure
payment program.
LG On the Payment Program Configuration: Initial Screen, choose Payment
methods/country.
MG On the Maintain Payment Program Configuration: Countries screen,
double-click on the appropriate country.
In this example double-click on U.S. (United States). If you cannot
find the line US, scroll down the screen.
Customizing Financial Accounting for Print Forms KIR

NG On the Maintain Payment Program Configuration: Country Pmnt Methods
– List screen, choose the appropriate payment method for checks.
In this example double-click on C (Checks). The Maintain Payment
Program Configuration: Country Pmnt Methods – Details screen appears.
zG In the Name of the print program field, enter the new print program
name.
{G Save the changes.
If you use the CTS, specify a transport request after saving.
OG Choose Exit to return to the Payment Program Configuration: Initial
Screen.
PG Choose Back to return to Display IMG screen.
ZŒŒ‚€‡‚‡€ _ˆ‹†Œ ˆ ~|„Œ
If you copied and modified a form for checks, inform the system that
you want to use the new form for check printing. The following
example shows how to assign a new form to checks (per company
code).
KJI SAPscript Made Easy | Release 4.6
mzŒ„
$VVLJQ D QHZ IRUP WR D SULQW SURJUDP IRU FKHFNV
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Financial Accounting → Accounts Receivable and Accounts
Payable → Business Transactions → Outgoing Payments → Automatic
Outgoing Payments → Payment Method/Bank Selection → Configure
payment program.
LG On the Payment Program Configuration: Initial Screen, choose Payment
methods/company code.
MG On the Maintain Payment Program Configuration: Company Codes screen,
double-click on a company code.
In our example, we use 3000 (IDES US INC New York).
NG On the Maintain Payment Program Configuration: Pmnt Methods in CC –
List screen, choose the appropriate payment methods for checks.
In our example, we use C (Check).
OG On the Maintain Payment Program Configuration: Pmnt Methods in CC –
General Data screen, choose Form Data.
gˆ~
Repeat steps 4 through 8 for each
company code you want to assign
a new form to.
Customizing Financial Accounting for Print Forms KJJ

PG On the Maintain Payment Program Configuration: Pmnt Methods in CC –
Form Data screen:
zG Enter the new form name in the Form for the payment transfer
medium field.
{G Save the changes.
If you use the CTS, specify a transport request after saving.
|G Go Back to return to the Maintain Payment Program Configuration:
Pmnt Methods in CC – List screen.
QG Go Back to return to the Maintain Payment Program Configuration:
Company Codes screen.
RG Go Back to return to the Payment Program Configuration: Initial Screen.
JIG Go Back to return to the Display IMG screen.
l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ a~z}~‹E _ˆˆ~‹E l‚€‡zŽ‹~ z‡} l~‡}~‹
You can specify standard text to appear in the output. The form for the
check normally prints only standard text, such as letter header.
The header is printed at the top of the check. The letter header can use
different standard text depending on the company code. If you do not
specify standard text, or if the specified standard text does not exist,
there is no resulting error.
gˆ~
The form for the check normally
prints only standard text such as
letter header, but you can easily
add the commands to print
standard text for footer, signature,
and sender.
KJK SAPscript Made Easy | Release 4.6
mzŒ„
$VVLJQ WH[W HOHPHQWV IRU KHDGHU IRRWHU VLJQDWXUH DQG VHQGHU SHU
FRPSDQ FRGH
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Financial Accounting → Accounts Receivable and Accounts
Payable → Business Transactions → Outgoing Payments → Automatic
Outgoing Payments → Payment Method/Bank Selection → Configure
payment program.
LG On the Payment Program Configuration: Initial Screen, choose Paying
company codes.
MG On the Payment Program Configuration: Paying company codes screen,
double-click on the appropriate company code.
In our example, we use 3000 (IDES US INC).
NG On the Payment Program Configuration: Paying company codes data
screen, choose Sender.
Customizing Financial Accounting for Print Forms KJL

OG On the Payment Program Configuration: Sender Details screen:
zG Enter ADRS in the Text ID field.
{G To specify standard text enter names in the Letter header, Footer
text, Signature, and Sender fields.
|G Save you changes.
If you use the CTS, specify a transport request after saving.
}G Choose Exit to return to the Payment Program Configuration: Initial
Screen.
PG Go Back to return to Display IMG screen.
QG To print specified standard text for footer text, signature, and sender,
make sure that the following control commands are used in the form:
To print the standard texts for footer text, signature, and sender, you must use
the following control commands in the form:
Footer:
,1/8'( 5(*8'7;7)8 2%-(7 7(;7 ,' $'56
Signature:
,1/8'( 5(*8'7;781 2%-(7 7(;7 ,' $'56
Sender:
,1/8'( 5(*8'7;7$% 2%-(7 7(;7 ,' $'56
Make sure that you use the correct text ID in the control commands.
TechTalk
KJM SAPscript Made Easy | Release 4.6
fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ
In the previous task, you might have specified standard text names
for letter header, footer text, signature, or sender. The following
example shows how you can create or change standard texts. In this
example, we use the text name Z_F_US01_HEADER and the text ID
ST.
mzŒ„
UHDWH RU FKDQJH VWDQGDUG WH[W
JG From the SAP standard menu, choose Tools → SAPscript → SO10 -
Standard text.
KG On the Standard Text: Request screen:
zG In the Text name field, enter a name of the standard text (for
example, Z_F_US01_HEADER).
{G In the Text ID field, enter a text ID (for example, ST).
|G If the standard text does not exist, choose Create.
}G If the standard text already exists, choose Change.
Customizing Financial Accounting for Print Forms KJN

LG On the Change Standard text: ... Language ... screen:
zG Enter the desired text.
{G Save the new or changed standard text.
|G Go Back to return to the Standard Text: Request screen.
The illustration above shows you some examples of text formatting
created with SAP-delivered paragraph and character formats.
MG Go Back to return to the SAP standard menu.
NG To print specified standard text for footer text, signature, and sender,
make sure, that the following control commands are used in the form:
To print the standard texts for footer text, signature, and sender, you must use
the following control commands in the form:
Footer:
INCLUDE REGUD-TXTFU OBJECT TEXT ID ADRS
Signature:
INCLUDE REGUD-TXTUN OBJECT TEXT ID ADRS
Sender:
INCLUDE REGUD-TXTAB OBJECT TEXT ID ADRS
Make sure that you use the correct text ID in the control commands.
TechTalk
KJO SAPscript Made Easy | Release 4.6
l‰~|‚’‚‡€ ~|„ i‹‚‡‚‡€ h‰‚ˆ‡Œ
In this section you will learn how to:
n Specify the number of test prints before a check run
n Specify multiple printers for:
• printing checks
• check run summary
To adjust your printer before a check run, specify the number of test
prints you want. You specify the number of test prints in the variant of
the print program (for example, program RFFOUS_C, variant Z1).
To adjust the variant of the print program to print the checks and a
summary of checks run on different printers, specify multiple
printers.
mzŒ„
UHDWH D YDULDQW RI WKH SULQW SURJUDP DQG VSHFLI WKH QXPEHU RI WHVW
SULQWV 6SHFLI PXOWLSOH SULQWHUV IRU SULQWLQJ FKHFNV DQG WKH FKHFN UXQ
VXPPDU
JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162).
KG Choose Financial Accounting → Accounts Receivable and Accounts
Payable → Business Transactions → Outgoing Payments → Automatic
Outgoing Payments → Payment Method/Bank Selection → Configure
payment program.
LG On the Payment Program Configuration: Initial Screen, choose Payment
methods/country.
MG On the Maintain Payment Program Configuration: Countries screen,
double-click on the appropriate country.
In this example double-click on U.S. (United States). If you can not find
the line U.S., scroll down the screen.
NG On the Maintain Payment Program Configuration: Country Pmnt Methods
– List screen, choose the appropriate payment method for checks.
In this example double-click on C (Checks).
Customizing Financial Accounting for Print Forms KJP

OG On the Maintain Payment Program Configuration: Country Pmnt Methods
– Details screen, choose Environment → Print prog. variants.
PG On the ABAP: Variants – Initial Screen:
zG Enter the name of your variant (for example, Z1) in the Variant
field.
{G If the variant already exist choose Change.
If the variant does not exist, choose Create.
KJQ SAPscript Made Easy | Release 4.6
QG On the Maintain Variants: Report RFFOUS_C, Variant Z1 screen:
zG Scroll down until you see the Print Control section.
{G In the Print control section, select the Print checks and Print payment
summary fields and enter different printer names in the
corresponding Printer fields.
|G Scroll down until you see the Output Control section.
}G In the Output control section, enter the number of desired test
prints in the Number of sample printouts field.
~G Save your changes.
If you use the CTS, specify a transport request after saving.
RG Choose Exit three times to return to the Payment Program
Configuration: Initial Screen.
JIG Go Back to return to the Display IMG screen.
3 $ 5 7 ) 2 8 5
Z‰‰~‡}‚‘~Œ
Sap script made easy
$ 3 3 ( 1 ' , ;
ZlZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ
h~‹‚~
The functionality of the SAPscript editor is determined by a number
of commands, which you can either choose from the menu or call with
function keys. These commands edit the text in the editor based on
your requirements, and commands are immediately executed.
In contrast, SAPscript recognizes another type of commands, the
control commands, which:
n Correspondingly influence the output formatting
n Are not interpreted by the SAPscript editor
n Only affect the SAPscript Composer
The Composer is a program that converts text from the editor display
into the print display. This program formats the line and pages where
symbols are replaced by their current values and text formatting is
based on the paragraph and the character style formats.
KKK SAPscript Made Easy | Release 4.6
h~‹‚~ ˆ lZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ
h~‹‚~ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ
Formatting options format variables and override the format
described in the Dictionary. Formatting options are always specified
within - variable brackets.
Table A–1 SAPscript control commands
SAPscript Commands Description
ADDRESS Formatting of addresses
BOTTOM, ENDBOTTOM Define footer text in a window
BOX, POSITION, SIZE Boxes, lines and shading
CASE, ENDCASE Case distinction
DEFINE Value assignment to text symbols
HEX, ENDHEX Hexadecimal values
IF, ENDIF Conditional text output
INCLUDE Include other texts
NEW-PAGE Explicit forms feed
NEW-WINDOW Next window MAIN
PERFORM, ENDPERFORM Calling ABAP Subroutines
PRINT-CONTROL Insert print control character
PROTECT, ENDPROTECT Protect from page break
RESET Initialize outline paragraphs
SET COUNTRY Country-specific formatting
SET DATE MASK Formatting of date fields
SET SIGN Position of +/- sign
SET TIME MASK Formatting of time fields
STYLE Change style
SUMMING Summing variables
TOP Set header text in window MAIN
SAPscript Control Commands KKL
Z
l’‡z‘ ˆ ˆ‡‹ˆ… ˆ††z‡}Œ
SAPscript control commands differ from normal text lines in the
following ways:
i ^}‚ˆ‹
n Control commands are highlighted gray.
n Control commands are inserted, changed or deleted using a dialog
window.
m~‘ ^}‚ˆ‹
n Control commands are indicated with the paragraph format /: in
the tag column.
Table A–2 SAPscript formatting options
Formatting Options Description
Changing the value of a counter Increasing or decreasing the value of a
counter
Country dependent formatting Specifying formats for country dependent
values
Date mask Formatting date fields
Exponent for floating point numbers Specifying an exponent for floating point
values
Fill characters Replacing leading spaces with fill characters
Ignoring conversion rules Ignoring conversion rules from Dictionary
Leading sign to the left Leading sign of numeric values is on the left
Leading sign to the right Leading sign of numeric values is on the right
Number of decimals Specifying the number of decimal places
Offset Specifying an offset of n characters
Omitting leading zeros Omitting the leading zeros
Omitting the leading sign Omitting the leading sign of numeric values
Omitting the separator for
‘Thousands’
Omitting the separator for “Thousands” in
numeric values
KKM SAPscript Made Easy | Release 4.6
n Control commands are entered, changed, or deleted in the
SAPscript editor in the same way as other text lines.
i ^}‚ˆ‹ z‡} m~‘ ^}‚ˆ‹
n All key words and specifications, not defined in quotes as literal,
are automatically converted to upper case.
n Enter the complete control command and the necessary
parameters on one line.
n Enter only one control command per line.
n Editor formatting does not affect lines with control commands.
If the control command is unknown or syntactically incorrect, the
command line is treated as a comment line, and is not interpreted or
printed.
gˆ~
All examples in appendix A show the syntax for the Text Editor. The syntax for the PC
Editor is identically except the paragraph format /: in the tag column, because the PC
Editor does not use a tag column anymore.
Z]]k^ll§^g]Z]]k^llS _ˆ‹†z‚‡€ ˆ Z}}‹~ŒŒ~Œ
The command formats an address according to the postal standards of
the destination country defined in the parameter COUNTRY. The
reference fields are described in the structure ADRS. Both constants
and symbols can be assigned to the parameters.
If a parameter of a control command is written in square brackets ( [ ] ) on the
following pages, then this parameter is optional for the command.
Some of the control commands are global settings, which are valid until they are
explicitly switched off. Therefore, it is important to know that, on a page, the
MAIN window is always processed first. For example, if you want to set the date
format with the control command SET DATE FORMAT and this format must be
valid for the entire form, then specify this command at the top of MAIN.
Tips  Tricks
TechTalk
SAPscript Control Commands KKN
Z
l’‡z‘
 $''5(66 '(/,9(5@ 3$5$*5$3+ D@ 35,25,7 S@ /,1(6 O@
 7,7/( title
 1$0( name1,name2,name3,name4@@@
 675((7 street
 32%2; PO box 2'( zip code@
 32672'( zip code
 ,7 town1,town2@
 5(*,21 region
 28175 country
 )52028175 from country
 (1'$''5(66
Both formatting data and address data are parameters. Address data
is formatted for output based on the COUNTRY, PRIORITY and
LINES parameters. As the default, the P.O. Box is used, if it is
available, rather than the street address.
n DELIVERY defines the street address.
If this parameter is selected, the system prints the street address
on the layout output instead of the P.O. Box.
n PARAGRAPH defines in which paragraph format the address is
output.
If the parameter is not defined, the address is output in the default
paragraph format.
n PRIORITY defines which address lines can be omitted if there is
not enough space on the output.
You can enter a combination of the following values:
Table A–3 PRIORITY parameter values
Value Description
A form of address
P mandatory blank line 1
Q mandatory blank line 2
2 name 2
3 name 3
4 name 4
L country name
S line for the street
O line for the city
KKO SAPscript Made Easy | Release 4.6
n LINES define how many lines are available to format the address.
If the address data cannot be completely formatted due to an
insufficient number of lines, the data entered in the parameter
PRIORITY is omitted. If the LINES specification is missing and this
command is in a form window whose type is not MAIN, the lines
available for the address layout are automatically calculated with
the current output line item and window size.
n TITLE is a required form of address.
n NAME means that up to four separate names, separated by
commas, can be defined.
n STREET means the street specification, including address number.
n POBOX is the Post Office box number.
n CODE is the P.O. box, postal, or zip code, if this code is different
from the postal code of the city.
n POSTCODE is city’s postal, or zip, code.
n CITY means that up to two place names can be defined.
n REGION determines the administrative area.
n COUNTRY specifies the country based on specific postal
standards and the address format.
n FROMCOUNTRY defines in which language the destination
country’s name is formatted. In EEC countries, only the
international country identification letter is placed, with a hyphen,
before the postal code.
^‘z†‰…~
 $''5(66
 7,7/( ¶RPSDQ·
 1$0( ¶:LGJHW 7HFKQRORJ ,QF· ¶$OO .LQGV RI :LGJHWV·
 675((7 ¶ /LGR /DQH·
 32%2; ¶· 2'( ¶·
 32672'( ¶·
 ,7 ¶)RVWHU LW·
 5(*,21 ¶$·
 28175 ¶86$·
 )52028175 ¶86$·
 (1'$''5(66
SAPscript Control Commands KKP
Z
This list generates the following address:
Company
Widget Technology, Inc.
All Kinds of Widgets
PO box 2935
Foster City, CA 94400
If the DELIVERY supplement is specified for the ADDRESS command, then the
street, not the P.O. Box, is entered.
Company
Widget Technology, Inc.
All Kinds of Widgets
1005 Lido Lane
Foster City, CA 94404
[hmmhfS ]~‚‡~ _ˆˆ~‹ m~‘ ‚‡ z p‚‡}ˆ
For MAIN, determine the lines, also known as footer texts, which are
always automatically output at the bottom of that window.
l’‡z‘
 %27720


 (1'%27720
The text lines between the two commands are output at the bottom of MAIN.
^‘z†‰…~
To switch a footer text off, enter the command pair BOTTOM.. ENDBOTTOM with no
text lines in between:
 %27720
 (1'%27720
Footer text no longer appears at the bottom of the page from and including this page.
SAPscript calls the ADDRESS_INTO_PRINTFORM function module to format
the address. If the display is not in the required form, check the settings that are
valid for this function module (see the documentation on the function module).TechTalk
If there is sufficient space in the window, a footer text is output on the current
page.
Only use footer texts in texts that are not printed with application programs, such
as dunning texts, ordering texts. These application programs also work with
footer texts with the form interface, which can lead to unwanted results.
TechTalk
KKQ SAPscript Made Easy | Release 4.6
[hqE ihlbmbhgE lbs^S [ˆ‘~ŒE e‚‡~ŒE lz}‚‡€
The BOX, POSITION and SIZE commands draw boxes, lines, and
shadows. Within any particular form, these commands specify
window or passage of window text can be output in a frame or with
shadowing. The SAP printer drivers based on page-oriented printers
(the HP LaserJet PCL-5 driver HPLJ4, the Postscript driver POST, the
Kyocera Prescribe driver PRES) use these commands when creating
output. Line printers and nonsupported page-oriented printers ignore
these commands. The resulting output may be viewed in the
SAPscript print previewer.
[hq
l’‡z‘
 %2; ;326@ 326@ :,'7+@ +(,*+7@ )5$0(@ ,17(16,7@
This command draws a box of the specified size at the specified
position. For each parameter (XPOS, YPOS, WIDTH, HEIGHT, and
FRAME), both a measurement and a unit of measure must be
specified. The INTENSITY parameter should be entered as a
percentage between 0 and 100.
n XPOS, YPOS specify the upper left corner of the box, relative to
POSITION command values.
Default is the values specified in the POSITION command.
The following calculation is performed internally to determine the
absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
n WIDTH determines the width of the box.
Default: WIDTH value of the SIZE command
n HEIGHT determines height of the box.
Default: HEIGHT value of the SIZE command
n FRAME determines the thickness of frame.
Default: 0 (no frame)
n INTENSITY determines the box contents as a grayscale percentage.
Default: 100 (full black)
When determining the measurements, use decimal numbers to
specify literal values (like ABAP numeric constants) and enclose these
values in inverted commas. Use a period for the decimal point
character. See also the examples listed below.
Use the following units of measure:
n TW (twip)
n PT (point)
SAPscript Control Commands KKR
Z
n IN (inch)
n MM (millimeter)
n CM (centimeter)
n LN (line)
n CH (character)
The following conversion factors apply:
n 1 TW = 1/20 PT
n 1 PT = 1/72 IN
n 1 IN = 2.54 CM
n 1 CM = 10 MM
n 1 CH = height of a character relative to the CPI specification in the
form header
n 1 LN = height of a line relative to the LPI specification in the form
header
^‘z†‰…~
 %2; )5$0(  7:
The above command draws a frame around the current window with a thickness of 10
TW (= 0.5 PT).
 %2; ,17(16,7 
The above command fills the window background with shadowing having a gray scale
of 10 %.
 %2; +(,*+7  7: )5$0(  7:
The above command draws a horizontal line across the complete top edge of the
window.
 %2; :,'7+  7: )5$0(  7:
The above command draws a vertical line along the complete height of the left hand
edge of the window.
 %2; :,'7+ 

 0 +(,*+7  0 )5$0(  7: ,17(16,7 
 %2; :,'7+ 

 0 +(,*+7 

 0 )5$0(  7:
 %2; ;326 

 0 :,'7+  7: +(,*+7 

 0 )5$0(  7:
 %2; ;326 

 0 :,'7+  7: +(,*+7 

 0 )5$0(  7:
The above commands draw two rectangles and two lines to construct a table of three
columns with a highlighted heading.
KLI SAPscript Made Easy | Release 4.6
ihlbmbhg
l’‡z‘
 326,7,21 ;25,*,1@ 25,*,1@ :,1'2:@ 3$*(@
This command sets the origin for the coordinate system used by the
XPOS and YPOS parameters of the BOX command. When a window
is first started, the POSITION value is set to refer to the upper left
corner of the window (default setting). If a parameter value does not
have a leading sign, then its value is interpreted as an absolute value,
which is a value that specifies an offset from the upper-left corner of
the output page. If a parameter value is specified with a leading sign,
then the new value of the parameter is calculated relative to the old
value. If a parameter specification is missing, then this parameter is
unchanged.
n XORIGIN, YORIGIN is the origin of the coordinate system.
n WINDOW sets the values for the left and upper edges to be the
same of those of the current window (default setting).
n PAGE sets the values for the left and upper edges to be the same as
the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
^‘z†‰…~
 326,7,21 :,1'2:
The above command sets the origin for the coordinate system to the upper-left corner
of the window.
 326,7,21 ;25,*,1  0 25,*,1 
 0

The above command sets the origin for the coordinate system to a point 2 cm from
the left edge and 2.5 cm from the upper edge of the output page.
 326,7,21 ;25,*,1 

 0 25,*,1  0
The above command shifts the origin for the coordinates 1.5 cm to the left and 1 cm
up.
lbs^
l’‡z‘
 6,=( :,'7+@ +(,*+7@ :,1'2:@ 3$*(@
This command sets the values of the WIDTH and HEIGHT parameters
used in the BOX command. When a window is first started, the SIZE
value is set to the same values as the window (default setting). If one
of the parameter specifications is missing, then no change is made to
its current value. If a parameter value does not have a leading sign,
SAPscript Control Commands KLJ
Z
then its value is interpreted as an absolute value. If a parameter value
is specified with a leading sign, then the new value of the parameter is
calculated relative to the old value.
n WIDTH, HEIGHT sets the dimensions of the rectangle or line.
n WINDOW sets the values for the width and height relative to the
values of the current window (default setting).
n PAGE sets the values for the width and height to the values of the
current output page.
^‘z†‰…~
 6,=( :,1'2:
The above command sets WIDTH and HEIGHT to the current window dimensions.
 6,=( :,'7+ 

 0 +(,*+7 

 0
The above command sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
 326,7,21 :,1'2:
 326,7,21 ;25,*,1  7: 25,*,1  7:
 6,=( :,'7+  7: +(,*+7  7:
 %2; )5$0(  7:
With the above commands, a frame is added to the current window. The frame edges
extend beyond the window itself, to avoid obscuring the leading and trailing text
characters.
Zl^S zŒ~ ]‚Œ‚‡|‚ˆ‡
The CASE command is a special case of multi-level case distinction
with IF commands. As a condition for the different cases, only one
symbol can be queried for equality with different values.
l’‡z‘
 $6( symbol
 :+(1 value1

 :+(1 value2

 :+(1 value n

 :+(1 27+(56

 (1'$6(
The symbol entered in the CASE line is formatted. If it has a value
specified in the individual WHEN lines, the text following the valid
WHEN line is output. If none of the listed values apply, the lines
KLK SAPscript Made Easy | Release 4.6
between the WHEN OTHERS line and ENDCASE are output. The
WHEN OTHERS case is optional. Comparison is always carried out as
a literal comparison as for the IF command.
]^_bg^S oz…Ž~ ZŒŒ‚€‡†~‡ ˆ m~‘ l’†{ˆ…Œ
Text symbols receive their value through an explicit assignment. This
assignment can be made interactively in the editor by choosing
Include → Symbols → Text. This step lists all the text symbols of a
text module and those of the allocated form. If the transaction is
exited, the contents defined in this way are lost. To continue
printing the text module, you would have to enter the symbol
values again.
The DEFINE command allows you to anchor this value assignment in
the text and to have it available when you next call up the text.
Furthermore, you can allocate another value to a text symbol in the
course of the text.
l’‡z‘
 '(),1( symbolname ¶value·
^‘z†‰…~
 '(),1( UH ¶RXU FRUUHVSRQGHQFH RI ·
 '(),1( VPERO ¶[[[[[[[·
 '(),1( VPERO ¶ VPERO ·
 '(),1( VPERO ¶]]]]]]]·
k~ŒŽ…S
symbol2 → yyyzzzzzzz
The assigned value may have a maximum of 60 characters, but it can
also contain more symbols. When a symbol is defined using DEFINE,
symbols which occur in the value are not immediately replaced by
their value. They are replaced only when the target symbol is
output.
If operator := is used in DEFINE, the symbols that occur in the
value to be assigned are immediately replaced by their current
values. The resulting character string is only then assigned to the
target symbol when all occurring symbols have been replaced. The
length of the value is limited to 80 characters, and the target
symbol must be a text symbol.
ENDCASE must end a CASE command, but the WHEN OTHERS command is
optional.
TechTalk
SAPscript Control Commands KLL
Z
l’‡z‘
 '(),1( symbolname  ¶value·
a^qS a~‘z}~|‚†z… ]zz
This command sends printer commands in a printer language directly
to a printer that supports that language. SAPscript does not interpret
the data enclosed by the HEX and ENDHEX command pair, but
inserts unchanged data into the output stream. This technique
allows objects with a pixel-oriented format to be printed as part of
a SAPscript text. The HEX and ENDHEX command pair enclose
the printer commands and data as hexadecimal text, so that the
printer formatting routines interpret each successive pair of
characters as a single hexadecimal value in the 0..255 range.
The characters 0..9 and A..F to represent the values 10..15 are valid
hexadecimal characters. The text may also include comment lines
(these begin with /* in the format column), which will not be
interpreted as hexadecimal data but are simply passed over by the
formatting routines.
l’‡z‘
 +(; 73( printer_language@


 (1'+(;
HEX denotes the start of the hexadecimal data. Subsequent text lines
are interpreted as described above. If the TYPE parameter is present,
the data will be sent to the printer only if the printer understands the
specified printer language. The following printer languages are
currently supported:
n POST (Postscript)
n PRES (Kyocera Prescribe)
n PCL (HP Printer Control Language)
 +(; 73( printer_language@ ;326 x_position@ 326
y_position@
Before the hexadecimal data is output, the output cursor is set to the
absolute position indicated by the specified X and Y position
parameters. If either the X or the Y position is not specified, then 0 will
be assumed for this parameter.
 +(; 73( printer_language@ +(,*+7 height@ /()7
left_indentation@
KLM SAPscript Made Easy | Release 4.6
The HEIGHT parameter determines the amount of space to be
reserved on the page for the output of the hexadecimal data. Any
text after ENDHEX will be output below this point. If the LEFT
parameter is also specified, then the output of the hexadecimal
data will be indented from the left margin by the specified amount.
^‘z†‰…~

 UHDWRU UHSRUW =4917( GDWH  WLPH  XVHU
6$365,37

%$%$%$%$'%$))))))
))))))

))%$))))))))))))''))'

 (1'+(;
This data will be printed only by an HP PCL printer (7.5 cm of space will allocated on
the page for the output of the data and the output cursor will be indented 2.25 cm to
the right of the form window edge).
b_S ˆ‡}‚‚ˆ‡z… m~‘ hŽ‰Ž
With the IF control command, define those lines that are output under
certain conditions. If the logical expression entered for the IF
command is fulfilled, the lines parenthesized by IF ... ENDIF are
output. If this expression is not enclosed in parentheses, the
commands are ignored.
l’‡z‘
 ,) Condition


 (1',)
The RSTXLDMC program uploads correctly formatted pixel data to the R/3
System and prepares it as a HEX-ENDHEX control command. This data can be
saved then as normal SAPscript text.TechTalk
SAPscript Control Commands KLN
Z
In the condition, the following relational operators are possible:
As logical link operators use OR, NOT, or AND.
The sequence of processing the logical operations and the sequence of
processing the conditions is always from left to right. There is no
order of binding, and bracketing is not allowed.
Comparison is always carried out as a literal comparison, that is,
symbols are compared in their formatted form as a character string
and not with their internal representation. This comparison must be
taken into account for program symbols whose format depends on
different parameters. Examples include currency fields that are output
with different number of places after the decimal point depending on
the currency key, or that use a comma or a period as the decimal
separator depending on the setting.
The IF command can be extended to make a two-sided case
distinction with the ELSE command. If the specified IF condition is
true, then the lines listed between IF and ELSE are formatted,
otherwise the lines between ELSE and ENDIF are formatted.
l’‡z‘
 ,) Condition

 (/6(

 (1',)
A multilevel case distinction is possible using the ELSEIF command.
l’‡z‘
 ,) Condition

 (/6(,) Condition

 (/6(

 (1',)
You can use as many ELSEIF commands as required. The
specification of an ELSE command is optional in this case.
Table A–4 Relational operators overview
Relational Operator Description
= or EQ equals
 or LT less than
 or GT greater than
= or LE less than or equal to
= or GE greater than or equal to
KLO SAPscript Made Easy | Release 4.6
bgen]^S b‡|…Ž}~ h~‹ m~‘Œ
Use INCLUDE to include the contents of another text into your
text. The text to be included exists separately from yours and is
only copied at the time of the output formatting. With INCLUDE,
since the text is only read and inserted during the output
formatting, the most current version of the required text is always
available.
l’‡z‘
 ,1/8'( name 2%-(7 o@ ,' i@ /$1*8$*( l@ 3$5$*5$3+ p@
1(:3$5$*5$3+ np@
The name of the text to be inserted must be specified and can have up
to 70 characters. If the text name contains blanks, put it in quotes as a
literal. It can also be specified with a symbol. All further parameters of
INCLUDE are optional. If these parameters are missing, SAPscript
uses default values based on the respective call environment for them.
^‘z†‰…~
 ,1/8'( 07(;7
The text MYTEXT is included in the language of the calling text.
 ,1/8'( 07(;7 /$1*8$*( ¶(· 3$5$*5$3+ ¶$·
The text with the name MYTEXT and the language E is included, regardless of the
language in which the calling text is created. The paragraph format A1 is valid as the
standard paragraph for this call.
The condition must not extend over several lines, and must be contained in one
line with the IF or ELSEIF command.
IF commands can also be nested.
An IF command must always end with ENDIF. If this command is forgotten, and
if the condition is not true, nothing more is output after the IF command.
If a syntax error is found when interpreting these commands, the corresponding
command is not executed. This can have various effects on the following text
output. If, for example, the IF statement is incorrectly structured, since IF is
missing, the following ELSEIF or ELSE commands are ignored. All lines are
output.
TechTalk
SAPscript Control Commands KLP
Z
h‰‚ˆ‡z… l‰~|‚‚|z‚ˆ‡Œ
n LANGUAGE
If a language is unspecified, the calling text’s language or the form
is set for the text to be included. If a language is specified, the text
is always loaded in this language, regardless of the language of
the calling text.
n PARAGRAPH
The text to be included is formatted with its style allocation. With
this parameter, the standard paragraph of this style can be
redefined for the current call. All * paragraphs of the inserted text
are formatted with the paragraph specified here.
n NEW-PARAGRAPH
The first line of the included text has this format flag, provided it
is not a command or comment line. If the optional entry
PARAGRAPH (see above) is empty, all * paragraphs of the
included text are formatted with the paragraph np specified with
NEW-PARAGRAPH.
n OBJECT
To completely specify a text, create additional specifications about
the text object. There are different rules and restrictions for this
specification that depends on the calling text’s object type. All
texts can be included in a form. If no object is entered here, TEXT
is used (standard texts). With a documentation text (object
DOKU), you can only include documentation texts. This object is
assumed even if no object is specified in this environment.
Only hypertext or documentation text can be included into a
hypertext (object DSYS). If the OBJECT specification is missing,
DSYS is set as a default value.
Only standard text (object TEXT), documentation text or
hypertext can be included in any other type of text. The default
object is TEXT if nothing is entered.
n ID
The text ID allows further text types within an object, is a further
part of the text key. If the ID is not entered, the default Include ID
from table TTXID is used to call text. If the specification is not in
this table, the text ID of the calling text is used.
KLQ SAPscript Made Easy | Release 4.6
The ID and the object are now the basis of a further consistency check:
n All text IDs are allowed for a form.
n Only documentation texts with the text IDs TX (general texts), UO
(authorization objects), and documentation texts (with the same
text ID as the calling documentation text) may be included in
documentation texts.
n All DSYS texts may be included in DSYS texts, regardless of their
ID. Documentation texts that will be inserted may only have IDs
TX and UO.
n Standard texts with the allowed text IDs, DSYS texts with IDs, and
documentation texts with IDs TX and UO may be included in the
text types.
g^pFiZ`^S ^‘‰…‚|‚ _ˆ‹† _~~}
SAPscript automatically inserts a page break if MAIN of one page is
filled. Using NEW-PAGE, a page break can be forced at any point.
The text after this command is written on a new page. The form
feed is independent of any conditions. The command now outputs
the current page.
If you have entered NEW-PAGE without additional parameters, the
page defined in the form as the next page is accessed. If, however,
there are various pages in your form, you can jump to any
particular next page by specifying the page name.
l’‡z‘
 1(:3$*( page name@
^‘z†‰…~
 1(:3$*(
The current page is completed and the text in the following lines is written on the next
page as determined in the form.
 1(:3$*( 6
Same as before, but S1 is accessed as the next page.
If an explicitly specified page for NEW-PAGE is not in the form, this page
specification is ignored. Make sure that there are no blank lines immediately
before a NEW-PAGE command. If an implicit form feed was carried out within
these blank lines, this step could lead to an unwanted empty page being printed.
Caution
SAPscript Control Commands KLR
Z
g^pFpbg]hpS g~‘ p‚‡}ˆ fZbg
You can have up to 99 MAIN windows on one page. These windows
are distinguished by a serial number (0..98) and assigned in this
order. So, with SAPscript, it is possible to print labels or to output
text in multiple columns. If one MAIN window is filled, then the
next MAIN window on the page is automatically accessed. A page
break is inserted at the end of the final MAIN window.
Using NEW-WINDOW, even if the current window is not
completely filled, you can explicitly call the next window MAIN. If
you are currently in the last MAIN window of the page, the
command works as a NEW-PAGE.
l’‡z‘
 1(::,1'2:
i^k_hkfS z……‚‡€ Z[Zi lŽ{‹ˆŽ‚‡~Œ
You can use the PERFORM command to call an ABAP subroutine
(form) from any program, subject to the normal ABAP runtime
authorization checking. You can use such calls to subroutines for
carrying out calculations, for obtaining data from the database that
is needed at display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed when
a document is formatted for display or printing. Communication
between a subroutine that you call and the document is by way of
symbols whose values are set in the subroutine.
l’‡z‘
,Q D IRUP ZLQGRZ
 3(5)250 IRUP! ,1 352*5$0 SURJ!
 86,1* ,19$5
 86,1* ,19$5

 +$1*,1* 2879$5
 +$1*,1* 2879$5

 (1'3(5)250
INVAR1 and INVAR2 are variable symbols and may be any of the four
SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be
character strings.
KMI SAPscript Made Easy | Release 4.6
The ABAP subroutine called via the command line stated above must
be defined in the ABAP report prog as follows:
)250 IRUP! 7$%/(6 ,1B7$% 6758785( ,76
287B7$% 6758785( ,76

(1')250
The values of the SAPscript symbols passed with  86,1* are
now stored in the internal table IN_TAB . Note that the system passes
the values as character string to the subroutine, since the field Feld
VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR
80). See the example below on how to access the variables.
The internal table OUT_TAB contains names and values of the
CHANGING parameters in the PERFORM statement. These
parameters are local text symbols, that is, character fields. See the
example below on how to return the variables within the
subroutine.
^‘z†‰…~
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.
]~‚‡‚‚ˆ‡ ‚‡ ~ lZiŒ|‹‚‰ ˆ‹†S
 3(5)250 *(7B%$52'( ,1 352*5$0 4-3(5)2
 86,1* 3$*(
 86,1* 1(;73$*(
 +$1*,1* %$52'(
 (1'3(5)250

 %$52'(
ˆ}‚‡€ ˆ ~ |z……‚‡€ Z[Zi ‰‹ˆ€‹z†S
5(3257 4-3(5)2
)250 *(7B%$52'( 7$%/(6 ,1B3$5 678785( ,76
287B3$5 6758785( ,76
ikbgmFhgmkheS b‡Œ~‹ i‹‚‡ ˆ‡‹ˆ… z‹z|~‹
This command allows you call certain printer functions from
SAPscript text. The control characters for the printer cannot be
directly entered into your text. First, with the spool transaction SPAD,
define a print control that contains the required printer commands.
This print control can now be called with the SAPscript command
PRINT-CONTROL.
l’‡z‘
 35,1721752/ name
SAPscript Control Commands KMJ
Z
The name of the required print control can be entered with or without
quotes.
After performing PRINT-CONTROL, SAPscript inserts a blank at the
start of the following line. If this is not required, this line must have
the paragraph format “=.”
ikhm^mS i‹ˆ~| ‹ˆ† iz€~ [‹~z„
You can determine whether a paragraph should or should not be
separated by a page break in the style or form. If the attribute page
protection is set, then all the lines of this paragraph are always output
together on one page. This attribute is linked to the respective
paragraph.
It is not beneficial to provide all paragraphs with a page protection
attribute to neutralize unwanted page breaks. This event is too
dynamic and only results from the current text. Furthermore, you may
also want to protect only parts of a paragraph from a page break.
In principle, this problem could be solved with NEW-PAGE by
explicitly starting a new page before the affected parts of the text.
However, it is complicated to change this procedure. Using NEW-
PAGE, if your text is formatted to have no unwanted page breaks,
and new lines are inserted and existing ones are deleted, the NEW-
PAGE commands inserted after this point will have to be checked
and can result in the movement of page breaks.
With the command pair PROTECT .. ENDPROTECT, SAPscript
offers the option to individually define protection from a page
break. If you parenthesize text with these commands, SAPscript
automatically guarantees that all of its lines are printed on one
page. If the lines fit on the current output page, they are output
there, as if PROTECT was not used. If, however, the space is not
sufficient, PROTECT works like a NEW-PAGE and generates a
form feed.
SAPscript has no idea of what is contained in the print control. It cannot check
whether the printer commands hidden behind it are functional. If problems result
when printing such a text, first print the text without the print controls, and then
activate each PRINT-CONTROL command to help you locate the error more
easily.
On completion, make sure that the defined print control sequences restore the
printer to a defined status. When printing subsequent texts, SAPscript assumes
that certain settings are still valid (type font, current page). If these settings are
changed by the called printer commands, this change can have unwanted
effects.
Caution
KMK SAPscript Made Easy | Release 4.6
So, you can view PROTECT/ENDPROTECT are conditional NEW-
PAGE commands, that determine whether the included lines fit
into the current window MAIN or not.
l’‡z‘
 3527(7


 (1'3527(7
The lines to be protected lie between the two commands.
k^l^mS b‡‚‚z…‚“~ hŽ…‚‡~ iz‹z€‹z‰Œ
The RESET command resets the numbering of an outline
paragraph to its initial value. If the user does not use RESET, all the
outline paragraphs of a text are sequentially numbered. If the
name of an outline paragraph is entered in RESET, the numbering
of this paragraph, is initialized with subordinate outline levels.
l’‡z‘
 5(6(7 paragraph format
The paragraph format specifies the outline paragraph to be initialized.
^‘z†‰…~
Assume that paragraph N1 is defined in the style you are using. This paragraph
should be used for listings and each time it generates an output of a list number. This
is the SAPscript editor:
$6 ,I RX ZDQW WR ZRUN ZLWK WKH 6$3 5 6VWHP SURFHHG DV
IROORZV
1 0DNH VXUH WKDW RX KDYH D 3
1 6ZLWFK RQ WKH 3
An ENDPROTECT command without a preceding PROTECT command is
ineffective.
If the last ENDPROTECT is missing, it is implicitly assumed at the end of the
text.
PROTECT .. ENDPROTECT commands cannot be nested. If a second
PROTECT command is recognized while another is active, the second is
ignored.
If the text between PROTECT and ENDPROTECT is so extensive that it would
not fit on an empty page, then only one form feed is generated and the text is
normally output. Thus, in this case, the section to be protected is separated by a
page break.
TechTalk
SAPscript Control Commands KML
Z
1 OLFN RQ WKH 6$3 LFRQ
$6 7KH 6$3 ORJRQ VFUHHQ DSSHDUV 7R ORJ RQ RX PXVW FDUU
RXW WKH IROORZLQJ VWHSV
 5(6(7 1
1 (QWHU RXU XVHU ,'
1 (QWHU RXU SDVVZRUG
1 KRRVH WKH DSSOLFDWLRQ RX UHTXLUH
k~ŒŽ…S
If you want to work with the SAP R/3 System, proceed as follows:
1. Make sure that you have a PC
2. Switch on the PC
3. Click on the SAP icon.
The SAP logon screen appears. To log on, you must carry out the
following steps:
1. Enter your user ID
2. Enter your password
3. Choose the application you require.
If the RESET command between the two lines in the previous example
is missing, then both of the listings would be sequentially numbered:
k~ŒŽ…S
If you want to work with the SAP R/3 System, proceed as follows:
1. Make sure that you have a PC
2. Switch on the PC
3. Click on the SAP icon.
The SAP logon screen appears. To log on, you must carry out the
following steps:
4. Enter your user ID
5. Enter your password
6. Choose the application you require.
KMM SAPscript Made Easy | Release 4.6
l^m hngmkrS ˆŽ‡‹’Fl‰~|‚‚| _ˆ‹†z‚‡€
Some field types are formatted to be country-specific. This includes
the display of a date, the decimal point, or the thousands separator.
Normally, the display types defined in the user master record are used
here. With the control command SET COUNTRY, a format
alternative to that in the user master record can be chosen, which is
stored country-specifically in table T005X.
l’‡z‘
 6(7 28175 Country key
This country key can be entered either directly in quotes or with a
symbol.
^‘z†‰…~
 6(7 28175 ¶$1·
 6(7 28175 Country key
By entering an empty country name, you can return to the values set in the user
master record.
 6(7 28175 ¶ ¶
The corresponding ABAP command is called internally by SAPscript.
l^m ]Zm^ fZldS _ˆ‹†z‚‡€ ˆ ]z~ _‚~…}Œ
Formatting date fields can be defined with the SAPscript command
SET DATE MASK. After executing this command, all the date fields
are output with this display.
l’‡z‘
 6(7 '$7( 0$6. ¶date mask·
If the required formats are incorrect, check the settings in table T005X.
Tips  Tricks
SAPscript Control Commands KMN
Z
In the date mask, the following edit formats can be used:
All other characters in the mask are interpreted as text and copied
correspondingly.
^‘z†‰…~
Assume that the current system date is March 1, 2000.
 6(7 '$7( 0$6. ¶:DOOGRUI ''00·
'$7(
k~ŒŽ…S
Walldorf, 01.03.00
 6(7 '$7( 0$6. ¶'' 0000 ·
'$7(
k~ŒŽ…S
01 March 2000
^‘z†‰…~
By specifying an empty string as the date mask, you can switch back to the default
display:
 6(7 '$7( 0$6. ¶ ¶
Table A–5 Date mask: Edit formats
Edit format Description
DD Day (two-digit)
DDD Day name abbreviated
DDDD Day name in full
MM Month (two-digit)
MMM Month name abbreviated
MMMM Month name in full
YY Year (two-digit)
YYYY Year (four-digit)
KMO SAPscript Made Easy | Release 4.6
gˆ~
The texts for the month and day names, shortened or in full, are stored language-
dependently in table TTDTG under the following arguments:
l^m lb`gS m~ iˆŒ‚‚ˆ‡ ˆ DHF
For commercial applications, it is common for the “+/-“ signs to be
displayed to the right of the number value. In certain cases, however,
it is necessary for these signs to be displayed to the left of the number
value. This position can be determined with the control command
SET SIGN. All program symbols formatted using this command
and that have a “+/-“ sign are displayed in the required fashion.
l’‡z‘
 6(7 6,*1 /()7
The +/- sign is displayed to the left of the number.
 6(7 6,*1 5,*+7
The +/- sign is displayed to the right of the number.
l^m mbf^ fZldS _ˆ‹†z‚‡€ ˆ m‚†~ _‚~…}Œ
With the SAPscript command SET TIME MASK time fields can be
alternatively formatted to the standard display.
l’‡z‘
 6(7 7,0( 0$6. ¶time mask·
The following edit formats can be used in the time mask:
n HH = hours (two-digit)
Table A–6 Table TTDTG: Date mask arguments
Argument Description
%%SAPSCRIPT_DDD_dd abbreviated day name
dd = day number (01 = Monday … 07 =
Sunday)
%%SAPSCRIPT_DDDD_dd full day name
%%SAPSCRIPT_MMM_mm abbreviated month name
mm = month number (01 = January …
12 = December)
%%SAPSCRIPT_MMMM_mm full month name
SAPscript Control Commands KMP
Z
n MM = minutes (two-digit)
n SS = seconds (two-digit)
All other characters in the mask are interpreted as text and printed
correspondingly.
^‘z†‰…~
Assume that the current time is 10:08:12.
 6(7 7,0( 0$6. ¶++00·
7,0(
k~ŒŽ…S
10:08
 6(7 7,0( 0$6. ¶++ KRXUV 00 PLQXWHV·
7,0(
k~ŒŽ…S
10 hours 08 minutes
By specifying an empty string as a time mask, you can switch back to the default
display:
 6(7 7,0( 0$6. ¶ ¶
lmre^S z‡€~ l’…~
The control command STYLE changes style within a text. This other
style is used until a new STYLE command is entered. If * is entered
as a style name, switch back to the original style.
l’‡z‘
 67/( style
 67/( 
If another text module is inserted by choosing Include → Text and
immediately deleted, STYLE is automatically set in the editor. The
same occurs if the text contents included in INCLUDE are copied
into the text by choosing Edit → Selected area → Delete INCLUDE.
lnffbg`
Program symbols can be added with the SUMMING command. The
command needs to be defined only once. Each time that the
specified symbol is edited, its current value is added to the sum
field. Several program symbols can also be added in a sum field.
KMQ SAPscript Made Easy | Release 4.6
l’‡z‘
6800,1* program symbol ,172 sum symbol
Since SAPscript can not dynamically define sum fields, the sum
symbol must be in a calling program structure that was declared with
TABLES.
mhiS l~ a~z}~‹ m~‘ ‚‡ fZbg
In MAIN, lines that are always automatically output at the top of
the window, called header texts, can be determined. Header texts
can automatically repeat the table heading at the top of every page
for an extensive tabular list.
l’‡z‘
 723


 (1'723
Those text lines between the two commands will be output at the top
of MAIN.
To switch a header text off, enter the command pair TOP .. ENDTOP,
with no lines in between:
 723
 (1'723
Header text will not appear on subsequent pages.
If the document window contains text, then the header text is effective from the
next page.
The same applies to deleting a header text. That is, a header text that has
already been output can no longer be canceled on the current page.
Only use header texts in texts that are not printed with application programs,
such as dunning texts and ordering texts. These application programs can also
work with header texts in the form interface, which can lead to unwanted results.
Tips  Tricks
SAPscript Control Commands KMR
Z
l’‡z‘ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ
z‡€‚‡€ ~ oz…Ž~ ˆ z ˆŽ‡~‹
You can increase or decrease the value of SAPSCRIPT-COUNTER_x
(x=0.. 9) counter variable by 1, before the current counter value is
printed.
l’‡z‘
6$365,372817(5B[
,QFUHDVHV E  WKH FRQWHQWV
RI WKH FRXQWHU YDULDEOH [
[
6$365,372817(5B[
'HFUHDVHV E  WKH FRQWHQWV
RI WKH FRXQWHU YDULDEOH [
[
If you want to change the value of a counter variable without actually
printing the new value, use this formatting option together with an
additional option to set the output length to 0 (see above). If you want
to set a counter variable to some specific value, use the DEFINE
control command.
^‘z†‰…~
Assume that SAPSCRIPT-COUNTER_1 initially has the value 2.
6$365,372817(5B ! 
6$365,372817(5B
! 
6$365,372817(5B
! 
6$365,372817(5B
! 
6$365,372817(5B
!
6$365,372817(5B
! 
ˆŽ‡‹’ ]~‰~‡}~‡ _ˆ‹†z‚‡€
Certain fields are formatted specific to a particular country. These
include fields for displaying a date and numeric fields containing
either a decimal point or a ‘thousands’ separator character. The
formatting applied is usually determined by the definitions contained
in the user master record. You can use the SET COUNTRY control
command to choose a different formatting operation. The various
country-dependent formatting options are stored in table T005X.
l’‡z‘
 6(7 28175 country_key
You can specify this country key either by quoting it directly enclosed
in inverted commas or by using a symbol.
 6(7 28175 
$1

 6(7 28175 .1$/$1'
KNI SAPscript Made Easy | Release 4.6
You can revert to the settings of the user master record by using the
SET COUNTRY control command again with an empty country name.
 6(7 28175 
 

When SAPscript encounters this command it calls the corresponding
ABAP command internally. The effect of the SAPscript command is
thus identical with that of the ABAP command.
If the formatting turns out other than expected, check the settings in
table T005X.
]z~ fzŒ„
To format date fields, use the SAPscript SET DATE MASK command.
Executing this command causes all subsequent date fields to be
printed with the specified formatting.
l’‡z‘
 6(7 '$7( 0$6. ¶date_mask·
In the date mask, the following edit formats can be used:
Any other characters occurring in the mask are interpreted as simple
text and are copied directly to the output.
Table A–7 Date mask: Edit formats
Template Description
DD day (two digits)
DDD name of day (abbreviated)
DDDD name of day (written out in full)
MM month (two digits)
MMM name of month (abbreviated)
MMMM name of month (written out in full)
YY year (two digits)
YYYY year (four digits)
LD day (formatted as for the L option)
LM month (formatted as for the L option)
LY year (formatted as for the L option)
SAPscript Control Commands KNJ
Z
^‘z†‰…~
Assuming a current system date of March 1, 2000.
 6(7 '$7( 0$6. 
)RVWHU LW 00''

'$7(
k~ŒŽ…S
Foster City, 03.01.00
 6(7 '$7( 0$6. 
0000 '' 

'$7(
k~ŒŽ…S
March 01, 2000
You can revert to the standard setting by using the SET DATE MASK command again
with an empty string in place of the date mask:
 6(7 '$7( 0$6. 
 

^‘‰ˆ‡~‡ ˆ‹ _…ˆz‚‡€ iˆ‚‡ gކ{~‹Œ
How a floating point number is formatted depends on whether an
exponent is specified. The mantissa is adjusted by shifting the decimal
point and, if necessary, introducing leading zeros, based on the chosen
exponent. An exponent value of 0 means that the exponent
representation will not be used to display the symbol.
l’‡z‘
VPERO(n
^‘z†‰…~
In this example the PLMK-SOLLWERT field is assumed to have the value 123456.78
and to be of data type FLTP.
Table A–8 Examples for floating point numbers
Symbol Result
PLMK-SOLLWERT +1.23456780000000E+05
PLMK-SOLLWERT(E3) +123.456780000000E+03
PLMK-SOLLWERT(E6) +0.12345678000000E+06
PLMK-SOLLWERT(E0) +123456.780000000
PLMK-SOLLWERT(E) +123456.780000000
KNK SAPscript Made Easy | Release 4.6
_‚…… z‹z|~‹Œ
Leading spaces in a value can be replaced with a fill character. The
character immediately following the F in the specification is used as
the fill character.
l’‡z‘
VPERO)f
^‘z†‰…~
The figure for customer sales in the KNA1-UMSAT field is $700. The Dictionary
description of the field specifies an output length of eight.
.
b€‡ˆ‹‚‡€ ˆ‡~‹Œ‚ˆ‡ kŽ…~Œ
SAPscript conversion routines specified in the Dictionary are
automatically recognized and used when program symbols are
formatted. These conversions can be prevented with the K option.
l’‡z‘
VPERO.
e~z}‚‡€ l‚€‡ ˆ ~ e~
The leading sign is normally displayed to the right of a numeric value,
except when using a floating point number. This option allows you to
specify that the leading sign is placed to the left of the number.
l’‡z‘
VPERO
Table A–9 Examples for fill characters
Symbol Result
KNA1-UMSAT 700.00
KNA1-UMSAT(F*) **700.00
KNA1-UMSAT(F0) 00700.00
Table A–10 Examples for leading sign
Symbol Result
ITCDP-TDULPOS 100.00-
ITCDP-TDULPOS() -100.00
SAPscript Control Commands KNL
Z
e~z}‚‡€ l‚€‡ ˆ ~ k‚€
The default setting outputs the leading sign to the right of a numeric
value. If you used the SET SIGN LEFT to specify that the leading sign
should be output before the value, this specification can be
overridden for individual symbols to enable these values to be output
with the leading sign to the right.
l’‡z‘
VPERO!
gކ{~‹ ˆ ]~|‚†z…Œ
A program symbol of one of the data types DEC, QUAN and FLTP can
contain decimal place data. This option overrides the Dictionary
definition for the number of decimal places to format this symbol
value.
l’‡z‘
VPEROn
^‘z†‰…~
The EKPO-MENGE field contains the value 1234.56. The Dictionary definition
specifies three decimal places and an output length of 17.
The SET SIGN LEFT control command specifies that all subsequent symbols
with a numeric value should have a left-justified leading sign. Using this control
command means that there is then no need to repeat the  option for each
individual symbol.
Tips  Tricks
Use the SET SIGN RIGHT control command to switch back to the default setting
to output the leading sign.
Tips  Tricks
Table A–11 Examples for number of decimals
Symbol Result
EKPO-MENGE 1,234.560
EKPO-MENGE(.1) 1,234.6
EKPO-MENGE(.4) 1,234.5600
EKPO-MENGE(.0) 1,235
KNM SAPscript Made Easy | Release 4.6
hŒ~
Specifying an offset of “n” causes the “n” left-most characters of the
symbol value will not be displayed. If the offset specified is greater
than the length of the value, nothing is output.
l’‡z‘
VPEROn
^‘z†‰…~
If symbol has the value 123456789, the following will be displayed:
h†‚‚‡€ e~z}‚‡€ s~‹ˆŒ
Certain symbol values are output with leading zeros. To suppress
these values use the Z option.
l’‡z‘
VPERO=
^‘z†‰…~
Assuming the current date is January 1, 2000
.
Table A–12 Examples for offsets
Symbol Result
symbol 123456789
symbol+3 456789
symbol+7 89
symbol+12 Blank
symbol+0 123456789
Table A–13 Examples omitting leading zeros
Symbol Result
DAY 01
DAY(Z) 1
SAPscript Control Commands KNN
Z
h†‚‚‡€ ~ e~z}‚‡€ l‚€‡
Program symbols with numeric values can have a leading sign, which
usually appears at the right of the numeric value as a space for
positive numbers, or as a minus sign for negative numbers. The S
option ensures that the value is formatted without the sign.
l’‡z‘
VPERO6
^‘z†‰…~
The ITCDP-TDULPOS field contains the value -100.00. The Dictionary definition
for this field includes a leading sign.
h†‚‚‡€ ~ l~‰z‹zˆ‹ ˆ‹ ¡mˆŽŒz‡}Œ¯
Symbols of the DEC, CURR, INT and QUAN data types are
normally formatted with the “thousands” separator character. The
T option allows you to specify that this separator character should
be omitted.
l’‡z‘
VPERO7
^‘z†‰…~
The EKPO-MENGE field contains the value 1234.56. The Data Dictionary definition
specifies three decimal places and the output length is set to 17.
hŽ‰Ž e~‡€
If you need only a part of the symbol value, or if the output has to fit
in an on-screen box or field without overlapping the edges of this
area, use an output length specification to define how many character
positions should be copied from the value.
Table A–14 Examples of omitting leading sign
Symbol Result
ITCDP-TDULPOS 100.00-
ITCDP-TDULPOS(S) 100.00
Table A–15 Examples of omitting separator for thousands
Symbol Result
EKPO-MENGE 1,234.560
EKPO-MENGE(T) 1234.560
KNO SAPscript Made Easy | Release 4.6
If a length is specified that is greater than the current value length,
then spaces are appended to the symbol value.
The character * specifies the program symbol length. This
specification causes the symbol value to be output based on the
output length defined in the Dictionary.
l’‡z‘
VPEROl
^‘z†‰…~
If symbol has the value 123456789.
An output length specification can be combined with an offset
specification. The specified length is then counted from the specified
offset position.
VPERO
→ 
^‘z†‰…~
The SYST-UNAME field contains the logon name of a user called Einstein. The
Dictionary entry for this field contains an output length of 12.
66781$0( (LQVWHLQ
66781$0(
(LQVWHLQ 
66781$0(
(LQVWHLQ 
i‹~|~}‚‡€ z‡} lŽ{Œ~ŠŽ~‡ m~‘
In addition to using initial symbol values, additional texts that are
output only when the symbol value is no longer the initial value can
be specified. You can specify a text to be output immediately before
the symbol value (the pretext), and text to be output immediately after
it (the posttext). If the symbol has its initial value, these texts are
suppressed.
l’‡z‘

SUHWH[W
VPERO
SRVWWH[W

Table A–16 Examples for output length
Symbol Result
symbol(3) 123
symbol(7) 1234567
SAPscript Control Commands KNP
Z
^‘z†‰…~
The KNA1-PFACH field contains a customer PO Box number. Since “PO Box” is
not stored in the field with the value, you would normally write the following for the
PO Box line of an address:
32 %R[ .1$3)$+
However, if no “P.O. Box” has been specified then “PO Box” would still appear on its
own in the address. Prevent this step by using pretext and/or posttext (in this case
pretext).
32 %R[ .1$3)$+ → 32 %R[

32 %R[ 
.1$3)$+
If “P.O. Box” is specified, then this information will be displayed with the appropriate
text in the usual way.

32 %R[ 
.1$3)$+ → 32 %R[ 
k‚€FcŽŒ‚‚~} hŽ‰Ž
Symbol values other than numeric values are normally formatted to
be left-justified. Right-justified formatting can be specified with the R
option. This option has to be used with an output length specification.
l’‡z‘
VPERO5
^‘z†‰…~
If symbol has the value 1234.
Ensure that the symbol, the pretext and the posttext, all appear on a single line
of the editor. This may mean that you have to use a long line (paragraph
attribute = or /= ) in the editor.
The apostrophe character delimits these texts. If this character also appears as
part of one of these texts, then it must be written twice at this point to avoid
misinterpretation. A pretext or posttext may contain symbols in addition to
normal text. These symbols are subject to the restriction that these symbols may
not have a pretext or a posttext.
Tips  Tricks
Table A–17 Examples for right-justified output
Symbol Result
symbol 1234
symbol(8R) 1234
KNQ SAPscript Made Easy | Release 4.6
l‰z|~ ˆ†‰‹~ŒŒ‚ˆ‡
The symbol value is viewed as a sequence of “words,” each separated
from the next by either one or a string of space characters. The C
option replaces each string of space characters with a single space and
shifting “words” to the left to close gaps. Leading spaces are
completely removed. The results are the same as if the ABAP
command CONDENSE was used.
l’‡z‘
VPERO
^‘z†‰…~
Assuming ’ Albert Einstein ’ is the symbol value.
lމ‰‹~ŒŒ‚‡€ b‡‚‚z… oz…Ž~Œ
The I option suppresses the output of symbols that still contain their
initial value.
l’‡z‘
VPERO,
^‘z†‰…~
Assuming KNA1-UMSAT contains the value 0 and the currency is USD.
If the field contains an amount other than 0, this value will be output in the usual way.
m‚†~ fzŒ„
You can use the SAPscript SET TIME MASK command to format time
fields in a way that differs from the standard setting. Executing this
command causes all subsequent time fields to be printed with the
specified formatting.
Table A–18 Examples for space compression
Symbol Result
symbol Albert Einstein
symbol(C) Albert Einstein
Table A–19 Examples for suppressing initial values
Symbol Result
KNA1-UMSAT 0.00
KNA1-UMSAT(I)
SAPscript Control Commands KNR
Z
l’‡z‘
 6(7 7,0( 0$6. 
time_mask

In the time mask, the following edit formats can be used:
Any other characters occurring in the mask are interpreted as simple
text and are copied directly to the output.
^‘z†‰…~
Assuming the current time is 10:08:12.
7,0( → 
 6(7 7,0( 0$6. 
++00

7,0(
k~ŒŽ…S
10:08
 6(7 7,0( 0$6. 
++ KRXUV 00 PLQXWHV

7,0(
k~ŒŽ…S
10 hours 08 minutes
 6(7 7,0( 0$6. 
++ KRXUV 00 PLQXWHV

7,0(=
k~ŒŽ…G
10 hours 8 minutes
You can revert to the standard setting by using the SET TIME MASK command again
with an empty string in place of the time mask:
 6(7 7,0( 0$6. 
 

Table A–20 Time mask: Edit formats
Template Description
HH hours (two digits)
MM minutes (two digits)
SS seconds (two digits)
KOI SAPscript Made Easy | Release 4.6
l’Œ~† oz‹‚z{…~Œ
?lZilkbimFhngm^kx‘? A‘ V IGG RBS
These fields represent ten counter variables that you can use in your
text and forms for any counting purposes. You can use the ‘+’ and ‘-’
formatting options to increment or decrement a counter before its
value is printed. You can use the DEFINE control command to
assign any specific value to a counter.
?lZilkbimF]kbo^k?S
SAPscript formats a text for a specific output device. The initial
formatting is independent of the specific language of this device.
SAPscript then calls a driver to convert the device-independent
format to device-specific control commands. This field contains the
name of the driver.
POST Postscript driver
HPL2 HP Laserjet driver for the PCL4/PCL5 languages
PRES Driver for output devices using the PRESCRIBE language
The available drivers are stored in table TSP09.
?lZilkbimFln[k?
After executing an INCLUDE statement, this contains a value that
indicates whether the INCLUDE was found or not. This value can be
queried with IF....
INCLUDE found = 0 and INCLUDE not found = 4
?lZilkbimF_hkfiZ`^l?
This contains the total number of pages output in a SAPscript form
(all output between the functions START_FORM and END_FORM).
The state of the page counter on the individual form pages
(START,HOLD,INC) is not taken into account.
Using this symbol impairs performance, since all output data for every form must
be retained internally to fill the symbol.
Tips  Tricks
SAPscript Control Commands KOJ
Z
?lZilkbimFch[iZ`^l?
This contains the total number of pages output in a SAPscript print
run (all output between the functions OPEN_FORM and
CLOSE_FORM). The state of the page counter on the individual
form pages (START,HOLD,INC) is not taken into account.
?lZilkbimFm^e^eZg]?
This contains the country identifier for the fax destination with fax
output with SAPscript (field ITCPO-TDTELELAND for the
parameter OPTIONS of function OPEN_FORM).
?lZilkbimFm^e^gnf?
This contains the local fax number for the fax destination with fax
output with SAPscript (field ITCPO-TDTELENUM for the
parameter OPTIONS of function OPEN_FORM).
?lZilkbimFm^e^gnf^?
This contains the complete fax number for the fax destination with fax
output with SAPscript (field ITCPO-TDTELENUME for the
parameter OPTIONS of function OPEN_FORM).
oz‹‚z{…~Œ ˆ l‹Ž|Ž‹~ lrlm
All variables of structure SYST, called system variables, can be used
in the form. Of particular interest are the variables for the system
date and time. These variables indicate the date and time that the
The CONDENSE option cannot be used on the program icon SAPSCRIPT-
FORMPAGES (C) without an explicit length specification. This symbol is
replaced with a value only after the form has been completely edited, since the
total number of pages of a form is first known in the program function
END_FORM or CLOSE_FORM.
However, the symbol size (number of characters) is reserved correctly when the
symbol first occurs, with the current page number. Therefore, only one character
is reserved for option C (CONDENSE) on pages 1-9, two characters on pages
10-99, and so on.
Using this symbol impairs performance, since all output data for every print job
must be retained internally to fill the symbol.
TechTalk
Tips  Tricks
KOK SAPscript Made Easy | Release 4.6
output was created. For the system date, use SYST-DATUM
variable, for the system time, use SYST-UZEIT. Note that you have
the formatting options for date and time variables.
$ 3 3 ( 1 ' , ;
[lz†‰…~ _ˆ‹†Œ
h~‹‚~
This appendix presents samples of some of the preconfigured forms
used by R/3 customers in the U.S. and Canada. To help you visualize
the layout and components of printed forms, the following forms are
shown:
n Account statement
n Credit memo
n Debit memo
n Delivery note
n Invoice
n Prenumbered check
n Unnumbered check
n Remittance advice
n Sales order confirmation
To find current versions of preconfigured SAPscript forms, visit
KWWSZZZVDSODEVFRPIRUPV.
KOM SAPscript Made Easy | Release 4.6
Z||ˆŽ‡ lz~†~‡ _ˆ‹†
Ad

More Related Content

What's hot (20)

ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
sapdocs. info
 
Output for picking list
Output for picking listOutput for picking list
Output for picking list
Srinivasulu Algaskhanpet
 
Org structure SAP
Org structure SAPOrg structure SAP
Org structure SAP
Suvojyoti Chowdhury
 
SAP SD Training | SAP SD Configuration Guide | SAP SD Study Material
SAP SD Training | SAP SD Configuration Guide | SAP SD Study MaterialSAP SD Training | SAP SD Configuration Guide | SAP SD Study Material
SAP SD Training | SAP SD Configuration Guide | SAP SD Study Material
SAP SD Training By Praveen
 
VOFM Routine
VOFM RoutineVOFM Routine
VOFM Routine
Mohammed Azhad
 
IDOC
IDOC IDOC
IDOC
Hari Krishna
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
sapdocs. info
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
kssr99
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
Ankit Sharma
 
2122706 - Delivered quantity of production order is not updated correctly if ...
2122706 - Delivered quantity of production order is not updated correctly if ...2122706 - Delivered quantity of production order is not updated correctly if ...
2122706 - Delivered quantity of production order is not updated correctly if ...
Ricardo Ishida
 
Sapscript
SapscriptSapscript
Sapscript
Jen Ringel
 
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialsAbap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
cesarmendez78
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
Kranthi Kumar
 
CDS Views.pptx
CDS Views.pptxCDS Views.pptx
CDS Views.pptx
Suman817957
 
SAP SD Complete Guide
SAP SD Complete GuideSAP SD Complete Guide
SAP SD Complete Guide
Mohammed Azhad
 
Badis
Badis Badis
Badis
Rajesh Kumar
 
Badi document
Badi documentBadi document
Badi document
hamisha_malik
 
Sap pp tutorial
Sap pp tutorialSap pp tutorial
Sap pp tutorial
Raja180
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
Kranthi Kumar
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
Uttam Agrawal
 
ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
sapdocs. info
 
SAP SD Training | SAP SD Configuration Guide | SAP SD Study Material
SAP SD Training | SAP SD Configuration Guide | SAP SD Study MaterialSAP SD Training | SAP SD Configuration Guide | SAP SD Study Material
SAP SD Training | SAP SD Configuration Guide | SAP SD Study Material
SAP SD Training By Praveen
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
sapdocs. info
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
kssr99
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
Ankit Sharma
 
2122706 - Delivered quantity of production order is not updated correctly if ...
2122706 - Delivered quantity of production order is not updated correctly if ...2122706 - Delivered quantity of production order is not updated correctly if ...
2122706 - Delivered quantity of production order is not updated correctly if ...
Ricardo Ishida
 
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialsAbap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
cesarmendez78
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
Kranthi Kumar
 
Sap pp tutorial
Sap pp tutorialSap pp tutorial
Sap pp tutorial
Raja180
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
Kranthi Kumar
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
Uttam Agrawal
 

Viewers also liked (16)

Exercise in alv
Exercise in alvExercise in alv
Exercise in alv
Kranthi Kumar
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
Kranthi Kumar
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction events
Kranthi Kumar
 
Sp rao abap
Sp rao abapSp rao abap
Sp rao abap
Kranthi Kumar
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
Kranthi Kumar
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abap
Kranthi Kumar
 
Epic abap
Epic  abapEpic  abap
Epic abap
Kranthi Kumar
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
Kranthi Kumar
 
Webdynpro by vijayender_reddy
Webdynpro by vijayender_reddyWebdynpro by vijayender_reddy
Webdynpro by vijayender_reddy
Kranthi Kumar
 
Adding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt esAdding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt es
Kranthi Kumar
 
E mail eft remittance using bte
E mail eft remittance using bteE mail eft remittance using bte
E mail eft remittance using bte
Kranthi Kumar
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programming
Kranthi Kumar
 
Crm technical
Crm technicalCrm technical
Crm technical
Kranthi Kumar
 
IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap material
Kranthi Kumar
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
Kranthi Kumar
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpro
manojdhir
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction events
Kranthi Kumar
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
Kranthi Kumar
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abap
Kranthi Kumar
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
Kranthi Kumar
 
Webdynpro by vijayender_reddy
Webdynpro by vijayender_reddyWebdynpro by vijayender_reddy
Webdynpro by vijayender_reddy
Kranthi Kumar
 
Adding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt esAdding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt es
Kranthi Kumar
 
E mail eft remittance using bte
E mail eft remittance using bteE mail eft remittance using bte
E mail eft remittance using bte
Kranthi Kumar
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programming
Kranthi Kumar
 
IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap material
Kranthi Kumar
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
Kranthi Kumar
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpro
manojdhir
 
Ad

Similar to Sap script made easy (20)

9555 apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
9555  apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto9555  apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
9555 apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
Edna Araujo
 
捷克長期留學簽證
捷克長期留學簽證捷克長期留學簽證
捷克長期留學簽證
Chieh Chang
 
apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
 apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
Leon Machado Guedes
 
prova modelo 04 pmsc ieses
prova modelo 04 pmsc iesesprova modelo 04 pmsc ieses
prova modelo 04 pmsc ieses
Felipe Leal
 
Lrf No Contexto Da Reforma Social Do Estado
Lrf No Contexto Da Reforma Social Do EstadoLrf No Contexto Da Reforma Social Do Estado
Lrf No Contexto Da Reforma Social Do Estado
marcosurl
 
A construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismoA construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismo
Vagner de Alencar
 
A construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismoA construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismo
Vagner de Alencar
 
A construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismoA construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismo
Vagner de Alencar
 
Execucao Orcamentaria E Financeira E O Cumprimento De Metas
Execucao Orcamentaria E Financeira E O Cumprimento De MetasExecucao Orcamentaria E Financeira E O Cumprimento De Metas
Execucao Orcamentaria E Financeira E O Cumprimento De Metas
marcosurl
 
Enfermidades de pacus e patingas
Enfermidades de pacus e patingasEnfermidades de pacus e patingas
Enfermidades de pacus e patingas
Agricultura Sao Paulo
 
Decreto n. 15 del 7 10 2019
Decreto n. 15 del 7 10 2019Decreto n. 15 del 7 10 2019
Decreto n. 15 del 7 10 2019
Estensecom
 
1 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 3
1 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 31 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 3
1 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 3
jeramon
 
2 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 3
2 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 32 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 3
2 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 3
jeramon
 
Educação. do liberalismo ao neoliberalismo
Educação. do liberalismo ao neoliberalismoEducação. do liberalismo ao neoliberalismo
Educação. do liberalismo ao neoliberalismo
wsshist
 
Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...
Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...
Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...
rosimovil4
 
Problemas básicos
Problemas básicosProblemas básicos
Problemas básicos
Gustavo Cortez
 
Anexo 12 inpsasel
Anexo 12 inpsaselAnexo 12 inpsasel
Anexo 12 inpsasel
Deivis Montilla
 
Regulacao Politica Nacional de Humanizacao e Acolhimento
Regulacao Politica Nacional de Humanizacao e AcolhimentoRegulacao Politica Nacional de Humanizacao e Acolhimento
Regulacao Politica Nacional de Humanizacao e Acolhimento
Rodrigo Zardo
 
1649604
16496041649604
1649604
estevaomoraes
 
Material de complemento
Material de complementoMaterial de complemento
Material de complemento
lvaldive
 
9555 apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
9555  apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto9555  apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
9555 apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
Edna Araujo
 
捷克長期留學簽證
捷克長期留學簽證捷克長期留學簽證
捷克長期留學簽證
Chieh Chang
 
apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
 apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
apostila__legislacao_sus_com_exercicios__saude__professor_paulo_prieto
Leon Machado Guedes
 
prova modelo 04 pmsc ieses
prova modelo 04 pmsc iesesprova modelo 04 pmsc ieses
prova modelo 04 pmsc ieses
Felipe Leal
 
Lrf No Contexto Da Reforma Social Do Estado
Lrf No Contexto Da Reforma Social Do EstadoLrf No Contexto Da Reforma Social Do Estado
Lrf No Contexto Da Reforma Social Do Estado
marcosurl
 
A construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismoA construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismo
Vagner de Alencar
 
A construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismoA construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismo
Vagner de Alencar
 
A construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismoA construção da imagem do pcc no jornalismo
A construção da imagem do pcc no jornalismo
Vagner de Alencar
 
Execucao Orcamentaria E Financeira E O Cumprimento De Metas
Execucao Orcamentaria E Financeira E O Cumprimento De MetasExecucao Orcamentaria E Financeira E O Cumprimento De Metas
Execucao Orcamentaria E Financeira E O Cumprimento De Metas
marcosurl
 
Decreto n. 15 del 7 10 2019
Decreto n. 15 del 7 10 2019Decreto n. 15 del 7 10 2019
Decreto n. 15 del 7 10 2019
Estensecom
 
1 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 3
1 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 31 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 3
1 debate gaceta 850 (3 11-10) seguridad ciudadana.pdf.nivel 3
jeramon
 
2 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 3
2 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 32 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 3
2 debate gaceta 975 (26 11-10) seguridad ciudadana.pdf.nivel 3
jeramon
 
Educação. do liberalismo ao neoliberalismo
Educação. do liberalismo ao neoliberalismoEducação. do liberalismo ao neoliberalismo
Educação. do liberalismo ao neoliberalismo
wsshist
 
Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...
Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...
Escolarización del niño alérgico paso a paso, pautas, protocolos, documentos,...
rosimovil4
 
Regulacao Politica Nacional de Humanizacao e Acolhimento
Regulacao Politica Nacional de Humanizacao e AcolhimentoRegulacao Politica Nacional de Humanizacao e Acolhimento
Regulacao Politica Nacional de Humanizacao e Acolhimento
Rodrigo Zardo
 
Material de complemento
Material de complementoMaterial de complemento
Material de complemento
lvaldive
 
Ad

More from Kranthi Kumar (20)

Dynamic binding
Dynamic bindingDynamic binding
Dynamic binding
Kranthi Kumar
 
Data binding
Data bindingData binding
Data binding
Kranthi Kumar
 
Creating simple comp
Creating simple compCreating simple comp
Creating simple comp
Kranthi Kumar
 
Creating messages
Creating messagesCreating messages
Creating messages
Kranthi Kumar
 
Creating a comp
Creating a compCreating a comp
Creating a comp
Kranthi Kumar
 
Context at design
Context at designContext at design
Context at design
Kranthi Kumar
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exercise
Kranthi Kumar
 
Alv for web
Alv for webAlv for web
Alv for web
Kranthi Kumar
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)
Kranthi Kumar
 
Abap faq
Abap faqAbap faq
Abap faq
Kranthi Kumar
 
control techniques
control techniquescontrol techniques
control techniques
Kranthi Kumar
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scripts
Kranthi Kumar
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script forms
Kranthi Kumar
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configuration
Kranthi Kumar
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
Kranthi Kumar
 
Batch input session
Batch input sessionBatch input session
Batch input session
Kranthi Kumar
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
Kranthi Kumar
 
Using folder options for page protection
Using folder options for page protectionUsing folder options for page protection
Using folder options for page protection
Kranthi Kumar
 
Business workflow
Business workflowBusiness workflow
Business workflow
Kranthi Kumar
 
Version it satya_dev
Version it satya_devVersion it satya_dev
Version it satya_dev
Kranthi Kumar
 
Creating simple comp
Creating simple compCreating simple comp
Creating simple comp
Kranthi Kumar
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exercise
Kranthi Kumar
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)
Kranthi Kumar
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scripts
Kranthi Kumar
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script forms
Kranthi Kumar
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configuration
Kranthi Kumar
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
Kranthi Kumar
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
Kranthi Kumar
 
Using folder options for page protection
Using folder options for page protectionUsing folder options for page protection
Using folder options for page protection
Kranthi Kumar
 
Version it satya_dev
Version it satya_devVersion it satya_dev
Version it satya_dev
Kranthi Kumar
 

Sap script made easy

  • 1. lZi ez{ŒE b‡|G 3DOR $OWR DOLIRUQLD ZlZiŒ|‹‚‰ fz}~ ^zŒ’ Z l~‰F{’Fl~‰ `Ž‚}~ ˆ _ˆ‹† ]~Œ‚€‡ z‡} i‹‚‡ˆŽ ‚‡ kHL Š
  • 2. ˆ‰’‹‚€ © 1999 by SAP AG. All rights reserved. Neither this documentation nor any part of it may be copied or reproduced in any form or by any means or translated into another language, without the prior consent of SAP AG. ]‚Œ|…z‚†~‹ SAP AG makes no warranties or representations with respect to the content hereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. SAP AG assumes no responsibility for any errors that may appear in this document. The information contained in this document is subject to change without notice. SAP AG reserves the right to make any such changes without obligation to notify any person of such revision or changes. SAP AG makes no commitment to keep the information contained herein up to date. m‹z}~†z‹„Œ SAP, the SAP logo, R/2, R/3, SAPscript, ABAP, and other SAP related products mentioned herein are registered or unregistered trademarks of SAP AG. All other products mentioned in this document are registered or unregistered trademarks of their respective companies. Simplification Group SAP Labs, Inc. 3475 Deer Creek Road Palo Alto, CA 94304 ZZZVDSODEVFRPVLPSOH VLPSOLIU#VDSFRP Printed in the United States of America. ISBN 1-893570-14-2
  • 3. 2 1 7 ( 1 7 6 b‡‹ˆ}Ž|‚ˆ‡ JJ h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JJ pz bŒ ‚Œ `Ž‚}~ Z{ˆŽX G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JK pˆ lˆŽ…} k~z} ‚Œ `Ž‚}~X G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JK $VVXPSWLRQV aˆ ˆ nŒ~ ‚Œ `Ž‚}~X G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JL +RZ ,V WKH *XLGH 2UJDQL]HG 3DUW /HDUQLQJ 6$3VFULSW %DVLFV 3DUW 0RGLILQJ 6$3VFULSW )RUPV 3DUW XVWRPL]LQJ $SSOLFDWLRQV IRU 6$3VFULSW )RUPV 3DUW $SSHQGL[HV pz@Œ g~ ‚‡ ‚Œ `Ž‚}~X G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JM ˆ‡~‡‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JN iz‹ JS e~z‹‡‚‡€ lZiŒ|‹‚‰ [zŒ‚|Œ z‰~‹ JS lZiŒ|‹‚‰ _ˆ‹†ŒS m~ [‚€ i‚|Ž‹~ JR h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KI pz Z‹~ lZiŒ|‹‚‰ _ˆ‹†ŒX G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KI ([DPSOHV RI 6$3VFULSW )RUPV pz bŒ ~ Z‹|‚~|Ž‹~ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX G G G G G G G G G G G G G G G G KJ aˆ Z‹~ lZiŒ|‹‚‰ _ˆ‹†Œ i‹ˆ|~ŒŒ~}X G G G G G G G G G G G G G G G G G G G G G G KL pz Z‹~ ~ ]‚~‹~‡ lˆŽ‹|~Œ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX G G G G G G G G G G KL 6WDQGDUG 6$3VFULSW )RUPV 6RPH ([DPSOHV
  • 4. M SAPscript Made Easy | Release 4.6 3UHFRQILJXUHG 6$3VFULSW )RUPV 6RPH ([DPSOHV p~‹~ ˆ _‚‡} ~ lZiŒ|‹‚‰ _ˆ‹†Œ ’ˆŽ g~~} G G G G G G G G G G G G G G G G KN z‰~‹ KS lZiŒ|‹‚‰ _ˆ‹†ŒS m~ [zŒ‚|Œ KP h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KQ pz Z‹~ _ˆ‹† fz‡z€~†~‡ mˆˆ…ŒX G G G G G G G G G G G G G G G G G G G G G G G KQ )RUP 3DLQWHU $FFHVVLQJ WKH )RUP 3DLQWHU 3 (GLWRU $FFHVVLQJ WKH 3 (GLWRU YLD )RUP 3DLQWHU $FFHVVLQJ WKH 3 (GLWRU YLD 6WDQGDUG 7H[W Z|‚z‚‡€ ~ `‹z‰‚|z… _ˆ‹† iz‚‡~‹ z‡} i ^}‚ˆ‹ G G G G G G G G G G LM pz Z‹~ ~ _ˆ‹† ˆ†‰ˆ‡~‡ŒX G G G G G G G G G G G G G G G G G G G G G G G G G G LN +HDGHU 3DUDJUDSK )RUPDWV KDUDFWHU )RUPDWV 3DJH /DRXW 9DULDEOHV 'RFXPHQWDWLRQ iz‹ KS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†Œ z‰~‹ LS `~‚‡€ lz‹~} ‚ _ˆ‹†Œ MP h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G MQ pˆ‹„‚‡€ ‚ lZiŒ|‹‚‰ _ˆ‹†ŒS _‚‹Œ l~‰Œ G G G G G G G G G G G G G G G G G G G MQ :KDW $UH WKH 0HWKRGV IRU ,PSRUWLQJ )RUPV )RUPV $YDLODEOH RQ DQ 5 OLHQW )RUPV $YDLODEOH DV 6HSDUDWH )LOHV +RZ WR KRRVH WKH %HVW 0HWKRG ˆ‰’‚‡€ _ˆ‹†Œ {~~~‡ …‚~‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G MR i‹~‰z‹‚‡€ ˆ‰‚~} _ˆ‹†ŒS Z}}‚‚ˆ‡z… mzŒ„Œ G G G G G G G G G G G G G G G G G G NK 2ULJLQDO /DQJXDJH KDQJLQJ 3DJH )RUPDW RI D )RUP b†‰ˆ‹‚‡€ _ˆ‹†Œ ‹ˆ† z _‚…~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G NQ
  • 5. Contents N z‰~‹ MS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS m~ [zŒ‚|Œ OL h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G OM ˆ‰’‚‡€ z _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ON m~Œ i‹‚‡‚‡€ z _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G OP fz‡‚‰Ž…z‚‡€ ~ ez’ˆŽ ˆ z _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G OR UHDWLQJ D 1HZ :LQGRZ 5HQDPLQJ D :LQGRZ KDQJLQJ :LQGRZ 3RVLWLRQ RU 6L]H 8VLQJ 'HVLJQ :LQGRZ KDQJLQJ :LQGRZ 3RVLWLRQ RU 6L]H 8VLQJ $GPLQLVWUDWLYH 6FUHHQ 5HPRYLQJ D :LQGRZ $OLJQLQJ :LQGRZV WR WKH *ULG fz‡‚‰Ž…z‚‡€ _ˆ‹† ˆ‡~‡ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G QK 0RYLQJ D )LHOG 0RYLQJ D 7DE ,QVHUWLQJ RU 'HOHWLQJ D /LQH 'HOHWLQJ :LQGRZ 7H[W 8VLQJ WKH 3 (GLWRU 'HOHWLQJ :LQGRZ 7H[W XVLQJ WKH 7H[W (GLWRU 5HPRYLQJ D )LHOG /RRNLQJ 8S D )LHOG $GGLQJ D 1HZ )LHOG $GGLQJ D )LHOG WR WKH 3ULQW 6WUXFWXUH z‰~‹ NS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS Z}z‡|~} mˆ‰‚|Œ JJL h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JJM i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ Ap‚‡}ˆŒ [fi _ˆ‹†zB G G G G G G G G G G G JJM 6WHS ,PSRUW WKH *UDSKLF LQWR WKH 'RFXPHQW 6HUYHU 6WHS 3UHYLHZ WKH *UDSKLF 3ULQWRXW 6WHS ,QFOXGH WKH *UDSKLF LQ D )RUP UHDWLQJ *UDSKLF 2EMHFWV DQG *UDSKLF ,'V i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ A[zŒ~…‚‡~ mb__ OGI _ˆ‹†zB G G G G G G G G G JKM ,QFOXGLQJ WKH RPSDQ /RJR RQ WKH )RUP RQYHUWLQJ %DVHOLQH 7,)) )RUPDW WR 6$3VFULSW 6WDQGDUG 7H[W ,QFOXGLQJ 6WDQGDUG 7H[W LQ D )RUP ,QFOXGLQJ WKH RPSDQ /RJR DV D 0DFUR RQ 3/ 3ULQWHUV RSLQJ D 6WDQGDUG 3ULQWHU 7SH 'HILQLQJ D 3ULQW RQWURO IRU WKH 0DFUR ,QFOXGLQJ WKH 3ULQW RQWURO LQ WKH )RUP i‹‚‡‚‡€ [z‹ ˆ}~Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JML Z}}‚‡€ z [ˆ‘ ‚ lz}‚‡€ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JMR UHDWLQJ 0XOWLSOH %R[HV i‹‚‡‚‡€ m~‘ o~‹‚|z……’ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JNO
  • 6. O SAPscript Made Easy | Release 4.6 z……‚‡€ Z[Zi lŽ{‹ˆŽ‚‡~Œ nŒ‚‡€ ~ i^k_hkf ˆ††z‡} G G G G G JNP iz‹ LS ŽŒˆ†‚“‚‡€ Z‰‰…‚|z‚ˆ‡Œ ˆ‹ lZiŒ|‹‚‰ _ˆ‹†Œ z‰~‹ OS ŽŒˆ†‚“‚‡€ lz…~Œ z‡} ]‚Œ‹‚{Ž‚ˆ‡ ˆ‹ i‹‚‡ _ˆ‹†Œ JOJ h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JOK Z||~ŒŒ‚‡€ ~ bf` G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JOK ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ lz…~Œ ]ˆ|ކ~‡Œ G G G G G JOL ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ l‚‰‰‚‡€ ]ˆ|ކ~‡Œ G G JON ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ [‚……‚‡€ ]ˆ|ކ~‡Œ G G G G JOR l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ l~‡}~‹E a~z}~‹E z‡} _ˆˆ~‹ G G G G JPJ 6SHFLILQJ 6WDQGDUG 7H[W SHU 6DOHV 2UJDQL]DWLRQ $OORFDWLQJ 6WDQGDUG 7H[W SHU 6KLSSLQJ 3RLQW 0DLQWDLQLQJ 6WDQGDUG 7H[W IRU )RUPV fz‚‡z‚‡‚‡€ i‹‚|‚‡€ ˆ‡}‚‚ˆ‡Œ ˆ Z‰‰~z‹ ‚‡ ~ hŽ‰Ž G G G G G G JPP z‰~‹ PS ŽŒˆ†‚“‚‡€ fz~‹‚z…Œ fz‡z€~†~‡ ˆ‹ i‹‚‡ _ˆ‹†Œ JQJ h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G JQK ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ ]ˆ|ކ~‡Œ G G G G G G G G G G JQK fz‚‡z‚‡‚‡€ ]ˆ|ކ~‡ m~‘ ˆ‹ i‹‚‡‚‡€ G G G G G G G G G G G G G G G G G G G G JQM :KHUH WR 6WDUW 0DLQWHQDQFH 0DLQWDLQLQJ 7H[W IRU 'RFXPHQW +HDGHU $GGLQJ D 1HZ (QWU IRU 'RFXPHQW +HDGHU 7H[W 'HOHWLQJ DQ (QWU IRU 'RFXPHQW +HDGHU 7H[W 9HULILQJ WKH 3ULQW 6HTXHQFH IRU 'RFXPHQW +HDGHU 7H[W 0DLQWDLQLQJ ,WHP 7H[W $GGLQJ D 1HZ (QWU IRU ,WHP 7H[W 'HOHWLQJ DQ ,WHP 7H[W 9HULILQJ WKH 3ULQW 6HTXHQFH IRU ,WHP 7H[W 0DLQWDLQLQJ 6XSSOHPHQW 7H[WV $GGLQJ D 1HZ (QWU IRU 6XSSOHPHQW 7H[W 'HOHWLQJ D 6XSSOHPHQW 7H[W 9HULILQJ WKH 3ULQW 6HTXHQFH IRU 6XSSOHPHQW 7H[W 0DLQWDLQLQJ KDQJH 7H[WV 0DLQWDLQLQJ +HDGLQJV fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ G G G G G G G G G G G G G G G G G G G G G G KIL
  • 7. Contents P z‰~‹ QS ŽŒˆ†‚“‚‡€ _‚‡z‡|‚z… Z||ˆŽ‡‚‡€ ˆ‹ i‹‚‡ _ˆ‹†Œ KIP h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KIQ ZŒŒ‚€‡‚‡€ z i‹‚‡ i‹ˆ€‹z† ˆ ~|„Œ G G G G G G G G G G G G G G G G G G G G G G KIQ ZŒŒ‚€‡‚‡€ _ˆ‹†Œ ˆ ~|„Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KIR l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ a~z}~‹E _ˆˆ~‹E l‚€‡zŽ‹~ z‡} l~‡}~‹ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KJJ fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ G G G G G G G G G G G G G G G G G G G G G G KJM l‰~|‚’‚‡€ ~|„ i‹‚‡‚‡€ h‰‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G KJO iz‹ MS Z‰‰~‡}‚‘~Œ Z‰‰~‡}‚‘ ZS lZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ KKJ h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KKJ h~‹‚~ ˆ lZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ G G G G G G G G G G G G G G G G G KKK h~‹‚~ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G KKK l’‡z‘ ˆ ˆ‡‹ˆ… ˆ††z‡}Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G KKL $''5(66±(1'$''5(66 )RUPDWWLQJ RI $GGUHVVHV %27720 'HILQH )RRWHU 7H[W LQ D :LQGRZ %2; 326,7,21 6,=( %R[HV /LQHV 6KDGLQJ $6( DVH 'LVWLQFWLRQ '(),1( 9DOXH $VVLJQPHQW WR 7H[W 6PEROV +(; +H[DGHFLPDO 'DWD ,) RQGLWLRQDO 7H[W 2XWSXW ,1/8'( ,QFOXGH 2WKHU 7H[WV 1(:3$*( ([SOLFLW )RUP )HHG 1(::,1'2: 1H[W :LQGRZ 0$,1 3(5)250 DOOLQJ $%$3 6XEURXWLQHV 35,1721752/ ,QVHUW 3ULQW RQWURO KDUDFWHU 3527(7 3URWHFW IURP 3DJH %UHDN 5(6(7 ,QLWLDOL]H 2XWOLQH 3DUDJUDSKV 6(7 28175 RXQWU6SHFLILF )RUPDWWLQJ 6(7 '$7( 0$6. )RUPDWWLQJ RI 'DWH )LHOGV 6(7 6,*1 7KH 3RVLWLRQ RI 6(7 7,0( 0$6. )RUPDWWLQJ RI 7LPH )LHOGV 67/( KDQJH 6WOH 6800,1* 723 6HW +HDGHU 7H[W LQ 0$,1 l’‡z‘ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G KMR KDQJLQJ WKH 9DOXH RI D RXQWHU RXQWU 'HSHQGHQW )RUPDWWLQJ
  • 8. Q SAPscript Made Easy | Release 4.6 'DWH 0DVN ([SRQHQW IRU )ORDWLQJ 3RLQW 1XPEHUV )LOO KDUDFWHUV ,JQRULQJ RQYHUVLRQ 5XOHV /HDGLQJ 6LJQ WR WKH /HIW /HDGLQJ 6LJQ WR WKH 5LJKW 1XPEHU RI 'HFLPDOV 2IIVHW 2PLWWLQJ /HDGLQJ =HURV 2PLWWLQJ WKH /HDGLQJ 6LJQ 2PLWWLQJ WKH 6HSDUDWRU IRU ³7KRXVDQGV´ 2XWSXW /HQJWK 3UHFHGLQJ DQG 6XEVHTXHQW 7H[W 5LJKW-XVWLILHG 2XWSXW 6SDFH RPSUHVVLRQ 6XSSUHVVLQJ ,QLWLDO 9DOXHV 7LPH 0DVN l’Œ~† oz‹‚z{…~Œ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOI Z‰‰~‡}‚‘ [S lz†‰…~ _ˆ‹†Œ KOL h~‹‚~ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOL Z||ˆŽ‡ lz~†~‡ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOM ‹~}‚ f~†ˆ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KON ]~{‚ f~†ˆ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOO ]~…‚~‹’ gˆ~ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOP b‡ˆ‚|~ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOQ i‹~‡Ž†{~‹~} ~|„ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KOR n‡‡Ž†{~‹~} ~|„ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KPI k~†‚z‡|~ Z}‚|~ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KPJ lz…~Œ h‹}~‹ ˆ‡‚‹†z‚ˆ‡ _ˆ‹† G G G G G G G G G G G G G G G G G G G G G G G G G G G KPK Z‰‰~‡}‚‘ S m‚‹}Fiz‹’ lˆ…Ž‚ˆ‡Œ KPL Z_iS _ˆ‹†l|z‰~Û G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G KPM )RUP6FDSH RPSRQHQWV URVV3ODWIRUP )HDWXUHV 7KH RQFHSW RQWDFW ,QIRUPDWLRQ aiS i‹ˆ~ŒŒ‚ˆ‡z… i‹‚‡‚‡€ lˆ…Ž‚ˆ‡Œ ˆ‹ lZi kHL ^‡‚‹ˆ‡†~‡Œ G KPP 3URIHVVLRQDO (OHFWURQLF )RUPV 3ULQWLQJ RQWDFW ,QIRUPDWLRQ
  • 9. Contents R aiS c~Zil b‡~……‚€~‡ [z‹ ˆ}~ lbff G G G G G G G G G G G G G G G G G G G G KPR 6ROXWLRQ )HDWXUHV 6XSSRUWHG %DU RGHV 6XSSRUWHG +3 3ULQWHU 0RGHOV 6$3 56SHFLILF ,QIRUPDWLRQ RQWDFW ,QIRUPDWLRQ aiS _…zŒ lbff ˆ‹ ai ezŒ~‹c~ i‹‚‡~‹Œ G G G G G G G G G G G G G G G G G G G KQJ 6ROXWLRQ )HDWXUHV 6XSSRUWHG 3ULQWHUV 0DQDJHPHQW 6RIWZDUH 6VWHPV 5HTXLUHPHQWV RQWDFW ,QIRUPDWLRQ c~_ˆ‹†S c~_ˆ‹† hŽ‰Ž iz„ ˆ‹ lZi kHL G G G G G G G G G G G G G G G G G G KQK -HW)RUP 'HVLJQ -HW)RUP HQWUDO -HW)RUP 6$3VFULSW IRUPV IRU 5 -HW)RUP )RUPV IRU 5 +RZ ,W :RUNV 7KH 3ULQW 3URFHVV )HDWXUHV RQWDFW ,QIRUPDWLRQ l‹~z†l~‹~S l‹~z†l~‹~ ˆ‡‡~|‚‚’ iz|„ ˆ‹ kHL G G G G G G G G KQP 6WUHDP6HUYH 2XWSXW )RUPDW RQYHUWHU IRU 5 )HDWXUHV DQG %HQHILWV RQWDFW ,QIRUPDWLRQ
  • 11. , 1 7 5 2 ' 8 7 , 2 1 b‡‹ˆ}Ž|‚ˆ‡ h~‹‚~ Forms streamline the process of conducting business. Invoices, credit memos, and delivery notes are just a few examples of the types of forms companies routinely use. With SAPscript, SAP’s programming tool, you can easily design, build, and print a wide variety of business forms. R/3 comes with a library of predesigned forms that can be quickly customized to fit the needs of every business. Filled with step-by-step instructions and screenshots, this guidebook helps you understand how to use SAPscript to design and print business forms.
  • 12. JK SAPscript Made Easy | Release 4.6 pz bŒ ‚Œ `Ž‚}~ Z{ˆŽX This guidebook is all about SAPscript forms. Using this guidebook, you will be able to: n Use graphical tools (Form Painter and PC Editor) to quickly adapt SAPscript forms for your needs n Reduce the consulting time and effort required to develop or modify SAPscript forms The topics covered in this guidebook will help you: n Modify the layout of SAPscript forms n Modify the content of SAPscript forms n Customize R/3 application for SAPscript forms pˆ lˆŽ…} k~z} ‚Œ `Ž‚}~X This guidebook is written for: n R/3 application consultants n R/3 implementation team members n Individuals with little or no knowledge of SAPscript ZŒŒŽ†‰‚ˆ‡Œ To help you get the most out of this guidebook, the following assumptions are being made: n Forms are intended for the U.S., Canadian, and Australian markets. n Except checks, U.S. and Australian companies do not routinely use preprinted forms. A company logo is usually the only preprinted item on a form. n Implementation teams are using the latest version of the predeveloped forms. To download preconfigured forms, go to KWWSZZZVDSODEVFRPIRUPV
  • 13. Introduction JL This guide does not cover the following topics. Consult your system administrator for more information. n Using the Change and Transport System (CTS) n Uploading predeveloped forms into your system n Using the Online Support Service to get an access key to modify R/3 objects aˆ ˆ nŒ~ ‚Œ `Ž‚}~X If you are a new SAPscript user, you should read parts 1 and 2 to familiarize yourself with SAPscript. If you are a more experienced SAPscript user, you should read part 2. You may choose to skim part 1. All examples and step-by-step intructions covered in part 2 are based on the SAPscript standard form for sales order confirmation (technical name RVORDER01). gˆ~ Although you can use parts of this guide as a tutorial, it is not intended to be a substitute for the SAP training course BC 460 SAPscript: Forms Design and Text Management in R/3. aˆ bŒ ~ `Ž‚}~ h‹€z‡‚“~}X iz‹ JS e~z‹‡‚‡€ lZiŒ|‹‚‰ [zŒ‚|Œ n Chapter 1: SAPscript Forms: The Big Picture Understanding concepts, architecture, and runtime environment of SAPscript forms n Chapter 2: SAPscript Forms: The Basics Form management tools and types of form components iz‹ KS fˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†Œ n Chapter 3: Getting Started with Forms Importing predeveloped forms into your system landscape n Chapter 4: Modifying SAPscript Forms: The Basics Modifying windows and content
  • 14. JM SAPscript Made Easy | Release 4.6 n Chapter 5: Modifying SAPscript Forms: Advanced Topics Logos, bar codes and other advanced topics iz‹ LS ŽŒˆ†‚“‚‡€ Z‰‰…‚|z‚ˆ‡Œ ˆ‹ lZiŒ|‹‚‰ _ˆ‹†Œ n Chapter 6: Customizing Sales and Distribution for Print Forms n Chapter 7: Customizing Materials Management for Print Forms n Chapter 8: Customizing Financial Accounting for Print Forms iz‹ MS Z‰‰~‡}‚‘~Œ n Appendix A: SAPscript Control Commands n Appendix B: Sample Forms n Appendix C: Third-Party Solutions pz@Œ g~ ‚‡ ‚Œ `Ž‚}~X Since the publication of the SAPscript Made Easy guidebook for Release 4.0B, the following new topics have been added: nŒ‚‡€ ~ €‹z‰‚| †z‡z€~†~‡ ˆˆ… ˆ ‚‡|…Ž}~ €‹z‰‚| ‚…~Œ ‚‡ z ˆ‹† You learn how to import a graphic file (in Windows BMP format ) into the document server, preview the graphic, and include the graphic in a form using the new graphic management tool. Additionally, you learn how to organize your own folder structure within the document server. For more information, see Chapter 5, “Modifying SAPscript Forms: Advanced Topics” on page 113. i‹‚‡‚‡€ ~‘ ~‹‚|z……’ You learn how to print text vertically using print controls. For more information, see Chapter 5, “Modifying SAPscript Forms: Advanced Topics” on page 113.
  • 15. Introduction JN nŒ‚‡€ ~ i^k_hkf |ˆ††z‡} ‚‡Œ~z} ˆ |z‡€‚‡€ ~ ‰‹‚‡ ‰‹ˆ€‹z† You learn how to use the SAPscript PERFORM command to receive additional data during the printing process. Often it is easier to use the PERFORM command than changing the print program. For more information, see Chapter 5, “Modifying SAPscript Forms: Advanced Topics” on page 113. i‹~‰z‹‚‡€ ˆ‹†Œ ˆ‹ †ˆ}‚‚|z‚ˆ‡ Language and page format differences exist for SAP standard forms and preconfigured forms used in the U.S. and Canadian markets. If you use the standard or preconfigured forms, you learn how to change the original language and page format for certain forms. For more information, see Chapter 3, “Getting Started with Forms” on page 47. ˆ‡~‡‚ˆ‡Œ Throughout this guide, you will find the symbols shown below. These mark special information that supplements the main discussion or theme. m~|mz…„: This symbol flags information that is highly technical. It is included for those who want to dig deeper into particular concepts or explore background theory. m‚‰Œ ? m‹‚|„ŒS This symbol flags suggestions, hints, and practical techniques to help you become more efficient in the way you use the R/3 System. zŽ‚ˆ‡S This symbol flags information that can help you steer clear of common pitfalls. It demands careful reading. TechTalk Tips Tricks Caution
  • 16. JO SAPscript Made Easy | Release 4.6 In the table below, you will find some of the text conventions used throughout this guide. Figure 0–1 Sample Enjoy R/3 (Release 4.6) screen Figure 0–2 Detailed screen elements Text convention What it means VDQVVHULI Command syntax. sans-serif italic Screen names or on-screen objects (buttons, fields, etc.). monospace User input (text the user types verbatim). name1 → name2 Menu selection. name1 is the menu name, and name2 is the item on the menu. Workplace Workplace Menu Standard Menu BarStandard Menu Bar Status Bar Screen Title Application Menu Bar Standard Menu Bar Application Menu Bar Status Bar Screen Title
  • 17. 3 $ 5 7 2 1 ( [e~z‹‡‚‡€ lZiŒ|‹‚‰ [zŒ‚|Œ
  • 19. + $ 3 7 ( 5 JlZiŒ|‹‚‰ _ˆ‹†ŒS m~ [‚€ i‚|Ž‹~
  • 20. KI SAPscript Made Easy | Release 4.6 h~‹‚~ This chapter provides an overview of SAPscript forms. After reading this chapter, you will be able to answer the following questions: n What are SAPscript forms? n What is the architecture of SAPscript forms? n How are SAPscript forms processed? n What are the different sources of SAPscript Forms? n Where can you find the SAPscript forms you need? pz Z‹~ lZiŒ|‹‚‰ _ˆ‹†ŒX To help you build the business forms (for example, invoices, purchase orders, etc.) you need, the R/3 System provides you form management tools and SAPscript forms. A SAPscript form is a template that simplifies the process of designing business forms. It supplies the layout (for example, page size) and content (for example, sales data for an invoice) for your business forms. You need SAPscript forms to print, distribute, or display the business forms. ^‘z†‰…~Œ ˆ lZiŒ|‹‚‰ _ˆ‹†Œ Some examples of SAPscript forms are shown in Figure 1–1: n Sales order confirmations n Invoices n Purchase orders n Prenumbered and unnumbered checks n Accounting statements n Packing and picking lists
  • 21. SAPscript Forms: The Big Picture KJ Figure 1–1 Sample SAPscript forms pz bŒ ~ Z‹|‚~|Ž‹~ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX Each SAPscript form consists of two main components: n Layout: The layout is defined by a set of windows in which the content appears. n Content: The content is either text (for example, business data for an invoice) or graphics (for example, a company logo). Figure 1–2 shows an invoice created with a standard SAPscript form. There are seven separate windows which define the overall layout of the invoice. Windows house the form content. To help you understand the architecture of a SAPscript form, the contents of the Payment Information window have been highlighted.
  • 22. KK SAPscript Made Easy | Release 4.6 Figure 1–2 Understanding the architecture of a SAPscript form The central object in a SAPscript form is the window. You can define the size, position, and content of each window in a form. As shown in Figure 1–3, a SAPscript form derives its structure from a set of windows (for example, logo, billing address, and information windows), each with its own content. For more information, see “What Are the Form Components?” on page 35. Figure 1–3 The role of windows in SAPscript forms Logo Window Main Window Payment Information Document Number 9000167 Document Date 06/03/1999 Purchase Order No. RJC-893 Purchase Order Date 06/02/1999 Packing List Number 80000145 Sales Order Number 180 Payment Terms Net 30 Billing Date 06/03/1999 Layout Content Window SAPscript Form Form Windows Content Top-Down Strategy SAPscript Form Logo Window Billing Address Window Address Window Information Window Invoice Details Window (Main Window)
  • 23. SAPscript Forms: The Big Picture KL aˆ Z‹~ lZiŒ|‹‚‰ _ˆ‹†Œ i‹ˆ|~ŒŒ~}X The SAPscript runtime environment coordinates the processing of SAPscript forms. As shown in Figure 1–4, the SAPscript runtime environment: n Retrieves layout and content data from the SAPscript form n Collects the necessary business data from the R/3 database n Generates the final SAPscript form The resulting business form can be printed, e-mailed, faxed, or displayed. Figure 1–4 How SAPscript forms are processed in the R/3 System pz Z‹~ ~ ]‚~‹~‡ lˆŽ‹|~Œ ˆ lZiŒ|‹‚‰ _ˆ‹†ŒX SAP provides you with two different sources for SAPscript forms: n Standard SAPscript forms: Standard SAPscript forms are delivered with the SAP standard client (usually referred to as client 000). n Preconfigured SAPscript forms (also called preconfigured forms): Developed for the U.S. and Canadian markets, the preconfigured SAPscript forms are delivered with the Preconfigured Client (PCC). Database Business Data SAPscript Runtime Environment SAPscript Form R/3 System Printer Onscreen E-mail Fax SAPscript Form
  • 24. KM SAPscript Made Easy | Release 4.6 n Current Preconfigured SAPscript forms: You can download current versions of the preconfigured forms from the Internet at: KWWSZZZVDSODEVFRPIRUPV. n SAPscript forms for R/3 Release 3.x: SAPscript forms are also available as separate files. For R/3 releases 3.0E, 3.0F, and 3.1H, SAP provides sets of SAPscript forms you can download from the Internet at: KWWSZZZVDSODEVFRPIRUPV lz‡}z‹} lZiŒ|‹‚‰ _ˆ‹†ŒS lˆ†~ ^‘z†‰…~Œ Here are some examples of standard SAPscript forms that are delivered with client 000: Table 1–1 Examples of standard SAPscript forms Form Description Standard Form Name Sales Order Confirmation RVORDER01 Packing List RVDELNOTE Invoice RVINVOICE01 Purchase Order MEDRUCK Prenumbered Check F110_PRENUM_CHCK
  • 25. SAPscript Forms: The Big Picture KN i‹~|ˆ‡‚€Ž‹~} lZiŒ|‹‚‰ _ˆ‹†ŒS lˆ†~ ^‘z†‰…~Œ Here are some examples of preconfigured forms delivered with the Preconfigured Client: p~‹~ ˆ _‚‡} ~ lZiŒ|‹‚‰ _ˆ‹†Œ ’ˆŽ g~~} Use Table 1–3 to help you find the SAPscript form you need. Table 1–2 Preconfigured SAPscript forms Form Description Preconfigured Form Name Sales Order Confirmation YPCC_ORDCONF_STD Packing List YPCC_PACKLIST Purchase Order YPCC_CHECK_NUM Invoice YPCC_INVOICE_STD Remittance Advice YPCC_REMITT_STD Account Statement / Open Item List YPCC_STATEMT_STD Balance Carried Forward Statement / Open Item List YPCC_STMBCF_STD Unnumbered Check YPCC_CHECK_UNN Prenumbered Check YPCC_CHECK_NUM Table 1–3 Where to find the SAPscript forms you need For... Go to... Standard SAPscript forms (complete list, organized along the application component hierarchy) From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. From the Form Painter: Request screen choose at right of the Form name field. The SAPscript Form Tree (Display Mode) screen shows the complete list. Preconfigured forms (updates and current development) KWWSZZZVDSODEVFRPIRUPV SAPscript forms (for R/3 releases 3.0E, 3.0F, and 3.1H) KWWSZZZVDSODEVFRPIRUPV
  • 27. + $ 3 7 ( 5 KlZiŒ|‹‚‰ _ˆ‹†ŒS m~ [zŒ‚|Œ
  • 28. KQ SAPscript Made Easy | Release 4.6 h~‹‚~ This chapter introduces you to the basics of SAPscript forms. To understand the “how-to’s” described in later chapters, you first need to become familiar with the following: n What are the form management tools in R/3? n What are the main components of SAPscript forms? For more information about SAPscript, see the R/3 online documentation (Basis → Basis Services/Communication Interfaces → SAPscript). pz Z‹~ _ˆ‹† fz‡z€~†~‡ mˆˆ…ŒX The task of managing forms typically involves layout and content considerations. To manage SAPscript forms, the R/3 System provides the following tools: n Form Painter – a graphical tool to manage form design and layout n PC Editor – a text-based tool to manage business content _ˆ‹† iz‚‡~‹ You use the Form Painter to manage the page layout of SAPscript forms. Z||~ŒŒ‚‡€ ~ _ˆ‹† iz‚‡~‹ mzŒ„ 6WDUW ZRUNLQJ ZLWK )RUP 3DLQWHU
  • 29. SAPscript Forms: The Basics KR JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. Depending on your display settings, the SAP Easy Access screen on your system may look different from the one shown above. To specify display settings, choose Extras → Settings. Then, select the desired options (for example, Show technical name). Tips Tricks
  • 30. LI SAPscript Made Easy | Release 4.6 KG On the Form Painter: Request screen: zG Enter a form name and language (for example, ZVORDER01 as the form and EN (English) as the language). {G Choose a form component option (for example, Header) in the Subobjects section. |G Choose Display or Change. The Form Painter consists of two screens: n Administrative Screen n Design Window You can modify each form component using the Administrative Screen. The Design Window (synchronized with the Administrative Screen) only appears, if you choose the form component Page Layout. For more information, see “What Are the Form Components?” on page 35. i ^}‚ˆ‹ You use the PC Editor to modify the content of SAPscript forms. With the PC Editor you can modify text elements or SAPscript command controls, and standard text. In the Subobjects section, select the form component you want to process as well as the processing mode (displaying or changing mode). The default setting under Subobjects is Header. To modify a form layout immediately, choose Page layout. Both synchronized screens of the graphical Form Painter appear. For more information, see “Page Layout” on page 40.Tips Tricks
  • 31. SAPscript Forms: The Basics LJ You can access the PC Editor in one of two ways: n Using the Form Painter n Using Standard Text To simultaneously modify form layout and content (for example, text elements or control commands), SAP recommends option 1 (see “Accessing the PC Editor via Form Painter” on page 31). To modify standard text only, use option 2 (see “Accessing the PC Editor via Standard Text” on page 32). Z||~ŒŒ‚‡€ ~ i ^}‚ˆ‹ ‚z _ˆ‹† iz‚‡~‹ mzŒ„ $FFHVVLQJ WKH 3 (GLWRU IURP )RUP 3DLQWHU JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter a form name and language (for example, ZVORDER01 as the form and EN (English) as the language). {G Select Page Layout in the Subobjects section. |G Choose Display or Change. LG To start the PC Editor directly from the Administrative Screen in Form Painter, choose . To access the PC Editor for the currently selected window, choose . The name of the currently selected window is displayed in the Name field.
  • 32. LK SAPscript Made Easy | Release 4.6 On the Administrative Screen, the PC Editor shows the content of the currently selected window. Z||~ŒŒ‚‡€ ~ i ^}‚ˆ‹ ‚z lz‡}z‹} m~‘ If you only want to change standard text, start the PC Editor without using Form Painter. Using Standard text is quicker than accessing through Form Painter, but you need the technical name of the text object you want to edit. mzŒ„ 2SHQ WKH 3 (GLWRU XVLQJ 6WDQGDUG WH[W JG From the SAP standard menu, choose Tools → SAPscript → SO10 - Standard Text.
  • 33. SAPscript Forms: The Basics LL KG On the Standard Text: Request screen: zG Choose the standard text by specifying Text name, Text ID and Language. {G Choose Change. The PC Editor appears for the chosen standard text.
  • 34. LM SAPscript Made Easy | Release 4.6 Z|‚z‚‡€ ~ `‹z‰‚|z… _ˆ‹† iz‚‡~‹ z‡} i ^}‚ˆ‹ The Form Painter provides graphical functionality for manipulating forms (see “Manipulating the Layout of a Form” on page 69). Before using the graphical Form Painter and the graphical PC Editor, you have to activate them. mzŒ„ $FWLYDWH WKH JUDSKLFDO )RUP 3DLQWHU DQG 3 (GLWRU JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen, choose Settings → Form Painter. This screen already shows the Form Painter. If the Form Painter is not activated yet, the screen may differ from the one shown.
  • 35. SAPscript Forms: The Basics LN LG On the User-Specific Settings screen: zG Make sure the Graphical Form Painter checkbox is selected. {G Make sure the Graphical PC Editor checkbox is selected. |G To activate user specific settings, choose . pz Z‹~ ~ _ˆ‹† ˆ†‰ˆ‡~‡ŒX SAPscript provides functions for form manipulation in the following areas: Table 2–1 SAPscript form components Form Component Description See Page Header General information and default settings 36 Paragraph formats Font and tab information for paragraphs 37 Character formats Font information within a paragraph 38 Page layout Page names with page flow information, position, and size of windows on the pages 40 Documentation Technical documentation about the form components 43
  • 36. LO SAPscript Made Easy | Release 4.6 a~z}~‹ The header consists of either administrative data for the form or basic settings that can be overridden in other parts of the form. The two elements most important to your customization are font and page format within the basic settings. Except for checks, the page format for the U.S. and Canada is LETTER and DIN A4 for Australia. The only purpose for the values “Lines per inch” and ”Characters/inch” is to convert the measures specified in lines and characters to absolute values. Do not change the values for “Lines per inch” and “Characters/inch” because you will readjust all tabs and window coordinates. We will discuss fonts later in this section.Caution The Lang. attributes section gives you important information about the called form. The Language field shows the language version you specified when you called the form. The Original lang. field shows the language to which you can change the form. It is usually the language in which the form was originally created. You can easily move to other components without leaving the above screen by choosing the related button of a component in the menu bar. For example, to move from the header to the page layout, choose Layout in the menu bar.Tips Tricks
  • 37. SAPscript Forms: The Basics LP iz‹z€‹z‰ _ˆ‹†zŒ A paragraph contains all the information needed to format text. In forms, not all of the formatting possibilities are used because most form paragraphs consist of only a line or a word. Font and tabs are the important paragraph formats. If you do not specify a font, the form uses the default font from the form header. If you want to create columns for outputting line items of a document, specify a list of tabs. The following screenshot illustrates the font attributes of a paragraph definition. If a paragraph uses a small font, set the line spacing to less than one line. Ensure that the printer can print more than six lines per inch. Tips Tricks
  • 38. LQ SAPscript Made Easy | Release 4.6 The following screenshot illustrates the tab attributes of a paragraph definition. Tab positions are specified as the number of characters from the left. The system uses the characters per inch value in the header basic settings to convert the number of characters into an absolute value. For this conversion, font size does not matter. z‹z|~‹ _ˆ‹†zŒ Character format overrides paragraph settings for specific words in a paragraph. For example, you might want to italicize a single word and not the entire paragraph. You can assign character formats to bar code printing. The standard attributes show: n Whether a character format is used for bar code printing n Which bar code format is used (you can choose predefined bar code formats form a list) To apply character strings within a paragraph using the PC Editor, mark the specific text and select the desired character format from the character string box. To apply character strings using the text editor, turn on the settings for the character string by enclosing the character string name in angle brackets before the specific text. To return to the standard paragraphs settings, insert a slash within angle brackets / at the end of the specific text. For example: BThese words will be bold/. TechTalk
  • 39. SAPscript Forms: The Basics LR For more information about bar code printing, see Chapter 5, “Modifying SAPscript Forms: Advanced Topics” on page 113. To access the font attributes of a character string, choose Font. For Font attributes, radio buttons can be used to underline, italicize, or bold the typeface. Retain means that underline, italic, or bold settings are retained from the paragraph. If a character string has no specified font, the paragraph font is used. The following screenshot displays the character string B, which changes the format to Bold, while the settings for Italics and Underline are retained from the paragraph.
  • 40. MI SAPscript Made Easy | Release 4.6 iz€~ ez’ˆŽ In page layout you can define or change windows. A window contains SAPscript text, which consists of text elements and the to-be-printed variables. There is one special window, MAIN, that contains the output of the document line items. Except for MAIN, the window type can be either variable (VAR) or constant (CONST). SAPscript does not distinguish between the two window types, although both types are mentioned in the SAPscript documentation. If you activate the Form Painter and choose Page layout from the Form Painter: Request screen, the following two screens appear: n Form: Change Page Layout screen (also referred to as the Administrative Screen) n Graphical Form Painter (also referred to as the Design Window) Figure 2–1 shows the synchronized screens you work with to modify page layout. You can easily move between screens by clicking on the desired screen. SAP online documentation on window types: Variable window content is regenerated on every new page. The content of a constant window is generated once and printed on every page. This means that, for better performance, windows that contain different information on different pages must be VAR; all others are CONST. The content of the window is defined in the SAPscript editor. TechTalk
  • 41. SAPscript Forms: The Basics MJ Figure 2–1 Form Painter screens On the Administrative Screen, choose to move to the window text. In this example the Window: INFO screen appears. n A gray shaded section represents SAPscript commands (including variables). n A white section shows you the content and layout. Design WindowDesign WindowDesign WindowDesign WindowDesign WindowDesign WindowDesign WindowDesign Window Administrative Screen
  • 42. MK SAPscript Made Easy | Release 4.6 oz‹‚z{…~Œ A variable name consists of the name of a DDIC structure, a hyphen, and a field name. All variable names must also be enclosed in ampersands (). If you want to output variables, you may format them. This step is necessary if you do not want the standard formatting of the variables coming from the data dictionary. For a detailed list of formatting options, see Appendix A, “SAPscript Control Commands” on page 221. Table 2–2 Common formatting options Common formatting options Syntax Truncating the variable length table-field(n) prints the first n characters of the variable Specifying the number of decimals table-field(.l) prints the variable with l decimals Outputting the variable with an offset table-field+m prints the rest of the variable after the first m characters Omitting leading zeros table-field(Z) omits the leading zeros Only the combinations of the first three formatting options are allowed. The syntax used to combine all three formatting options is: table- field+m(n.l)Tips Tricks
  • 43. SAPscript Forms: The Basics ML ]ˆ|ކ~‡z‚ˆ‡ Storing technical documentation for forms is a useful feature of SAPscript. Here, you can look for information about form variables, know when the print program fills the variables, and easily describe all your changes. We highly recommend using this feature, especially if you want to modify a form. In this example, we chose the display mode for the documentation. In the Display Documentation screen, you will find useful information about the form. The form, usage of windows, and text elements are described.
  • 45. 3 $ 5 7 7 : 2 Zfˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†Œ
  • 47. + $ 3 7 ( 5 L`~‚‡€ lz‹~} ‚ _ˆ‹†Œ
  • 48. MQ SAPscript Made Easy | Release 4.6 h~‹‚~ In the previous chapters you learned how SAPscript forms supply the basic layout and structure for your business forms. You are now ready to take the first step toward customizing SAPscript forms. To help you get started with SAPscript forms, this chapter covers the following: n What are the methods for importing (or copying) forms? n How to choose the best method for importing (or copying) forms? n How to import or copy forms? pˆ‹„‚‡€ ‚ lZiŒ|‹‚‰ _ˆ‹†ŒS _‚‹Œ l~‰Œ SAPscript forms are client-dependent. Before you can customize a SAPscript form, you must import (or copy) the form into the appropriate R/3 client. pz Z‹~ ~ f~ˆ}Œ ˆ‹ b†‰ˆ‹‚‡€ _ˆ‹†ŒX Depending on how the forms are available, there are two different methods for importing forms into your appropriate client. _ˆ‹†Œ Zz‚…z{…~ ˆ‡ z‡ kHL …‚~‡ If the forms are already available on an R/3 client (for example, on the SAP standard client 000, a preconfigured client, or another client), you must execute a client copy to import the forms into the appropriate client. For more information, see “Copying Forms between Clients” on page 49. _ˆ‹†Œ Zz‚…z{…~ zŒ l~‰z‹z~ _‚…~Œ If the forms are available at a file location (for example, on the D drive), you must first import the forms into your client. For more information, see “Importing Forms from a File” on page 58.
  • 49. Getting Started with Forms MR aˆ ˆ ˆˆŒ~ ~ [~Œ f~ˆ}X Use the table below to determine which import method applies to your situation. Each number represents a different procedure. If more than one procedure is applicable, try to use the one with the lower number. If you are using the Preconfigured Client, simply copy the forms from the PCC client to your client. For more information, see “Copying Forms between Clients” on page 49. U.S. and Canadian customers not using the Preconfigured Client may want to begin by importing the forms from a file. For more information, see “Importing Forms from a File” on page 58. ˆ‰’‚‡€ _ˆ‹†Œ {~~~‡ …‚~‡Œ If you want to use preconfigured forms or standard forms that are available in another client than your specific development client, you have to copy the forms between clients. Since we assume you will not perform any development directly in the preconfigured client or standard client, you have to copy the forms—either from the standard client 000 or the preconfigured client—to your specific development client. The task in this section describes how to copy forms from one client to another. You will learn to execute a client copy for standard forms between the standard client 000 and the client you are currently logged on to. Table 3–1 Choosing the best method to import forms Type of Forms Needed Using Preconfigured Client Using SAP Client U.S. or Canadian 0 1 2 Copy preconfigured form from PCC client to yours Copy standard form from client 000 to yours Import from file 1 2 Copy standard form from client 000 to yours Import forms from file All other countries 1 2 Copy standard form from client 000 to yours Import forms from file 1 2 Copy standard form from client 000 to yours Import forms from file Before modifying forms, make sure that you only modify copies. Caution
  • 50. NI SAPscript Made Easy | Release 4.6 If you are using the Preconfigured Client, you may have to copy preconfigured forms from the PCC to another client. Copying forms from the PCC is analog to copying forms from standard client 000; you only have to replace the client number 000 with the client number of your preconfigured client. mzŒ„ RS IRUPV EHWZHHQ FOLHQWV The following procedure describes how to copy the form RVORDER01 for sales order confirmation. JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen, choose Utilities → Copy from client. Make sure you are working in the client that is going to receive the forms.
  • 51. Getting Started with Forms NJ LG On the Copy Forms Between Clients screen: zG Enter the form name (for example, RVORDER01) in the Form name field. {G Enter the target form name, replacing the first letter of the form name with Z (for example, ZVORDER01), in the Target form field. |G Choose . MG On the Create Object Directory Entry screen: zG Enter a development class. {G Choose . The new name of a copied form (target form) must begin with Y or Z, because the form name must be located in the customer name space to be modifiable later. The default value for the Source client field is the SAP standard client number 000. If you are copying the forms from the preconfigured client (for example, the preconfigured client number is 010), you have to overwrite the source client number 000 (for example, with 010).
  • 52. NK SAPscript Made Easy | Release 4.6 You have now copied the form from one client to another. The system displays an action log. NG Go Back three times to return to the SAP standard menu. i‹~‰z‹‚‡€ ˆ‰‚~} _ˆ‹†ŒS Z}}‚‚ˆ‡z… mzŒ„Œ Every time you copy forms between clients, you have to consider two important attributes of the form: The original language and the assigned paper size. n Standard SAPscript forms are delivered with original language DE (German) and paper size DIN A4 (210 x 297 mm.). n Preconfigured SAPscript forms are delivered with original language EN (English) and paper size LETTER (215 x 279 mm.). gˆ~ Since the forms delivered with the Preconfigured Client use English, you do not have to change the original language for forms copied from the PCC. h‹‚€‚‡z… ez‡€Žz€~ You can modify forms only in the original language. Before you change a copied form, make sure you choose the correct language version of the form. Since the SAP standard forms currently use DE
  • 53. Getting Started with Forms NL (German) as the original language, you may want to change the original language to EN (English). The following task shows how to change the original language for a form. mzŒ„ KDQJH WKH RULJLQDO ODQJXDJH *HUPDQ '(
  • 54. RI WKH FRSLHG VWDQGDUG IRUP =925'(5 WR RULJLQDO ODQJXDJH (QJOLVK (1
  • 55. JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER01 in the Form field. {G Enter DE in the Language field. |G Choose Change. If you activate the Change and Transport System (CTS), put your new form ZVORDER01 on a correction request.
  • 56. NM SAPscript Made Easy | Release 4.6 LG Choose Utilities → Convert orig. lang. to change the original language of the copied form. MG In the Convert Original Language window: zG Enter EN in the To original language field. {G Choose . The system converts the original language from DE to EN, as shown in the message displayed in the status bar. If a message is not displayed in a separate information window, the message will be displayed in the window’s status bar.
  • 57. Getting Started with Forms NN z‡€‚‡€ iz€~ _ˆ‹†z ˆ z _ˆ‹† Since the preconfigured forms are developed with page format LETTER and the standard forms with page format DIN A4, you may want to change the page format for a form. You can easily convert the page format DIN A4 to LETTER and vice versa by executing the program RSTXFCON. The program RSTXFCON converts the current form page format to the specified page format checking the position and size of each window on each page. In general, the program tries to hold the position and size of a window. The program first moves the window, and only if necessary, reduces the window size. It is important to understand the program will never enlarge a window. In general, you should execute the conversion program only for page formats that are very similar. The more different the page format, the more additional manual changes are necessary after executing the program. mzŒ„ KDQJH WKH SDJH IRUPDW ',1 $ WR /(77(5 IRU IRUP =925'(5 JG From the SAP standard menu, choose Tools → ABAP Workbench → Development → SE38 – ABAP Editor. KG On the ABAP Editor: Initial Screen: zG In the Program field, enter RSTXFCON. {G Choose . Before you change the page format, make sure the form is active.
  • 58. NO SAPscript Made Easy | Release 4.6 LG On the SAPscript: Conversion of Page Format for Forms screen: zG In the Form name field, enter the desired form name (for example, ZVORDER01). {G In the New page format field, enter the desired page format (for example, LETTER). |G Make sure that the check box Test run, do not save is selected. }G Choose . ~G Review the action protocol for the test run. G Go Back. Print the protocol to have a copy of the parameters that will be changed by the conversion program. Click at the right of the New page format field and then choose the desired page format from the list of available standard page formats. Tips Tricks
  • 59. Getting Started with Forms NP MG If you want to change the paper format, execute the conversion program again, by deselecting the check box Test run, do not save and choose . NG If you do not want to change the paper format, go Back twice to return to the SAP standard menu.
  • 60. NQ SAPscript Made Easy | Release 4.6 b†‰ˆ‹‚‡€ _ˆ‹†Œ ‹ˆ† z _‚…~ The following section describes how to import forms from a file. Importing from a file is a very practical way to start your form development process in order to save time and money. Importable files with SAPscript forms can be found on the Internet at: KWWSZZZVDSODEVFRPIRUPV. The easiest way to import forms into your R/3 System is to make the files available on the presentation server (that is, the computer where the SAPGUI is running). gˆ~ You may also place the files on the application server. However, this process is somewhat complicated, particularly if the R/3 System is running on a multi-server machine. mzŒ„ ,PSRUW D IRUP IURP D ILOH LQWR RXU FOLHQW JG Log on to the presentation server where you want to make the forms available. KG Copy the to-be-imported forms to the desired drive of your presentation server. LG Log on to the client that is going to receive the imported forms. MG From the SAP standard menu, choose Tools → ABAP Workbench → Development → SE38 - ABAP Editor. Forms are client dependent. Therefore, the upload program only creates forms in the client where the program has been executed. TechTalk
  • 61. Getting Started with Forms NR NG On the ABAP Editor: Initial Screen: zG Enter RSTXSCRP in the Program field. RSTXSCRP is the name of the upload program in the R/3 System. {G Choose . Although the RSTXSCRP report is an easy and quick way to get a form into the R/3 System, there are some restrictions. Make sure that you also read SAPNet - R/3 frontend note 3355 to learn more about this and similar import functions for forms. TechTalk
  • 62. OI SAPscript Made Easy | Release 4.6 OG On the SAPscript Export to Dataset / SAPscript Import from Dataset screen: zG Enter the object name of the form (for example, ZVORDER01) in the Object name field. {G Enter IMPORT in the Mode field. |G If you use the presentation server, select From/on frontend, otherwise select From/on application server. }G Enter the name of the dataset and the path (for example, C:order01.scr) in the Dataset name field. ~G Choose . PG In the Import from a Local File window: zG Enter the full path to the file containing the desired dataset in the File name field. {G Choose Transfer. The file transfer is now complete. To import other forms, repeat the steps shown in this task.
  • 63. Getting Started with Forms OJ The result of the file transfer is the protocol displayed below. QG Go Back three times to return to the SAP standard menu.
  • 65. + $ 3 7 ( 5 Mfˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS m~ [zŒ‚|Œ
  • 66. OM SAPscript Made Easy | Release 4.6 h~‹‚~ In the previous chapter you learned how to import SAPscript forms in your development client. You already know the form management tools Form Painter and PC Editor and how to access them. You are now ready to start modifying forms. This chapter focuses on basic form modifications as: n Copying a form n Test printing a form n Modifying the layout of a form (creating, renaming, moving, resizing, or deleting a window) n Modifying the content of a form (moving fields or tabs, looking up a field in the data dictionary, adding fields to your form, or adding fields to a print structure) To make your next system upgrade easier and smoother, do not modify the standard forms or the forms from the disk. Copy these forms and modify the copies, not the standard forms.Caution
  • 67. Modifying SAPscript Forms: The Basics ON ˆ‰’‚‡€ z _ˆ‹† Forms must be copied before changes are made. The following example shows how to copy a form. mzŒ„ RS D IRUP IRU D VDOHV RUGHU FRQILUPDWLRQ JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter the name of the new form in the Form field. This name should be as similar as possible to the old name and has to begin with Z or Y, since the new form name has to be in the name range for customer objects (for example, the new name for the Sales Order Confirmation is ZVORDER02). {G Enter EN in the Language field. |G Choose Create.
  • 68. OO SAPscript Made Easy | Release 4.6 LG Choose to accept the message displayed in the popup window. MG On the Administrative Screen: zG Enter Sales Order Confirmation in the Description field. {G From the menu bar, choose Form → Copy from. NG In the popup window: zG Enter ZVORDER01 in the Form field. {G Enter EN in the Language field. |G Choose .
  • 69. Modifying SAPscript Forms: The Basics OP OG On the Form: Change Header: ZVORDER02 screen: zG Save form ZVORDER02. If your system is connected to the Change and Transport System (CTS), the new form must be written on a correction request. (The instructions for writing a correction request are not included in this guide.) {G To activate the changes, choose . |G Go Back to return to the SAP standard menu. m~Œ i‹‚‡‚‡€ z _ˆ‹† Test prints provide an easy way to check modified forms. On a test print, SAPscript prints a string of Xs for all of the variables used in the form. For example, if a variable is 5 characters in length, SAPscript prints XXXXX in its place. All windows, except MAIN, are printed as they appear in the actual output. MAIN contains a list of all defined text elements. To test the form during sales order customizing, specify that form. ZVORDER02 should be used to print all sales order confirmations. For more information, see Chapter 6, “Customizing Sales and Distribution for Print Forms” on page 161. If you activate the form, it is not necessary to save the form in step 6a, because the form is saved during activation in step 6b. Tips Tricks
  • 70. OQ SAPscript Made Easy | Release 4.6 mzŒ„ ([HFXWH D SULQW WHVW RI D IRUP JG From SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G From the menu bar, choose Utilities → Test print.
  • 71. Modifying SAPscript Forms: The Basics OR LG On the Print screen: zG Enter a printer name (for example, LP01) in the OutputDevice field. {G Select Print immediately. |G Choose Print. MG On the Form Painter: Request screen, go Back to return to the SAP standard menu. fz‡‚‰Ž…z‚‡€ ~ ez’ˆŽ ˆ z _ˆ‹† Manipulation of the layout of a form can be subdivided into the following operations: n Creating a new window n Renaming a window n Changing the position of a window n Changing the size of a window n Removing a window n Aligning a window
  • 72. PI SAPscript Made Easy | Release 4.6 gˆ~ The following sections describe the manipulation of a form using the graphical Form Painter. It is always possible to manipulate the forms by conventional means in the Administrative Screen, that is, by specifying the coordinates of windows by numerical values. For instructions switching over to the graphical Form Painter, see “Activating the Graphical Form Painter and PC Editor” on page 34. ‹~z‚‡€ z g~ p‚‡}ˆ mzŒ„ $GG D QHZ ZLQGRZ WR D IRUP JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change. LG In the Design Window, right-click to access the form layout manipulation menu and choose Create window. The window can also be created by choosingEdit → Windows → Create → Variables window from the menu on the Administrative Screen.
  • 73. Modifying SAPscript Forms: The Basics PJ MG Click on the Administrative Screen. NG To activate the changes, choose . In general, you will proceed with: n Renaming the newly created window (see “Renaming a Window” on page 72) n Changing the size of the newly created window (see “Changing Window Position or Size Using Design Window” on page 75) n Changing the position of the newly created window (see “Changing Window Position or Size Using Design Window” on page 75) The new window is automatically named WINDOW1 and placed in the top left corner of the page.
  • 74. PK SAPscript Made Easy | Release 4.6 k~‡z†‚‡€ z p‚‡}ˆ mzŒ„ KDQJH WKH QDPH DQG GHVFULSWLRQ
  • 75. RI WKH H[LVWLQJ ZLQGRZ IRU H[DPSOH :,1'2: WR $''5(66
  • 76. JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change.
  • 77. Modifying SAPscript Forms: The Basics PL LG In the Design Window: zG Select WINDOW1. {G Right-click to access the form layout manipulation menu and choose Rename. MG On the Rename window: zG Enter a name (for example, ADDRESS2) in the to field. {G Choose . NG Click on the Administrative Screen.
  • 78. PM SAPscript Made Easy | Release 4.6 OG On the Administrative Screen: zG Enter a description for the renamed window (for example, Shipping Address) in the Description field. {G To activate the changes, choose . |G Go Back twice to return to the SAP standard menu. The window can also be renamed by choosing Edit → Windows → Rename from the menu bar on the Administrative Screen.
  • 79. Modifying SAPscript Forms: The Basics PN z‡€‚‡€ p‚‡}ˆ iˆŒ‚‚ˆ‡ ˆ‹ l‚“~ nŒ‚‡€ ]~Œ‚€‡ p‚‡}ˆ mzŒ„ (QODUJH RU VKULQN WKH VL]H RI D ZLQGRZ RU SODFH D ZLQGRZ DW DQRWKHU SRVLWLRQ LQ WKH IRUP JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change.
  • 80. PO SAPscript Made Easy | Release 4.6 LG In the Design Window: zG To move a window, grab the window by pressing the left mouse button. Move the window to the new position while keeping the left mouse button pressed. Release the left mouse button at the new position. {G To change the size of a window, position the cursor on the corner or edge of the window and press the left mouse button. Keep the left mouse button pressed while changing the window size. Release the left mouse button when the new size is adjusted. MG Click on the Administrative Screen. zG To activate the changes, choose . {G Go Back twice to return to the SAP standard menu.
  • 81. Modifying SAPscript Forms: The Basics PP z‡€‚‡€ p‚‡}ˆ iˆŒ‚‚ˆ‡ ˆ‹ l‚“~ nŒ‚‡€ Z}†‚‡‚Œ‹z‚~ l|‹~~‡ mzŒ„ KDQJH WKH SRVLWLRQ RU VL]H RI D ZLQGRZ E FKDQJLQJ WKH PDUJLQ SRVLWLRQ RU WKH ZLGWK DQG KHLJKW RI D ZLQGRZ JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change. LG Click on the Administrative Screen.
  • 82. PQ SAPscript Made Easy | Release 4.6 MG In the Windows section of the Administrative Screen: zG Choose a window by clicking the arrow in the Name field. {G Choose the desired window name. |G To change the position of the chosen window, change the values in the Left margin and Upper margin fields. }G To change the size of the chosen window, change the values in the Window width and Window height fields. ~G To activate the changes, choose . G Go Back twice to return to the SAP standard menu.
  • 83. Modifying SAPscript Forms: The Basics PR k~†ˆ‚‡€ z p‚‡}ˆ mzŒ„ 'HOHWH WKH ZLQGRZ $''5(66 IURP WKH IRUP JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change.
  • 84. QI SAPscript Made Easy | Release 4.6 LG In the Design Window: zG Select ADDRESS2. {G Right-click to access the form layout manipulation menu and choose Delete. MG Click on the Administrative Screen. NG On the Administrative Screen: zG To activate the changes, choose . {G Go Back twice to return to the SAP standard menu. Z…‚€‡‚‡€ p‚‡}ˆŒ ˆ ~ `‹‚} You will notice a grid in the background of the Design Window. You can adjust the grid step size by specifying the step width (from 0 to 10) and the unit of measurement (for example, inches, millimeters, etc.). If you activate the automatic alignment in the Form Painter, the precise position or size of the windows will be defined by the grid.
  • 85. Modifying SAPscript Forms: The Basics QJ mzŒ„ $GMXVW WKH JULG VWHS VL]H RI D IRUP JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change. LG On the Administrative Screen, choose Utilities → Options. MG In the Options window: zG Adjust the new Step size for the grid with a value between 0 (zero) and 10. {G Select Align automatically to grid. |G Choose . The grid measurement unit can also be changed here (for example, in the Unit of measure field, change MM to IN).
  • 86. QK SAPscript Made Easy | Release 4.6 gˆ~ You activated the Align automatically to grid option. Next time you change the position or size of a window, the system automatically aligns the window to the grid you defined in step 4a. fz‡‚‰Ž…z‚‡€ _ˆ‹† ˆ‡~‡ This section highlights the major features available for manipulating the content of a window, for example its text fields. The following functions will be described in detail: n Moving a field n Removing a field n Looking up a field n Adding a new field n Adding a field to the print structure fˆ‚‡€ z _‚~…} Text appearing in the form output can be moved as follows: n If it is the only text in a window, move the window (as described in “Changing Window Position or Size Using Design Window” on page 75). n If it is positioned with a tab, move the tab. n If it has to be moved vertically, insert or delete an empty line. The following sections describe how to manipulate the content of a window with the PC Editor. Of course, it is always possible to manipulate the content in the conventional way (that is, by specifying the position of a field with numerical values). Caution
  • 87. Modifying SAPscript Forms: The Basics QL fˆ‚‡€ z mz{ mzŒ„ ,Q WKH WDEOH KHDGHU RI OLQH LWHPV IRU DQ RUGHU FRQILUPDWLRQ PRYH WKH WH[W Material RQH FKDUDFWHU WR WKH ULJKW JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change. In this example, we move one word in the table header of line items in a sales order one character to the right. The complete task would be also to move the corresponding line item variable to match the columns for both the table header and line items. Tips Tricks
  • 88. QM SAPscript Made Easy | Release 4.6 LG In the Design Window: zG Activate the MAIN window. {G Right-click to access the form layout manipulation menu and choose Edit text. If any unknown paragraph formats are used in the window, the Form Painter cannot call the PC Editor; it launches the text editor instead. A message indicating the names of the unknown formats appears in the status line of the Administrative Screen where the text editor is located. In general, you should assign a paragraph format, which is already defined for the form, to each paragraph with an unknown paragraph format. TechTalk
  • 89. Modifying SAPscript Forms: The Basics QN MG On the Window MAIN screen: zG Scroll down until you see /E ITEM_HEADER. {G Look at the line where Material is printed in paragraph format IL. Material is printed after the first tab, which is represented by a set of double commas. To move the word one character to the right, you must increase the tab by 1. NG Go Back to return to the Administrative Screen. If a window uses an unknown paragraph format, the Form Painter can not call the PC Editor. You have the following alternatives: n Work with the line editor as described in the example. This needs a little practice, because the technique is different from the way you work with the PC Editor. n Create paragraph formats for the unknown formats.
  • 90. QO SAPscript Made Easy | Release 4.6 OG On the Administrative Screen: zG Choose Paragraph formats. {G Select IL by double-clicking on its line. The paragraph format will be highlighted after selection. |G Choose Tabs.
  • 91. Modifying SAPscript Forms: The Basics QP PG In the Form: Change Paragraphs: ZVORDER02 window, in the Tabs block: zG The first tab entry means that the first tab position is 7 characters from the left border of the form, and the corresponding text will be printed with left alignment. {G To move Material one character to the right, increase the first tab by one and overwrite 7.00 with 8.00. |G To activate the changes, choose . }G Go Back twice to return to the SAP standard menu.
  • 92. QQ SAPscript Made Easy | Release 4.6 b‡Œ~‹‚‡€ ˆ‹ ]~…~‚‡€ z e‚‡~ mzŒ„ 2Q DQ RUGHU FRQILUPDWLRQ LQVHUW D EODQN OLQH EHWZHHQ ³VKLSWR DGGUHVV´ DQG ³DGGUHVV´ JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change.
  • 93. Modifying SAPscript Forms: The Basics QR LG In the Design Window: zG Right-click the INFO1 window. {G Right-click to access the form layout manipulation menu and choose Edit text. |G Position the cursor where you want to insert an empty line. In this example, it is following the Ship-to address. MG Press Enter on your keyboard. A new line is inserted behind the cursor position as shown in the illustration below. NG Go Back to return to the Administrative Screen. Note that the ship-to address is printed only if the variable for the ship-to country, VBDKA-LAND1, is filled. Character string s (small font) is used to print the Ship-to address.
  • 94. RI SAPscript Made Easy | Release 4.6 OG To activate the changes, choose . ]~…~‚‡€ p‚‡}ˆ m~‘ nŒ‚‡€ ~ i ^}‚ˆ‹ n To delete the content of a line in a window, highlight and delete the content. Then place the cursor on the empty line and delete the line. n To delete an entire block, highlight and delete the block. ]~…~‚‡€ p‚‡}ˆ m~‘ ŽŒ‚‡€ ~ m~‘ ^}‚ˆ‹ n To delete a line in a window, overwrite the line (including the format column) using spaces. n To delete an entire block of lines, mark the block by double-clicking on the format columns of the first and last lines. Choose Delete. k~†ˆ‚‡€ z _‚~…} There are several different cases to consider when removing a field. Case 1: The field is not located with other fields in a command line. You can remove the field by deleting the command line. Case 2: The field is located with other fields in a command line. Tabs do not separate the fields. You can remove the field by changing the command line. In the command line, highlight the field and delete it. Case 3: The field is located in a line item table. Tabs separate the different table columns. For example, to remove the item number from a sales order confirmation delete the text ITEM and the subsequent tab in the item header and move the text Material and Description. Next, delete the item number variable and move the material number and the description variables. After overwriting a line with spaces, do not choose Enter because it will insert an empty line. To exit the text editor, choose Back. A command line is highlighted gray in the PC Editor.
  • 95. Modifying SAPscript Forms: The Basics RJ mzŒ„ 5HPRYH WKH LWHP QXPEHU IURP D VDOHV RUGHU FRQILUPDWLRQ JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change.
  • 96. RK SAPscript Made Easy | Release 4.6 LG In the Design Window: zG Activate the MAIN window. {G Right-click to access the form layout manipulation menu and choose Edit text. The PC Editor for the MAIN window is displayed on the Administrative Screen.
  • 97. Modifying SAPscript Forms: The Basics RL MG On the Window MAIN screen: zG Scroll down until you see the command line ITEM_HEADER. {G From the menu bar, choose Format → Paragraph on/off to display the tabs in the PC Editor. NG Highlight the text Item and the subsequent tab (represented by an arrow) and delete both (press the Delete key on your keyboard). If you do not know the paragraph format which is used for a text element in the PC Editor, you can display the paragraph format by choosing Formats. For the first text element displayed under the command line ULINE (71), the paragraph format is IL (line item).
  • 98. RM SAPscript Made Easy | Release 4.6 OG On the Window MAIN screen: zG Scroll down until you see the command line ITEM_LINE. All lines within this section have the paragraph format IL (line item). {G Click the variable VBDPA-POSNR. |G Choose to delete the variable. PG Delete the tab that follows VBDPA-POSNR.
  • 99. Modifying SAPscript Forms: The Basics RN QG Delete the first tab in the four lines that follow. The screenshot shows the result of the changes. Since you deleted the first tab in the paragraph format IL (line item), you have to adjust the tabs for this paragraph format. RG Go Back to return to the Administrative Screen. JIG On the Administrative Screen: zG Choose Paragraph formats. {G Double-click paragraph format IL. |G Choose Tabs.
  • 100. RO SAPscript Made Easy | Release 4.6 }G To delete the first tab you have to overwrite the first tab position 7.00 with blanks. ~G To move the second tab to the left you have to adjust the second tab position by overwriting 26.00 with 19.00. Since the first tab was positioned seven characters from the left, the second tab has to be moved nineteen characters to the left (26 minus 7). G To activate the changes, choose . €G Go Back twice to return to the SAP standard menu. gˆ~ The system automatically removes blank tab lines by shifting the entries of the second tab line (Number 2) to the first tab line (Number 1). eˆˆ„‚‡€ n‰ z _‚~…} To add a new field, first make sure that the new field is “printable.” Only data dictionary defined fields can be used as printable fields. So, before adding a new field, determine whether the field name is part of the data dictionary. Some of the structures have user exits for additional to-be-printed fields. Although it is sometimes enough to add the user exit field to the structure, some ABAP programming may be necessary. All R/3 documents have at least two structures defined in the data dictionary. These structures are used to print header and line item document data. The fields of these structures can be used as variables in the layout set.Tips Tricks
  • 101. Modifying SAPscript Forms: The Basics RP mzŒ„ /RRN XS WKH ³VDOHV RIILFH´ ILHOG LQ WKH GDWD GLFWLRQDU JG From the SAP standard menu choose Logistics → Sales and Distribution → Sales → Order → VA02 - Change to locate the Sales office field. KG On the Change Sales Order: Initial Screen: zG In the Order field, enter a sales order (for example, 5040). {G Choose Sales. LG On the Change OR Standard Order OR ...: Overview screen, choose Goto → Header → Sales from the menu bar. MG On the Change OR Standard Order OR ...: Header Data screen: zG Place the cursor in the field to determine that field’s technical name (for example, Sales office). {G Press F1 or Help. NG On the Help - Change OR Standard Order OR ...: Header Data window, choose Technical info.
  • 102. RQ SAPscript Made Easy | Release 4.6 On the Technical Information window you find the technical name of the Sales office field in the Field name field. In our example the technical name is VKBUR. The next step is to decide if the field Sales office belongs to the document header or the document items. In this example, Sales office belongs to the header because it was accessed via the path Goto → Header → Sales on the Change Standard Order: Overview screen. The next task is to find out if the field is designated for output. Table 4–1 shows the structures used to print header and item data. A field is flagged as an output field only if it is included in one of the structures shown in Table 4–1. The technical name of a field is displayed in the Field name.
  • 103. Modifying SAPscript Forms: The Basics RR gˆ~ The Prenumbered Check print program also provides REGUD, a structure for bank data. mzŒ„ 'HWHUPLQH ZKHWKHU WKH ILHOG 9.%85 LV LQFOXGHG LQ WKH WDEOH 9%'.$ JG From the SAP standard menu, choose Tools → ABAP Workbench → Development → SE11 - ABAP Dictionary. Table 4–1 Structures used to print header and item data Item Data Dictionary Structure Sales Order Confirmation VBDPA Packing List VBDPL Picking List VBLKP Invoice VBDPR Purchase Order EKPO Prenumbered Check REGUP PP Goods Issue Slip RESBD PP Pick List RESBD PP Confirmation Slip AFVGD PP Time Ticket AFVGD PP Goods Receipt List RESBD (In addition for co-products with settlement: AFPOD) PP Operations Control Ticket AFVGD PP Object List AFVGD PP Kanban Card KARTE
  • 104. JII SAPscript Made Easy | Release 4.6 KG On the Dictionary: Initial Screen: zG Enter VBDKA in the Database table field. {G Choose Display. The result is a list of all fields in table VBDKA. LG From the SAP standard icon bar, choose .
  • 105. Modifying SAPscript Forms: The Basics JIJ MG On the Dictionary: Display Structure dialog window: zG Enter VKBUR. {G Choose . NG On the Dictionary: Display Structure screen, the cursor will be positioned automatically on the field name VKBUR. If the field name is not found, the message String ‘...’ not found appears. If the field name was found, follow the steps in “Adding a New Field” on page 102. If the field name was not found, proceed to the “Adding a Field to the Print Structure” on page 106 and then follow the steps in the “Adding a New Field” on page 102.
  • 106. JIK SAPscript Made Easy | Release 4.6 Z}}‚‡€ z g~ _‚~…} mzŒ„ $GG WKH ³VDOHV RIILFH´ ILHOG WR WKH ERWWRP RI WKH ,1)2 ZLQGRZ JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change.
  • 107. Modifying SAPscript Forms: The Basics JIL LG In the Design Window: zG Select INFO. {G Right-click to access the form layout manipulation menu and choose Edit text.
  • 108. JIM SAPscript Made Easy | Release 4.6 MG On the Window INFO screen: zG Scroll down to the last line, position the cursor behind the last character, and press Enter to create a new line. {G Enter Sales Office (the header of the new variable). |G Format the newly entered text by marking it. }G Choose the paragraph format AS (standard paragraph) and the character format S (small key word). ~G Choose Enter. G Enter VBDKA-VKBUR (the variable name is enclosed in ampersands). After creating the new line, the paragraph is automatically set to AS. This is the last paragraph used in this window. All headers are printed in a smaller font, defined with the character string S. A variable name is the name of the structure followed by a hyphen (“-”) and the field name. Variable names must be enclosed in ampersands. TechTalk Tips Tricks
  • 109. Modifying SAPscript Forms: The Basics JIN NG Go Back to return to the Administrative Screen. OG On the Administrative Screen: zG To activate the changes, choose . {G Go Back twice to return to the SAP standard menu.
  • 110. JIO SAPscript Made Easy | Release 4.6 Z}}‚‡€ z _‚~…} ˆ ~ i‹‚‡ l‹Ž|Ž‹~ This section provides directions on how to add a new field to a print structure. If a field is not included in a print structure, follow the step- by-step example in this section. For example, field XBLNR is not included in the sales order header print structure. For more information, refer to the Standard Order: Header → Business Data → Billing Details screen. XBLRN is the Reference No. field in the Financial Accounting section. The following table shows the names of structures that you can add field names to: If you want to include the field XBLNR to the sales order header add it to the substructure VBDKAZ. mzŒ„ $GG WKH ;%/15 ILHOG WR SULQW VWUXFWXUH 9%'.$= JG From the SAP standard menu, choose Tools → ABAP Workbench → Overview → SE84 - Information System → ABAP Dictionary → Basic objs → Structures. These steps only apply to SD documents. No steps exist for other documents. However, the structures for the other documents already contain most, if not all, of the required fields. Table 4–2 Names of structures to which field names can be added Document Structure Sales Order Header VBDKAZ Sales Order Item VBDPAZ Packing List Header VBDKLZ Packing List Item VBDPLZ Picking List Header VBLKKZ Picking List Item VBLKPZ Invoice Header VBDKRZ Invoice Item VBDPRZ SD structures include substructures. By adding a field to a substructure and activating it, a field is automatically added to the structure. These substructures are treated as user exits, and SAP does not overwrite them during an upgrade.
  • 111. Modifying SAPscript Forms: The Basics JIP KG On the R/3 Repository Information System: Structures screen: zG Enter VBDKAZ in the Structure name field. {G Choose . LG On the Structures (1 Hits) screen: zG Select the structure VBDKAZ. {G Choose .
  • 112. JIQ SAPscript Made Easy | Release 4.6 MG A 20-digit object access key must be specified to register the object as modified. Next, proceed with the whole object reparation procedure. During the procedure, you must specify the object you want to modify. In this example, you must enter R3TR TABL VBDKAZ in the Object registration screen. NG On the Dictionary: Maintain Structure screen: zG Choose a blank line. {G Enter XBLNR in the first Comp field. In this example, the field represents the object‘s field name. |G Enter XBLNR in the second Comp field. In this example, the field represents the object‘s data element name. }G To activate the changes, choose . Now VBDKA-XBLNR is a valid variable that can be added to the form. Note that the name of the structure is still VBDKA, not VBDKAZ. If the original language and the logon language are different a dialog window appears. You can maintain the structure VBDKAZ in its original language or in the logon language.TechTalk If you do not know where to get this object access key or you are not familiar with the object reparation procedure, see your system administrator. Normally, the field name and the data element name are the same.
  • 113. Modifying SAPscript Forms: The Basics JIR The next step is to find out whether or not additional ABAP programming is needed to fill the variable, or if the new variable has been automatically filled in. When you look up the field name, notice the table name where the field is stored. For XBLNR, the table is VBAK. Table 4–3 shows the name of all tables where no additional ABAP programming is necessary: If additional ABAP programming is necessary, the following programs have been provided to fill the variables. However, this guide does not provide programming instructions. Table 4–4 shows the user exit program names: In the sales order print program, the header data is collected in VBDKA. The item data structure is POS. Table 4–3 Tables that do not require ABAP programming Document Tables Sales Order Header VBAK Sales Order Item VBAP Packing List Header LIKP Packing List Item LIPS Picking List Header LIKP Picking List Item LIPS Invoice Header VBRK Invoice Item VBRP Table 4–4 User exit program names Document Program Sales Order V05DZZEN Packing List V05OZZEN Picking List V05AZZEN Invoice V05NZZEN
  • 114. JJI SAPscript Made Easy | Release 4.6 ^‘z†‰…~ This is an example for a sales order user exit, where data was first selected to be added to the header and then to be added to the items. 6HOHFW ILHOG IURP GEWDE DQG SXW LW LQWR QHZILHOG LQ YEGND 6HOHFW VLQJOH IURP GEWDE ZKHUH YEHOQ YEGNDYEHOQ ,I VVXEUF 9EGNDQHZILHOG GEWDEILHOG (QGLI 6HOHFW ILHOG IURP GEWDE DQG SXW LW LQWR QHZILHOG LQ YEGSD /RRS DW SRV 6HOHFW VLQJOH IURP GEWDE ZKHUH YEHOQ YEGNDYEHOQ $QG SRVQU SRVSRVQU ,I VVXEUF 3RVQHZILHOG GEWDEILHOG 0RGLI SRV (QGLI (QGORRS n In the packing list print program, the header data is collected in VBDKL. The structure for the item data is VBDPL_TAB. n In the picking list print program, the header data is collected in VBLKK_WA, and the item data structure is VBLKP_TAB. n In the invoice print program, the header data is collected in VBDKR, and the item data structure is LVBDPR.
  • 115. Modifying SAPscript Forms: The Basics JJJ
  • 117. + $ 3 7 ( 5 Nfˆ}‚’‚‡€ lZiŒ|‹‚‰ _ˆ‹†ŒS Z}z‡|~} mˆ‰‚|Œ
  • 118. JJM SAPscript Made Easy | Release 4.6 h~‹‚~ This chapter builds further on what you learned in the previous chapter. This chapter covers the following topics: n Printing company logos (in Windows BMP and TIFF 6.0 format) n Inserting bar code information n Adding a box with shading n Printing text vertically n Calling ABAP subroutines (using the PERFORM command) i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ Ap‚‡}ˆŒ [fi _ˆ‹†zB Starting with Release 4.6, SAPscript offers you a new tool for importing graphics —in the Windows bitmap format—into your forms (for example, logos). Called SAPscript Graphic Management, this new solution: n Gives you more flexibility in creating graphics n Helps you manage your graphics with ease n Helps you easily include graphics in forms n Updates the former complex process for importing graphics The SAPscript Graphic Management can also manage graphics saved as Baseline TIFF 6.0 format. Although we highly recommend using the new process, the processes for Baseline TIFF 6.0 format are still available. We describe these in the section “Printing a Company Logo (Baseline TIFF 6.0 Format)” on page 124. To make a system upgrade easier and smoother, do not modify the standard forms or the preconfigured forms. Copy these forms and modify the copies. Caution The SAPscript Graphic Management Tool supports Windows bitmap format (*.bmp) and Baseline TIFF 6.0 format (*.tif). Make sure that you save graphics in these formats.TechTalk
  • 119. Modifying SAPscript Forms: Advanced Topics JJN To include a graphic in your form, perform the following steps: 1. Import the graphic into the document server. 2. Preview the graphic printout. 3. Include the graphic in a form. l~‰ JS b†‰ˆ‹ ~ `‹z‰‚| ‚‡ˆ ~ ]ˆ|ކ~‡ l~‹~‹ mzŒ„ 0DNH D JUDSKLF %03 IRUPDW
  • 120. DYDLODEOH RQ WKH GRFXPHQW VHUYHU E LPSRUWLQJ WKH JUDSKLF JG From the SAP standard menu, choose Tools → SAPscript → Administration → SE78 - Graphic. KG From the workplace menu, choose Stored on document server → GRAPHICS → BMAP. SAPscript enables you to import graphics in the Windows bitmap format into your forms. To make this process independent of any graphics tool and ensure flexibility, no graphic tool is included with SAPscript itself. Therefore, you cannot modify graphics within SAPScript. Graphics modifications have to be executed with a graphics tool that allows you to save your graphic in the Windows bitmap format. Caution Graphic objects Graphic ID
  • 121. JJO SAPscript Made Easy | Release 4.6 LG On the SAPscript graphics management window, choose . MG On the Import graphic window: zG In the File name field, enter the file location (on your presentation server) where the import program can find the graphic (for example, C:SAPlogo.bmp). {G In the Name field, enter a name for the graphic (for example, LOGO_01). |G In the Description field, enter a description (for example, COMPANY LOGO). }G Choose . NG Choose Exit to return to the SAP standard menu. Graphics stored in the document server are separated into graphic objects and graphic IDs. In the example, only the graphic object GRAPHICS and the graphic ID BMAP are available. You can create new graphic objects and IDs (see “Creating Graphic Objects and Graphic IDs” on page 120). Tips Tricks gˆ~ You will refer to this name, if you include the graphic in a form (as described in “Step 3: Include the Graphic in a Form” on page 118).
  • 122. Modifying SAPscript Forms: Advanced Topics JJP l~‰ KS i‹~‚~ ~ `‹z‰‚| i‹‚‡ˆŽ mzŒ„ 3UHYLHZ WKH JUDSKLF SULQWRXW RQ WKH GRFXPHQW VHUYHU
  • 123. JG From the SAP standard menu, choose Tools → SAPscript → Administration → SE78 - Graphic. KG From the workplace menu, choose Stored on document server → GRAPHICS → BMAP. LG On the SAPscript graphics management screen: zG Enter the graphic name in the Name field (for example, LOGO_01). {G To preview the graphic, choose . |G Choose Exit to return to the SAP Easy Access screen. You may want to insert a graphic from other documents (for example, your company web side) into a form by using a copy and paste approach. SAPscript does not support this technique. You must copy the graphic to your local drive, import the graphic into the document server as describe in this task, and include the graphic in the form (as described in step 3 (see page 118). Caution The graphic is displayed in the workplace area. A color graphic can be viewed only in color.
  • 124. JJQ SAPscript Made Easy | Release 4.6 l~‰ LS b‡|…Ž}~ ~ `‹z‰‚| ‚‡ z _ˆ‹† To include your company logo in a form, you must create a graphic. SAPscript creates a new window and places it automatically on the top left corner of the page. mzŒ„ ,QFOXGH D JUDSKLF LQ D IRUP E FUHDWLQJ D JUDSKLF ZLQGRZ JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG In the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change.
  • 125. Modifying SAPscript Forms: Advanced Topics JJR LG In the Design Window, right-click to access the form layout manipulation menu and choose Create graphic. MG On the Include graphic screen: zG Enter the name of the graphic (for example, LOGO_01). The name of the graphic is the name you defined when you imported the graphic onto the document server (see “Step 1: Import the Graphic into the Document Server” on page 115). {G Choose . You can specify the resolution of the graphic by entering the number of dots per inch (dpi). The ratio between the resolution you entered and the original resolution in which the graphic was scanned determines the printed size of the graphic on the form. ^‘z†‰…~ The graphic was originally scanned with a resolution of 300 dpi. If you enter a resolution of 150 dpi, the width and height of the graphic will be doubled. If you enter a resolution of 600 dpi, the graphic’s width and height will be halved.
  • 126. JKI SAPscript Made Easy | Release 4.6 The new graphic is always positioned in the top left corner of the form. NG Select the Administrative Screen. OG On the Administrative Screen: zG To activate the changes, choose . {G Go Back twice to return to the SAP standard menu. ‹~z‚‡€ `‹z‰‚| h{ƒ~|Œ z‡} `‹z‰‚| b]Œ You can easily create your own object structure on the document server by defining your own graphic objects and graphic IDs. mzŒ„ UHDWH D QHZ JUDSKLF REMHFW DQG JUDSKLF ,' XVLQJ 6$3VFULSW VHWWLQJV JG From the SAP standard menu, choose Tools → SAPscript → Administration → SE75 - Settings. You can move the graphic window easily using the drag-and-drop technique, but you cannot resize the graphic within SAPscript. You have to resize the graphic using a graphics tool outside SAPscript. You must then import the graphic onto the document server and include it in your form. Tips Tricks
  • 127. Modifying SAPscript Forms: Advanced Topics JKJ KG On the SAPscript Settings screen: zG Select Graphical objects and IDs. {G Choose Change. LG On the Information window, choose . MG On the Change graphics IDs screen, choose . NG On the Create Object dialog window: zG In the Graphic object field, enter a name for the object (for example, Z_GRAPHIC). {G Enter a description. |G Choose . The new object is displayed in the list of all available graphic objects. gˆ~ Make sure your graphic object names begin with a Y or Z.
  • 128. JKK SAPscript Made Easy | Release 4.6 OG On the Change graphics IDs screen, double-click on the object Z_GRAPHIC to open the object’s graphic IDs. PG On the Change graphics IDs for object … screen, choose . QG On the Create ID dialog window: zG In the Graphic ID field, enter the ID’s name (for example, ZLOG). {G Enter a description. |G Choose . RG On the Change graphics IDs for object … screen, save the graphic ID. The graphic object will also be saved. gˆ~ Make sure your graphic ID names begin with a Y or Z.
  • 129. Modifying SAPscript Forms: Advanced Topics JKL If you use the CTS, specify a transport request after saving. JIG Go Back three times to return to the SAP standard menu. JJG Choose Tools → SAPscript → Administration → SE78 - Graphic. JKG On the SAPscript graphics management screen, in the workplace menu, expand Stored on document server. The graphic object Z_GRAPHIC is displayed. Graphic ID Graphic object
  • 130. JKM SAPscript Made Easy | Release 4.6 i‹‚‡‚‡€ z ˆ†‰z‡’ eˆ€ˆ A[zŒ~…‚‡~ mb__ OGI _ˆ‹†zB To print a company logo, either include it in the form or as a macro on a PCL-5 printer. The following rules help you to determine which method is most appropriate. n If you cannot provide your logo in the Baseline TIFF 6.0 format, the company logo should be a macro on the printer (see “Including the Company Logo as a Macro on PCL-5 Printers” on page 132”). n If you do not have a PCL-5 printer, include the company logo in the form (see “Including the Company Logo on the Form” below). n In all other cases, include the company logo in the form (see “Including the Company Logo on the Form” below). The following procedures are also documented in the SAPNet Frontend notes 39031, 18045, and 5995. b‡|…Ž}‚‡€ ~ ˆ†‰z‡’ eˆ€ˆ ˆ‡ ~ _ˆ‹† Create your company logo with a graphic program and save it in the Baseline TIFF 6.0 format. To include your company logo in a form, first convert your Baseline TIFF 6.0 file into SAPscript standard text. Next, include the standard text in the form (see “Including Standard Text in a Form” on page 127). If you followed the directions exactly and no logo is printed, the format of the logo file format is probably not Baseline TIFF 6.0. SAPscript does not give an error message if an incorrect file format is used. gˆ~ Many paint programs support the Baseline TIFF 6.0 format. Tips Tricks
  • 131. Modifying SAPscript Forms: Advanced Topics JKN ˆ‡~‹‚‡€ [zŒ~…‚‡~ mb__ OGI _ˆ‹†z ˆ lZiŒ|‹‚‰ lz‡}z‹} m~‘ mzŒ„ RQYHUW RXU %DVHOLQH 7,)) IRUPDW FRPSDQ ORJR LQWR 6$3VFULSW VWDQGDUG WH[W JG From the SAP standard menu, choose Tools → ABAP Workbench → Development → SE38 – ABAP Editor. KG On the ABAP Editor: Initial Screen: zG Enter RSTXLDMC in the Program field. {G Choose . LG On the Upload TIFF files to SAPscript texts screen: zG In the File name field, enter the filename and its path (for example, C:SAPlogo.tif). {G In the Type field, enter the appropriate type of raster image. • BMON stands for a black and white raster image. Use BMON for monochrome printers because they normally do not perform a gray-level conversion. • BCOL stands for a color raster image with up to 256 colors. gˆ~ UNIX file names are case-sensitive.
  • 132. JKO SAPscript Made Easy | Release 4.6 |G Enter a name for the standard text in the Text name field. The name must begin with the prefix ZHEX-MACRO-, which is the default value for the field (for example, ZHEX-MACRO-LOGO). }G Choose . The upload may take some time. The result should be a protocol as shown. MG Go Back four times to return to the SAP standard menu. Text name: ZHEX-MACRO is the technical name under which the logo is stored. You can freely define the name of the file by adding some characters (for example, ZHEX-MACRO-TEST). The filename and text name do not have to be the same. File name: enter the filename and its path as it appears on the C or A drive. At the end of the protocol, the Text ZHEX-MACRO-LOGO, Language EN, Object TEXT, Id ST saved successfully messageindicatesthatthe standard text was created.
  • 133. Modifying SAPscript Forms: Advanced Topics JKP b‡|…Ž}‚‡€ lz‡}z‹} m~‘ ‚‡ z _ˆ‹† mzŒ„ ,QFOXGH WKH VWDQGDUG WH[W =+(;0$52/2*2 LQ WKH VDOHV RUGHU FRQILUPDWLRQ IRUP =925'(5 JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. You can easily display the created standard text. 1. From the SAP standard menu, choose Tools → SAPscript → SO10 Standard Text. 2. In the Text name field, enter ZHEX-MACRO-LOGO. 3. Choose Display. The print preview does not display the logo. For additional information about report RSTXLDMC, access the report documentation: 1. From the SAP standard menu, choose Tools → ABAP Workbench → Development → SE38 - ABAP Editor. 2. In the Program field, enter RSTXLDMC. 3. Select Documentation. 4. Choose Display. Tips Tricks TechTalk
  • 134. JKQ SAPscript Made Easy | Release 4.6 KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change. LG In the Design Window, right-click to access the form layout manipulation menu and choose Create window. The new window is automatically named Window1.
  • 135. Modifying SAPscript Forms: Advanced Topics JKR MG In the Design Window: zG Select Window1. {G Right-click to access the form layout manipulation menu and choose Rename. NG On the Rename window: zG Enter a new name for the window (for example, LOGO). {G Choose . OG Define the position of the new window LOGO using the graphical Form Painter. The new window is automatically named Window1. With graphics or macros, the system considers only the window position, not the window size. The Left margin must be specified in CH (characters) and the Upper margin must be specified in LN (lines).TechTalk
  • 136. JLI SAPscript Made Easy | Release 4.6 PG In the Design Window: zG Select LOGO window. {G Right-click to access the form layout manipulation menu and choose Edit text. The PC Editor for the LOGO window appears. QG From the PC Editor tool bar, choose . RG On the Creating Additional Information screen: zG Select Command. {G Enter INCLUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the Command line. |G Choose .
  • 137. Modifying SAPscript Forms: Advanced Topics JLJ JIG Go Back to return to the Administrative Screen. The text changes are automatically transferred by the system. JJG On the Administrative Screen: zG In the Description field, enter a short explanation text for the window LOGO (for example, Company Logo). {G To activate the changes, choose . The new command line appearsinthe PCEditor.
  • 138. JLK SAPscript Made Easy | Release 4.6 b‡|…Ž}‚‡€ ~ ˆ†‰z‡’ eˆ€ˆ zŒ z fz|‹ˆ ˆ‡ ieFN i‹‚‡~‹Œ To include a company logo as a macro on a PCL-5 printer: 1. Copy a standard printer type to modify it (see “Copying a Standard Printer Type” on page 133). 2. Define a print control for the macro (see “Defining a Print Control for the Macro” on page 135). 3. Include the print control in a form (see “Including the Print Control in the Form” on page 138). Your company logo appears on the first page of form ZVORDER02 using the standard text ZHEX-MACRO-LOGO and the LOGO window for the print output. To display the company logo on subsequent pages, you must copy the LOGO window to page NEXT. You must repeat the following procedure for all defined pages: 1. On the Administrative Screen, choose the LOGO window. 2. Copy the window. 3. Choose page NEXT. 4. Insert the window. The position and size of the LOGO window defined for page FIRST apply to the other pages. 5. Activate the form. Tips Tricks In R/3, the following printer types (or a copy of the printer type) represent PCL-5 printers: n HPLJIIID n HPLJ4 n HPLJ5SI n HPLJMI n IBMAFP n IBMAFP3 n IBMEFP n IBMEFP3 n LX4039 n SNI20XX8 Includingacompanylogoas a macro works only on a PCL-5 printer. TechTalk
  • 139. Modifying SAPscript Forms: Advanced Topics JLL gˆ~ Several third parties offer logos as a PCL-5 macro and describe how to bring the logo to the printer. ˆ‰’‚‡€ z lz‡}z‹} i‹‚‡~‹ m’‰~ mzŒ„ RS D VWDQGDUG SULQWHU WSH IRU PRGLILFDWLRQ JG To determine the device type to use, from the SAP standard menu choose Tools → CCMS → Spool → SPAD - Spool administration. KG On the Spool Administration: Initial Screen, choose the Devices / servers tab and choose the Output devices button. A list of all available output devices appears. The macro file can be loaded onto the printer by printing the file once from the operating system level (for example, using UNIX command lp). The disadvantage is that macros are lost when you turn off the printer. To avoid this, load the macro onto a Flash-Memory cartridge. TechTalk
  • 140. JLM SAPscript Made Easy | Release 4.6 LG Each printer name has a corresponding device type name. MG Go Back to return to the Spool Administration: Initial Screen. NG From the Spool Administration: Initial Screen, choose Utilities → For device types → Copy device type. OG On the Copy device type screen: zG Enter the name of the device type in the Copy device type field (for example, HPLJ4). {G Enter the name for copied device type in the to device type field (for example, Z_HPLJ4). |G Choose . In this example, the device type name for printer DCBM is HPLJ4 (HP Laserjet 4 series PCL-5). Make sure the name of the copied device type starts with Y or Z (customer name range) Although you are free to define the name of the copied device type, we recommend using a name that is as close as possible to the original name.
  • 141. Modifying SAPscript Forms: Advanced Topics JLN PG Confirm all the subsequent popup windows. If you use the Change and Transport System (CTS), specify a transport request. The result is shown on the Copy device type screen. QG Go Back three times to return to the SAP standard menu. ]~‚‡‚‡€ z i‹‚‡ ˆ‡‹ˆ… ˆ‹ ~ fz|‹ˆ mzŒ„ 'HILQH D SULQW FRQWURO IRU RXU PDFUR JG From the SAP standard menu, choose Tools → CCMS → Spool → SPAD - Spool administration. gˆ~ In our example, the macro has a macro ID of 100. The macro ID, which is set when you bring the macro to the printer, must be between 100 and 999. To get your ID, ask your system administrator.
  • 142. JLO SAPscript Made Easy | Release 4.6 KG On the Spool Administration: Initial Screen, choose Full administration. LG On the DeviceTypes tab, click on Device types.
  • 143. Modifying SAPscript Forms: Advanced Topics JLP MG On the Spool Administration: List of Device Types screen: zG Scroll down until you find the desired device type (for example, Z_HPLJ4). {G Select the device type. |G Choose Print Controls.
  • 144. JLQ SAPscript Made Easy | Release 4.6 NG On the Spool Administration: Edit Print Controls screen: zG Choose . Since the system switched to the change mode, the icons displayed on the screen changed. {G Overwrite the first row of the PrCtl column with the newest print control (for example, ZM100). |G Overwrite the first row of the Control character sequence column with the control character sequence (for example, 1B2666313030793358). }G Save the new print control. OG Go Back four times to return to the SAP standard menu. b‡|…Ž}‚‡€ ~ i‹‚‡ ˆ‡‹ˆ… ‚‡ ~ _ˆ‹† mzŒ„ ,QFOXGH WKH SULQW FRQWURO IRU H[DPSOH ZM100
  • 145. LQ WKH VDOHV RUGHU FRQILUPDWLRQ IRUP =925'(5 JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. Make sure your print control starts with Y or Z. We recommend that the macro ID is also part of the name. The control character sequence contains the macro ID in hexadecimal representation. The sequence is 1B2666...793358, where the three dots are the hexadecimal representations of the macro ID letters. In general, the hexadecimal representations for 0 to 9 are 30 to 39. The sequences are printer dependent. You will find the sequences in your printer manual. ^‘z†‰…~ If the macro ID is 100, the three dots will be 313030.
  • 146. Modifying SAPscript Forms: Advanced Topics JLR KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page layout. }G Choose Change. LG In the Design window, right-click to access the form layout manipulation menu and choose Create window.
  • 147. JMI SAPscript Made Easy | Release 4.6 MG In the Design Window: zG Select Window1. {G Right-click to access the form layout manipulation menu and choose Rename. NG On the Rename window: zG Enter a new name for Window1 (for example, LOGO). {G Choose . OG Define the position of the LOGO window using the graphical Form Painter. The new window is automatically named Window1. With graphics or macros, the system considers only the window position, but not the size. The left margin must be specified in CH (characters) and the upper margin must be specified in LN (lines).
  • 148. Modifying SAPscript Forms: Advanced Topics JMJ PG In the Design Window. zG Select the LOGO window. {G Right-click to access the form layout manipulation menu and choose Edit text. The PC Editor for the LOGO window appears. QG From the PC Editor tool bar, choose . RG On the Creating Additional Information screen: zG Select SAP characters. {G Enter 32 in SAP characters. |G Choose . JIG From the PC Editor tool bar, choose .
  • 149. JMK SAPscript Made Easy | Release 4.6 JJG On the Creating Additional Information screen: zG Select Command. {G Enter PRINT-CONTROL ZM100 in the Command line. |G Choose . JKG Go Back to return to the Administrative Screen The text changes are automatically transferred by the system. The new command lines appear in the PC Editor.
  • 150. Modifying SAPscript Forms: Advanced Topics JML JLG On the Administrative Screen: zG In the Description field, enter a short explanation text for the window LOGO (for example, Company Logo). {G To activate the changes, choose . i‹‚‡‚‡€ [z‹ ˆ}~Œ The easiest way to print bar codes is to use a Kyocera laser printer because you do not need additional hardware or software. You just add the bar code to the form. Your company logo appears on the first page of form ZVORDER02 using the print control ZM100 and the LOGO window for the print output. If the company logo should be displayed on the subsequent pages, you must copy the LOGO window to page NEXT. You have to repeat the following procedure for all defined pages: 1. On the Administrative Screen, choose the LOGO window. 2. Copy the window. 3. Choose page NEXT. 4. Insert the window. The position and size of the LOGO window defined for page FIRST apply to the other pages. 5. Activate the form. Tips Tricks
  • 151. JMM SAPscript Made Easy | Release 4.6 With an HP laser printer, the solution is also simple — it is basically a “plug-and-play.” Add the JetCAPS BARSIMM to an HP Laserjet 4 or 5 printer and then add the bar code to the form. Most other solutions require more work. To keep bar code printing easy, this guide covers only Kyocera and HP laser printers. For HP laser printers, insert the SIMM into your HP Laserjet 4 or 5 and make sure that your printer is an HPLJ4 in R/3. If you do not know your printer type, ask your system administrator. mzŒ„ 'HILQH WKH PDWHULDO QXPEHUV RQ WKH VDOHV RUGHU FRQILUPDWLRQ =925'(5 DV D ³ RI ´ EDU FRGH ZLWK D FKHFN GLJLW JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Character formats. }G Choose Change. LG On the Form: Change Character Strings: ZVORDER02 screen, choose Edit → Create Element. With the SIMM, you receive a list of print controls that tell you how to switch the bar codes on and off. These print controls are already defined for the HPLJ4.Tips Tricks
  • 152. Modifying SAPscript Forms: Advanced Topics JMN MG On the Create Element screen: zG Enter a name for the character format (for example, B3). {G Enter a description (for example, Bar code 3 of 9 w/check). |G Choose . NG On the Form: Change Character Strings: ZVORDER02 window: zG In the Standard attributes section, enter a description in the Description field (for example, Bar code 3 of 9 w/check). {G In the Bar code field, choose . The new character format appears in the Character formats section.
  • 153. JMO SAPscript Made Easy | Release 4.6 OG From the Name of an SAP bar code screen: zG Select the desired bar code (for example, BC_CD39C). {G Choose . PG On the Form: Change Character Strings: ZVORDER02 window: zG Save the new character format. {G Choose Layout. If you want to print a bar code vertically, you can choose a SAP bar code that has been defined for vertical bar code printing. You will recognize such a bar code on the rotation parameter. The rotation parameter has the value 090. Rotation values of 000, 090, 180, and 270 degrees are possible values for this parameter, however, the value 090 is delivered for several SAP standard bar codes. Bar codes are rotated in a counter-clockwise direction. If, for example, a bar code is rotated by 90 degrees, it is tilted to the left when printed. For example, r=090 indicates a rotation value of 90 degrees. A character format B3 for the bar code format BC_CD39C is now defined and can be used.
  • 154. Modifying SAPscript Forms: Advanced Topics JMP QG In the Design Window: zG Select the Main window. {G Right-click to access the form layout manipulation menu and choose Edit text. RG On the PC Editor for the Window MAIN window: zG Scroll down until you see the ITEM_LINE section (highlighted gray). {G In the first line of the ITEM_LINE section, place the cursor on the symbol VBDPA-MATNR and mark it. Make sure the symbol is marked (it must not blink). |G In the list box for character formats, choose B3 Bar code 3 of 9 w/check. JIG Go Back to return to the Administrative Screen. JJG On the Administrative Screen, choose to activate the changes. gˆ~ Next, we have to adjust the output of the MAIN window. In the example you assign the new character format B3 to the symbol VBDPA- MATNR in the ITEM LINE section. You can check the assigned formats for the symbol VBDPA-MATNR by clicking on the symbol and choosing Formats. The Formats window appears and shows the assigned formats. Choose to close the Formats window. Tips Tricks
  • 155. JMQ SAPscript Made Easy | Release 4.6 Some of the bar codes are higher than one line, which may cause the previous lines to overlap. To avoid overlapping, add blank lines before the line with the bar code. Assign a paragraph format to the blank lines. Make sure the paragraph format is not defined to automatically suppress or compress blank lines. To check the paragraph settings, go to standard attributes and ensure that the No blank lines checkbox is deselected. It is not possible to change the height of a bar code within a form. To change the height of a bar code you have to define your own bar code. To define your own barcode, you can use the font maintenance transaction SE73. Your barcodes must begin with Y or Z. For more information, see the R/3 online documentation (Basis → BasisService/Communication Interfaces → SAPscript. In our example, notice the bar code, which reserves space for the entire material number field (this field is 18 characters long). If you do not use all 18 characters and do not want to waste space, delimit the field length by using the output length formatting option. The symbol definition should be VBDPA- MATNR(8) In a numerical bar code, some scanners cannot read special characters. For these scanners, omit the special characters inserted by SAPscript during formatting. An example of a special character is the delimiter for “Thousands” that is used for some numerical fields. For more information on formatting options, see “Overview of Formatting Options” on page 222 and “Syntax of Formatting Options” on page 249. Tips Tricks TechTalk TechTalk
  • 156. Modifying SAPscript Forms: Advanced Topics JMR Z}}‚‡€ z [ˆ‘ ‚ lz}‚‡€ In this section, we want to have a box around an entire window and to shade the first line of this window. mzŒ„ 'UDZ D ER[ DURXQG WKH VKLSWR DGGUHVV DQG VKDGH WKH VKLSWR DGGUHVV RQ WKH VDOHV RUGHU FRQILUPDWLRQ RXWSXW JG From the SAP standard menu, choose Tools → SAPscript → SE71 - Form. KG On the Form Painter: Request screen: zG Enter ZVORDER02 in the Form field. {G Enter EN in the Language field. |G Select Page Layout. }G Choose Change. gˆ~ For more information, see the R/3 online documentation (Basis → Basis Service/Communication Interfaces → SAPscript.
  • 157. JNI SAPscript Made Easy | Release 4.6 LG In the Design Window: zG Select the INFO1 window. {G Right-click to access the form layout manipulation menu and choose Edit text. MG With the PC Editor on the Window INFO1 screen: zG Position the cursor at the end of the first line. {G Choose . Only if the variable VBDKA- LAND1_WEisfilled,willthe INFO1 window be printed in the output. Likewise, the box and shading will only be printed if this variable is filled. (We will insert the box and shading commands between the first and second line of the PC Editor.)
  • 158. Modifying SAPscript Forms: Advanced Topics JNJ NG On the Create Additional Information window: zG Select Command. {G Enter POSITION XORIGIN ’-0.5’ CH YORIGIN ’-0.25’ LN in the Command line. |G Choose . OG In the PC Editor on the Window INFO1, choose . This command positions the cursorahalfcharacteranda quarter line off the upper left corner of the window. This is the starting point for the next command, which will be the sizing of the box. Place the cursor off the window to avoid overwriting the window’s content with the box.
  • 159. JNK SAPscript Made Easy | Release 4.6 PG On the Creating Additional Information window: zG Select Command. {G Enter SIZE WIDTH ‘+1’ CH HEIGHT ‘+0.5’ LN in the Command line. |G Choose . QG In the PC Editor on the Window INFO1, choose . This command defines a new window one character wider and half a line higher than the window. Size the box bigger than the window to avoid overwriting the window’s content with the box. The line inserted in step 7b creates a new window, which overlaps the INFO1 window by half a character on the left and right sides and by a quarter line on the top and bottom of the window.
  • 160. Modifying SAPscript Forms: Advanced Topics JNL RG On the Creating Additional Information window: zG Select Command. {G Enter BOX FRAME 10 TW in the Command line. |G Choose . In the PC Editor on the Window INFO1, choose . This command paints the boxinthepreviouslydefined size. The box line thickness isspecified as10twips(one-twentieth of a point).
  • 161. JNM SAPscript Made Easy | Release 4.6 JIG On the Creating Additional Information window: zG Select Command. {G Enter BOX HEIGHT ‘1.5’ LN INTENSITY 20 in the Command line. |G Choose . The PC Editor for the Window INFO1 appears. JJG Go Back to return to the Administrative Screen. JKG To activate the changes, choose . ‹~z‚‡€ fŽ…‚‰…~ [ˆ‘~Œ By default, a box is oriented to the window coordinates. Therefore, you should create a new window for every box you want to include in the output. Instead of creating boxes for just parts of a window, the box should fill out the entire window. If you want multiple boxes on a page, you do not have to create a window for every box. This command shades the first one and a half lines of the box with the intensity of 20%gray.Shading morethanoneline is necessary because the box begins a quarter line above the window. With a shading level of 1.5 lines, the first line of the window, a quarter line above the first line, and a quarter line below the first line are shaded.
  • 162. Modifying SAPscript Forms: Advanced Topics JNN The following example shows how to create multiple boxes in one window. ^‘z†‰…~ The following is a simple example of multiple boxes on one window: 326,7,21 :,1'2: )LUVW %R[ 326,7,21 ;25,*,1 ¶· + 25,*,1 ¶· /1 ´7KLV LV WKH GHIDXOW 6,=( :,'7+ ¶·+ +(,*+7 ¶· /1 %2; )5$0( 7: 6HFRQG %R[ 326,7,21 ;25,*,1 ¶· + 25,*,1 ¶· /1 6,=( :,'7+ ¶·+ +(,*+7 ¶· /1 %2; )5$0( 7: 7KLUG %R[ 326,7,21 ;25,*,1 ¶· + 25,*,1 ¶· /1 6,=( :,'7+ ¶·+ +(,*+7 ¶· /1 %2; )5$0( 7: This code will generate three boxes relative to the size of the page window. Here is one possible configuration based on the example above:
  • 163. JNO SAPscript Made Easy | Release 4.6 i‹‚‡‚‡€ m~‘ o~‹‚|z……’ Sometimes you may want to print text vertically. SAPscript itself is not able to print text vertically, but you can inform the printer to do this. To rotate the window during the printing, you need two separate print controls. You have to include the print controls so that they enclose the content (text, bar codes, graphics) you want to print vertically. The content of the window should have the following structure. 35,1721752/ =0 7H[W WR SULQW YHUWLFDO 35,1721752/ =0 The print control ZM200 informs the printer to print the following text vertically. The print control ZM300 informs the printer to return to horizontal printing. The specific print sequences for the print controls can be found in the documentation of your printer type. SAPscript, however, interprets the window’s content as horizontal text. Therefore, if you execute the test printing function in SAPscript, the text will be printed horizontal. To check the printout, you have to print the form starting the print program from the application. To print text vertically, perform the following steps in the recommended order: 1. If necessary, copy a standard printer type (see “Copying a Standard Printer Type” on page 133). 2. Create the print control that informs the printer to print vertically (see “Defining a Print Control for the Macro” on page 135). 3. Create the print control that informs the printer to return to horizontal printing (see “Defining a Print Control for the Macro” on page 135). 4. Create a new window for vertical printing. Make sure that the window does not overlap with other windows or stand out of the page during the printing. 5. Include the print controls in the new window (see “Including the Print Control in the Form” on page 138). gˆ~ Make sure your print control starts with Y or Z. We recommend that the macro ID is also part of the name.
  • 164. Modifying SAPscript Forms: Advanced Topics JNP z……‚‡€ Z[Zi lŽ{‹ˆŽ‚‡~Œ nŒ‚‡€ ~ i^k_hkf ˆ††z‡} In SAPscript, you can use the PERFORM command in a window to call an ABAP subroutine to: n Obtain data from the database that is needed at print time n Carry out complex ABAP calculations n Format data Often, without modification, the above operations cannot be executed by the print program assigned to your form. Instead of modifying the print program, you can use the PERFORM command to execute additional operations during the printing. Calling an ABAP subroutine from a SAPscript form causes a slight drop in performance during the printing. The delay depends on the complexity of the operations executed in the called subroutine. The PERFORM command is executed when the form is formatted for printing. Communication between the called ABAP subroutine and the form is by the way of symbols whose values are set in the ABAP subroutine. l’‡z‘ ˆ ~ i^k_hkf Œz~†~‡ ‚‡ z ˆ‹† ‚‡}ˆG 3(5)250 IRUP! ,1 352*5$0 SURJ! 86,1* ,19$5 86,1* ,19$5 +$1*,1* 2879$5 +$1*,1* 2879$5 (1'3(5)250 INVAR1 and INVAR2 are variable symbols and may be any of the four SAPscript symbol types. You can use as many symbols as you want. All symbols that are transferred from the SAPscript form to the ABAP subroutine are listed in the PERFORM command using the keyword USING. OUTVAR1 and OUTVAR2 are local text symbols and must, therefore, be character strings. The restriction to text symbols avoids the unintentional change of system symbols. Parameters transferred back to SAPscript forms from internal tables in subroutines are received by the PERFORM command as text using the keyword CHANGING. The ABAP subroutine form called via the PERFORM command must be defined in the ABAP program prog as follows: Do not confuse the SAPscript PERFORM command with the ABAP PERFORM statement.
  • 165. JNQ SAPscript Made Easy | Release 4.6 l’‡z‘ ˆ ~ Z[Zi ŒŽ{‹ˆŽ‚‡~ Uˆ‹†WG )250 IRUP! 7$%/(6 ,1B7$% 6758785( ,76 287B7$% 6758785( ,76 (1')250 ^‘z†‰…~ In the example, we will retrieve a customer name from table SCUSTOM. We assume this table is not defined in the print program. The SAPscript form calls the subroutine GET_NAME in the ABAP program ZREADCUSTOM. IRUP! *(7B1$0( SURJ! =5($'86720 ,19$5 867 2879$5 1$0( ,1B7$% ,177$% 287B7$% 2877$% ˆ}‚‡€ ‚‡ ~ lZiŒ|‹‚‰ ˆ‹† ‚‡}ˆS 3(5)250 *(7B1$0( ,1 352*5$0 =5($'86720 86,1* 867 +$1*,1* 1$0( (1'3(5)250 1$0( ˆ}‚‡€ ‚‡ ~ Z[Zi ‰‹ˆ€‹z†S 5(3257 =5($'86720 7$%/(6 686720 )RUP *(7B1$0( )250 *(7B1$0( 7$%/(6 ,177$% 6758785( ,76 2877$% 6758785( ,76 UHDG ILUVW OLQH RI LQWWDE 5($' 7$%/( ,177$% ,1'(; VHOHFW IURP VFXVWRP DQG PRGLI RXWWDE ZLWK QHZ GDWD 6(/(7 6,1*/( )520 686720 :+(5( ,' ,177$%9$/8( ,) 668%5 5($' 7$%/( 2877$% ,1'(; 029( 6867201$0( 72 2877$%9$/8( 02',) 2877$% ,1'(; 67$%,; (/6( 5($' 7$%/( 2877$% ,1'(; 029( ¶QR QDPH· 72 2877$%9$/8( 02',) 2877$% ,1'(; 67$%,; (1',) (1')250 You can only use internal tables of structure ITCSY in the form routine. The structure is composed of two fields, NAME and VALUE. Text fields are transferred into the NAME field and text field contents into the VALUE field. Create the subroutine in your customer namespace.
  • 166. 3 $ 5 7 7 + 5 ( ( [ŽŒˆ†‚“‚‡€ Z‰‰…‚|z‚ˆ‡Œ ˆ‹ lZiŒ|‹‚‰ _ˆ‹†Œ
  • 168. + $ 3 7 ( 5 OŽŒˆ†‚“‚‡€ lz…~Œ z‡} ]‚Œ‹‚{Ž‚ˆ‡ ˆ‹ i‹‚‡ _ˆ‹†Œ
  • 169. JOK SAPscript Made Easy | Release 4.6 h~‹‚~ Before you can use print forms with your application, certain customizing steps may be needed. This chapter covers the following two activities related to customizing Sales and Distribution (SD) for print forms: n How to use a modified form instead of a standard form n How to get printing results that cannot be achieved by modifying the form Z||~ŒŒ‚‡€ ~ bf` Since customizing is done through the Implementation Guide (IMG), it serves as the starting point for chapters 6 through 8. All of the IMG-related procedures in this guide begin with the Display IMG screen for the SAP Reference IMG. mzŒ„ $FFHVV WKH 6$3 5HIHUHQFH 'LVSOD ,0* VFUHHQ JG From the SAP standard menu, choose Tools → AcceleratedSAP → Customizing → SPRO Edit Project. The Customizing: Edit Project screen appears and displays all of the customizing projects defined in your system. KG On the Customizing: Edit Project screen, choose SAP Reference IMG. Usually you use a current Project IMG instead of the SAP Reference IMG. A Project IMG is a subset of the SAP Reference IMG or the Enterprise IMG. Depending on your customizing projects you may see fewer topics on your screen. Tips Tricks
  • 170. Customizing Sales and Distribution for Print Forms JOL The Display IMG screen appears and displays the SAP Reference IMG. The sample Display IMG screen below shows how to execute an IMG activity. For example, to execute Configure transaction-related display characteristics for fields, you start at the Display IMG screen. Next, you choose General Settings → Field Display Characteristics → Configure transaction-related display characteristics for fields. ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ lz…~Œ ]ˆ|ކ~‡Œ Before you can use your modified form for printing, you must assign it to the print program. If you do not assign your modified form, the system will use the standard form for printing. In this section you will learn how to: n Access the relevant customizing activity for sales documents n Assign a modified form to a sales order confirmation You may change the print program used to collect and print data but it is not mandatory. You can also specify the print program and form for each output type and medium. To expand subsequent IMG nodes, click this arrow. To collapse subsequent IMG nodes, click this arrow. To read the documentation for a specific IMG activity, click this icon at the beginning of a line. To execute a specific IMG activity, click this icon at the beginning of a line. When expanding the IMG structure, not all nodes may be visible on the Display IMG screen. If the expanded list becomes too long, you may need to scroll up or down to view the nodes that are no longer on the screen.Tips Tricks
  • 171. JOM SAPscript Made Easy | Release 4.6 You can use the standard form RVORDER01 for inquiry, quotation, sales order confirmation, contract, and scheduling agreement. mzŒ„ $VVLJQ D QHZ IRUP WR VDOHV GRFXPHQWV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG On the Display IMG screen, choose Sales Distribution → Basic Functions → Output Control → Output Determination → Output Determination Using the Condition Technique → Maintain Output Determination for Sales Documents → Maintain Output Types. LG On the Display View “Output Types”: Overview screen, choose to switch to the Change Mode. MG On the Change View “Output Types”: Overview screen: zG Select an output type in the Output Types table (for example, BA00 Order Confirmation). {G From the workplace menu, double-click Processing routines. Instead of the SAP standard form RVORDER01, you may want to use the preconfigured form YPPC_ORDCONF for the U.S. and Canadian markets. You can use YPPC_ORDCONF for inquiry, quotation, sales order confirmation, contract, and scheduling agreement confirmation. Tips Tricks
  • 172. Customizing Sales and Distribution for Print Forms JON NG On the Change View “Processing routines”: Overview screen: zG Enter the form name (for example, ZVORDER02) for the medium you want to use. {G Save the changed processing routine. If you use the Change and Transport System (CTS) specify a transport request after saving. |G Go Back twice to return to the Display IMG screen. ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ l‚‰‰‚‡€ ]ˆ|ކ~‡Œ Now you will see similar customizing steps for other SD documents, such as delivery notes (packing lists) and picking lists. You will find these forms now in the section Logistics Execution. The most important output types are LD00 (delivery note/packing list) and WMTA (automatic TA/picking list). Since Release 4.5, the output type EK00 (picking list) has been replaced with the output type WMTA (automatic TA). This step-by-step guide shows sales order confirmation output only. However, the standard form, RVORDER01, or the form, YPPC_ORDCONF_STD, can be used for all other output types.TechTalk
  • 173. JOO SAPscript Made Easy | Release 4.6 mzŒ„ $VVLJQ D QHZ IRUP IRU SDFNLQJ OLVW GHOLYHU QRWH
  • 174. WR VKLSSLQJ GRFXPHQWV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Logistics Execution → Shipping → Basic Shipping Functions→ Output Control → Output Determination → Maintain Output Determination for Outbound Deliveries → Maintain Output Types. LG On the Display View “Output Types”: Overview screen, choose to switch to the Change Mode. MG On the Change View “Output Types”: Overview screen: zG In the Output Types table, select the output type LD00. {G From the workplace menu, double-click Processing routines.
  • 175. Customizing Sales and Distribution for Print Forms JOP NG On the Change View “Processing routines”: Overview screen: zG In the Form field, enter the form name for the medium you want to use. {G Save the changed processing routine. If you use the Change and Transport System (CTS), specify a transport request after saving. |G Go Back twice to return to the Display IMG screen. mzŒ„ $VVLJQ D QHZ IRUP IRU SLFNLQJ OLVW WR VKLSSLQJ GRFXPHQWV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Logistics Execution → Shipping → Basic Shipping Functions→ Output Control → Output Determination → Maintain Output Determination for Outbound Deliveries → Maintain Output Types.
  • 176. JOQ SAPscript Made Easy | Release 4.6 LG On the Display View “Output Types”: Overview screen, choose to switch to the Change Mode. MG On the Change View “Output Types”: Overview screen: zG In the Output Types table, select the output type WMTA (Automatic TA). {G From the workplace menu, double-click Processing routines.
  • 177. Customizing Sales and Distribution for Print Forms JOR NG On the Change View “Processing routines”: Overview screen: zG Enter the form name for the medium you want to use. {G Save the changed processing routine. If you use the Change and Transport System (CTS), specify a transport request after saving. |G Go Back twice to return to the Display IMG screen. ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ [‚……‚‡€ ]ˆ|ކ~‡Œ mzŒ„ $VVLJQ D QHZ IRUP IRU LQYRLFHV WR ELOOLQJ GRFXPHQWV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Sales Distribution → Basic Functions → Output Control → Output Determination → Output Determination Using the Condition Technique → Maintain Output Determination for Billing Documents → Maintain Output Types. LG On the Display View “Output Types”: Overview screen, choose to switch to the Change Mode. gˆ~ If only one processing routine is defined, the Change View “Processing routines”: Details screen is displayed immediately. Go Back to return to the Change View “Processing routines”: Overview screen.
  • 178. JPI SAPscript Made Easy | Release 4.6 MG On the Change View “Output Types”: Overview screen: zG In the Output Types table, select the output type RD00 (Invoice). {G From the workplace menu, double-click Processing routines. NG On the Change View “Processing routines”: Overview screen: zG Enter the form name (for example, YPCC_INVOICE_STD) for the medium you want to use. {G Save the changed processing routine. If you use the CTS, specify a transport request after saving.
  • 179. Customizing Sales and Distribution for Print Forms JPJ |G Go Back twice to return to the Display IMG screen. l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ l~‡}~‹E a~z}~‹E z‡} _ˆˆ~‹ Standard text can be selected as output. The forms are configured to print standard text as headers, footers, and mailing addresses. The mailing address is printed above the greeting; the header and footer are printed at the top and bottom of the page respectively. Sales order confirmations, packing lists, and invoices use different standard text for each sales organization, and picking lists use different standard text for each shipping point. If you do not specify standard text, or if the specified standard text does not exist, there is no resulting error. l‰~|‚’‚‡€ lz‡}z‹} m~‘ ‰~‹ lz…~Œ h‹€z‡‚“z‚ˆ‡ mzŒ„ $VVLJQ VWDQGDUG WH[W IRU VHQGHU KHDGHU DQG IRRWHU SHU VDOHV RUJDQL]DWLRQ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Sales and Distribution → Basic Functions → Output Control → Output Determination → Process Output and Forms → Assign Form Texts. LG To specify the standard text for sales order confirmations, packing lists, and invoices, double-click on Assign form texts per sales organization.
  • 180. JPK SAPscript Made Easy | Release 4.6 MG On the Change View “Organizational Unit: Sales Organizations - Output”: Overv screen: zG Enter the standard text names for Addr (sending address), Lett (letter header), and Foot (footer text). Make sure the text names start with “Y” or “Z.” {G Save the standard text names. If you use the CTS, specify a transport request after saving. |G Go Back to return to the Choose activities popup window. NG On the Choose Activity screen, choose to return to the Display IMG screen. The system marks the activity with a check, indicating that you have already assigned form texts per sales organization. This screen displays the sales organizations that you have defined. To allocate form texts per shipping point, double-click on the desired activity and do not choose Cancel.
  • 181. Customizing Sales and Distribution for Print Forms JPL Z……ˆ|z‚‡€ lz‡}z‹} m~‘ ‰~‹ l‚‰‰‚‡€ iˆ‚‡ mzŒ„ $OORFDWH VWDQGDUG WH[W IRU VHQGHU KHDGHU DQG IRRWHU SHU VKLSSLQJ SRLQW JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Sales and Distribution → Basic Functions → Output Control → Output Determination → Process Output and Forms → Assign Form Texts. LG On the Choose Activity screen, to specify the standard texts for a picking list, double-click on Allocate form texts per shipping point.
  • 182. JPM SAPscript Made Easy | Release 4.6 MG On the Change View “Organizational Unit: Shipping Points - Output Determination screen: zG Enter the standard text names for Addr (sending address), Lett (letter header), and Foot (footer text). Make sure the text names start with “Y” or “Z.” {G Save the standard text names. |G Go Back to return to the Choose activities popup window. NG On the Choose Activity screen, choose to return to the Display IMG screen. fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ Forms use standard text for recurring header, footer, sender, greetings, and other printed information. These standard texts are inserted in a form by the INCLUDE command. This screen displays the shipping points that you defined. To assign form text per sales organization,double-clickon thedesired activity and do not choose Cancel. The system marks the activity with a check, indicating that you have already allocated form texts per shipping point.
  • 183. Customizing Sales and Distribution for Print Forms JPN If you create a new standard text, make sure that the form can refer to this new standard text. You have to create or change a INCLUDE command in the form. The following task shows you how to create or change standard text using the PC Editor. mzŒ„ UHDWH RU FKDQJH VWDQGDUG WH[W JG From the SAP standard menu, choose Tools → SAPscript → SO10 - Standard text. KG On the Standard Text: Request screen: zG In the Text name field, enter Z_ADRS_HEADER. In this example, use the text name Z_ADRS_HEADER, specified for letter header in the section Specifying Standard Text for Sender, Header, and Footer. {G In the Text ID field, enter ADRS. |G If the standard text does not exist, choose Create. If the standard text already exists, choose Change. Since the forms use ADRS, it is easier to use this text ID here. If you use another text ID, you need to change the corresponding command line in the forms.Tips Tricks
  • 184. JPO SAPscript Made Easy | Release 4.6 LG On the Change Standard texts for adr.Include: Z_ADRS_Header Language EN screen: zG Enter the desired text. {G Save the new or changed standard text. |G Go Back to return to the Standard Text: Request screen. }G Go Back to return to the SAP standard menu. MG If you create a new standard text, make sure that there is an INCLUDE command in the SAPscript form, which refers to the new standard text. This screenshot shows some examples of text formatting created with SAP-delivered paragraph and character formats. If you replace an existing standard text, which is already referred by an INCLUDE command in a form, you do not have to create a new INCLUDE command, just replace the name of the standard text.Tips Tricks
  • 185. Customizing Sales and Distribution for Print Forms JPP fz‚‡z‚‡‚‡€ i‹‚|‚‡€ ˆ‡}‚‚ˆ‡Œ ˆ Z‰‰~z‹ ‚‡ ~ hŽ‰Ž Pricing conditions can be marked to appear in the output, either at the item level or as a sum. During customizing, you can specify if the pricing conditions should appear: n After each item n As a sum at the end of all the items mzŒ„ 0DLQWDLQ SULFLQJ SURFHGXUHV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Sales and Distribution → Basic Functions → Pricing → Pricing Control → Define and Assign Pricing Procedures. LG On the Choose Activity screen, double-click on Maintain pricing procedures.
  • 186. JPQ SAPscript Made Easy | Release 4.6 gˆ~ Repeat steps 4 and 5 for relevant pricing procedures. MG On the Change View: “Procedures”: Overview screen: zG In the Procedures table, select the box in front of a pricing procedure. {G From the workplace menu, choose Control.
  • 187. Customizing Sales and Distribution for Print Forms JPR NG On the Change View: “Control”: Overview screen: zG In the P column in the Control table, do one of the following subordinated steps: • If the pricing condition should not appear on the output, delete X or S. • If the pricing condition should appear for every item, enter X. • If the pricing condition should appear as a sum, enter S. {G Save the controls. |G From the workplace menu, choose Procedures. The Change View: “Procedures”: Overview screen appears again. gˆ~ To maintain another pricing procedure, repeat steps 4 and 5. OG Go Back to return to the Choose Activity screen. PG On the Choose Activity screen, choose to return to the SAP Reference IMG screen. Column P in the Control Table
  • 189. + $ 3 7 ( 5 PŽŒˆ†‚“‚‡€ fz~‹‚z…Œ fz‡z€~†~‡ ˆ‹ i‹‚‡ _ˆ‹†Œ
  • 190. JQK SAPscript Made Easy | Release 4.6 h~‹‚~ Before you can use print forms with your application, certain customizing steps may be needed. This chapter covers the following two activities related to customizing Materials Management (MM) for print forms: n How to use a modified form instead of a standard form n How to get printing results that cannot be achieved by modifying the form ZŒŒ‚€‡‚‡€ i‹‚‡ i‹ˆ€‹z†Œ z‡} _ˆ‹†Œ ˆ ]ˆ|ކ~‡Œ Before you can use your modified form for printing, you must assign it to the print program. If you do not assign your modified form, the system will use the standard form for printing. A print program to collect and print data can also be specified. However, the print program does not need to be changed. mzŒ„ $VVLJQ D QHZ IRUP IRU SXUFKDVH RUGHUV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Materials Management → Purchasing → Messages → Forms (Layout Sets) for Messages → Assign Form (Layout Set) and Print Program for Purchase Order.
  • 191. Customizing Materials Management for Print Forms JQL The Change View: “Output Processing Programs”: Overview screen appears. LG In the Output Processing Programs table, enter a form name in the Form field for each output type and medium you want to use. For example, to send output to both printer and fax, use the preconfigured form YPCC_PURCHORD_STD instead of the standard form MEDRUCK. MG Save the changes. If you use the CTS, specify a transport request after saving. The Med column shows the different outputmedia usedforanoutput type (“1” for printer and “2” for fax). NEU is the output type for the purchase order. The Form column
  • 192. JQM SAPscript Made Easy | Release 4.6 NG Go Back to return to the Display IMG screen. fz‚‡z‚‡‚‡€ ]ˆ|ކ~‡ m~‘ ˆ‹ i‹‚‡‚‡€ The text from the purchase order, header, and item levels can appear in the output. Even if materials are included in the item, all material text can be selected to appear in the output at the item level of the purchase order. You can maintain document text for: n Document header n Document item n Document supplement n Change text n Headings Figure 7–1 Purchase order (preconfigured SAPscript form) Document supplement text is usually printed at the end of all purchase order items. Document item text Document header text Headings contain the document title, purchase order number, and date. The headings are printed in both first lines of the standard SAPscript form MEDRUCK for purchase order. Document title Change text explains why it is necessary to reprint a purchase order once it has been changed.
  • 193. Customizing Materials Management for Print Forms JQN p~‹~ ˆ lz‹ fz‚‡~‡z‡|~ The starting point for maintaining document text is the Messages: Purchase Order screen, where you can select the desired document text. mzŒ„ $FFHVV WKH 0HVVDJHV 3XUFKDVH 2UGHU VFUHHQ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Materials Management → Purchasing → Messages → Texts for Messages → Define Texts for Purchase Order. LG On the Choose Activity screen, double-click on Document Printout Purchase Order. MG On the Messages: Purchase Order screen, choose the desired document text.
  • 194. JQO SAPscript Made Easy | Release 4.6 Table 7–1 provides an overview of the IMG activities related to maintaining document texts for purchase orders. To learn more about adding and deleting objects, or verifying print sequences, go to the appropriate page number. Table 7–1 Overview of IMG activities related to document texts Name of object Adding an entry Deleting an entry Verifying a print sequence Texts for document header See page 187 See page 189 See page 189 Texts for document item See page 191 See page 194 See page 194 Texts for document supplement See page 196 See page 198 See page 198 Change texts See page 200 Headings See page 201
  • 195. Customizing Materials Management for Print Forms JQP fz‚‡z‚‡‚‡€ m~‘ ˆ‹ ]ˆ|ކ~‡ a~z}~‹ Z}}‚‡€ z g~ ^‡‹’ ˆ‹ ]ˆ|ކ~‡ a~z}~‹ m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen. For more information, see “Where to Start Maintenance” on page 185. LG On the Messages: Purchase Order screen, choose Texts for document header. MG On the Change View: “Messages: Header Texts”: Overview screen: zG Review the text selected to appear in the output. This text is a subset of all text defined on the header level of the purchase order and comes either from the purchase order header or is individual text. {G Choose New Entries. EKKO is the Object and F01 (Header text) is the Text ID for text coming from the purchase order header. TEXT is the Object and ST (Standard text) is the Text ID for individual text. The most important lines are those with document type NB (Standard PO). The important operations are: n New purchase order: 1 n Changed purchase order: 2
  • 196. JQQ SAPscript Made Easy | Release 4.6 NG On the New Entries: Details of Added Entries screen: zG In the Print operation field, enter 1 (New purchase order) or 2 (Changed purchase order). {G In the Purchasing doc. type field, enter NB (Standard purchase order). |G In the Text object field, enter EKKO (Purchasing document header texts) or TEXT (standard text). }G In the Text ID field, enter F02 (Header note) or ST (standard text). ~G In the Print sequence field, enter a number that determines the text printing sequence for the text. G If you use TEXT in the Text object field, enter a name for a standard text in the Text name field. €G Select Print title to print the text title. G Save the new entry. If you use the CTS, specify a transport request after saving. ‚G Go Back to return to the Change View: “Messages: Header Texts”: Overview screen. OG Go Back to return to the Messages: Purchase Order screen. PG Choose twice to return to the SAP Reference IMG screen. The print sequence determines the sequence in which text will be printed. The numbers you enter can be used only once, but you are not required to enter numbers in sequence. For example, thefollowing sequences are valid: n 1, 3, 4, 6, and 8 n 1, 2, 3, 4, and 5 n 3, 5, 6, and 9
  • 197. Customizing Materials Management for Print Forms JQR ]~…~‚‡€ z‡ ^‡‹’ ˆ‹ ]ˆ|ކ~‡ a~z}~‹ m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Texts for document header. MG On the Change View: “Messages: Header Texts”: Overview screen: zG Select the box at the beginning of the lines that you want to delete. {G Choose . |G Save the changes. NG Go Back to return to the Messages: Purchase Order screen. OG Choose twice to return to the SAP Reference IMG screen. o~‹‚’‚‡€ ~ i‹‚‡ l~ŠŽ~‡|~ ˆ‹ ]ˆ|ކ~‡ a~z}~‹ m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Texts for document header.
  • 198. JRI SAPscript Made Easy | Release 4.6 MG On the Change View: “Messages: Header Texts”: Overview screen: zG Select the box at the beginning of the line you want to verify. {G Choose . NG On the Change View “Messages: Header Texts”: Details screen: zG In the Print sequence field, you can change the number that determines the text printing sequence. {G Save the changes. If you use the CTS, specify a transport request after saving. |G Go Back to return to the Change View: “Messages: Header Texts”: Overview screen. OG Go Back to return to the Messages: Purchase Order screen. PG Choose twice to return to the SAP Reference IMG screen. The print sequence determines the sequence in which text will be printed. The numbers you enter can be used only once, but you are not required to enter numbers in sequence. For example, the following sequences are valid: n 1, 3, 4, 6, and 8 n 1, 2, 3, 4, and 5 n 3, 5, 6, and 9
  • 199. Customizing Materials Management for Print Forms JRJ fz‚‡z‚‡‚‡€ b~† m~‘ Text printed at the item level comes from various item categories. The most important item categories are: Text printed at the item level comes from various objects. The most important objects are: Z}}‚‡€ z g~ ^‡‹’ ˆ‹ b~† m~‘ mzŒ„ $GG D QHZ HQWU IRU SXUFKDVH RUGHU LWHP WH[W JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). Table 7–2 Item category indicators Indicator Description (blank) Standard item B Limit item K Consignment item L Subcontracting item S Third-party item T Text item U Stock transfer item D Service item Table 7–3 Objects at item level Object Description EKPO Purchase order items MATERIAL Materials EINE Purchasing info records VBBP Sales order items in case of a third-party item ASMD Service master records ESLL Services TEXT Standard texts
  • 200. JRK SAPscript Made Easy | Release 4.6 LG On the Messages: Purchase Order screen, choose Texts for document item. MG On the Change View: “Messages: Item Texts”: Overview screen: zG Review the text selected to appear in the output. This text is a subset of all text defined on the item level of the purchase order. {G Choose New Entries. The most important lines are those with document type NB (Standard PO). The output can be distinguished by item categories in the I column (see Table 7–2 on page 191). The important operations are: n New purchase order: 1 n Changed purchase order: 2 Text printed at the item level comes from various objects (see Table 7–3 on page 191).
  • 201. Customizing Materials Management for Print Forms JRL NG On the New Entries: Details of Added Entries screen: zG In the Print operation field, enter 1 (New purchase order) or 2 (Changed purchase order). {G In the Purchasing document type field, enter NB (Standard purchase order). |G In the Item category field, enter the letter for the desired item category. }G In the Text object field, enter EKPO (Purchasing document item texts) or TEXT (Standard text). ~G In the Text ID field, enter F03 (Material PO text) or ST (Standard text). G If you use TEXT in the Text object field, enter a name for a standard text in the Text name field. €G In the Print Sequence field, enter a number that determines the printing sequence for the text. The Printing priority field can remain empty. G Select Print title to print the text title. ‚G Save the new item text. If you use the CTS, specify a transport request after saving. ƒG Go Back to return to the Change View: “Messages: Item Texts”: Overview screen. OG Go Back to return to the Messages: Purchase Order screen. PG Choose twice to return to the SAP Reference IMG screen. Sequence and Printing priority determine the sequence in which text should be printed. It is a two-level sequence. Therefore, if the input for Sequence is equal for two text items, the Printing priority field determines the sequence. However, Sequence can accept up to 99 numbers, which is sufficient to determine a unique text sequence. Accordingly, we recommend that you leave Printing priority empty. You must enter an increasing sequence in the Sequence and Printing priority fields. But within the sequence, you may skip numbers. For example, both “1, 2, 3, 4, and 5” and “3, 5, 6, and 9” are valid sequences.
  • 202. JRM SAPscript Made Easy | Release 4.6 ]~…~‚‡€ z‡ b~† m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Texts for document item. MG On the Change View: “Messages: Item Texts”: Overview screen: zG Select the box at the beginning of the lines that you want to delete. {G Choose . |G Save the changes. NG Go Back to return to the Messages: Purchase Order screen. OG Choose twice to return to the SAP Reference IMG screen. o~‹‚’‚‡€ ~ i‹‚‡ l~ŠŽ~‡|~ ˆ‹ b~† m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Texts for document item.
  • 203. Customizing Materials Management for Print Forms JRN MG On the Change View: “Messages: Item Texts”: Overview screen: zG Select the box at the beginning of the line you want to verify. {G Choose . The Change View “Messages: Item Texts”: Details screen appears. NG On the Change View “Messages: Item Texts”: Details screen: zG In the Print Sequence field, you can change the number that determines the text printing sequence. {G In the Printing priority field, you can change the number that determines the text printing priority. This field can remain empty. |G Save the changes. If you use the CTS, specify a transport request after saving. }G Go Back to return to the Change View: “Messages: Item Texts”: Overview screen. OG Go Back to return to the Messages: Purchase Order screen. PG Choose twice to return to the SAP Reference IMG screen. You must enter an increasing sequence in the Printing priority field. You must enter an increasing sequence in the Print Sequence field, but, you may skip numbers. For example, the following sequences are valid: n 1, 2, 3, 4, and 5 n 3, 5, 6, and 9
  • 204. JRO SAPscript Made Easy | Release 4.6 fz‚‡z‚‡‚‡€ lމ‰…~†~‡ m~‘Œ Z}}‚‡€ z g~ ^‡‹’ ˆ‹ lމ‰…~†~‡ m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Texts for supplement text. MG On the Change View: “Messages: Supplement Texts”: Overview screen: zG Review the text selected to appear in the output at the end of all purchase order items. {G Choose New Entries. The most important lines are those with document type NB (Standard PO). The important operations are: n New purchase order: 1 n Changed purchase order: 2 gˆ~ Text, printed as supplements, comes either from the purchase order header or is standard text. For a purchase order header, EKKO is the Object and the supplement text ID varies (for example, F06). For standard text, TEXT is the Object and ST is the Text ID (not shown).
  • 205. Customizing Materials Management for Print Forms JRP NG On the New Entries: Details of Added Entries screen: zG In the Print operation field, enter 1 (New purchase order) or 2 (Changed purchase order). {G In the Purchasing doc. type field, enter NB (Standard purchase order). |G In the Text object field, enter EKKO (Purchasing document header texts) or TEXT (standard text). }G In the Text ID field, enter the desired text ID (for example F06). ~G In the Print sequence field, enter a number that determines the text printing sequence. G If you use TEXT in the Text object field, enter a standard text name in the Text name field. €G Select Print title to print the text title. G Save the new entry. If you use the CTS, specify a transport request after saving. ‚G Go Back to return to the Change View: “Messages: Supplement Texts”: Overview screen. OG Go Back to return to the Messages: Purchase Order screen. PG Choose twice to return to the SAP Reference IMG screen. The print sequence determines the sequence in which text will be printed. The numbers you enter in the Print sequence field can be used only once, but you are not required to enter numbers in sequence. For example, the following sequences are valid: n 1, 3, 4, 6, and 8 n 1, 2, 3, 4, and 5 n 3, 5, 6, and 9
  • 206. JRQ SAPscript Made Easy | Release 4.6 ]~…~‚‡€ z lމ‰…~†~‡ m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Texts for supplement text. MG On the Change View: “Messages: Supplement Texts”: Overview screen: zG Select the box at the beginning of the lines you want to delete. {G Choose . |G Save the changes. If you use the CTS, specify a transport request after saving. NG Go Back to return to the Messages: Purchase Order screen. OG Choose twice to return to the SAP Reference IMG screen. o~‹‚’‚‡€ ~ i‹‚‡ l~ŠŽ~‡|~ ˆ‹ lމ‰…~†~‡ m~‘ JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Texts for supplement text.
  • 207. Customizing Materials Management for Print Forms JRR MG On the Change View: “Messages: Supplement Texts”: Overview screen: zG Select the box at the beginning of the line you want to verify. {G Choose . NG On the Change View “Messages: Supplement Texts”: Details screen: zG In the Print sequence field, change the number that determines the text printing sequence. {G Save the changes. If you use the CTS, specify a transport request after saving. |G Go Back to return to the Change View: “Messages: Supplement Texts”: Overview screen. OG Go Back to return to the Messages: Purchase Order screen. PG Choose twice to return to the SAP Reference IMG screen. The print sequence determines the sequence in which text will be printed. The numbers you enter in the Print sequence field can be used only once, but you are not required to enter numbers in sequence. For example, the following sequences are valid: n 1, 3, 4, 6, and 8 n 1, 2, 3, 4, and 5 n 3, 5, 6, and 9
  • 208. KII SAPscript Made Easy | Release 4.6 fz‚‡z‚‡‚‡€ z‡€~ m~‘Œ The change text explains why a change in a purchase order makes it necessary to reprint the purchase order. If it is applicable, this text appears in the output. JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Change texts. MG On the Change View: “Messages: Change Texts”: Overview screen: zG Review the change texts. {G To change the text, overwrite it. |G Save the changes. If you use the CTS, specify a transport request after saving. NG Go Back to return to the Message: Purchase Order screen. OG Choose twice to return to the SAP Reference IMG screen.
  • 209. Customizing Materials Management for Print Forms KIJ fz‚‡z‚‡‚‡€ a~z}‚‡€Œ You can change the title of the output, the field headings for the purchase order number, and the purchase order date. The content of the title and the document type are printed in the first two lines of purchasing documents outputted with the standard SAPscript form MEDRUCK. The content of the heading document number is printed above the document number or document date. JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Access the Messages: Purchase Order screen (see “Where to Start Maintenance” on page 185). LG On the Messages: Purchase Order screen, choose Headings. MG On the Change View “Messages: Headings”: Overview screen: zG Select the box at the beginning of the lines that you want to change. {G Choose . The important operations are: n New purchase order: 1 n Changed purchase order: 2 The most important lines are those with document type NB (Standard PO).
  • 210. KIK SAPscript Made Easy | Release 4.6 NG On the Change View “Messages: Headings”: Details screen: zG Overwrite the title and heading for the document number and date. {G Save the changes. If you use the CTS, specify a transport request after saving. |G Go Back to return to the Change View “Messages: Headings”: Overview screen. OG Go Back to return to the Message: Purchase Order screen. PG Choose twice to return to the SAP Reference IMG screen. Changesin the heading for the document number and date can cause changes in the form. Before changing the headings, see where the variables for the document number and date are used in the form, and if the form needs to be changed.
  • 211. Customizing Materials Management for Print Forms KIL fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ In the previous tasks, you might have created new entries using the text object TEXT and specified text names for standard texts. The following steps show how to create or change standard texts. In this example, use the text name Z_PURCHORD_HEADER and the text ID ST. mzŒ„ 0DLQWDLQLQJ VWDQGDUG WH[W JG From the SAP standard menu, choose Tools → SAPscript → SO10 - Standard text. KG On the Standard Text: Request screen: zG In the Text name field, enter Z_PURCHORD_HEADER. {G In the Text ID field, enter ST. |G If the standard text does not exist, choose Create. If the standard text already exists, choose Change.
  • 212. KIM SAPscript Made Easy | Release 4.6 LG On the Change Standard text: ... Language ... screen: zG Enter the desired text. {G Save the new or changed standard text. |G Go Back to return to the Standard Text: Request screen. MG Go Back to return to the SAP standard menu. NG If you create a new standard text, make sure that there is an ,1/8'( command in the SAPscript form, which refers to the new standard text. This screen shows some examples of text formatting created with SAP-delivered paragraph and character formats. If you replace an existing standard text, which is already referred to by an ,1/8'( command in a form, you do not have to create a new ,1/8'( command. Simply replace the name of the standard text.Tips Tricks
  • 213. Customizing Materials Management for Print Forms KIN
  • 215. + $ 3 7 ( 5 QŽŒˆ†‚“‚‡€ _‚‡z‡|‚z… Z||ˆŽ‡‚‡€ ˆ‹ i‹‚‡ _ˆ‹†Œ
  • 216. KIQ SAPscript Made Easy | Release 4.6 h~‹‚~ Before you can use print forms with your application, certain customizing steps may be needed. This chapter covers the following two activities related to customizing Financial Accounting (FI) for print forms: n How to use a modified form instead of a standard form n How to get printing results that cannot be achieved by modifying the form ZŒŒ‚€‡‚‡€ z i‹‚‡ i‹ˆ€‹z† ˆ ~|„Œ If you copy and modify the standard print program for checks, you must inform the system that you want to use this new print program for printing checks. The following example shows how you can assign a print program to checks for a specific country. mzŒ„ $VVLJQ D QHZ SULQW SURJUDP WR FKHFNV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Financial Accounting → Accounts Receivable and Accounts Payable → Business Transactions → Outgoing Payments → Automatic Outgoing Payments → Payment Method/Bank Selection → Configure payment program. LG On the Payment Program Configuration: Initial Screen, choose Payment methods/country. MG On the Maintain Payment Program Configuration: Countries screen, double-click on the appropriate country. In this example double-click on U.S. (United States). If you cannot find the line US, scroll down the screen.
  • 217. Customizing Financial Accounting for Print Forms KIR NG On the Maintain Payment Program Configuration: Country Pmnt Methods – List screen, choose the appropriate payment method for checks. In this example double-click on C (Checks). The Maintain Payment Program Configuration: Country Pmnt Methods – Details screen appears. zG In the Name of the print program field, enter the new print program name. {G Save the changes. If you use the CTS, specify a transport request after saving. OG Choose Exit to return to the Payment Program Configuration: Initial Screen. PG Choose Back to return to Display IMG screen. ZŒŒ‚€‡‚‡€ _ˆ‹†Œ ˆ ~|„Œ If you copied and modified a form for checks, inform the system that you want to use the new form for check printing. The following example shows how to assign a new form to checks (per company code).
  • 218. KJI SAPscript Made Easy | Release 4.6 mzŒ„ $VVLJQ D QHZ IRUP WR D SULQW SURJUDP IRU FKHFNV JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Financial Accounting → Accounts Receivable and Accounts Payable → Business Transactions → Outgoing Payments → Automatic Outgoing Payments → Payment Method/Bank Selection → Configure payment program. LG On the Payment Program Configuration: Initial Screen, choose Payment methods/company code. MG On the Maintain Payment Program Configuration: Company Codes screen, double-click on a company code. In our example, we use 3000 (IDES US INC New York). NG On the Maintain Payment Program Configuration: Pmnt Methods in CC – List screen, choose the appropriate payment methods for checks. In our example, we use C (Check). OG On the Maintain Payment Program Configuration: Pmnt Methods in CC – General Data screen, choose Form Data. gˆ~ Repeat steps 4 through 8 for each company code you want to assign a new form to.
  • 219. Customizing Financial Accounting for Print Forms KJJ PG On the Maintain Payment Program Configuration: Pmnt Methods in CC – Form Data screen: zG Enter the new form name in the Form for the payment transfer medium field. {G Save the changes. If you use the CTS, specify a transport request after saving. |G Go Back to return to the Maintain Payment Program Configuration: Pmnt Methods in CC – List screen. QG Go Back to return to the Maintain Payment Program Configuration: Company Codes screen. RG Go Back to return to the Payment Program Configuration: Initial Screen. JIG Go Back to return to the Display IMG screen. l‰~|‚’‚‡€ lz‡}z‹} m~‘ ˆ‹ a~z}~‹E _ˆˆ~‹E l‚€‡zŽ‹~ z‡} l~‡}~‹ You can specify standard text to appear in the output. The form for the check normally prints only standard text, such as letter header. The header is printed at the top of the check. The letter header can use different standard text depending on the company code. If you do not specify standard text, or if the specified standard text does not exist, there is no resulting error. gˆ~ The form for the check normally prints only standard text such as letter header, but you can easily add the commands to print standard text for footer, signature, and sender.
  • 220. KJK SAPscript Made Easy | Release 4.6 mzŒ„ $VVLJQ WH[W HOHPHQWV IRU KHDGHU IRRWHU VLJQDWXUH DQG VHQGHU SHU FRPSDQ FRGH JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Financial Accounting → Accounts Receivable and Accounts Payable → Business Transactions → Outgoing Payments → Automatic Outgoing Payments → Payment Method/Bank Selection → Configure payment program. LG On the Payment Program Configuration: Initial Screen, choose Paying company codes. MG On the Payment Program Configuration: Paying company codes screen, double-click on the appropriate company code. In our example, we use 3000 (IDES US INC). NG On the Payment Program Configuration: Paying company codes data screen, choose Sender.
  • 221. Customizing Financial Accounting for Print Forms KJL OG On the Payment Program Configuration: Sender Details screen: zG Enter ADRS in the Text ID field. {G To specify standard text enter names in the Letter header, Footer text, Signature, and Sender fields. |G Save you changes. If you use the CTS, specify a transport request after saving. }G Choose Exit to return to the Payment Program Configuration: Initial Screen. PG Go Back to return to Display IMG screen. QG To print specified standard text for footer text, signature, and sender, make sure that the following control commands are used in the form: To print the standard texts for footer text, signature, and sender, you must use the following control commands in the form: Footer: ,1/8'( 5(*8'7;7)8 2%-(7 7(;7 ,' $'56 Signature: ,1/8'( 5(*8'7;781 2%-(7 7(;7 ,' $'56 Sender: ,1/8'( 5(*8'7;7$% 2%-(7 7(;7 ,' $'56 Make sure that you use the correct text ID in the control commands. TechTalk
  • 222. KJM SAPscript Made Easy | Release 4.6 fz‚‡z‚‡‚‡€ lz‡}z‹} m~‘ ˆ‹ _ˆ‹†Œ In the previous task, you might have specified standard text names for letter header, footer text, signature, or sender. The following example shows how you can create or change standard texts. In this example, we use the text name Z_F_US01_HEADER and the text ID ST. mzŒ„ UHDWH RU FKDQJH VWDQGDUG WH[W JG From the SAP standard menu, choose Tools → SAPscript → SO10 - Standard text. KG On the Standard Text: Request screen: zG In the Text name field, enter a name of the standard text (for example, Z_F_US01_HEADER). {G In the Text ID field, enter a text ID (for example, ST). |G If the standard text does not exist, choose Create. }G If the standard text already exists, choose Change.
  • 223. Customizing Financial Accounting for Print Forms KJN LG On the Change Standard text: ... Language ... screen: zG Enter the desired text. {G Save the new or changed standard text. |G Go Back to return to the Standard Text: Request screen. The illustration above shows you some examples of text formatting created with SAP-delivered paragraph and character formats. MG Go Back to return to the SAP standard menu. NG To print specified standard text for footer text, signature, and sender, make sure, that the following control commands are used in the form: To print the standard texts for footer text, signature, and sender, you must use the following control commands in the form: Footer: INCLUDE REGUD-TXTFU OBJECT TEXT ID ADRS Signature: INCLUDE REGUD-TXTUN OBJECT TEXT ID ADRS Sender: INCLUDE REGUD-TXTAB OBJECT TEXT ID ADRS Make sure that you use the correct text ID in the control commands. TechTalk
  • 224. KJO SAPscript Made Easy | Release 4.6 l‰~|‚’‚‡€ ~|„ i‹‚‡‚‡€ h‰‚ˆ‡Œ In this section you will learn how to: n Specify the number of test prints before a check run n Specify multiple printers for: • printing checks • check run summary To adjust your printer before a check run, specify the number of test prints you want. You specify the number of test prints in the variant of the print program (for example, program RFFOUS_C, variant Z1). To adjust the variant of the print program to print the checks and a summary of checks run on different printers, specify multiple printers. mzŒ„ UHDWH D YDULDQW RI WKH SULQW SURJUDP DQG VSHFLI WKH QXPEHU RI WHVW SULQWV 6SHFLI PXOWLSOH SULQWHUV IRU SULQWLQJ FKHFNV DQG WKH FKHFN UXQ VXPPDU JG Access the SAP Reference IMG (see “Accessing the IMG” on page 162). KG Choose Financial Accounting → Accounts Receivable and Accounts Payable → Business Transactions → Outgoing Payments → Automatic Outgoing Payments → Payment Method/Bank Selection → Configure payment program. LG On the Payment Program Configuration: Initial Screen, choose Payment methods/country. MG On the Maintain Payment Program Configuration: Countries screen, double-click on the appropriate country. In this example double-click on U.S. (United States). If you can not find the line U.S., scroll down the screen. NG On the Maintain Payment Program Configuration: Country Pmnt Methods – List screen, choose the appropriate payment method for checks. In this example double-click on C (Checks).
  • 225. Customizing Financial Accounting for Print Forms KJP OG On the Maintain Payment Program Configuration: Country Pmnt Methods – Details screen, choose Environment → Print prog. variants. PG On the ABAP: Variants – Initial Screen: zG Enter the name of your variant (for example, Z1) in the Variant field. {G If the variant already exist choose Change. If the variant does not exist, choose Create.
  • 226. KJQ SAPscript Made Easy | Release 4.6 QG On the Maintain Variants: Report RFFOUS_C, Variant Z1 screen: zG Scroll down until you see the Print Control section. {G In the Print control section, select the Print checks and Print payment summary fields and enter different printer names in the corresponding Printer fields. |G Scroll down until you see the Output Control section. }G In the Output control section, enter the number of desired test prints in the Number of sample printouts field. ~G Save your changes. If you use the CTS, specify a transport request after saving. RG Choose Exit three times to return to the Payment Program Configuration: Initial Screen. JIG Go Back to return to the Display IMG screen.
  • 227. 3 $ 5 7 ) 2 8 5 Z‰‰~‡}‚‘~Œ
  • 229. $ 3 3 ( 1 ' , ; ZlZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ h~‹‚~ The functionality of the SAPscript editor is determined by a number of commands, which you can either choose from the menu or call with function keys. These commands edit the text in the editor based on your requirements, and commands are immediately executed. In contrast, SAPscript recognizes another type of commands, the control commands, which: n Correspondingly influence the output formatting n Are not interpreted by the SAPscript editor n Only affect the SAPscript Composer The Composer is a program that converts text from the editor display into the print display. This program formats the line and pages where symbols are replaced by their current values and text formatting is based on the paragraph and the character style formats.
  • 230. KKK SAPscript Made Easy | Release 4.6 h~‹‚~ ˆ lZiŒ|‹‚‰ ˆ‡‹ˆ… ˆ††z‡}Œ h~‹‚~ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ Formatting options format variables and override the format described in the Dictionary. Formatting options are always specified within - variable brackets. Table A–1 SAPscript control commands SAPscript Commands Description ADDRESS Formatting of addresses BOTTOM, ENDBOTTOM Define footer text in a window BOX, POSITION, SIZE Boxes, lines and shading CASE, ENDCASE Case distinction DEFINE Value assignment to text symbols HEX, ENDHEX Hexadecimal values IF, ENDIF Conditional text output INCLUDE Include other texts NEW-PAGE Explicit forms feed NEW-WINDOW Next window MAIN PERFORM, ENDPERFORM Calling ABAP Subroutines PRINT-CONTROL Insert print control character PROTECT, ENDPROTECT Protect from page break RESET Initialize outline paragraphs SET COUNTRY Country-specific formatting SET DATE MASK Formatting of date fields SET SIGN Position of +/- sign SET TIME MASK Formatting of time fields STYLE Change style SUMMING Summing variables TOP Set header text in window MAIN
  • 231. SAPscript Control Commands KKL Z l’‡z‘ ˆ ˆ‡‹ˆ… ˆ††z‡}Œ SAPscript control commands differ from normal text lines in the following ways: i ^}‚ˆ‹ n Control commands are highlighted gray. n Control commands are inserted, changed or deleted using a dialog window. m~‘ ^}‚ˆ‹ n Control commands are indicated with the paragraph format /: in the tag column. Table A–2 SAPscript formatting options Formatting Options Description Changing the value of a counter Increasing or decreasing the value of a counter Country dependent formatting Specifying formats for country dependent values Date mask Formatting date fields Exponent for floating point numbers Specifying an exponent for floating point values Fill characters Replacing leading spaces with fill characters Ignoring conversion rules Ignoring conversion rules from Dictionary Leading sign to the left Leading sign of numeric values is on the left Leading sign to the right Leading sign of numeric values is on the right Number of decimals Specifying the number of decimal places Offset Specifying an offset of n characters Omitting leading zeros Omitting the leading zeros Omitting the leading sign Omitting the leading sign of numeric values Omitting the separator for ‘Thousands’ Omitting the separator for “Thousands” in numeric values
  • 232. KKM SAPscript Made Easy | Release 4.6 n Control commands are entered, changed, or deleted in the SAPscript editor in the same way as other text lines. i ^}‚ˆ‹ z‡} m~‘ ^}‚ˆ‹ n All key words and specifications, not defined in quotes as literal, are automatically converted to upper case. n Enter the complete control command and the necessary parameters on one line. n Enter only one control command per line. n Editor formatting does not affect lines with control commands. If the control command is unknown or syntactically incorrect, the command line is treated as a comment line, and is not interpreted or printed. gˆ~ All examples in appendix A show the syntax for the Text Editor. The syntax for the PC Editor is identically except the paragraph format /: in the tag column, because the PC Editor does not use a tag column anymore. Z]]k^ll§^g]Z]]k^llS _ˆ‹†z‚‡€ ˆ Z}}‹~ŒŒ~Œ The command formats an address according to the postal standards of the destination country defined in the parameter COUNTRY. The reference fields are described in the structure ADRS. Both constants and symbols can be assigned to the parameters. If a parameter of a control command is written in square brackets ( [ ] ) on the following pages, then this parameter is optional for the command. Some of the control commands are global settings, which are valid until they are explicitly switched off. Therefore, it is important to know that, on a page, the MAIN window is always processed first. For example, if you want to set the date format with the control command SET DATE FORMAT and this format must be valid for the entire form, then specify this command at the top of MAIN. Tips Tricks TechTalk
  • 233. SAPscript Control Commands KKN Z l’‡z‘ $''5(66 '(/,9(5@ 3$5$*5$3+ D@ 35,25,7 S@ /,1(6 O@ 7,7/( title 1$0( name1,name2,name3,name4@@@ 675((7 street 32%2; PO box 2'( zip code@ 32672'( zip code ,7 town1,town2@ 5(*,21 region 28175 country )52028175 from country (1'$''5(66 Both formatting data and address data are parameters. Address data is formatted for output based on the COUNTRY, PRIORITY and LINES parameters. As the default, the P.O. Box is used, if it is available, rather than the street address. n DELIVERY defines the street address. If this parameter is selected, the system prints the street address on the layout output instead of the P.O. Box. n PARAGRAPH defines in which paragraph format the address is output. If the parameter is not defined, the address is output in the default paragraph format. n PRIORITY defines which address lines can be omitted if there is not enough space on the output. You can enter a combination of the following values: Table A–3 PRIORITY parameter values Value Description A form of address P mandatory blank line 1 Q mandatory blank line 2 2 name 2 3 name 3 4 name 4 L country name S line for the street O line for the city
  • 234. KKO SAPscript Made Easy | Release 4.6 n LINES define how many lines are available to format the address. If the address data cannot be completely formatted due to an insufficient number of lines, the data entered in the parameter PRIORITY is omitted. If the LINES specification is missing and this command is in a form window whose type is not MAIN, the lines available for the address layout are automatically calculated with the current output line item and window size. n TITLE is a required form of address. n NAME means that up to four separate names, separated by commas, can be defined. n STREET means the street specification, including address number. n POBOX is the Post Office box number. n CODE is the P.O. box, postal, or zip code, if this code is different from the postal code of the city. n POSTCODE is city’s postal, or zip, code. n CITY means that up to two place names can be defined. n REGION determines the administrative area. n COUNTRY specifies the country based on specific postal standards and the address format. n FROMCOUNTRY defines in which language the destination country’s name is formatted. In EEC countries, only the international country identification letter is placed, with a hyphen, before the postal code. ^‘z†‰…~ $''5(66 7,7/( ¶RPSDQ· 1$0( ¶:LGJHW 7HFKQRORJ ,QF· ¶$OO .LQGV RI :LGJHWV· 675((7 ¶ /LGR /DQH· 32%2; ¶· 2'( ¶· 32672'( ¶· ,7 ¶)RVWHU LW· 5(*,21 ¶$· 28175 ¶86$· )52028175 ¶86$· (1'$''5(66
  • 235. SAPscript Control Commands KKP Z This list generates the following address: Company Widget Technology, Inc. All Kinds of Widgets PO box 2935 Foster City, CA 94400 If the DELIVERY supplement is specified for the ADDRESS command, then the street, not the P.O. Box, is entered. Company Widget Technology, Inc. All Kinds of Widgets 1005 Lido Lane Foster City, CA 94404 [hmmhfS ]~‚‡~ _ˆˆ~‹ m~‘ ‚‡ z p‚‡}ˆ For MAIN, determine the lines, also known as footer texts, which are always automatically output at the bottom of that window. l’‡z‘ %27720 (1'%27720 The text lines between the two commands are output at the bottom of MAIN. ^‘z†‰…~ To switch a footer text off, enter the command pair BOTTOM.. ENDBOTTOM with no text lines in between: %27720 (1'%27720 Footer text no longer appears at the bottom of the page from and including this page. SAPscript calls the ADDRESS_INTO_PRINTFORM function module to format the address. If the display is not in the required form, check the settings that are valid for this function module (see the documentation on the function module).TechTalk If there is sufficient space in the window, a footer text is output on the current page. Only use footer texts in texts that are not printed with application programs, such as dunning texts, ordering texts. These application programs also work with footer texts with the form interface, which can lead to unwanted results. TechTalk
  • 236. KKQ SAPscript Made Easy | Release 4.6 [hqE ihlbmbhgE lbs^S [ˆ‘~ŒE e‚‡~ŒE lz}‚‡€ The BOX, POSITION and SIZE commands draw boxes, lines, and shadows. Within any particular form, these commands specify window or passage of window text can be output in a frame or with shadowing. The SAP printer drivers based on page-oriented printers (the HP LaserJet PCL-5 driver HPLJ4, the Postscript driver POST, the Kyocera Prescribe driver PRES) use these commands when creating output. Line printers and nonsupported page-oriented printers ignore these commands. The resulting output may be viewed in the SAPscript print previewer. [hq l’‡z‘ %2; ;326@ 326@ :,'7+@ +(,*+7@ )5$0(@ ,17(16,7@ This command draws a box of the specified size at the specified position. For each parameter (XPOS, YPOS, WIDTH, HEIGHT, and FRAME), both a measurement and a unit of measure must be specified. The INTENSITY parameter should be entered as a percentage between 0 and 100. n XPOS, YPOS specify the upper left corner of the box, relative to POSITION command values. Default is the values specified in the POSITION command. The following calculation is performed internally to determine the absolute output position of a box on the page: X(abs) = XORIGIN + XPOS Y(abs) = YORIGIN + YPOS n WIDTH determines the width of the box. Default: WIDTH value of the SIZE command n HEIGHT determines height of the box. Default: HEIGHT value of the SIZE command n FRAME determines the thickness of frame. Default: 0 (no frame) n INTENSITY determines the box contents as a grayscale percentage. Default: 100 (full black) When determining the measurements, use decimal numbers to specify literal values (like ABAP numeric constants) and enclose these values in inverted commas. Use a period for the decimal point character. See also the examples listed below. Use the following units of measure: n TW (twip) n PT (point)
  • 237. SAPscript Control Commands KKR Z n IN (inch) n MM (millimeter) n CM (centimeter) n LN (line) n CH (character) The following conversion factors apply: n 1 TW = 1/20 PT n 1 PT = 1/72 IN n 1 IN = 2.54 CM n 1 CM = 10 MM n 1 CH = height of a character relative to the CPI specification in the form header n 1 LN = height of a line relative to the LPI specification in the form header ^‘z†‰…~ %2; )5$0( 7: The above command draws a frame around the current window with a thickness of 10 TW (= 0.5 PT). %2; ,17(16,7 The above command fills the window background with shadowing having a gray scale of 10 %. %2; +(,*+7 7: )5$0( 7: The above command draws a horizontal line across the complete top edge of the window. %2; :,'7+ 7: )5$0( 7: The above command draws a vertical line along the complete height of the left hand edge of the window. %2; :,'7+ 0 +(,*+7 0 )5$0( 7: ,17(16,7 %2; :,'7+ 0 +(,*+7 0 )5$0( 7: %2; ;326 0 :,'7+ 7: +(,*+7 0 )5$0( 7: %2; ;326 0 :,'7+ 7: +(,*+7 0 )5$0( 7: The above commands draw two rectangles and two lines to construct a table of three columns with a highlighted heading.
  • 238. KLI SAPscript Made Easy | Release 4.6 ihlbmbhg l’‡z‘ 326,7,21 ;25,*,1@ 25,*,1@ :,1'2:@ 3$*(@ This command sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting). If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, which is a value that specifies an offset from the upper-left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If a parameter specification is missing, then this parameter is unchanged. n XORIGIN, YORIGIN is the origin of the coordinate system. n WINDOW sets the values for the left and upper edges to be the same of those of the current window (default setting). n PAGE sets the values for the left and upper edges to be the same as the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm). ^‘z†‰…~ 326,7,21 :,1'2: The above command sets the origin for the coordinate system to the upper-left corner of the window. 326,7,21 ;25,*,1 0 25,*,1 0 The above command sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page. 326,7,21 ;25,*,1 0 25,*,1 0 The above command shifts the origin for the coordinates 1.5 cm to the left and 1 cm up. lbs^ l’‡z‘ 6,=( :,'7+@ +(,*+7@ :,1'2:@ 3$*(@ This command sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window (default setting). If one of the parameter specifications is missing, then no change is made to its current value. If a parameter value does not have a leading sign,
  • 239. SAPscript Control Commands KLJ Z then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. n WIDTH, HEIGHT sets the dimensions of the rectangle or line. n WINDOW sets the values for the width and height relative to the values of the current window (default setting). n PAGE sets the values for the width and height to the values of the current output page. ^‘z†‰…~ 6,=( :,1'2: The above command sets WIDTH and HEIGHT to the current window dimensions. 6,=( :,'7+ 0 +(,*+7 0 The above command sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm. 326,7,21 :,1'2: 326,7,21 ;25,*,1 7: 25,*,1 7: 6,=( :,'7+ 7: +(,*+7 7: %2; )5$0( 7: With the above commands, a frame is added to the current window. The frame edges extend beyond the window itself, to avoid obscuring the leading and trailing text characters. Zl^S zŒ~ ]‚Œ‚‡|‚ˆ‡ The CASE command is a special case of multi-level case distinction with IF commands. As a condition for the different cases, only one symbol can be queried for equality with different values. l’‡z‘ $6( symbol :+(1 value1 :+(1 value2 :+(1 value n :+(1 27+(56 (1'$6( The symbol entered in the CASE line is formatted. If it has a value specified in the individual WHEN lines, the text following the valid WHEN line is output. If none of the listed values apply, the lines
  • 240. KLK SAPscript Made Easy | Release 4.6 between the WHEN OTHERS line and ENDCASE are output. The WHEN OTHERS case is optional. Comparison is always carried out as a literal comparison as for the IF command. ]^_bg^S oz…Ž~ ZŒŒ‚€‡†~‡ ˆ m~‘ l’†{ˆ…Œ Text symbols receive their value through an explicit assignment. This assignment can be made interactively in the editor by choosing Include → Symbols → Text. This step lists all the text symbols of a text module and those of the allocated form. If the transaction is exited, the contents defined in this way are lost. To continue printing the text module, you would have to enter the symbol values again. The DEFINE command allows you to anchor this value assignment in the text and to have it available when you next call up the text. Furthermore, you can allocate another value to a text symbol in the course of the text. l’‡z‘ '(),1( symbolname ¶value· ^‘z†‰…~ '(),1( UH ¶RXU FRUUHVSRQGHQFH RI · '(),1( VPERO ¶[[[[[[[· '(),1( VPERO ¶ VPERO · '(),1( VPERO ¶]]]]]]]· k~ŒŽ…S symbol2 → yyyzzzzzzz The assigned value may have a maximum of 60 characters, but it can also contain more symbols. When a symbol is defined using DEFINE, symbols which occur in the value are not immediately replaced by their value. They are replaced only when the target symbol is output. If operator := is used in DEFINE, the symbols that occur in the value to be assigned are immediately replaced by their current values. The resulting character string is only then assigned to the target symbol when all occurring symbols have been replaced. The length of the value is limited to 80 characters, and the target symbol must be a text symbol. ENDCASE must end a CASE command, but the WHEN OTHERS command is optional. TechTalk
  • 241. SAPscript Control Commands KLL Z l’‡z‘ '(),1( symbolname ¶value· a^qS a~‘z}~|‚†z… ]zz This command sends printer commands in a printer language directly to a printer that supports that language. SAPscript does not interpret the data enclosed by the HEX and ENDHEX command pair, but inserts unchanged data into the output stream. This technique allows objects with a pixel-oriented format to be printed as part of a SAPscript text. The HEX and ENDHEX command pair enclose the printer commands and data as hexadecimal text, so that the printer formatting routines interpret each successive pair of characters as a single hexadecimal value in the 0..255 range. The characters 0..9 and A..F to represent the values 10..15 are valid hexadecimal characters. The text may also include comment lines (these begin with /* in the format column), which will not be interpreted as hexadecimal data but are simply passed over by the formatting routines. l’‡z‘ +(; 73( printer_language@ (1'+(; HEX denotes the start of the hexadecimal data. Subsequent text lines are interpreted as described above. If the TYPE parameter is present, the data will be sent to the printer only if the printer understands the specified printer language. The following printer languages are currently supported: n POST (Postscript) n PRES (Kyocera Prescribe) n PCL (HP Printer Control Language) +(; 73( printer_language@ ;326 x_position@ 326 y_position@ Before the hexadecimal data is output, the output cursor is set to the absolute position indicated by the specified X and Y position parameters. If either the X or the Y position is not specified, then 0 will be assumed for this parameter. +(; 73( printer_language@ +(,*+7 height@ /()7 left_indentation@
  • 242. KLM SAPscript Made Easy | Release 4.6 The HEIGHT parameter determines the amount of space to be reserved on the page for the output of the hexadecimal data. Any text after ENDHEX will be output below this point. If the LEFT parameter is also specified, then the output of the hexadecimal data will be indented from the left margin by the specified amount. ^‘z†‰…~ UHDWRU UHSRUW =4917( GDWH WLPH XVHU 6$365,37 %$%$%$%$'%$)))))) )))))) ))%$))))))))))))''))' (1'+(; This data will be printed only by an HP PCL printer (7.5 cm of space will allocated on the page for the output of the data and the output cursor will be indented 2.25 cm to the right of the form window edge). b_S ˆ‡}‚‚ˆ‡z… m~‘ hŽ‰Ž With the IF control command, define those lines that are output under certain conditions. If the logical expression entered for the IF command is fulfilled, the lines parenthesized by IF ... ENDIF are output. If this expression is not enclosed in parentheses, the commands are ignored. l’‡z‘ ,) Condition (1',) The RSTXLDMC program uploads correctly formatted pixel data to the R/3 System and prepares it as a HEX-ENDHEX control command. This data can be saved then as normal SAPscript text.TechTalk
  • 243. SAPscript Control Commands KLN Z In the condition, the following relational operators are possible: As logical link operators use OR, NOT, or AND. The sequence of processing the logical operations and the sequence of processing the conditions is always from left to right. There is no order of binding, and bracketing is not allowed. Comparison is always carried out as a literal comparison, that is, symbols are compared in their formatted form as a character string and not with their internal representation. This comparison must be taken into account for program symbols whose format depends on different parameters. Examples include currency fields that are output with different number of places after the decimal point depending on the currency key, or that use a comma or a period as the decimal separator depending on the setting. The IF command can be extended to make a two-sided case distinction with the ELSE command. If the specified IF condition is true, then the lines listed between IF and ELSE are formatted, otherwise the lines between ELSE and ENDIF are formatted. l’‡z‘ ,) Condition (/6( (1',) A multilevel case distinction is possible using the ELSEIF command. l’‡z‘ ,) Condition (/6(,) Condition (/6( (1',) You can use as many ELSEIF commands as required. The specification of an ELSE command is optional in this case. Table A–4 Relational operators overview Relational Operator Description = or EQ equals or LT less than or GT greater than = or LE less than or equal to = or GE greater than or equal to
  • 244. KLO SAPscript Made Easy | Release 4.6 bgen]^S b‡|…Ž}~ h~‹ m~‘Œ Use INCLUDE to include the contents of another text into your text. The text to be included exists separately from yours and is only copied at the time of the output formatting. With INCLUDE, since the text is only read and inserted during the output formatting, the most current version of the required text is always available. l’‡z‘ ,1/8'( name 2%-(7 o@ ,' i@ /$1*8$*( l@ 3$5$*5$3+ p@ 1(:3$5$*5$3+ np@ The name of the text to be inserted must be specified and can have up to 70 characters. If the text name contains blanks, put it in quotes as a literal. It can also be specified with a symbol. All further parameters of INCLUDE are optional. If these parameters are missing, SAPscript uses default values based on the respective call environment for them. ^‘z†‰…~ ,1/8'( 07(;7 The text MYTEXT is included in the language of the calling text. ,1/8'( 07(;7 /$1*8$*( ¶(· 3$5$*5$3+ ¶$· The text with the name MYTEXT and the language E is included, regardless of the language in which the calling text is created. The paragraph format A1 is valid as the standard paragraph for this call. The condition must not extend over several lines, and must be contained in one line with the IF or ELSEIF command. IF commands can also be nested. An IF command must always end with ENDIF. If this command is forgotten, and if the condition is not true, nothing more is output after the IF command. If a syntax error is found when interpreting these commands, the corresponding command is not executed. This can have various effects on the following text output. If, for example, the IF statement is incorrectly structured, since IF is missing, the following ELSEIF or ELSE commands are ignored. All lines are output. TechTalk
  • 245. SAPscript Control Commands KLP Z h‰‚ˆ‡z… l‰~|‚‚|z‚ˆ‡Œ n LANGUAGE If a language is unspecified, the calling text’s language or the form is set for the text to be included. If a language is specified, the text is always loaded in this language, regardless of the language of the calling text. n PARAGRAPH The text to be included is formatted with its style allocation. With this parameter, the standard paragraph of this style can be redefined for the current call. All * paragraphs of the inserted text are formatted with the paragraph specified here. n NEW-PARAGRAPH The first line of the included text has this format flag, provided it is not a command or comment line. If the optional entry PARAGRAPH (see above) is empty, all * paragraphs of the included text are formatted with the paragraph np specified with NEW-PARAGRAPH. n OBJECT To completely specify a text, create additional specifications about the text object. There are different rules and restrictions for this specification that depends on the calling text’s object type. All texts can be included in a form. If no object is entered here, TEXT is used (standard texts). With a documentation text (object DOKU), you can only include documentation texts. This object is assumed even if no object is specified in this environment. Only hypertext or documentation text can be included into a hypertext (object DSYS). If the OBJECT specification is missing, DSYS is set as a default value. Only standard text (object TEXT), documentation text or hypertext can be included in any other type of text. The default object is TEXT if nothing is entered. n ID The text ID allows further text types within an object, is a further part of the text key. If the ID is not entered, the default Include ID from table TTXID is used to call text. If the specification is not in this table, the text ID of the calling text is used.
  • 246. KLQ SAPscript Made Easy | Release 4.6 The ID and the object are now the basis of a further consistency check: n All text IDs are allowed for a form. n Only documentation texts with the text IDs TX (general texts), UO (authorization objects), and documentation texts (with the same text ID as the calling documentation text) may be included in documentation texts. n All DSYS texts may be included in DSYS texts, regardless of their ID. Documentation texts that will be inserted may only have IDs TX and UO. n Standard texts with the allowed text IDs, DSYS texts with IDs, and documentation texts with IDs TX and UO may be included in the text types. g^pFiZ`^S ^‘‰…‚|‚ _ˆ‹† _~~} SAPscript automatically inserts a page break if MAIN of one page is filled. Using NEW-PAGE, a page break can be forced at any point. The text after this command is written on a new page. The form feed is independent of any conditions. The command now outputs the current page. If you have entered NEW-PAGE without additional parameters, the page defined in the form as the next page is accessed. If, however, there are various pages in your form, you can jump to any particular next page by specifying the page name. l’‡z‘ 1(:3$*( page name@ ^‘z†‰…~ 1(:3$*( The current page is completed and the text in the following lines is written on the next page as determined in the form. 1(:3$*( 6 Same as before, but S1 is accessed as the next page. If an explicitly specified page for NEW-PAGE is not in the form, this page specification is ignored. Make sure that there are no blank lines immediately before a NEW-PAGE command. If an implicit form feed was carried out within these blank lines, this step could lead to an unwanted empty page being printed. Caution
  • 247. SAPscript Control Commands KLR Z g^pFpbg]hpS g~‘ p‚‡}ˆ fZbg You can have up to 99 MAIN windows on one page. These windows are distinguished by a serial number (0..98) and assigned in this order. So, with SAPscript, it is possible to print labels or to output text in multiple columns. If one MAIN window is filled, then the next MAIN window on the page is automatically accessed. A page break is inserted at the end of the final MAIN window. Using NEW-WINDOW, even if the current window is not completely filled, you can explicitly call the next window MAIN. If you are currently in the last MAIN window of the page, the command works as a NEW-PAGE. l’‡z‘ 1(::,1'2: i^k_hkfS z……‚‡€ Z[Zi lŽ{‹ˆŽ‚‡~Œ You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on. PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine. l’‡z‘ ,Q D IRUP ZLQGRZ 3(5)250 IRUP! ,1 352*5$0 SURJ! 86,1* ,19$5 86,1* ,19$5 +$1*,1* 2879$5 +$1*,1* 2879$5 (1'3(5)250 INVAR1 and INVAR2 are variable symbols and may be any of the four SAPscript symbol types. OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
  • 248. KMI SAPscript Made Easy | Release 4.6 The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows: )250 IRUP! 7$%/(6 ,1B7$% 6758785( ,76 287B7$% 6758785( ,76 (1')250 The values of the SAPscript symbols passed with 86,1* are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables. The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine. ^‘z†‰…~ 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. ]~‚‡‚‚ˆ‡ ‚‡ ~ lZiŒ|‹‚‰ ˆ‹†S 3(5)250 *(7B%$52'( ,1 352*5$0 4-3(5)2 86,1* 3$*( 86,1* 1(;73$*( +$1*,1* %$52'( (1'3(5)250 %$52'( ˆ}‚‡€ ˆ ~ |z……‚‡€ Z[Zi ‰‹ˆ€‹z†S 5(3257 4-3(5)2 )250 *(7B%$52'( 7$%/(6 ,1B3$5 678785( ,76 287B3$5 6758785( ,76 ikbgmFhgmkheS b‡Œ~‹ i‹‚‡ ˆ‡‹ˆ… z‹z|~‹ This command allows you call certain printer functions from SAPscript text. The control characters for the printer cannot be directly entered into your text. First, with the spool transaction SPAD, define a print control that contains the required printer commands. This print control can now be called with the SAPscript command PRINT-CONTROL. l’‡z‘ 35,1721752/ name
  • 249. SAPscript Control Commands KMJ Z The name of the required print control can be entered with or without quotes. After performing PRINT-CONTROL, SAPscript inserts a blank at the start of the following line. If this is not required, this line must have the paragraph format “=.” ikhm^mS i‹ˆ~| ‹ˆ† iz€~ [‹~z„ You can determine whether a paragraph should or should not be separated by a page break in the style or form. If the attribute page protection is set, then all the lines of this paragraph are always output together on one page. This attribute is linked to the respective paragraph. It is not beneficial to provide all paragraphs with a page protection attribute to neutralize unwanted page breaks. This event is too dynamic and only results from the current text. Furthermore, you may also want to protect only parts of a paragraph from a page break. In principle, this problem could be solved with NEW-PAGE by explicitly starting a new page before the affected parts of the text. However, it is complicated to change this procedure. Using NEW- PAGE, if your text is formatted to have no unwanted page breaks, and new lines are inserted and existing ones are deleted, the NEW- PAGE commands inserted after this point will have to be checked and can result in the movement of page breaks. With the command pair PROTECT .. ENDPROTECT, SAPscript offers the option to individually define protection from a page break. If you parenthesize text with these commands, SAPscript automatically guarantees that all of its lines are printed on one page. If the lines fit on the current output page, they are output there, as if PROTECT was not used. If, however, the space is not sufficient, PROTECT works like a NEW-PAGE and generates a form feed. SAPscript has no idea of what is contained in the print control. It cannot check whether the printer commands hidden behind it are functional. If problems result when printing such a text, first print the text without the print controls, and then activate each PRINT-CONTROL command to help you locate the error more easily. On completion, make sure that the defined print control sequences restore the printer to a defined status. When printing subsequent texts, SAPscript assumes that certain settings are still valid (type font, current page). If these settings are changed by the called printer commands, this change can have unwanted effects. Caution
  • 250. KMK SAPscript Made Easy | Release 4.6 So, you can view PROTECT/ENDPROTECT are conditional NEW- PAGE commands, that determine whether the included lines fit into the current window MAIN or not. l’‡z‘ 3527(7 (1'3527(7 The lines to be protected lie between the two commands. k^l^mS b‡‚‚z…‚“~ hŽ…‚‡~ iz‹z€‹z‰Œ The RESET command resets the numbering of an outline paragraph to its initial value. If the user does not use RESET, all the outline paragraphs of a text are sequentially numbered. If the name of an outline paragraph is entered in RESET, the numbering of this paragraph, is initialized with subordinate outline levels. l’‡z‘ 5(6(7 paragraph format The paragraph format specifies the outline paragraph to be initialized. ^‘z†‰…~ Assume that paragraph N1 is defined in the style you are using. This paragraph should be used for listings and each time it generates an output of a list number. This is the SAPscript editor: $6 ,I RX ZDQW WR ZRUN ZLWK WKH 6$3 5 6VWHP SURFHHG DV IROORZV 1 0DNH VXUH WKDW RX KDYH D 3 1 6ZLWFK RQ WKH 3 An ENDPROTECT command without a preceding PROTECT command is ineffective. If the last ENDPROTECT is missing, it is implicitly assumed at the end of the text. PROTECT .. ENDPROTECT commands cannot be nested. If a second PROTECT command is recognized while another is active, the second is ignored. If the text between PROTECT and ENDPROTECT is so extensive that it would not fit on an empty page, then only one form feed is generated and the text is normally output. Thus, in this case, the section to be protected is separated by a page break. TechTalk
  • 251. SAPscript Control Commands KML Z 1 OLFN RQ WKH 6$3 LFRQ $6 7KH 6$3 ORJRQ VFUHHQ DSSHDUV 7R ORJ RQ RX PXVW FDUU RXW WKH IROORZLQJ VWHSV 5(6(7 1 1 (QWHU RXU XVHU ,' 1 (QWHU RXU SDVVZRUG 1 KRRVH WKH DSSOLFDWLRQ RX UHTXLUH k~ŒŽ…S If you want to work with the SAP R/3 System, proceed as follows: 1. Make sure that you have a PC 2. Switch on the PC 3. Click on the SAP icon. The SAP logon screen appears. To log on, you must carry out the following steps: 1. Enter your user ID 2. Enter your password 3. Choose the application you require. If the RESET command between the two lines in the previous example is missing, then both of the listings would be sequentially numbered: k~ŒŽ…S If you want to work with the SAP R/3 System, proceed as follows: 1. Make sure that you have a PC 2. Switch on the PC 3. Click on the SAP icon. The SAP logon screen appears. To log on, you must carry out the following steps: 4. Enter your user ID 5. Enter your password 6. Choose the application you require.
  • 252. KMM SAPscript Made Easy | Release 4.6 l^m hngmkrS ˆŽ‡‹’Fl‰~|‚‚| _ˆ‹†z‚‡€ Some field types are formatted to be country-specific. This includes the display of a date, the decimal point, or the thousands separator. Normally, the display types defined in the user master record are used here. With the control command SET COUNTRY, a format alternative to that in the user master record can be chosen, which is stored country-specifically in table T005X. l’‡z‘ 6(7 28175 Country key This country key can be entered either directly in quotes or with a symbol. ^‘z†‰…~ 6(7 28175 ¶$1· 6(7 28175 Country key By entering an empty country name, you can return to the values set in the user master record. 6(7 28175 ¶ ¶ The corresponding ABAP command is called internally by SAPscript. l^m ]Zm^ fZldS _ˆ‹†z‚‡€ ˆ ]z~ _‚~…}Œ Formatting date fields can be defined with the SAPscript command SET DATE MASK. After executing this command, all the date fields are output with this display. l’‡z‘ 6(7 '$7( 0$6. ¶date mask· If the required formats are incorrect, check the settings in table T005X. Tips Tricks
  • 253. SAPscript Control Commands KMN Z In the date mask, the following edit formats can be used: All other characters in the mask are interpreted as text and copied correspondingly. ^‘z†‰…~ Assume that the current system date is March 1, 2000. 6(7 '$7( 0$6. ¶:DOOGRUI ''00· '$7( k~ŒŽ…S Walldorf, 01.03.00 6(7 '$7( 0$6. ¶'' 0000 · '$7( k~ŒŽ…S 01 March 2000 ^‘z†‰…~ By specifying an empty string as the date mask, you can switch back to the default display: 6(7 '$7( 0$6. ¶ ¶ Table A–5 Date mask: Edit formats Edit format Description DD Day (two-digit) DDD Day name abbreviated DDDD Day name in full MM Month (two-digit) MMM Month name abbreviated MMMM Month name in full YY Year (two-digit) YYYY Year (four-digit)
  • 254. KMO SAPscript Made Easy | Release 4.6 gˆ~ The texts for the month and day names, shortened or in full, are stored language- dependently in table TTDTG under the following arguments: l^m lb`gS m~ iˆŒ‚‚ˆ‡ ˆ DHF For commercial applications, it is common for the “+/-“ signs to be displayed to the right of the number value. In certain cases, however, it is necessary for these signs to be displayed to the left of the number value. This position can be determined with the control command SET SIGN. All program symbols formatted using this command and that have a “+/-“ sign are displayed in the required fashion. l’‡z‘ 6(7 6,*1 /()7 The +/- sign is displayed to the left of the number. 6(7 6,*1 5,*+7 The +/- sign is displayed to the right of the number. l^m mbf^ fZldS _ˆ‹†z‚‡€ ˆ m‚†~ _‚~…}Œ With the SAPscript command SET TIME MASK time fields can be alternatively formatted to the standard display. l’‡z‘ 6(7 7,0( 0$6. ¶time mask· The following edit formats can be used in the time mask: n HH = hours (two-digit) Table A–6 Table TTDTG: Date mask arguments Argument Description %%SAPSCRIPT_DDD_dd abbreviated day name dd = day number (01 = Monday … 07 = Sunday) %%SAPSCRIPT_DDDD_dd full day name %%SAPSCRIPT_MMM_mm abbreviated month name mm = month number (01 = January … 12 = December) %%SAPSCRIPT_MMMM_mm full month name
  • 255. SAPscript Control Commands KMP Z n MM = minutes (two-digit) n SS = seconds (two-digit) All other characters in the mask are interpreted as text and printed correspondingly. ^‘z†‰…~ Assume that the current time is 10:08:12. 6(7 7,0( 0$6. ¶++00· 7,0( k~ŒŽ…S 10:08 6(7 7,0( 0$6. ¶++ KRXUV 00 PLQXWHV· 7,0( k~ŒŽ…S 10 hours 08 minutes By specifying an empty string as a time mask, you can switch back to the default display: 6(7 7,0( 0$6. ¶ ¶ lmre^S z‡€~ l’…~ The control command STYLE changes style within a text. This other style is used until a new STYLE command is entered. If * is entered as a style name, switch back to the original style. l’‡z‘ 67/( style 67/( If another text module is inserted by choosing Include → Text and immediately deleted, STYLE is automatically set in the editor. The same occurs if the text contents included in INCLUDE are copied into the text by choosing Edit → Selected area → Delete INCLUDE. lnffbg` Program symbols can be added with the SUMMING command. The command needs to be defined only once. Each time that the specified symbol is edited, its current value is added to the sum field. Several program symbols can also be added in a sum field.
  • 256. KMQ SAPscript Made Easy | Release 4.6 l’‡z‘ 6800,1* program symbol ,172 sum symbol Since SAPscript can not dynamically define sum fields, the sum symbol must be in a calling program structure that was declared with TABLES. mhiS l~ a~z}~‹ m~‘ ‚‡ fZbg In MAIN, lines that are always automatically output at the top of the window, called header texts, can be determined. Header texts can automatically repeat the table heading at the top of every page for an extensive tabular list. l’‡z‘ 723 (1'723 Those text lines between the two commands will be output at the top of MAIN. To switch a header text off, enter the command pair TOP .. ENDTOP, with no lines in between: 723 (1'723 Header text will not appear on subsequent pages. If the document window contains text, then the header text is effective from the next page. The same applies to deleting a header text. That is, a header text that has already been output can no longer be canceled on the current page. Only use header texts in texts that are not printed with application programs, such as dunning texts and ordering texts. These application programs can also work with header texts in the form interface, which can lead to unwanted results. Tips Tricks
  • 257. SAPscript Control Commands KMR Z l’‡z‘ ˆ _ˆ‹†z‚‡€ h‰‚ˆ‡Œ z‡€‚‡€ ~ oz…Ž~ ˆ z ˆŽ‡~‹ You can increase or decrease the value of SAPSCRIPT-COUNTER_x (x=0.. 9) counter variable by 1, before the current counter value is printed. l’‡z‘ 6$365,372817(5B[
  • 258. ,QFUHDVHV E WKH FRQWHQWV RI WKH FRXQWHU YDULDEOH [ [
  • 260. 'HFUHDVHV E WKH FRQWHQWV RI WKH FRXQWHU YDULDEOH [ [
  • 261. If you want to change the value of a counter variable without actually printing the new value, use this formatting option together with an additional option to set the output length to 0 (see above). If you want to set a counter variable to some specific value, use the DEFINE control command. ^‘z†‰…~ Assume that SAPSCRIPT-COUNTER_1 initially has the value 2. 6$365,372817(5B ! 6$365,372817(5B
  • 266. ! ˆŽ‡‹’ ]~‰~‡}~‡ _ˆ‹†z‚‡€ Certain fields are formatted specific to a particular country. These include fields for displaying a date and numeric fields containing either a decimal point or a ‘thousands’ separator character. The formatting applied is usually determined by the definitions contained in the user master record. You can use the SET COUNTRY control command to choose a different formatting operation. The various country-dependent formatting options are stored in table T005X. l’‡z‘ 6(7 28175 country_key You can specify this country key either by quoting it directly enclosed in inverted commas or by using a symbol. 6(7 28175 $1 6(7 28175 .1$/$1'
  • 267. KNI SAPscript Made Easy | Release 4.6 You can revert to the settings of the user master record by using the SET COUNTRY control command again with an empty country name. 6(7 28175 When SAPscript encounters this command it calls the corresponding ABAP command internally. The effect of the SAPscript command is thus identical with that of the ABAP command. If the formatting turns out other than expected, check the settings in table T005X. ]z~ fzŒ„ To format date fields, use the SAPscript SET DATE MASK command. Executing this command causes all subsequent date fields to be printed with the specified formatting. l’‡z‘ 6(7 '$7( 0$6. ¶date_mask· In the date mask, the following edit formats can be used: Any other characters occurring in the mask are interpreted as simple text and are copied directly to the output. Table A–7 Date mask: Edit formats Template Description DD day (two digits) DDD name of day (abbreviated) DDDD name of day (written out in full) MM month (two digits) MMM name of month (abbreviated) MMMM name of month (written out in full) YY year (two digits) YYYY year (four digits) LD day (formatted as for the L option) LM month (formatted as for the L option) LY year (formatted as for the L option)
  • 268. SAPscript Control Commands KNJ Z ^‘z†‰…~ Assuming a current system date of March 1, 2000. 6(7 '$7( 0$6. )RVWHU LW 00'' '$7( k~ŒŽ…S Foster City, 03.01.00 6(7 '$7( 0$6. 0000 '' '$7( k~ŒŽ…S March 01, 2000 You can revert to the standard setting by using the SET DATE MASK command again with an empty string in place of the date mask: 6(7 '$7( 0$6. ^‘‰ˆ‡~‡ ˆ‹ _…ˆz‚‡€ iˆ‚‡ gކ{~‹Œ How a floating point number is formatted depends on whether an exponent is specified. The mantissa is adjusted by shifting the decimal point and, if necessary, introducing leading zeros, based on the chosen exponent. An exponent value of 0 means that the exponent representation will not be used to display the symbol. l’‡z‘ VPERO(n
  • 269. ^‘z†‰…~ In this example the PLMK-SOLLWERT field is assumed to have the value 123456.78 and to be of data type FLTP. Table A–8 Examples for floating point numbers Symbol Result PLMK-SOLLWERT +1.23456780000000E+05 PLMK-SOLLWERT(E3) +123.456780000000E+03 PLMK-SOLLWERT(E6) +0.12345678000000E+06 PLMK-SOLLWERT(E0) +123456.780000000 PLMK-SOLLWERT(E) +123456.780000000
  • 270. KNK SAPscript Made Easy | Release 4.6 _‚…… z‹z|~‹Œ Leading spaces in a value can be replaced with a fill character. The character immediately following the F in the specification is used as the fill character. l’‡z‘ VPERO)f
  • 271. ^‘z†‰…~ The figure for customer sales in the KNA1-UMSAT field is $700. The Dictionary description of the field specifies an output length of eight. . b€‡ˆ‹‚‡€ ˆ‡~‹Œ‚ˆ‡ kŽ…~Œ SAPscript conversion routines specified in the Dictionary are automatically recognized and used when program symbols are formatted. These conversions can be prevented with the K option. l’‡z‘ VPERO.
  • 272. e~z}‚‡€ l‚€‡ ˆ ~ e~ The leading sign is normally displayed to the right of a numeric value, except when using a floating point number. This option allows you to specify that the leading sign is placed to the left of the number. l’‡z‘ VPERO
  • 273. Table A–9 Examples for fill characters Symbol Result KNA1-UMSAT 700.00 KNA1-UMSAT(F*) **700.00 KNA1-UMSAT(F0) 00700.00 Table A–10 Examples for leading sign Symbol Result ITCDP-TDULPOS 100.00- ITCDP-TDULPOS() -100.00
  • 274. SAPscript Control Commands KNL Z e~z}‚‡€ l‚€‡ ˆ ~ k‚€ The default setting outputs the leading sign to the right of a numeric value. If you used the SET SIGN LEFT to specify that the leading sign should be output before the value, this specification can be overridden for individual symbols to enable these values to be output with the leading sign to the right. l’‡z‘ VPERO!
  • 275. gކ{~‹ ˆ ]~|‚†z…Œ A program symbol of one of the data types DEC, QUAN and FLTP can contain decimal place data. This option overrides the Dictionary definition for the number of decimal places to format this symbol value. l’‡z‘ VPEROn
  • 276. ^‘z†‰…~ The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies three decimal places and an output length of 17. The SET SIGN LEFT control command specifies that all subsequent symbols with a numeric value should have a left-justified leading sign. Using this control command means that there is then no need to repeat the option for each individual symbol. Tips Tricks Use the SET SIGN RIGHT control command to switch back to the default setting to output the leading sign. Tips Tricks Table A–11 Examples for number of decimals Symbol Result EKPO-MENGE 1,234.560 EKPO-MENGE(.1) 1,234.6 EKPO-MENGE(.4) 1,234.5600 EKPO-MENGE(.0) 1,235
  • 277. KNM SAPscript Made Easy | Release 4.6 hŒ~ Specifying an offset of “n” causes the “n” left-most characters of the symbol value will not be displayed. If the offset specified is greater than the length of the value, nothing is output. l’‡z‘ VPEROn ^‘z†‰…~ If symbol has the value 123456789, the following will be displayed: h†‚‚‡€ e~z}‚‡€ s~‹ˆŒ Certain symbol values are output with leading zeros. To suppress these values use the Z option. l’‡z‘ VPERO=
  • 278. ^‘z†‰…~ Assuming the current date is January 1, 2000 . Table A–12 Examples for offsets Symbol Result symbol 123456789 symbol+3 456789 symbol+7 89 symbol+12 Blank symbol+0 123456789 Table A–13 Examples omitting leading zeros Symbol Result DAY 01 DAY(Z) 1
  • 279. SAPscript Control Commands KNN Z h†‚‚‡€ ~ e~z}‚‡€ l‚€‡ Program symbols with numeric values can have a leading sign, which usually appears at the right of the numeric value as a space for positive numbers, or as a minus sign for negative numbers. The S option ensures that the value is formatted without the sign. l’‡z‘ VPERO6
  • 280. ^‘z†‰…~ The ITCDP-TDULPOS field contains the value -100.00. The Dictionary definition for this field includes a leading sign. h†‚‚‡€ ~ l~‰z‹zˆ‹ ˆ‹ ¡mˆŽŒz‡}Œ¯ Symbols of the DEC, CURR, INT and QUAN data types are normally formatted with the “thousands” separator character. The T option allows you to specify that this separator character should be omitted. l’‡z‘ VPERO7
  • 281. ^‘z†‰…~ The EKPO-MENGE field contains the value 1234.56. The Data Dictionary definition specifies three decimal places and the output length is set to 17. hŽ‰Ž e~‡€ If you need only a part of the symbol value, or if the output has to fit in an on-screen box or field without overlapping the edges of this area, use an output length specification to define how many character positions should be copied from the value. Table A–14 Examples of omitting leading sign Symbol Result ITCDP-TDULPOS 100.00- ITCDP-TDULPOS(S) 100.00 Table A–15 Examples of omitting separator for thousands Symbol Result EKPO-MENGE 1,234.560 EKPO-MENGE(T) 1234.560
  • 282. KNO SAPscript Made Easy | Release 4.6 If a length is specified that is greater than the current value length, then spaces are appended to the symbol value. The character * specifies the program symbol length. This specification causes the symbol value to be output based on the output length defined in the Dictionary. l’‡z‘ VPEROl
  • 283. ^‘z†‰…~ If symbol has the value 123456789. An output length specification can be combined with an offset specification. The specified length is then counted from the specified offset position. VPERO
  • 284. → ^‘z†‰…~ The SYST-UNAME field contains the logon name of a user called Einstein. The Dictionary entry for this field contains an output length of 12. 66781$0( (LQVWHLQ 66781$0(
  • 286. (LQVWHLQ i‹~|~}‚‡€ z‡} lŽ{Œ~ŠŽ~‡ m~‘ In addition to using initial symbol values, additional texts that are output only when the symbol value is no longer the initial value can be specified. You can specify a text to be output immediately before the symbol value (the pretext), and text to be output immediately after it (the posttext). If the symbol has its initial value, these texts are suppressed. l’‡z‘ SUHWH[W VPERO SRVWWH[W Table A–16 Examples for output length Symbol Result symbol(3) 123 symbol(7) 1234567
  • 287. SAPscript Control Commands KNP Z ^‘z†‰…~ The KNA1-PFACH field contains a customer PO Box number. Since “PO Box” is not stored in the field with the value, you would normally write the following for the PO Box line of an address: 32 %R[ .1$3)$+ However, if no “P.O. Box” has been specified then “PO Box” would still appear on its own in the address. Prevent this step by using pretext and/or posttext (in this case pretext). 32 %R[ .1$3)$+ → 32 %R[ 32 %R[ .1$3)$+ If “P.O. Box” is specified, then this information will be displayed with the appropriate text in the usual way. 32 %R[ .1$3)$+ → 32 %R[ k‚€FcŽŒ‚‚~} hŽ‰Ž Symbol values other than numeric values are normally formatted to be left-justified. Right-justified formatting can be specified with the R option. This option has to be used with an output length specification. l’‡z‘ VPERO5
  • 288. ^‘z†‰…~ If symbol has the value 1234. Ensure that the symbol, the pretext and the posttext, all appear on a single line of the editor. This may mean that you have to use a long line (paragraph attribute = or /= ) in the editor. The apostrophe character delimits these texts. If this character also appears as part of one of these texts, then it must be written twice at this point to avoid misinterpretation. A pretext or posttext may contain symbols in addition to normal text. These symbols are subject to the restriction that these symbols may not have a pretext or a posttext. Tips Tricks Table A–17 Examples for right-justified output Symbol Result symbol 1234 symbol(8R) 1234
  • 289. KNQ SAPscript Made Easy | Release 4.6 l‰z|~ ˆ†‰‹~ŒŒ‚ˆ‡ The symbol value is viewed as a sequence of “words,” each separated from the next by either one or a string of space characters. The C option replaces each string of space characters with a single space and shifting “words” to the left to close gaps. Leading spaces are completely removed. The results are the same as if the ABAP command CONDENSE was used. l’‡z‘ VPERO
  • 290. ^‘z†‰…~ Assuming ’ Albert Einstein ’ is the symbol value. lމ‰‹~ŒŒ‚‡€ b‡‚‚z… oz…Ž~Œ The I option suppresses the output of symbols that still contain their initial value. l’‡z‘ VPERO,
  • 291. ^‘z†‰…~ Assuming KNA1-UMSAT contains the value 0 and the currency is USD. If the field contains an amount other than 0, this value will be output in the usual way. m‚†~ fzŒ„ You can use the SAPscript SET TIME MASK command to format time fields in a way that differs from the standard setting. Executing this command causes all subsequent time fields to be printed with the specified formatting. Table A–18 Examples for space compression Symbol Result symbol Albert Einstein symbol(C) Albert Einstein Table A–19 Examples for suppressing initial values Symbol Result KNA1-UMSAT 0.00 KNA1-UMSAT(I)
  • 292. SAPscript Control Commands KNR Z l’‡z‘ 6(7 7,0( 0$6. time_mask In the time mask, the following edit formats can be used: Any other characters occurring in the mask are interpreted as simple text and are copied directly to the output. ^‘z†‰…~ Assuming the current time is 10:08:12. 7,0( → 6(7 7,0( 0$6. ++00 7,0( k~ŒŽ…S 10:08 6(7 7,0( 0$6. ++ KRXUV 00 PLQXWHV 7,0( k~ŒŽ…S 10 hours 08 minutes 6(7 7,0( 0$6. ++ KRXUV 00 PLQXWHV 7,0(=
  • 293. k~ŒŽ…G 10 hours 8 minutes You can revert to the standard setting by using the SET TIME MASK command again with an empty string in place of the time mask: 6(7 7,0( 0$6. Table A–20 Time mask: Edit formats Template Description HH hours (two digits) MM minutes (two digits) SS seconds (two digits)
  • 294. KOI SAPscript Made Easy | Release 4.6 l’Œ~† oz‹‚z{…~Œ ?lZilkbimFhngm^kx‘? A‘ V IGG RBS These fields represent ten counter variables that you can use in your text and forms for any counting purposes. You can use the ‘+’ and ‘-’ formatting options to increment or decrement a counter before its value is printed. You can use the DEFINE control command to assign any specific value to a counter. ?lZilkbimF]kbo^k?S SAPscript formats a text for a specific output device. The initial formatting is independent of the specific language of this device. SAPscript then calls a driver to convert the device-independent format to device-specific control commands. This field contains the name of the driver. POST Postscript driver HPL2 HP Laserjet driver for the PCL4/PCL5 languages PRES Driver for output devices using the PRESCRIBE language The available drivers are stored in table TSP09. ?lZilkbimFln[k? After executing an INCLUDE statement, this contains a value that indicates whether the INCLUDE was found or not. This value can be queried with IF.... INCLUDE found = 0 and INCLUDE not found = 4 ?lZilkbimF_hkfiZ`^l? This contains the total number of pages output in a SAPscript form (all output between the functions START_FORM and END_FORM). The state of the page counter on the individual form pages (START,HOLD,INC) is not taken into account. Using this symbol impairs performance, since all output data for every form must be retained internally to fill the symbol. Tips Tricks
  • 295. SAPscript Control Commands KOJ Z ?lZilkbimFch[iZ`^l? This contains the total number of pages output in a SAPscript print run (all output between the functions OPEN_FORM and CLOSE_FORM). The state of the page counter on the individual form pages (START,HOLD,INC) is not taken into account. ?lZilkbimFm^e^eZg]? This contains the country identifier for the fax destination with fax output with SAPscript (field ITCPO-TDTELELAND for the parameter OPTIONS of function OPEN_FORM). ?lZilkbimFm^e^gnf? This contains the local fax number for the fax destination with fax output with SAPscript (field ITCPO-TDTELENUM for the parameter OPTIONS of function OPEN_FORM). ?lZilkbimFm^e^gnf^? This contains the complete fax number for the fax destination with fax output with SAPscript (field ITCPO-TDTELENUME for the parameter OPTIONS of function OPEN_FORM). oz‹‚z{…~Œ ˆ l‹Ž|Ž‹~ lrlm All variables of structure SYST, called system variables, can be used in the form. Of particular interest are the variables for the system date and time. These variables indicate the date and time that the The CONDENSE option cannot be used on the program icon SAPSCRIPT- FORMPAGES (C) without an explicit length specification. This symbol is replaced with a value only after the form has been completely edited, since the total number of pages of a form is first known in the program function END_FORM or CLOSE_FORM. However, the symbol size (number of characters) is reserved correctly when the symbol first occurs, with the current page number. Therefore, only one character is reserved for option C (CONDENSE) on pages 1-9, two characters on pages 10-99, and so on. Using this symbol impairs performance, since all output data for every print job must be retained internally to fill the symbol. TechTalk Tips Tricks
  • 296. KOK SAPscript Made Easy | Release 4.6 output was created. For the system date, use SYST-DATUM variable, for the system time, use SYST-UZEIT. Note that you have the formatting options for date and time variables.
  • 297. $ 3 3 ( 1 ' , ; [lz†‰…~ _ˆ‹†Œ h~‹‚~ This appendix presents samples of some of the preconfigured forms used by R/3 customers in the U.S. and Canada. To help you visualize the layout and components of printed forms, the following forms are shown: n Account statement n Credit memo n Debit memo n Delivery note n Invoice n Prenumbered check n Unnumbered check n Remittance advice n Sales order confirmation To find current versions of preconfigured SAPscript forms, visit KWWSZZZVDSODEVFRPIRUPV.
  • 298. KOM SAPscript Made Easy | Release 4.6 Z||ˆŽ‡ lz~†~‡ _ˆ‹†
  • 299. Sample Forms KON [ ‹~}‚ f~†ˆ _ˆ‹†
  • 300. KOO SAPscript Made Easy | Release 4.6 ]~{‚ f~†ˆ _ˆ‹†
  • 302. KOQ SAPscript Made Easy | Release 4.6 b‡ˆ‚|~ _ˆ‹†
  • 303. Sample Forms KOR [ i‹~‡Ž†{~‹~} ~|„ _ˆ‹† 92,'
  • 304. KPI SAPscript Made Easy | Release 4.6 n‡‡Ž†{~‹~} ~|„ _ˆ‹†
  • 306. KPK SAPscript Made Easy | Release 4.6 lz…~Œ h‹}~‹ ˆ‡‚‹†z‚ˆ‡ _ˆ‹†
  • 307. $ 3 3 ( 1 ' , ; m‚‹}Fiz‹’ lˆ…Ž‚ˆ‡Œ SAPscript should be used whenever possible because it is the only integrated solution. However, many vendors offer output solutions for the R/3 System. This appendix presents an overview of some of the solutions provided by third-parties: n Formscape (AFP Technology) n Professional printing solutions for SAP R/3 environments (Hewlett Packard) n JetCAPS BarSIMM (Hewlett Packard) n Flash SIMM (Hewlett Packard) n JetForm Output Pak for R/3 (JetForm) n StreamServe Connectivity Pack for R/3 (StreamServe) gˆ~ The companies featured in this appendix do not represent a complete list of vendors with output solutions for the R/3 customers.
  • 308. KPM SAPscript Made Easy | Release 4.6 Z_iS _ˆ‹†l|z‰~Û FormScape is an enterprise wide, text management solution that dramatically reduces the time associated with the creation and management of modern documents. Essentially, the program takes the burden of formatting output off the host and places it onto Network servers within the organization. This approach helps reduce network load because users are able to print improved documents without sending the entire formatted print job across the network wire. _ˆ‹†l|z‰~ ˆ†‰ˆ‡~‡Œ The FormScape suite of products consists of four core modules: n FormScape ServerTM n FormScape DeveloperTM n FormScape InquisitorTM n FormScape AdministratorTM The modules are also complemented by a suite of other advanced “add-ons” that work together to provide organizations with a scalable text management solution. _ˆ‹†l|z‰~ l~‹~‹ FormScape Server receives the data users want to improve and recomposes it into a modern dynamic document for example: n Changing the font styles and sizes n Changing the layout or n Adding and removing logos—on the fly n SAP does not endorse any particular third-party solution. n Product information covered here has been supplied by company representatives and has not been reviewed for accuracy. n For the most current product information, visit the company web sites. Caution
  • 309. Third-Party Solutions KPN One FormScape Server can handle multiple document types and will process each one uniquely. Once the Server has finished processing the data, it can route the final output to any printer, fax, email or other archive device. This component runs without user intervention as a background service on the Windows NT4 machine. _ˆ‹†l|z‰~ ]~~…ˆ‰~‹ FormScape Developer is used to configure how the FormScape Server component captures and processes print jobs. FormScape Developer refers to each unique set of instructions of a project. When a project for FormScape Server is defined, users specify: n What input is used n What process on the data is to be performed n How it will design and redirect output The Developer module provides powerful “drag and drop” programming that removes the need to “script,” together with a “What-You-See-Is-What-You-Get” (WYSIWYG) interface for form layout. The Developer also allows for remote testing and debugging of projects, further reducing implementation times. _ˆ‹†l|z‰~ b‡ŠŽ‚Œ‚ˆ‹ The third module, FormScape Inquisitor, is a management system providing centralized control of the FormScape environment. Using Inquisitor, an administrator can install, move or remove any FormScape core or add-on module remotely across the WAN. In-built functionality also allows for the off-line backup of Server services for mission critical applications. _ˆ‹†l|z‰~ Z}†‚‡‚Œ‹zˆ‹ FormScape Administrator allows central control of multiple FormScape projects across multiple servers within the environment, over the WAN. Its functionality includes timed project replication and server activity logging. _ˆ‹†l|z‰~ ^‡z{…~‹ For the SAP R/3 Release 4.x user, AFP has an advanced “add-on” module called FormScape Enabler. This module interacts with the SAP system via the certified Raw Data Interface (RDI).
  • 310. KPO SAPscript Made Easy | Release 4.6 RDI is an SAP proprietary specification that allows developers to define document structure and content, but leave the layout and other formatting attributes to FormScape. In-addition to RDI, Enabler comes with new Wizbar™ technology that further reduces development time. Via RDI, Enabler allows the SAP R/3 System to produce high quality documents, both in batch and single output modes, across a wide range of output methods. ‹ˆŒŒFi…zˆ‹† _~zŽ‹~Œ FormScape ideally sits within a TCP/IP network environment hosted by the NT4 operating system. You can therefore, access FormScape services from any PC, UNIX, mainframe, or midrange system as either an LPR printer queue or by using FTP to put data files into a file queue. If an alternative protocol is required, this can be provided through third-party inter-connectivity products, or by using FormScape’s POP3/SMTP compliant e-mail input queue. For example, a user on a SCO UNIX machine running SCO’s Advanced File and Print Server can direct output data for an invoice, via LPR to an NT print queue. FormScape intercepts the data, reformats it, and prints the invoice, complete with graphical formatting. The open nature of the FormScape architecture allows seamless integration with a wide range of third-party solutions such as volume print systems, global archives, fax systems, workflow systems, and “end-to-end” delivery systems. m~ ˆ‡|~‰ The FormScape Server is driven by a project built with the Developer module. SAP R/3 outputs RDI to a printer that is actually a FormScape print queue. FormScape then massages the raw data based upon the rules in the project and routes the data to its final destination(s). The FormScape Server module works in three distinct phases: 1. Collection—Collection is the point where the FormScape Server receives the data by either a printer queue, e-mail queue, or via file queues. 2. Identification—this stage determines which set of defined rules should act upon this particular job. 3. Reporting—after identification, the specific rules and routing
  • 311. Third-Party Solutions KPP procedures are applied to the data and then sent to the destination. ˆ‡z| b‡ˆ‹†z‚ˆ‡ AFP Technology Internet: KWWSZZZIRUPVFDSHFRP E-mail: LQIR#IRUPVFDSHFRP aiS i‹ˆ~ŒŒ‚ˆ‡z… i‹‚‡‚‡€ lˆ…Ž‚ˆ‡Œ ˆ‹ lZi kHL ^‡‚‹ˆ‡†~‡Œ The HP corporate printer family is synonymous with office printing. Many companies use them, but most have not made full use of the benefits offered by state-of-the-art printing. By consolidating various business printing tasks on your HP corporate printers, especially in SAP R/3 environments, HP’s printing solutions for SAP R/3 environments lead the way to massive savings. Even better, HP brings you the complete printing solution—including consulting and services—therefore addressing all your SAP R/3 printing needs: n Electronic forms with corporate logos, typefaces and signatures n Bar-codes including scaling and automatic checksum calculations n MICR check printing for highest quality checks n Implementation services and support
  • 312. KPQ SAPscript Made Easy | Release 4.6 i‹ˆ~ŒŒ‚ˆ‡z… ^…~|‹ˆ‡‚| _ˆ‹†Œ i‹‚‡‚‡€ Electronic forms with corporate logos, boxes, grey-shading, and special typefaces offer you a simple way to enhance the output quality of your SAP R/3 System. Even double-sided or color printing are available. Greater flexibility, together with cost savings, will be easily achieved. Thanks to HP’s corporate printer family you can now revolutionize the way you print forms. In the past, preprinted forms and stationery were the best way to produce quality results. Now, an HP LaserJet 5 printer with its definition of 600 dpi and HP’s Resolution Enhancement Technology (RET) almost matches the printing press. Instead of preprinting you can now print forms on demand on plain paper. l‚†Ž…z‡~ˆŽŒ i‹‚‡‚‡€ ˆ _ˆ‹† z‡} ]zz The powerful HP LaserJet printers allow simple insertion of downloaded variable data such as names, addresses or other information into fields along with the fixed data that makes up the form layout. Completed forms can then be printed in any order on plain paper. The need for multiple paper trays is eliminated, as is the manual feeding of various types of preprinted paper. i‹‚‡‚‡€ _~zŽ‹~Œ n Two-sided printing with duplex option n Multiple copies printed automatically (duplicates, triplicates) n Automatic labeling of carbon copies n Duplication of signature with special carbon paper (up to two copies) n High quality gray-scale printing or color printing for logos or highlighting (Color LaserJet 5 or DeskJet 1600C) n Just-in-time simultaneous printing of form and data (on demand) n Printing in any order without paper changes ˆ‡z| b‡ˆ‹†z‚ˆ‡ Hewlett Packard KWWSZZZKSFRPJRVDSBKS
  • 313. Third-Party Solutions KPR aiS c~Zil b‡~……‚€~‡ [z‹ ˆ}~ lbff JetCAPS BarSIMM is an exclusive bar coding solution for HP LaserJet printers, available in PCL mode only. lˆ…Ž‚ˆ‡ A unique feature of HP bar code SIMM is the full EAN 128 set A, and the EAN 128 autoswitch, able to analyze incoming data to perform data compression and to switch dynamically between sets A, B, and C within the same bar code. This feature makes the HP LaserJet printers one of the only standard laser printers that are fully compatible with the new international shipping labels standard UCC/EAN-128 defined by ANSI/MH 10.8 and the ENC/MITL (European Normalization Committee/Multi-Industry Transport Label). _~zŽ‹~Œ n Data integrity check n Checksum calculations n Text value automatically printable n Automatic font selection and scaling lމ‰ˆ‹~} [z‹ ˆ}~Œ n UPC-A, UPC-A +2, UPC-A +5 n UPC-E, UPC-E +2, UPC-E +5 n EAN/JAN-8, EAN/JAN-8 +2, EAN/JAN-8 +5 n EAN/JAN-13, EAN-JAN-13 +2, EAN/JAN-13 +5 n 2 of 5 interleaved (+CHK), 2 of 5 Matrix (+CHK) n 2 of 5 Industrial (+CHK) n 3 of 9 (+CHK), 3 of 9 extended (+CHK) n 93 (+CHK), 93 extended (+CHK) n 128 autoswitch n 128 A/B/C n UCC-128 n Codabar-Monarch (+CHK Mod 16)
  • 314. KQI SAPscript Made Easy | Release 4.6 n MSI Plessey (+CHK 10), MSI Plessey (+CHK 11 CHK 10) n Danish, French and German postal bar-codes n ZIP+4 Postnet 5 and 9 digits, contents of HP’s Barcode More cartridge lމ‰ˆ‹~} ai i‹‚‡~‹ fˆ}~…Œ n HP LaserJet 4/ 4M n HP LaserJet 4 Plus/4M Plus n HP LaserJet 4P/ 4MP n HP LaserJet 4 Si/ 4SI MX n HP LaserJet 4V/ 4MV n HP LaserJet 5P/ 5MP n HP LaserJet 5/ 5N/ 5M n HP LaserJet 5Si/ 5Si MX n HP LaserJet 6P/ 6MP lZi kHLFl‰~|‚‚| b‡ˆ‹†z‚ˆ‡ Fully compatible with SAP R/3, HP bar code SIMM supports the printing of bar codes through the SAP R/3 device type HPLJ4, designed for HP PCL5 printers. HPLJ4 contains the PCL5 commands necessary to drive the bar code SIMM and is delivered with SAP R/3 Release 3.0. Customers using SAP R/3 Releases 2.1/2.2 may install this device type into their systems following R/3 note #8928. ˆ‡z| b‡ˆ‹†z‚ˆ‡ KWWSZZZKSFRPJRVDSBKS).
  • 315. Third-Party Solutions KQJ aiS _…zŒ lbff ˆ‹ ai ezŒ~‹c~ i‹‚‡~‹Œ lˆ…Ž‚ˆ‡ HP’s new Flash SIMM stores your document formats on a non-volatile chip within your printer—so you can use ordinary plain paper to produce high quality forms and stationery on demand. _~zŽ‹~Œ n Integration of graphics, company logos, signatures, etc. n Update formats instantly n Boost network efficiency n Ensure high security n Produce consistent documents n Guaranteed quality n Effective management control lމ‰ˆ‹~} i‹‚‡~‹Œ n HP LaserJet 4/ 4M n HP LaserJet 4 Plus/4M Plus n HP LaserJet 4P/ 4MP n HP LaserJet 4 Si/ 4SI MX n HP LaserJet 4V/ 4MV n HP LaserJet 5P/ 5MP n HP LaserJet 5/ 5N/ 5M n HP LaserJet 5Si/ 5Si MX n HP LaserJet 6P/ 6MP fz‡z€~†~‡ lˆz‹~ l’Œ~†Œ k~ŠŽ‚‹~†~‡Œ PC running Windows 3.1 or later, Windows NT, Windows 95, or OS/2.
  • 316. KQK SAPscript Made Easy | Release 4.6 ˆ‡z| b‡ˆ‹†z‚ˆ‡ KWWSZZZKSFRPJRVDSBKS c~_ˆ‹†S c~_ˆ‹† hŽ‰Ž iz„ ˆ‹ lZi kHL JetForm Output Pak for SAP R/3 allows SAP customers to merge R/3 data with a JetForm electronic form and print or fax it using existing devices. JetForm Output Pak for SAP R/3 consists of the following products and services. c~_ˆ‹† ]~Œ‚€‡ JetForm Design for Microsoft® Windows® is a comprehensive WYSIWYG graphical design tool for creating electronic replicas of paper forms. Design forms that contain company logos, graphics, and bar codes as well as customizing the format of data. Easy to use tools such as user-defined grids allow for precise placement of graphics and text. JetForm Design provides full font support, as well as shaded or rotated text. JetForm Central merges forms developed with JetForm Design with data from R/3 applications. The Form Builder is a utility that ships with JetForm Output Pak for SAP R/3 and works with JetForm Design. When a R/3 SAPscript form is imported into JetForm Design, the Form Builder creates a form containing the specifics of the SAPscript form. This provides for fast easy creation and integration of new forms beyond those included in the JetForm Output Pak for SAP R/3. c~_ˆ‹† ~‡‹z… JetForm Central is a server-based application, with which customers can deliver presentation-quality forms output from information stored in the R/3 databases. JetForm Central’s data merge functions replace preprinted forms and unformatted reports. The custom print drivers of JetForm Central guarantee print speed three to five times faster than standard operating system print drivers. JetForm Central is a multi-platform product that runs under a variety of operating systems. JetForm Output Pak for SAP R/3 enhances the basic functionality of JetForm Central by providing two additional Agents: the Sort Agent and the RDI Agent. The Sort Agent allows you to sort forms on
  • 317. Third-Party Solutions KQL specified data before printing or faxing the form. The RDI Agent converts RDI output from SAP R/3 Release 4.x to a JetForm field nominated data stream for further processing by JetForm Central. c~_ˆ‹† lZiŒ|‹‚‰ ˆ‹†Œ ˆ‹ kHL JetForm Output Pak contains a number of simplified versions of the standard R/3 SAPscript forms. These SAPscript forms generate SAP data in a format that a JetForm Central can process. Table C-1 lists the SAPscript forms included with JetForm Output Pak for SAP R/3. These SAPscript forms are available for both Release 3.x and Release 4.x (RDI interface) users. c~_ˆ‹† _ˆ‹†Œ ˆ‹ kHL JetForm Output Pak also contains a number of production ready forms to work with the JetForm forms. These forms are the best business practice examples, and can be modified to meet customer- specific needs such as the addition of company logos. Table C-1 lists the forms available with JetForm Output Pak for SAP R/3.
  • 318. KQM SAPscript Made Easy | Release 4.6 aˆ b pˆ‹„Œ With JetForm Output Pak for SAP R/3, the formatting attributes now reside in the form instead of in the SAPscript form. Use JetForm Design to move, change, add, or delete the formatting attributes on the form. Page sizes, font types, line spacing, justification, shading, logos, and field sizes are all specified within the form itself and is independent of the SAPscript form. Table C–1 The JetForm Output Pak forms and SAPscript forms SAP Module SAPscript form Form SD RVORDER01 Order Confirmation SD RVDELNOTE Delivery Note SD RVINVOICE01 Invoice SD SD_PACKING_LIST Packing List SD RVPICKSIN Picking List SD SD_LOADING_LIST Loading List SD SD_CASH_SALE Cash Sale FI F110_IN_CHECK International Check FI F140_PAY_CONF_01 Payment Notice FI F150_DUNN_01 Dunning Letter FI F110_PRENUM_CHCK Prenumbered Check MM MEDRUCK Purchase Order MM MEDRUCK Request for Quote AD ZJ_SF1034 SF 1034 Public Voucher for Purchases and Services other than personal AD ZJ_SF1035 SF1035 Public Voucher for Purchases and Services other than personal — Continuation AD ZJ_SF1443 SF1443 Contractor's Request for Progress Payment AD ZJ_DD250 DD250 Material Inspection and Receiving Report
  • 319. Third-Party Solutions KQN m~ i‹‚‡ i‹ˆ|~ŒŒ When a user initiates a print request, R/3 executes an ABAP print program, which calls the SAPscript subsystem and opens the appropriate SAPscript form. The print program then passes the application data, extracted from the R/3 database, to SAPscript by calling the elements defined in the SAPscript form. SAPscript is responsible for formatting the data output stream according to instructions defined in the SAPscript form, as well as specific commands issued by the print program. The forms that ship with JetForm Output Pak, allow the R/3 application to generate the data stream in a format that JetForm Central can process. The SAPscript subsystem sends the application data stream to the R/3 spool subsystem. The R/3 spooler output device type is specified as a plain ASCII printer, which results in a JetForm data stream being passed to the host spool system. The corresponding operating system print queue is configured to send the data stream unmodified to JetForm Central. JetForm Central then merges the data and places it on the form created using JetForm Design. When forms and graphic files, such as company logos are stored on the server, there is no need to download them for each print job. JetForm Central contains its own print drivers and converts the merged form to the appropriate printer language and sends it to the specified printer, which outputs the document as a printed form. Figure C–1 R/3 print processing steps using JetForm _~zŽ‹~Œ Forms are language independent, so only one version needs to be maintained. (Language-dependent “boilerplate” is stored within the JetForm form file.) Since the form is simpler, the SAPscript composer requires less processing time. Downloading the forms only once and data R/3 Application Server Print Server JetForm data stream SAP R/3 Application ABAP/4 print program SAPscript subsystem JetForm modified layout set SAP Spool Subsystem Host Spool System JetForm Central Printer JetForm form
  • 320. KQO SAPscript Made Easy | Release 4.6 storing them on the print server reduces the amount of data transferred across the network. Network traffic is also reduced since the spool system data stream sent across the network is significantly smaller than a standard SAP data stream with embedded formatting information—as small as one tenth of the typical size. c~_ˆ‹† hŽ‰Ž iz„ _~zŽ‹~Œ n Easy to use WYSIWYG forms drawing tool. No programming is required to create the forms. n Extensive forms processing capabilities (graphics, bar codes, logos, watermarks, rotated text, multi-part forms). High quality professional forms output, comparable to preprinted forms. n The Form Builder utility converts layout sets to forms. Eliminates the need to create new forms from scratch, automatically creates and positions fields on the form. n Bar codes done in software. Print bar codes on any supported printer with no additional hardware required. n Print data values anywhere on a form, for example, print “amount due” total at the top, as well as at the bottom of the page. Create flexible forms that support customers’ business requirements. n Intelligent dynamic forms. Create market-focused, personalized messages on customer documents. n The look and feel of each document can be dynamically controlled by the data. For example, processing automatically allocates space on an invoice to accommodate the number of line items. This saves paper and improves the appearance of printed documents as well as makes documents easy for customers to read and process. n Nonprogrammers can make the necessary changes to the forms. Easy and inexpensive to maintain using existing staff. n Layout sets generate plain ASCII data that can simultaneously output several types of documents in multiple formats. For example, you can print or fax an invoice, packing list, and credit memo from a single data stream. n Create one output stream from the R/3 application for all users. Customize and print documents locally at remote subsidiaries using different languages, logos, or terms and conditions without impacting application development or deployment. n JetForm data streams sent across the network contain only data, no formatting. This greatly reduces the network traffic, as small as one tenth of the typical size.
  • 321. Third-Party Solutions KQP n Supports most common languages. This supports global business requirements to deliver documents worldwide in languages that require double-byte characters. n Forms and logos are stored on the server. Reduces the amount of data transferred across the network. n Implement JetForm forms and layout sets without changing the standard R/3 print program. n Installation routines automatically install all components. Get up and running quickly. n JetForm Central print drivers are three to five times faster than operating system print drivers. n Can sort documents prior to printing. Allows documents to be printed in any order, for instance, by postal code to support external mail handling systems. n Perform calculations on a data stream including +, - , *, /, **, log, ln, abs, exp, floor, frac, int, round, sqrt and trunc. Create new fields such as running totals without changing the R/3 application. n SAP BAPI-certified. Assures interface with R/3 has been tested and certified by SAP. ˆ‡z| b‡ˆ‹†z‚ˆ‡ JetForm Corporation KWWSZZZMHWIRUPFRP. l‹~z†l~‹~S l‹~z†l~‹~ ˆ‡‡~|‚‚’ iz|„ ˆ‹ kHL The StreamServe Connectivity Pack for R/3 is certified for the SAPscript Raw Data Interface (BC-RDI). It includes tools and runtime software components that allow customers to meet their output processing requirements in all situations. Design principles applied to the creation of the Connectivity Pack are: n Universally applicable - all versions and release levels of SAP R/3 are supported n Based on standards - SAP tools and interfaces are used wherever possible n Flexible and adaptable - customer modifications to standard SAP forms are taken into consideration
  • 322. KQQ SAPscript Made Easy | Release 4.6 n Easy to use - graphical tools ensure quick and easy creation and maintenance of documents n Maximum functionality - all processing, formatting, and distribution requirements are supported n High performance - any output device driven at any speed The following graphic gives an overview of the StreamServe Connectivity Pack architecture: l‹~z†l~‹~ hŽ‰Ž _ˆ‹†z ˆ‡~‹~‹ ˆ‹ kHL The StreamServe Output Format Converter for R/3 can read existing R/3 SAPscript forms and translate them into StreamServe format. Alternatively, it is possible to use RDI data streams as input to the Converter, as is necessary for the Customer Care and Services module in the R/3 Industry Solution Utilities (IS-U/CCS), where SAPscript forms don’t contain all the information required for conversion. The Converter is a graphical tool running on 32-bit Microsoft Windows platforms. It allows users to recreate their existing R/3 forms for enhancement by StreamServe Tool, the graphical StreamServe application used for defining the formatting, processing, and distribution of documents; all changes and modifications to the standard SAPscript forms provided by SAP are reflected accurately. SAP R/3 Stream Serve Layout Set Layout Set StreamServe Converter StreamServe Server XML Data Dictionary Runtime Configuration User Input Frontend Tool Import Import R/3 DataExport R/3 Data Dictionary
  • 323. KQR Data items are added to a StreamServe Data Dictionary, allowing for flexible use of all data variables anywhere in a document, such as the highlighted display of the total of a multi-page invoice on top of the first page. Layout information, such as the positioning of text elements, can be transferred to StreamServe Tool using an Extensible Markup Language (XML) file. k]b lމ‰ˆ‹ ˆ‹ lZi kHL k~…~zŒ~ M RDI Certification means that StreamServe Server can directly interpret data from SAP R/3 Release 4. The formatting and processing capabilities of StreamServe ensure that all customer requirements can be met: n Documents complying with legal and Corporate Image requirements n Use of all printer features (fonts, tray selection, ...) n Support for high speed/high volume printing n Post-processing of output data for envelope and postal machines n Distribution to the correct output channels, depending on data content l‹~z†l~‹~ ez’ˆŽ l~Œ If a customer’s R/3 system is still at Release 3, or if RDI is not be used in Release 4, the Converter allows the transformation of any SAPscript form to StreamServe format. When such a transformed form is re-imported into the R/3 system, it causes SAPscript to generate data in a format nearly identical to RDI. In this way, StreamServe Server can handle all data streams in the same manner, regardless of whether they originate from SAP R/3 Release 3 or 4. In other words, the benefits of RDI support for Release 4 equally apply to Release 3 of SAP R/3. l‹~z†l~‹~ l~‹~‹ StreamServe Server is the real-time output processing, formatting and distribution engine. It is available on Microsoft Windows NT and most UNIX platforms, including IBM AIX, HP-UX, Sun OS, Digital UNIX and DG-UX. By adding optional modules, a wide variety of output formats and distribution channels, such as IBM AFPDS, Xerox VIPP, Fax, Email, HTML and XML can be used.
  • 324. KRI SAPscript Made Easy | Release 4.6 l‹~z†l~‹~ mˆˆ… StreamServe Tool is a Windows-based end-user tool for output design and formatting, entering distribution rules, and system configuration and maintenance. Built-in graphical functions are supplemented by a powerful scripting language that provides full control over all aspects of output processing. _~zŽ‹~Œ z‡} [~‡~‚Œ SAP customers and System Integrators derive a whole range of benefits through using StreamServe: n Powerful, Easy-to-use Design Tools Formatting and layout changes no longer require modifications to R/3 SAPscript forms, thereby reducing implementation time. Device independent document design facilitates Spool Administration in R/3. n Conformance to Corporate Image Requirements StreamServe supports graphics, barcodes and all printer features. This allows for very precise document design, resulting in consistent and professional looking documents. This is difficult, if not impossible, to achieve using standard R/3 tools. n External Processing of Output Data StreamServe supports post-processing of output data, for example to add marks for enveloping or postal machines, along with many other functions, including database lookups via ODBC. n Intelligent Routing to Multiple Channels One of the core functions of StreamServe is its ability to select the appropriate output medium and channel, according to the content of the output data stream. This includes generating multiple documents from one data stream, for example faxing an invoice to a customer, generating a confirmation for the sales representative, and producing a PDF file for archiving. n Application Independence Output Processing is treated as a separate module. A clearly defined interface ensures most changes in output requirements do not require changes in the application, and vice versa. As the
  • 325. KRJ output module processes raw application data, new data fields are easily accommodated, keeping programming changes to an absolute minimum. n Release Independence The StreamServe solution uses R/3 standards, such as RDI. As a result, you can install new releases of R/3 without having to worry about the impact on output processing. ˆ‡z| b‡ˆ‹†z‚ˆ‡ StreamServe Corporation KWWSZZZVWUHDPVHUYHFRP
  • 326. KRK SAPscript Made Easy | Release 4.6
  • 327. , 1 ' ( ; b‡}~‘ Z ABAP commands CONDENSE 258, 261 ABAP programs accesing documentation 127 QCJPERFO 240 RSTXFCON 55 RSTXLDMC 125 RSTXSCRP 59 ZREADCUSTOM 158 ABAP subroutines calling 157, 239 GET_NAME 158 Access key 13, 108 ADDRESS, control command 224 Addresses, formatting 224 AFP FormScape 274 [ Bar codes character format 38 printing in forms 143 rotation parameter 146 standard 146 vertical printing 156 Billing documents assigning forms 169 assigning print programs 169 BOTTOM, control command 227 Box BOX, control command 228 boxes, lines, and shading 149, 228 multiple boxes on one window 155 C Option 258 Case distinction 231 CASE, control command 231 Character formats 145 description 35 inserting print control character 240 using 38, 222 Columns 37 Company logo 12 Conditional text output 234 Control character sequence 138 Control commands ADDRESS 224 BOTTOM 227 BOX 228 CASE 231 DEFINE 232, 249 global settings 224 HEX 233 IF 234 INCLUDE 236 NEW-PAGE 238, 239 NEW-WINDOW 239 parameter syntax 224 PERFORM 239 b‡}~‘
  • 328. KRM SAPscript Made Easy | Release 4.6 POSITION 228, 230 PRINT-CONTROL 240 PROTECT 241 RESET 242 SET COUNTRY 244, 250 SET DATE MASK 244, 250 SET SIGN 246, 253 SET TIME MASK 246, 258 SIZE 228, 230 STYLE 247 SUMMING 247 TOP 248 Conversion rules, ignoring 252 Correction and Transport System 13 Country dependent formatting 244, 249 Customizing overview 162, 182, 208 Customizing in FI assigning forms to checks 209 assigning print programs to checks 208 selecting standard text for output 211, 212 specifying multiple printers 216 specifying number of test prints 216 Customizing in MM assigning forms to documents 182 assigning print programs to documents 182 maintaining change text 200 maintaining document text for printing 184 maintaining document text overview 186 maintaining header text 187 maintaining headings 201 maintaining item text 191 maintaining supplement text 196 Customizing in SD assigning forms to sales documents 163 assigning print programs to sales documents 163 maintaining pricing conditions 177 maintaining pricing procedures 177 selecting standard text for output 171 ] Data dictionary 42, 222, 255, 256 looking up fields 96 Date fields, formatting 244, 250 DEFINE, control command 232, 249 Document Server importing graphics 115 Documentation description 35 using 43 ^ Enjoy R/3 screen 16 _ Fields adding to print structures 106 adding to windows 102 looking up in the data dictionary 96 moving 82 printable 96 removing 90 Fill characters 252 Floating point numbers, setting exponent 251 Fonts 36, 37 Footers defining footer text in a window 227 selecting standard text 211 Form feed 238 Form layout aligning windows to grid 80 changing window position or size 75, 77 creating new windows 70 removing windows 79 renaming windows 72 Form Painter accessing the Form Painter 28 accessing the PC Editor 31 activating graphical functionality 34 adding new fields 102 administrative screen 30, 32, 40 aligning windows to grid 80 changing window position or size 75, 77 creating new windows 70 design window 30, 40, 128, 139, 150 layout management 28 manipulating form layout 70 modifying forms 129, 140 removing windows 79 renaming windows 72 Format character 38 graphic 114 paragraph 37 Formatting options conversion rules, ignoring 223, 252
  • 329. Index KRN country dependent formatting 223, 249 date fields 223, 250 fill characters 223, 252 floating numbers, setting exponent 223 floating point numbers, setting exponent 251 initial values, suppressing 258 leading sign left 223, 252 leading sign right 223, 253 leading signs, omitting 223, 255 leading zeros, omitting 223, 254 number of decimals 223, 253 offset 223, 254 output length 255, 257 overview 222 pretext/posttext 256 right-justified output 257 space compression 258 thousands separator, omitting 223, 255 time fields 258 value of counter 249 value of counter, changing 223 Forms adding boxes, lines, and shading 149 architecture 21 assigning to checks 209 assigning to documents 182 assigning to sales documents 163 components, overview 35 content management 31 copying 50, 65 copying standard printer types 133 defining print controls for macros 135 examples 20 finding form sources 25 form management tools 28 form managment tools 28 importing 58 including company logos as a PCL-5 macro 132 including company logos on forms 124 including graphics 118 including print controls 138 introduction 20 layout 69 layout management 28 naming 51 original language 52 preconfigured 23, 25 printing bar codes 143 printing company logos 124 process description 20 runtime environment process 23 standard 24, 64, 114, 165 test printing 67 ` Graphic formats Baseline TIFF 6.0 114, 124 Windows BMP 114 Graphic ID 115, 120 creating 120 naming 122 Graphic object 115, 120 creating 120 naming 121 Graphics import onto document server 115 including in forms 118 previewing on the document server 117 vertical printing 156 Grid aligning windows 80 measurement unit 81 step size 81 a Headers administrative data 36 basic settings 36 description 35 header text 248 selecting standard text 211 using 36 Hewlett Packard Electronic-Forms Solution 277 Flash SIMM 281 JetCAPS Bar SIMM 279 JetCAPS BARSIMM 144 HEX, control command 233 Hexidecimal data 233 b I Option 258 IF, control command 234 IMG accessing 162 Enterprise IMG 162 Project IMG 162
  • 330. KRO SAPscript Made Easy | Release 4.6 SAP Reference IMG 162 Implementation Guide 162 INCLUDE, control command 175, 204, 215, 236 Initial values suppressing 258 c JetForm JetForm Central 282 JetForm Design 282 Output Pak 282 d K Option 252 e Language attributes 36 original 36, 52 Layout set Adapt 12 Leading sign left 252 Leading sign right 253 Leading signs, omitting 255 Leading zeros, omitting 254 Line items 37 Lines inserting or deleting 88 removing fields by deleting lines 90 Logos converting to SAPscript standard text 125 including as a macro on PCL-5 printer 132 including on forms 124 printing 124 f Macro ID hexadecimal representation 138 naming print controls 138, 156 Main window 22 Measurement units of 36, 38, 82, 151, 152, 228 g NEW-PAGE, control command 238, 239 NEW-WINDOW, control command 239 Number of decimals 253 h Object registration 108 Offset 254 Options C 258 I 258 K 252 R 257 S 255 T 255 Z 254 Output length 255, 257 right justified 257 Output formatting 221 i Page break, protecting 241 Page format 36 changing 55 DIN A4 36, 52, 55 LETTER 36, 52, 55 Page layout description 35 using 40 Paragraph formats description 35 unknown 84, 85 using 37 PC Editor accessing from Form Painter 31 accessing without Form Painter 32 activating graphical functionality 34 content management 31 displaying control commands 41, 90 displaying text 41 inserting information 130, 141, 147, 150 inserting or deleting lines 88 moving fields 82 moving tabs 83 removing fields 90 PCC 48, 49
  • 331. Index KRP PERFORM, control command 157, 239 keyword CHANGING 157 keyword USING 157 POSITION, control command 228, 230 Preconfigured client introduction 48, 49 naming copied forms 51 original language 52 Prefix ZHEX-MACRO- 126 Pretext/Posttext 256 Print control 135, 138, 156 Print programs assigning to checks 208 assigning to documents 182 assigning to sales documents 163 Print sequence 188, 190, 193, 195, 197, 199 Print structures adding fields 106 PRINT-CONTROL, control command 240 Printing bar codes 143 logos 124 specifying multiple printers 216 specifying number of test prints 216 test printing forms 67 vertical text 156 Printing priority 193, 195 Program symbols, adding 247 PROTECT, control command 241 Purchase order change text 200 header text 187, 189 headings 201 item text 192, 194 supplement text 196, 198 k R Option 257 RESET, control command 242 Resetting numbering 242 l S Option 255 Sales documents assigning forms 163 assigning print programs 163 Sales organization specifying standard text 171 Sample forms Account Statement 264 Credit Memo 265 Debit Memo 266 Delivery Note 267 Invoice 268 overview 263 Prenumbered Check 269 Remittance Advice 271 Sales Order Confirmation 272 Unnumbered Check 270 SAPscript composer 221 control commands 41, 221, 222, 223 conversion routines 252 editor 40, 221, 224 Graphic Management 114 settings 120 symbol types 157 system variables 260 SAPscript forms 20 Screen Elements 16 SET COUNTRY, control command 244, 250 SET DATE MASK, control command 244, 250 SET SIGN, control command 246, 253 SET TIME MASK, control command 246, 258 Shipping documents assigning forms 165 assigning print programs 165 Shipping point specifying standard text 173 Sign position (+/-), formatting 246 SIZE, control command 228, 230 Space compression 258 Standard text maintaining 174, 203, 214 selecting for output 171, 211, 212 Structures SD substructures 106 STYLE, control command 247 SUMMING, control command 247 m T Option 255 Tables ABAP programming needed to fill variables 109 no ABAP programming needed to fill variables 109 of internal structure ITCSY 158
  • 332. KRQ SAPscript Made Easy | Release 4.6 SCUSTOM 158 Tabs 37, 95 moving 83 Text Editor inserting or deleting lines 88 moving fields 82 moving tabs 83 removing fields 90 Text style, formatting 247 Third-party solutions AFP FormScape 274 HP E-Forms solution 277 HP Flash SIMM 281 HP JetCAPS Bar SIMM 279 JetForm Output Pak 282 Thousands separator, omitting 255 Time fields 258 Time fields, formatting 246 TOP, control command 248 Transaction codes SE11 99 SE38 55, 58, 125 SE71 29, 31, 50, 53, 65, 68, 70, 72, 75, 77, 79, 81, 83, 88, 91, 102, 118, 127, 138, 144, 149 SE75 120 SE78 115, 117 SE84 106 SO10 175, 203, 214 SPAD 133, 135 SPRO 162 n User exits 106, 109 o Value assignment to text symbols 232 Value of counter, changing 249 Variables ABAP programming needed to fill 109 formatting 222 naming 104 no ABAP programming needed to fill 109 syntax 42 system 260 Vertical text printing 156 p Window MAIN 40, 67 document header text 184 document item text 184 document supplement text 184 next 239 Windows adding fields to print structures 106 adding new fields 102 aligning to grid 80 graphic 118 inserting or deleting lines 88 looking up fields in the data dictionary 96 moving fields 82 moving tabs 83 removing fields by deleting lines 90 types 40 s Z Option 254
  翻译: