printing an invoice
TRANSCRIPT
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 1/26
Create a Form by name ZUSERID_INVOICE and the program name ZUSERID_PRINTINVOICE
Solution
Let u pr!nt an In"o!#e $hoe output $!%% be a &o%%o$'
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 2/26
Step ( '
)o to Trana#t!on *S+,RTFOR+S- &rom the S,P Eay ,##e S#reen.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 3/26
)!"e the Smart Form name $h!#h tart $!th / or Z and #%!#0 on Create.
Step 1 '
Rename Page( a FIRST by e2pand!ng the node Page and 3!ndo$4 doub%e #%!#0 on the node5P,)E(.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 4/26
, per the Re6u!rement $e need to ha"e 7 $!ndo$.
(. (t $!ndo$ &or d!p%ay!ng Logo
1. 1nd $!ndo$ &or d!p%ay!ng 8!%%!ng Do#ument Deta!%9. 9rd $!ndo$ &or d!p%ay!ng Cutomer Deta!%:. :th $!ndo$ &or d!p%ay!ng the Item Deta!% and the Tota% ,mount7. 7th $!ndo$ &or d!p%ay!ng the Footer Deta!%
O& a%% thee $!ndo$ the +a!n $!ndo$ !.e. the $!ndo$4 $h!#h ho%d the Item Deta!% ! a%readyde&!ned. So %et u no$ #reate the other $!ndo$.
Step 9 '
E2pand the node FIRST to ee the ma!n $!ndo$. No$ to #reate the Logo $!ndo$.
The &o%%o$!ng #reen appear. Enure that the $!ndo$ type ! Se#ondary. No$ Rename3INDO3( a LO)O3IN by doub%e #%!#0!ng on the node 53INDO3(.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 5/26
The &o%%o$!ng #reen appear.
Repeat the ame &or #reat!ng rema!n!ng $!ndo$. ,&ter #reat!ng the rema!n!ng $!ndo$ the#reen hou%d %oo0 %!0e th!'
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 6/26
Step : '
No$ go to the Form Pa!nter by #%!#0!ng on the button preent on theapp%!#at!on too%bar. ,d;ut a%% the $!ndo$ a per the re6u!rement.
/ou #an #%oe the Form pa!nter by pre!ng the button .
Step 7 '
No$ %et u p%a#e a )raph!# !nto the LO)O3IN <Logo 3!ndo$=.
For that $e need to &!rt !mport the !mage &rom the %o#a% ytem. To do th! )o to trana#t!onSE>? &rom the S,P Eay ,##e #reen. The !n!t!a% #reen &or ,dm!n!trat!on o& Form )raph!#appear. E2pand the node )R,P@ICS and e%e#t 8!tmap !mage. Se%e#t the Rad!o 8utton Co%or
&or up%oad!ng Co%ored !mage.
No$ C%!#0 on Import 8utton !n order to !mport an !mage &rom your ytem.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 7/26
, pop up appear. )!"e the F!%e path !n the F!%e Name4 Enter a Name and De#r!pt!on a ho$n
be%o$ and Cont!nue.
Step A '
No$ go ba#0 to the trana#t!on *S+,RTFOR+S-. R!ght C%!#0 on the LO)O3IN à Createà
)raph!#.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 8/26
, per the &o%%o$!ng #reen hot ma0e the #hange. In the &!e%d N,+E $!th the F: he%p e%e#t the!mage $h!#h you ha"e !mported &rom SE>?.
Step > '
No$ #om!ng to the De#%arat!on. , re6u!red the data !nto the &orm #ome &rom 9 tab%e name%y4
BN,( For pr!nt!ng the Cutomer Deta!% !n the Cutomer Deta!% 3!ndo$.
V8RB For pr!nt!ng the 8!%%!ng Do#ument @eader Deta!% !n the 8!%%!ng Do#ument Deta!% 3!ndo$.
V8RP For pr!nt!ng the Item Deta!% !n the +a!n 3!ndo$.
The Data Retr!e"a% and pr!nt!ng the Form ! done through a Dr!"er Program #a%%edZSF_PRINTINVOICE.
In the Form $e need to de#%are ome Import parameter and a%o de&!ne ome )%oba% De&!n!t!on.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 9/26
For de#%ar!ng Import parameter doub%e #%!#0 on Form Inter&a#e and !n#%ude the %!ne a ho$nbe%o$ '
I& you ha"e tab%e type de&!ned &or V8RB and V8RP tab%e g!"e thoe name !n the ,o#!atedtype- #o%umn.
I+_FS_BN,( The &!e%d tr!ng &or @o%d!ng Cutomer Deta!%.
I+_T_V8RB Tab%e to ho%d 8!%%!ng Do#ument @eader Data.
I+_T_V8RP Tab%e to ho%d 8!%%!ng Do#ument Item Data.
For )%oba% De&!n!t!on4 doub%e #%!#0 on the )%oba% De&!n!t!on and !n#%ude the %!ne a &o%%o$ '
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 10/26
I+_T_BN,( Tab%e to ho%d Cutomer Deta!%.
I+_FS_V8RB F!e%d Str!ng to ho%d 8!%%!ng Do#ument @eader Data.
I+_FS_V8RP F!e%d Str!ng to ho%d 8!%%!ng Do#ument Item Data.
3_TOT,L Store the Tota% ,mount o& the &!e%d NET3R.
I& the abo"e #reen hot ! ober"ed $e &!nd a arro$ $h!#h ! p%a#ed on Curren#yuant. F!e%d.Open th! Tab to !n#%ude the &o%%o$!ng %!ne.
Th! ! to re&er the #urren#y &!e%d NET3R !n the tab%e V8RP to !t #orrepond!ng #urren#y 0ey&!e%d !n the tab%e V8RB.
Step ? '
D!p%ay!ng the #ontent !n 8ILL3IN <8!%%!ng 3!ndo$=.
Create a Loop under the node 8ILL3IN
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 11/26
Name the Loop a LOOP_8ILL4 g!"e a de#r!pt!on a Loop &or 8!%%!ng Deta!%. In the &!e%d Operandg!"e the deta!% a I+_T_V8RB INTO I+_FS_V8RB. In the $here #ond!t!on g!"e the &!e%dname a BUN,)4 Se%e#t the operator a *- and #ompar!on "a%ue a I+_FS_BN,(BUNNR.
Create Te2t under the Loop LOOP_8ILL to d!p%ay 8!%%!ng Do#ument Deta!%
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 12/26
)!"e the Name &or the TEGT and a De#r!pt!on. To d!p%ay the &!e%d #%!#0 on F!e%d L!tono&& button on the app%!#at!on too%bar. , %!t $!th &!e%d name appear at the bottom %e&t #orner aho$n !n the #reen hot be%o$. Drag H Drop the &!e%d &rom I+_FS_V8RB on to the ed!tor.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 13/26
Step '
D!p%ay!ng the #ontent !n CUST3IN <Cutomer 3!ndo$=
Create Te2t under the node CUST3IN to d!p%ay the Cutomer Deta!%.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 14/26
)!"e the Name &or the TEGT and a De#r!pt!on. C%!#0 on F!e%d L!t ono&& button on theapp%!#at!on too%bar. , %!t $!th &!e%d name appear at the bottom %e&t #orner a ho$n !n the #reenhot be%o$. Drag H Drop the &!e%d &rom I+_FS_BN,( on to the ed!tor.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 15/26
Step (J '
D!p%ay!ng #ontent !n +,IN <+a!n 3!ndo$=
Create a Tab%e under the node +,IN.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 16/26
)!"e Name &or the tab%e and De#r!pt!on. R!ght #%!#0 on 5LT/PE( and rename the L!ne a L!ne(.
S!n#e $e ha"e to d!p%ay 7 #o%umn4 LINE( ha to be d!"!ded !nto 7 #e%%. To dra$ %!ne Se%e#t
the button Dra$ L!ne and Co%umn.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 17/26
No$ #reate a Tab%e %!ne under the node @eader and g!"e the L!ne Type a L!ne(.
, oon a you g!"e the L!ne type a L!ne( and pre ENTER you #an ee that under the5RO3( 7 Ce%% name%y 5CELL(KK5CELL7 are #reated. No$ Rename ea#h o& thee aho$n be%o$'
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 18/26
No$ under ea#h Ce%% #reate TEGT &or D!p%ay!ng the Co%umn @ead!ng.
Repeat the ame tep &or the node +a!n ,rea.
De&!ne a Tab%e %!ne. )!"e the L!ne Type a LINE(.
, oon a you g!"e the L!ne type a L!ne( and pre ENTER you #an ee that under the5RO3( 7 Ce%% name%y 5CELL(KK5CELL7 are #reated. No$ Rename ea#h o& thee Ce%%
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 19/26
and Create Te2t under ea#h Ce%% to d!p%ay the Deta!% &rom V8RP. ,&ter Creat!ng a%% thee your #reen hou%d %oo0 %!0e th! '
In the +a!n ,rea Drag and Drop the &!e%d &rom the &!e%d tr!ng I+_FS_V8RP to pr!nt the ItemDeta!%. So !n the Te2t ITE+NO( !t $!%% be HI+_FS_V8RPPOSNRH and o onK a ho$n
abo"e.
S!n#e $e ha"e to d!p%ay the Tota% amount !n the Footer area4 Create a Tab%e L!ne $!th one Ce%%.To #reate a Tab%e L!ne R!ght C%!#0 on the L!ne ( à Inertà Empty %!ne underneath . ,n empty
L!ne appear a&ter L!ne (. Name th! L!ne a L!ne1.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 20/26
Create a Te2t under the #e%% TOT,L. )!"e the L!ne type a L!ne 1. The Fo%%o$!ng #reen appear
In order to #a%#u%ate the Tota% <3_TOT,L= go to the Tab%e ITE+DET. Se%e#t the Tab Ca%#u%at!onand g!"e the deta!% a ho$n !n the #reen hot be%o$'
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 21/26
)o ba#0 to the Footer à Te2t &or D!p%ay!ng the TOT,L. Drag and Drop 3_TOT,L &rom the
)%oba% Data. To d!p%ay the &!e%d %!t C%!#0 on the button F!e%d %!t ono&&.
Step (( '
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 22/26
D!p%ay!ng #ontent !n 8OTTO+3IN <Footer Deta!%=
Create a TEGT under the Node 8OTTO+3IN to d!p%ay the Footer In&ormat!on.
)!"e the Name &or the TEGT and a De#r!pt!on an Enter the Te2t you $ant to D!p%ay !n the$!ndo$. So your #reen %oo0 ometh!ng %!0e th!'
Step (1 '
F!na%%y Sa"e and ,#t!"ate the Form.
, $e 0no$4 $hen $e ,#t!"ate the Smart Form !t generate a Fun#t!on +odu%e automat!#a%%y. To"!e$ the Fun#t!on +odu%e generated &or th! Smart Form4 )o to En"!ronment à Fun#t!on +odu%e
Name.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 23/26
8y C%!#0!ng on the Fun#t!on +odu%e Name4 a pop up appear $h!#h g!"e the name o& theFun#t!on +odu%e.
Note do$n the Fun#t!on +odu%e name.
Step (9 '
Dr!"er program to E2e#ute the &orm ZSF_INVOICE
)o to Trana#t!on *SE9?- &rom the S,P Eay ,##e S#reen and #reate an E2e#utab%e Program$!th ome name ay ZSF_PRINTINVOICE.
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 24/26
, !n the &o%%o$!ng program4 de#%are the Se%e#t!on #reen e%ement4 3or0 "ar!ab%e4 Interna%Tab%e et#K and #a%% the Fun#t!on SSF_FUNCTION_+ODULE_N,+E and
(8CD38SFJJJJJ1J( <The one $h!#h $e got !n Smart &orm by go!ng to En"!ronment àFun#t!on +odu%e Name=. ,&ter #a%%!ng the Fun#t!on (8CD38SFJJJJJ1J( ;ut rep%a#e !t byF+_N,+E a ho$n !n the #ode be%o$' REPORT zsf_printinvoice.
*"Table Declarations...................................................TABLES:
na! vbr
vbrp.
*"Select Screen Ele#ents...............................................
PARA$ETERS : p_%nnr L&'E vbr(%na)
p_vbeln L&'E vbr(vbeln.
*"Data Declarations....................................................*"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*
* or +ariables
**"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*
DATA : f#_na#e T,PE rs-l_fna#. " /a#e of t0e 1%nction $o2%le
*"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((** &nternal Table to 3ol2 Billin) Doc%#ent 3ea2er Details *
*"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*
DATA :
t_vbr L&'ESTA/DARD TABLE
O1 vbr.*"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*
* &nternal Table to 3ol2 Billin) Doc%#ent &te# Details **"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*
DATA:
t_vbrp L&'E
STA/DARD TABLE O1 vbrp.
DATA : fs_na! T,PE na! " 3ol2s 4%sto#er Details
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 25/26
fs_vbr L&'E L&/E O1 t_vbr " 3ol2s Billin)Doc 3ea2er Details
fs_vbrp L&'E L&/E O1 t_vbrp. " 3ol2s Billin)Doc &te# Details
*"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((** START(O1(SELE4T&O/ E+E/T *
*"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*START(O1(SELE4T&O/.
SELE4T S&/5LE * 1RO$ na!
&/TO fs_na!
3ERE %nnr E6 p_%nnr.
SELE4T * 1RO$ vbr
&/TO TABLE t_vbr 3ERE %na) E6 p_%nnr
A/D vbeln E6 p_vbeln.
SELE4T *
1RO$ vbrp &/TO TABLE t_vbrp
1OR ALL E/TR&ES &/ t_vbr 3ERE vbeln 7 t_vbr(vbeln.
4ALL 18/4T&O/ 9SS1_18/4T&O/_$OD8LE_/A$E9 EPORT&/5
for#na#e 7 9;S1_&/+O&4E9
&$PORT&/5
f#_na#e 7 f#_na#e E4EPT&O/S
no_for# 7 ! no_f%nction_#o2%le 7 <
OT3ERS 7 -.
&1 s=(s%brc >? @.
* $ESSA5E &D S,($S5&D T,PE S,($S5T, /8$BER S,($S5/O* &T3 S,($S5+! S,($S5+< S,($S5+- S,($S5+.
E/D&1.4ALL 18/4T&O/ f#_na#e
EPORT&/5 i#_fs_na! 7 fs_na!
i#_t_vbr 7 t_vbr
i#_t_vbrp 7 t_vbrp
E4EPT&O/S for#attin)_error 7 !
internal_error 7 < sen2_error 7 -
%ser_cancele2 7
OT3ERS 7 .
&1 s=(s%brc >? @.* $ESSA5E &D S,($S5&D T,PE S,($S5T, /8$BER S,($S5/O
* &T3 S,($S5+! S,($S5+< S,($S5+- S,($S5+.
E/D&1.
3hen the ,bo"e Program ! E2e#uted the &!na% output $ou%d be'
8/18/2019 Printing an Invoice
http://slidepdf.com/reader/full/printing-an-invoice 26/26