Sunday 15 March 2015

                                                    Smart Forms


Smart Forms (from 1997 4.6c)

 1. Go to T-code SMARTFORMS.

When we create smart form by default one page and one main window will be created we can change default name as per our convent.Whenever we create smart forms, SAP creates/generates a function module.

Navigation window consist of nodes and sub nodes. They contain all the elements (text, window etc) that belong to sap forms.
Maintenance window shows attributes of the elements.
Form printer window shows the layout of the page.


In the navigation window you will find
Form Attributes: Have General attributes (Created by, Date, Time,), Language Attributes (Access, Translate) Output options (Page format, style, output format).

Global Definitions: The Data defined here can be used throughout the smart form for coding purposes.
We can also declare variable, constants, structures, and internal table in smart form under global definition. In smart form under global data we can write this things
We can also write user define TYPES under TYPES
Under initialization we can write anything like select statement, Function module etc...
 Note: Sum of all columns width is equal to total width of table

Form Interface: Here all the data which will be passed to the smart form from the Print program is defined.
Form interface acts as interface between Form and print program
Form interface looks like function module screen here we have all tables of function module i.e. like IMPORT | EXPORT | TABLES | EXCEPTION
 Anything variable or parameter we want to give as a input to smart form from program we give/declare under IMPORT tab
If we want get parameter /variable as an output from smart form we mention under EXPORT tab
If we want to get/get table as input or output we mention under TABLES tab.



For background picture and graphics you can pick up either black and white or color bitmap images and are stored in the form of standard texts. You may take a detour from the smartform screen and open Form Graphics screen. Transaction code: Se78 


There are two types of Windows
Main
Secondary
NOTE
You cannot have more than 1 main window in a page. You can have multiple secondary windows
Whatever you print in secondary window...it has to be static. (If u have 20 lines in a PO and there is page constraint the lines get carried forward to next page in the main window. i.e. In a predecessor and successor type of content, they will be printed in sequence in main window. This is not allowed in Secondary windows.

The two different editors are available in Smartforms viz. Normal Editor

and the Graphics Editor.

This setting can be changed using the Configure editor in Utilities.
In Table painter, you can draw the format as per client requirement (e.g. Heading, Sub Heading, Item, Sub Total, Grand Total etc.)

You can use the table layout to determine:
The number of lines and cells
The height of each line
The width of each cell
The alignment of the table in the window

The Table shows the different line types which will be used in the table. The Line types define the size of each cell and the number of cells in each line.


PAGE
 In General attributes (her in page counter we can set page style and fount etc...)
 In Output options (her in print attributes we can set page format i.e. portrait or landscape)
BACKGROUNDPICTURE
Give smart form name in Name
 Give In object as Graphics
 In ID as BMAP
 Choose Black & white (BMON) or Color (BCOL) images or Determine dynamically (BMON, BCOL)
 In output attributes choose resolution e.g. 600 and output mode e.g. print & print preview
 WINDOW
 In General attributes window type as main window
In output options give position and size as per requirements
In box & shading (give shading color and width to column)
 HOW TO WRITE CODE IN SMART FORM
 Even in smart forms also we need to write code or text under text element only
 Select window in left side panel right click on window click on create click on text (We can write text/code in text element).


 HOW TO PRINT SYSTEM FIELDS IN SMART FORMS
Click on ‘Filed list on/off’ in application tool bar expand system field
 Expand system fields
Expand SFSY – Smart Form System Field

Drag whatever system fields.





sripts :we need to create at least one paragraph format////no need in smartform.
script: in this we can declare only variables. ///constants,tables, variables.
Scripts: We can print tiff&bmp logos////only bmp logos.



Q. Is it possible to print text with different font on the same line?
Yes underlinetext </>boldtext</>.
Q. How to develop sap scripts in different languages?
SE63. Click translation long text sap scriptforms.

Q. How to print the page nos forms?
Every page I want to print 1 of 10,2 of 10.
PAGE&PAGE&OF&SAPSCRIPT-FORMPAGES&.
Q. How to change the development class of sap script & other than sap script?
Goto se 38 & gotoàobject directory entryàchange the development classàsave.
Q. How to printsystemfields in smartforms?
Click on field list on/off.
Expand sfsy-smart form system field.
Q. Why smart forms are client independent?
Whenever we activate smart forms & create dynamic fm this will stored in database repository.
Portrait format ////
Landscape format -------
In page if we have main window, variable type window we no need to declare programmatically by default it will come.
In variable window text element we no need to call element text.
All the pages from the same layout should always have same orientation.
When there is no text page for the current page then current page itself the last page.












Steps to follow to create standard script:
TO KNOW THE OUTPUT TYPE:
1. Go to me22. Take purchase order {4500012164}. Click on messages see the output eg. NEU.
2. Go to NACE {select po order}, Click on output types, select output type, click on processing routines, select form & copy the standard form to create custom form.
COPY STANDARDFORM & CREATE CUSTOM FORM:
3.  Se 71, go to utilities click on copy form clients, give form, client(1000) target custom form, click execute, go back , convert language DE to EN.
TO MODIFICATION TO FORM AS PER REQUIREMENT.
4. Go to se 71, click on change, do modification save & active.
TO CREATE OWN OUTPUTTYPE:
5. Go to NACE, Select purchase order, select output type change. Select standard output type. Click on copy as own type.
6. Go back to NACE, select purchase order, click on procedures, select purchase order, double click on control click on copy create custom.
TO ASSIGN CUSTOM OUTPUTNTYPE TO PO TRANSLATION:
7. Go to ME22N,click on change,click on message, choose output & save it. Give printer name in logical destination. Go back save & exit.
8. Go to ME22N, click message, select custom output type click futher data give dispatch time as send immediately, go back save & exit.
9. Go to ME22N.
10. Click on print preview to see own custom from output.








No comments:

Post a Comment