Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Pgina 1 de 19
sapbrainsonline.com
Search
Primary Menu
Skip to content
HOME
ABAP Tutorial
SAP Dictionary
ABAP Syntax
ABAP Source Codes & Sample Projects
ALV ( ABAP List Viewer ) Tutorial
SAP ABAP OBJECTS Tutorials
SAP MENU PAINTER & SCREEN PAINTER TUTORIAL
SAP USER EXITS tutorial
LSMW
SAP BDC
Sap SMARTFORMS
SAPSCRIPTS tutorial
SAP Modules
Sap MM Module Tutorial
SAP CO Tutorial
SAP Cross Application Tutorials
SAP FI Module
SAP HR Module
SAP Logistics
SAP PM
SAP PP Module
SAP PS Module
SAP QM Module
SAP SD Module
SAP Treasury Module
SAP Warehouse Management
SAP WORKFLOW
SAP CTS
SAP ITS
SAP ALE
SAP IDOC Tutorial
SAP EDI Tutorial
SAP BAPI Tutorial
Search for:
Search
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 2 de 19
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 3 de 19
SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com
solutions since forms can be adjusted in minimum time. You design a form using the graphical
Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy
structure (tree structure) that consists of individual nodes, such as nodes for global settings,
nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use
Drag & Drop,
Copy & Paste, and
select different attributes.
These actions do not include writing of coding lines or using a Script
language.
Using your form description maintained in the Form Builder, Smart Forms generates a function
module that encapsulates layout, content and form logic. So you do not need a group of
function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd
party printing tools. XSF passes form content from R/3 to an external product without passing any
layout information about the Smart Form.
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 4 de 19
Table Structure
Global definitions
Table Structure
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 5 de 19
*
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 6 de 19
= ZSMARTFORM
* VARIANT
* DIRECT_CALL
IMPORTING
FM_NAME
= FM_NAME
EXCEPTIONS
NO_FORM
=1
NO_FUNCTION_MODULE
OTHERS
=2
= 3.
if sy-subrc <> 0.
WRITE: / ERROR 1.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
endif.
call function FM_NAME
* EXPORTING
* ARCHIVE_INDEX
* ARCHIVE_INDEX_TAB
* ARCHIVE_PARAMETERS
=
=
=
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
* CONTROL_PARAMETERS
* MAIL_APPL_OBJ
* MAIL_RECIPIENT
* MAIL_SENDER
Pgina 7 de 19
* OUTPUT_OPTIONS
* USER_SETTINGS
= X
* IMPORTING
* DOCUMENT_OUTPUT_INFO
* JOB_OUTPUT_INFO
* JOB_OUTPUT_OPTIONS
TABLES
GS_MKPF
= INT_MKPF
EXCEPTIONS
FORMATTING_ERROR
=1
INTERNAL_ERROR
SEND_ERROR
=2
=3
USER_CANCELED
OTHERS
=4
= 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Additional Fonts for your SMARTFORMS
You can create additional fonts and style with transaction SMARTSTYLES
This can then be define in the paragraph and character
formats, which you can then be assign to texts and fields in the Smart Form.
The character formats includes effects such as superscript, subscript,
barcode and font attributes.
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 8 de 19
Difference
with SMARTFORMS vs. SapScript(SE71)
The Following are the differences :a) Multiple page formats are possible in
smartforms which is not the case in SAPScripts
b) It is possible to have a smartform without a
main window .
c) Labels cannot be created in smartforms.
In R3 also, you can download into XML format. However, its not sure about
uploading. Refer to the program SF_XSF_DEMO.
In 4.7 Enterprise, other have seen this utlity which is completey missing in
4.6c. There is functionality to downlaod a complete form or only a particular
node. (Utilities -> Download form).
It will create a XML file and save it in the hard disk.
For others, if you want to download/upload
the Smartforms source, you will need the help from the Basis people. What you
can do is to create a Transport and then FTP down to your local harddisk. When
you need the Smartform source in another system, you have FTP up the Smartforms
file back to the SAP server. Finally, the Basis team, will tp it into your
system.
g) The
protect and endprotect command in
sapscript doesnt work with smartforms. For example on a invoice:
First data of position no 80. is printed on page one, other data of position no
80 is printed on page 2. And theres nothing you can do about it. Actually,
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 9 de 19
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 10 de 19
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the
format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This
allows you to include texts such asPage x of y into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print
request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to X after a page break (either automatic [Page 7] or
command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 11 de 19
Contains the name of the raised exception. You must trigger your own
exceptions, which you defined in the form interface, using the user_exception
macro (syntax: user_exception <exception name >).
Example
Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the
application program; the form is called for each customer and all form outputs
are included in an output request
Smart forms
Frequently Asked Questions
Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the
loop that forces a NEWPAGE on whatever condition you want. Then only loop
through a subset of the internal table (based on the conditions in the Command
node) of the elements in the Table node.
Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use
the Paragraph and character formats.
Line in Smartform
Either you can use a window that takes up the width of your page and only has
a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw __ accross the page and play with the fonts so that it
joins each UNDER_SCORE.
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 12 de 19
= externalname
importing
fm_name
= internalname
exceptions
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
no_form
Pgina 13 de 19
=1
no_function_module = 2
others
= 3.
if sy-subrc <> 0.
message e427.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a /, which is how the internal
names start. if it does, the name has already been converted. If not, it calls
the FM and converts the name.
You would then CALL FUNCTION sf_label.
Smartforms
FAQ Part Two
Smartforms output difference
Problem with Smartforms: in a certain form for two differently configured
printers, there seem to be a difference in the output of characters per inch
(the distance between characters which gives a layout problem text in two
lines instead of one.
It happens when the two printers having different Printer Controls if you go
to SPAD Menu (Spool Administrator Menu) you can see the difference in the
Printer Control and if you make the Printer control setting for both the
printers as same. then it will be ok. and also u have to check what is the
device type used for both the output devices.
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 14 de 19
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 15 de 19
How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SFs. For 4.7 version if
you are using tables, there are two options for protection against line break:
You can protect a line type against page break.
You can protect several table lines against page break for output in the main
area.
Protection against page break for line types
Double-click on your table node and choose the Table tab page.
Switch to the detail view by choosing the Details pushbutton.
Set the Protection against page break checkbox in the table for the relevant
line type. Table lines that use this line type are output on one page.
Protection against page break for several table lines
Expand the main area of your table node in the navigation tree.
Insert a file node for the table lines to be protected in the main area.
If you have already created table lines in the main area, you can put the
lines that you want to protect again page break under the file using Drag&Drop.
Otherwise, create the table lines as subnodes of the file.
Choose the Output Options tab page of the file node and set the Page
Protection option. All table lines that are in the file with the Page
Protection option set are output on one page.
In 4.6, Alternatively in a paragraph format use the Page protection attribute
to determine whether or not to display a paragraph completely on one page. Mark
it if you want to avoid that a paragraph is split up by a page break. If on the
current page (only in the main window) there is not enough space left for the
paragraph, the entire paragraph appears on the next page.
Details
information about SAP Barcodes
A barcode solution consists of the following:
a barcode printer
a barcode reader
a mobile data collection application/program
A barcode label is a special symbology to represent human readable
information such as a material number or batch number
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 16 de 19
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 17 de 19
and you are basically locked down in one location and have to bring all the
material to that location to process.
Another solution is to use SAPConsole transactions
or write your own ABAP Dialog programs that will fit onto a barcode enabled
wireless handheld terminal and that will follow the business logic as executed
on the shop floor.
These programs are highly complex exercises in industrial engineering and
ergonomics because of the limited screen sizes and limited ability to accept
keyboard input. The user is instructed step-by-step and only scan and push
F-keys to interact with the SAP system. Scan, scan, beep, beep, enter highly
automated.
6% de desc
15% de des
5% de desc
Kit 4 Pneus
Kit de 04
Pneu
165/70R13
Pneus
165/70R13
KR21 Marsh... Kelly Metric ... 175/70R13 K...
79
R$ 501.96
R$ 130.56
R$ 545.20
Go !
Go !
Go !
Post navigation
Previous PostABAP Code Optimization Methods & TechniquesNext PostSAP R/3 Architecture
Interview Questions
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 18 de 19
Quick Guides
SAP Basis
SAP HANA
Crystal reports
SAP LUMIRA
Predictive Analysis
Enterprise Performance Management
SAP Fiori
SAP R3 ARCHITECTURE INTRODUCTION
SAP Certification Help & Details
SAP Interview Questions
HR Tables & Infotypes
SAP HELP
CRM
6% de desc
Kit 4 Pneus
165/70R13 KR21
Marshal 78T
R$ 501.96
Go !
15% de des
Pneu 165/70R13
Kelly Metric Xtra
Goodyear 79T
R$ 130.56
Go !
5% de desc
Kit de 04 Pneus
175/70R13 KR21
Marshal 82T
R$ 545.20
Go !
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015
Pgina 19 de 19
Syam Sasi
Seguir
Latest
Important Tables
TCODES
SD Transaction Codes
MM Transaction Codes
HR Transaction Codes
FI Transaction Codes
ABAP Transaction Codes
Home | Contact | Privacy Policy | Sitemap | Google+
Disclaimer:All of the product names here are trademarks of their respective companies. The site
sapbrainsonline.com is not affiliated with SAP AG. Use information on this site at your own risk. This site does not
host any files on its server. If any complaints about the posts please contact us at sapbrain.support@gmail.com.
2013 - 2014
http://sapbrainsonline.com/smartforms-tutorial/smartforms-complete-reference-guide.... 12/08/2015