Professional Documents
Culture Documents
Business Requirement :
Develop a Smart form to print the Invoice Details along with
Copies/Final windows .The Layout is given as below.
Steps:
Goto Smartforms Tcode
Select Smartstyle
Give a name as ZINVICE_STYLE
Click on Create
Double click on Paragraph Format Folder
Click on Create Node
Save it
Expand Page1->Rightclick->Create->Window
Create a Graphics Node and display Image which is uploaded through SE78
Tcode.
Right Click on Page1->Create ->Graphic
Give the Name of the image or Press F4 on Name field.
Click on Icon
A popup will be displayed
Write the below code
Press Enter
Put '/' at the end
Click on Icon
A popup will be displayed
Write &SFSY-FORMPAGES& in the poup.
Finally It should look as below
Click on Create->Write Some text ->save it ->Go back->and Click on print preview .
Goto Smartforms
Double click on the INVOICE_TEXT ->Right click->Create Text.
Select Text Type as Include text.
And also Create an varibale by name V_SNO for displaying Serial No in the table
under Global Definations
Click on Icon
A Popup Will appear
Click on
Select
Right Click on each cell and create text and write the texts as below.
Cell5->Text = &V_SNO(C)& .
Cell6->Text = &wa_vbrp-matnr&.
Cell7->Text = &wa_vbrp-FKIMG(C)&.
Cell8->Text = &wa_vbrp-netwr& .
Here, We are displaying currency/quantity Fields in a table .
So , we Need to specify the reference currency/quantity Fields under
Global Definitions Tab.
Write the below code With Input and Output parameters in the Program lines.
Everything is complete for displaying Line item Information.
Now adjust the Main Window Length, position .
Save->activate the form .
Modify the Driver Program for Including the logic for selecting Line Item
Information.
Add the below lines of code .
DO 100 TIMES .
APPEND WA_VBRP TO I_VBRP .
ENDDO.
Repeat the same and copy TITLE window and MAIN window .
The Page2 Should look as below
Click On Form Painter Button->Increase the Height of Main window by dragging
It upper side .It should Look as below.
Double lick on the Table
Select Calculations Tab.
We want to calculate the total on WA_VBRP-NETWR field
Give the values as below .
Now create a text under the node TABLE print the grand total.
.
Goto Table->Expand Main Area->Expand ROw->Expand Last Cell->Text Will be
visible
Steps:
Create a variable under global definition for displaying copy name.
Now Right click on Program lines->Create Text and display the copy name
Click on Now.
***********************************************************
The output is as below : First copy will be
*************************************************************
*************************************************************
Third copy will be
*************************************************************
Using FINAL Window .
Final windows are generally processed after all the windows in smart form are
finished.
Generally Smart form will not execute any final windows initially.
It will skip all final windows and it executes remaining windows.
After Finishing all windows....Then it comes back to first page and it will check
weather
Any final window is available on page1 or page2 or page3 etc..
If it is available it will execute the final window .
Requirement :
Here My requirement is: Print the Grand total on the first page itself.
But the Grand total is calculated only after all the line items are displayed
from main window .
So to Print Grand total on the first page...lets create a final window on
page1.
And print the grand total from the variable V_TOTAL.
Steps:
Right Click on Page1->Create a window of type FINAL Window..
*****************Finished Guys*****************************
I think I have covered all the concepts. Remaining concepts will be discussed in class.