| Home • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Label printing using Smart formsBy Sushil Choudhary, Tata Consultancy Services It is
believed that SAP has not provided any functionary to create labels in Smart
form and this is considered as one of its disadvantage. In this document we will
learn how to create labels using Smart form. To
understand this document you should have fair idea about how Smart form works.
Also this document will not explain the programming part required to fetch the
data which is used to create labels. Below is
the kind of output we expect form this label printing form.
Step1:- Suppose we
have all the data used to create labels available in our Smart form in table
IT_FINAL which is exported thorough driver program to Smart form. Now our
requirement is to print the labels in the manner shown below. Label1 Label2
Label3 Label4
Label5 Label6
i.e. odd
labels on left side and even on right. Your requirement might vary from this one
and you need to do the changes in layout and logic accordingly. To
implement this requirement cerate 5 secondary window and a main window all of
the size of label box, in 1st page of Smart form as shown below. Last
window which print the last label on the page should be the main window, so that
the next page will be triggered if more labels needs to be printed.
Step2:-
In the
Global Dataà
Initialization section of the smart form Every row
in the table IT_FINAL represents 1 label. As per the
current requirement every 6th row will cerate last label on the page
and any further row if exist will trigger the next page. Move every
6th row from IT_FINAL to IT_MAIN and delete the same from IT_FINAL.
Now we
have IT_FINAL which contain data to be printed in 5 secondary windows and
IT_MAIN which contain data for main window. Step3:-
Create 5
work areas wa_1, wa_2, wa_3, wa_4, wa_5 of the type of line of IT_FINAL in the
global declaration area. Write code
to move 1st 5 rows from IT_FINAL to the above declared work areas and
then delete those 5 rows form internal; table as shown in the below screen-shot.
Step
4:- Now create
a text node in every window and pass the label data from wa_1 to text node of
1st secondary window and so on.
Every Node
has a condition that it will execute only if the corresponding work area value
is not initial.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||