cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms

Former Member
0 Kudos

Hi

Im a begineer to Smartform..I have to learn smarform..

I knw the basics of ABAP/4 language..

Keeping this in mind, can any1 send me a simple step by step exercise on Smartforms..through which i can learn basics of how to build a new smartform..

Regards

Priyanka

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

To create new smartform

Here is the procedure

1. Create a new smartforms

Transaction code SMARTFORMS

Create new smartforms call ZSMART

2. Define looping process for internal table

Pages and windows

First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)

Here, you can specify your title and page numbering

&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)

Main windows -> TABLE -> DATA

In the Loop section, tick Internal table and fill in

ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2

3. Define table in smartforms

Global settings :

Form interface

Variable name Type assignment Reference type

ITAB1 TYPE Table Structure

Global definitions

Variable name Type assignment Reference type

ITAB2 TYPE Table Structure

4. To display the data in the form

Make used of the Table Painter and declare the Line Type in Tabstrips Table

e.g. HD_GEN for printing header details,

IT_GEN for printing data details.

You have to specify the Line Type in your Text elements in the Tabstrips Output options.

Tick the New Line and specify the Line Type for outputting the data.

Declare your output fields in Text elements

Tabstrips - Output Options

For different fonts use this Style : IDWTCERTSTYLE

For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&

5. Calling SMARTFORMS from your ABAP program

REPORT ZSMARTFORM.

  • Calling SMARTFORMS from your ABAP program.

  • Collecting all the table data in your program, and pass once to SMARTFORMS

  • SMARTFORMS

  • Declare your table type in :-

  • Global Settings -> Form Interface

  • Global Definintions -> Global Data

  • Main Window -> Table -> DATA

*

*

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.

SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.

MOVE-CORRESPONDING MKPF TO INT_MKPF.

APPEND INT_MKPF.

ENDSELECT.

  • At the end of your program.

  • Passing data to SMARTFORMS

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZSMARTFORM'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

if sy-subrc <> 0.

WRITE: / 'ERROR 1'.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

call function FM_NAME

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • 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 = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 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.

for Smartforms material

http://www.sap-basis-abap.com/sapsf001.htm

http://www.sap-press.com/downloads/h955_preview.pdf

http://www.ossincorp.com/Black_Box/Black_Box_2.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://www.sap-img.com/smartforms/smartform-tutorial.htm

http://www.sapgenie.com/abap/smartforms.htm

How to trace smartform

http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF

http://www.sap-img.com/smartforms/smart-006.htm

http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm

check most imp link

http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html

step by step good ex link is....

http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.h...

How to create a New smartfrom, it is having step by step procedure

http://sap.niraj.tripod.com/id67.html

just check it step by step with lots of screen shots.

http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.h...

You can find help about smartforms in the following links:

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://www.sapgenie.com/abap/smartforms_detail.htm

http://www.sap-press.com/downloads/h955_preview.pdf

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20...

http://www.sap-basis-abap.com/sapsf001.htm

http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

http://www.sapgenie.com/abap/smartforms.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm

http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm

http://www.sap-img.com/smartforms/smart-001.htm

http://www.sap-img.com/smartforms/smartform-tutorial.htm

http://www.sap-img.com/smartforms/smart-002.htm

http://www.sapgenie.com/abap/smartforms.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

Regards

Pavan

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

Go through this <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985">link.</a> It will guide you step wise.

Also goto smartforms tcode and have a look at standard example programs

SF_EXAMPLE_01

SF_EXAMPLE_02

close the thread once your question is answered.

Regards,

SaiRam

Former Member
0 Kudos

http://help.sap.com/saphelp_nw04s/helpdata/en/4b/83fb51df8f11d3969700a0c930660b/frameset.htm

Smart Forms
Purpose

You use Smart Forms to create and maintain forms for mass printing in SAP systems. Besides using the printer for standard output you can also select the Internet (by using a generated HTML output), a fax, or e-mail as the output medium.

In addition to the tool, SAP delivers a selection of forms for central business processes. This includes forms in Customer Relationship Management (CRM) as well as in the applications SD, FI, and HR.

Smart Forms offers the following advantages:

· Creating and maintaining forms requiring half the time

· Adapting forms without any programming knowledge due to entirely graphical user interface

· Integrating input elements into the HTML output, which enables you to use a form in Internet applications as well



Smart Forms replace SAPscript forms. SAPscript forms will still be supported in the future; you can use them without making any changes for years to come. You can even use SAPscript texts in the Smart Forms. Migration of SAPscript forms into Smart Forms is supported.

Integration
Smart Forms allows you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a user who is familiar with the tool but has only rudimentary programming knowledge can configure forms with data from an SAP system for the relevant business processes. The result of the form development is a Smart Form. After it is activated, the Smart Form is similar to a callable function module in the SAP system.

The logic of the form is mapped entirely in the Smart Form. To print a form, you call it from within an application program, in which you retrieve the application data to be merged into the form. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form.

Features
Tools
To develop a Smart Form you use the Form Builder in which you describe the attributes of the Smart Form by using the integrated graphical tools, such as the Form Painter for the layout of a form page or the Table Painter for the design of table output. The form logic is represented by a hierarchy structure (tree structure) that you construct of individual nodes together with the relevant attributes. Besides using existing nodes for global settings you may create, for example, nodes for the output of texts, of tables, or of graphics. To make changes, use Drag&Drop, Copy&Paste, and select different attributes. These actions do not require writing coding lines or using a Script language.

You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.

Tables
You can include static and dynamic tables into a Smart Form. Dynamic tables enable you to display tables whose size is determined only at the moment of their output by the number of the table items to be displayed. Table functions are:

· Line feeds in individual table cells

· Event-controlled output of table headings and footers

· Integrated calculation of grand totals and subtotals

· Colored boxes and shadings in tables

Miscellaneous
To position output on a form page you use windows. Besides using simple windows for displaying output of fixed length there are special window types, for example, for continuous text or for distinctions between the original and a copy of a form.

You can include background pictures as graphics, which you can either use as copy templates for a form or print as background graphics.

You can specify spool attributes in the form to allow for postage optimizing.

Interactive Web Forms
You use HTML output to integrate forms into Internet applications. This allows you to use the same Smart Form both for printing and for the Internet application. The layout of the form in the web browser corresponds to the print layout.

click below for the simplest example




http://sap.ionelburlacu.ro/sap0/sapsf001.htm