cancel
Showing results for 
Search instead for 
Did you mean: 

regarding smart forms

Former Member
0 Kudos

hi,

i am new to smartforms and i got report to make changes in the smart forms,plzz help me out as i know nothing about the smart forms by providing me it in easiest & simplest form.

if find useful help will be deifnately rewarded.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hi

for initially u can go on some common SAP sites like SAP-IMG.com , there u can find tuturials , they will be help ful to u ,

or search SMARTFORMS on forum , here u can find use ful links.

Former Member
0 Kudos

Hi,

I am new to smart forms. Can anyone tell me how to use the text editor in smart forms? The problem in the smart form that i have created is there is an internal table whch has 10 order item but when i loop through it,it is displaying only the last item? How do i solve this?

thanks in advance.

Regards,

Pavithra.

Former Member
0 Kudos

Hi Ric,

here is a link which will teach you step by step

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

More links

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

Step by Step creation of Smartforms

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

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

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

http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html

How to trace smartform

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

FAQs

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

also see

http://www.saptechnical.com/InterviewQ/interviewQ.htm

http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm

http://www.techinterviews.com/?p=198

http://www.techinterviews.com/?p=326

http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm

http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm

http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP

http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240

http://www.sap-img.com/abap/abap-interview-question.htm

http://www.allinterview.com/Interview-Questions/ABAP.html

check most imp link

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

Regards,

Eshwar

Former Member
0 Kudos

Hi,

Go through the following Links, here u can find example with step

by step.

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

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

Check these step-by-step links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...

Check these links also.

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

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

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

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

Regards,

Priyanka.

mahaboob_pathan
Contributor
0 Kudos

hi,

SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).

According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).

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.

________________________________________

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.

• Barcode Fonts - EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39 Barcode Fonts

Barcode printing within SAPScript

Overview of Bar coding

1. What’s a bar code?

Bar codes are machine-readable symbols made of patterns of black and white bars and stripes, or in some cases checkerboard-like grids. There are different styles of bar codes called symbologies. Code 39, UPC, and Code 128 are examples of different symbologies.

2. What’s in a bar code?

Bits of information are encoded within bar codes. The data is read by bar code scanners and is often used in conjunction with databases. Bar codes don’t require human-input, can be read by automated machines, and are virtually error-free.

3. What are bar codes used for?

Bar codes are used on anything in the retail channel destined to be scanned at the cash register. They’re also used on everything from shipping forms, labels, ID cards, direct mail pieces, and invoices.

4. How do scanners work?

Scanners look at the pattern of light and dark bars and decode a bar code, returning the string contained in them. Often this string is a look-up into a database. That’s how the grocery store cash register knows that you just bought a box of cereal for $2.59. The UPC bar code contains a number that matches a record in the store’s database. Neither the item’s name nor its price is in the bar code. It’s just a record number that references a database.

5. What’s the easiest way to make a bar code?

Using a font to create a bar code is quick and easy. You can use a font from within your favorite Microsoft Windows or Macintosh applications including databases, spreadsheets, word processors, and desktop publishing applications. Unlike graphic images, there is no storage requirement because the bar codes are made dynamically by formatting the correct string in a bar code font. We sell a complete line of bar code and OCR fonts in TrueType and Type 1 formats.

6. UPC, EAN, BOOKLAMD, & ISSN

UPC bar codes are used in the U.S. and Canada on retail items. EAN and JAN symbols are used in Europe and Japan respectively. Bookland symbols, based on ISBN numbers, are used on books. ISSN bar codes are used on non-U.S. periodicals. All of these symbologies are numeric-only, have a fixed length, and one or more check digits.

7. Code 39

Code 39 (Code 3 of 9) is the most popular symbology for ID, inventory, and tracking purposes. It has a variable length, supports alphanumeric strings, and can be printed at a variety of sizes and aspect ratios. This is the bar code used at video rental stores, on ID badges, and anywhere a simple bar code is needed. The full ASCII version supports the lower 128 ASCII characters. It is sometimes used with an optional check digit.

8. POSTNET

POSTNET bar codes are used to encode ZIP codes on U.S. mail. Unlike other bar codes, POSTNET symbols consist of bars that vary in height, not width. A check digit is appended to the bar code, which can be used for 5-digit ZIP codes, 9-digit ZIP+4 codes, or the newer 11-digit delivery point barcodes.

9. Code 128

A denser, more compact symbology that supports the lower 128 ASCII characters. Used whenever space is at a premium. Variable length strings with a mandatory check digit. Widely used in the shipping industry, it has three variations: code set A, code set B, and code set C. The latter is numeric-only and employs simple compression. There are several industry-specific subsets of Code 128.

10. Interleaved 2 of 5 & 2 of 5

Interleaved 2 of % is a numeric-only symbology that is very compact because information is encoded in both the bars and spaces. Interleaved 2 of 5 bar codes are used on corrugated boxes, in the shipping industry, and in laboratories. 2 of 5 is an older bar code that isn’t used much today.

11. Codabar, MSI-Plessey, & others

Codabar is a numeric-only symbology used by FedEX, libraries, and blood banks. MSI-Plessey is another numeric symbology used in libraries. Code 93 is a compact symbology used on electronic components. OCR-A and OCR-B are optical character recognition symbols. MICR (magnetic ink character recognition) are the symbols found on the lower left corner of checks.

12. PD 417 and other 2D bar codes

2D (two dimensional) symbologies are extremely dense bar codes that look like a crossword puzzle or a honeycomb- like matrix. PD 417 has emerged as the 2D bar code of choice. The other popular 2D symbology is Maxicode used by United Parcel Service. Because PD 417 encodes up to 1108 bytes of information, it is really a portable data file (PD), as opposed to simply being a pointer into an external database.

Smart Forms are used in SAP to create and maintain forms for mass printing. The Smart Forms offers the following advantages:

&#61656; Creating and maintaining forms require half the time.

&#61656; Adapting to forms without any programming techniques due to GUI.

&#61656; Web publishing using the generated XML output.

Migration from SAPScript to Smart Form is supported in smart forms. The important features in smart forms are as listed below:

&#61656; The smart forms allow the user to execute simple modifications to the form and in the form logic by using simple graphical tools.

&#61656; To print a form the user will need a program for the data retrieval and a smart form that contains the entire form logic. As these two are separate one should adapt the smart form if changes to the form logic is necessary. The application program passes the data via a function module interface to the smart form. When activating the smart form the system automatically generates the function module and at the runtime process this.

&#61656; The user designs the form using the graphical form painter and the graphical table painter. The form logic is represented by the hierarchical 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 any changes one has to use the Drag&Drop, Cut&Paste. These actions do not include writing of coding lines or using a script language.

&#61656; For web publishing, the system provides a generated XML output of the processed form.

&#61656; One can insert static and dynamic tables. These include the line feeds in the individual table cells, triggering events for table headings and subtotals and sorting data before output.

&#61656; The smart forms allow the user to include graphics, which can be displayed as a part of the form or as background graphics. During printout the user can suppress the background graphic as and when necessary.

&#61656; The smart forms also supports the postage optimizing.

OVERVIEW

The architecture of the smart form is given below:

In a smart form one describes:

&#61656; The layout of the form (element positions on a page).

&#61656; Individual elements to be displayed, for ex: text, graphics, addresses, tables etc.,

&#61656; The form logic, for example to read the application data from internal tables, to introduce conditions and to control the process flows.

&#61656; A form interface to transfer the application data to form definition.

When a smart form is activated , the system generates a function module that encapsulates all the attributes of the smart form.

As soon as the application program calls the function module, the smart form uses the module interface to transfer any table data previously selected and to print the form according to the form description.

Creating Forms Using SAP Smart Forms

When creating a form one must:

&#61656; Retrieve the application data

&#61656; Describe the form

&#61656; Pass the application data to the form

Retrieving the application data:

Write an ABAP program to retrieve data or include a retrieval routine into the application. This code consists of statements that select data from databases according to certain selection criteria. Store the retrieved data in internal tables, structures or variables and transfer it to the form in one step.

Describing the Form:

The user defines the form using a smart form. Use the tools of the form builder as listed below:

&#61656; Use the form painter to position the windows, graphics and addresses on a page.

&#61656; Use the PC editor to write the texts.

&#61656; Use the table painter to format the tables.

The flow control is used to print the pages and elements.

Form Logic (Introduction)

In the form builder one can describe a smart form by a set of nodes. To do this, one can build up a tree structure on the left side of the user interface.

The node global settings and its three successors form attributes, form interface and global definitions always exists for any newly created forms.

To describe the form logic, create the hierarchy under the node pages and windows.

The following rules apply to control the flow of the form output.

&#61656; The nodes in the tree structure are processed from top to bottom.

&#61656; For each node there is a tab, this can be used to link the node to a condition. If the condition is true, the system processes the node. If not, it skips the node and all its successors.

&#61656; One should define a next page for each page.

Graphical User Interface

The basic ABAP programming skills are required only in special cases like calling a function module or for complex and extensive conditions.

The SAP form builder of the smart form consists of:

&#61656; Form painter for creating the layout of the form

&#61656; PC Editor for entering texts and fields into output areas

&#61656; Navigation free for maintaining the form logic

&#61656; Table painter for creating templates and tables

&#61656; Form check

To define the text formats, one can use the Smart Styles.

The from painter:

The form painter offers the following functions:

&#61656; Design area with ruler, cursor with help lines, and he grid and main grid.

&#61656; Display of the cursor position in the ruler, which can be suppressed and set.

&#61656; Two level grid with engage function which can be customized.

&#61656; When creating, changing and moving a window, the window size appears in the ruler.

&#61656; Detachable toolbar containing the most important functions.

&#61656; Autoscrolling when moving windows, placing windows in the background.

&#61656; Zoom factors that can be set to any value and autozooming of the design area to the window size.

&#61656; Sensitive context menu.

&#61656; Placing a scanned graphic into the background of the design area.

The PC Editor:

The pc editor offers the following functions:

&#61656; Enter, delete, select, cut and copy texts.

&#61656; Assign paragraph and character formats.

&#61656; Include, change and delete fields.

The Table Painter:

The table painter offers the following functions:

&#61656; Drawing lines and columns

&#61656; Inserting , cutting , copying and deleting lines

&#61656; Deleting cells

&#61656; Changing cell size and moving cell separator lines

&#61656; Splitting cells

&#61656; Selecting table patterns

Style builder:

On the left of the style builder screen consists of the predetermined nodes (header data, folder for paragraph formats, folder for character formats).

On the right one can see the maintenance screen with its tab pages. At the bottom the preview of the selected font can be viewed.

Field list and Error list:

The field list displays the following data in the form a tree structure:

&#61656; All tables, fields and structures passed via the form interface.

&#61656; System fields and the fields that are defined in the global definitions.

This allows one to check whether a correct field name has been entered or not and that the form knows the field or not. To display the field list, in the form builder choose field list On/Off.

The error list contains the list of errors and warnings displayed at the bottom of the maintenance screen.

Node types:

When a form is created, the tree structure of the form painter contains two root nodes.

&#61656; The successors of the global settings node are used to maintain form attributes, the form interface and global definitions.

&#61656; The successors of the pages and windows node to create the pages of the form, position elements on these pages, and determine the sequence on how to process these created elements.

Basic elements of a form

Creating pages:

Each form consists of one or more pages. The first page in the tree structure is the start page and the processing of the form starts with this page itself.

&#61656; Open the context menu for existing page node and choose create®page

&#61656; Enter a unique name for the node and a description

&#61656; Determine the format and the mode of the page counter on the general attributes tab

&#61656; Determine the print attributes of the page on the output options

&#61656; Determine a background graphic for the entire page on the background tab

Creating windows:

One can set the size and position of the window graphically in the form painter. There are main windows and subwindows. The difference between these two is that the output in a main window can cover several pages.

&#61656; Open the context menu for an existing page node and choose®window

&#61656; Enter a name for the node and a description

&#61656; On the general attributes indicate whether the window is a main window. If sub window wants to be created then leave the checkbox empty

Positioning texts on the form

The texts are displayed in the form using text nodes. The only exceptions are addresses. This uses its own node.

The predecessor node of the text node determines its use:

Predecessor node Used to

Sub window Position text on one or more pages

Main window Display text in relation to other nodes in the main window, it may cover several pages

Template Displays texts for table cells of a static table

Table Display table contents

Header and footer Display column headings and grand totals in tables

Event node Display subtotals in a table

There are three text types:

&#61656; Text element : to enter new text in the PC editor

&#61656; Text module : to include a text module

&#61656; Include text : to include an existing SAPscript text

Entering texts in PC editor:

Ø To create a text node call the context menu for that node in the tree structure that should receive the text, then choose->text

&#61656; Enter a unique name for the node and the node description

&#61656; On the general attributes tab choose text element as text type

&#61656; Enter the text in the PC editor

&#61656; In the text node box choose whether the text should be started with a new paragraph or only in a new line

Including text modules:

Text module of the text node is used to refer to an existing text module in the system. The text modules can be used in two ways:

&#61656; Refer to the text module. The text then appears read-only in the PC editor and is included when the form is printed.

&#61656; Copy the text module. The system then copies the text of the module and automatically converts the text node into an editable text element.

&#61656; To create a text node , call the context menu for that node in the tree structure that shall contain the text and choose create->text

&#61656; Enter a unique name for the node and a description

&#61656; On the general attributes tab select the text type text module

&#61656; Enter the name of the text module in the text name field

Including SAPscript texts:

One can use the text type include text node to refer to a SAPscript text that already exists in the system. To identify the text the text name, object, id and the language is needed.

&#61656; To create the text node call the context menu for that node in the tree structure that shall receive the text and choose create -> text

&#61656; Enter a unique name for the node and the node description

&#61656; On the general attributes tab choose include text as text type

Inserting addresses:

One can use the address node to insert an address into the form. This guarantees that the address is formatted according to the postal rules of the sender country.

&#61656; To create an address node , call the context menu for that node in the tree structure that one wants to contain the text and choose create->text

&#61656; Enter a name for the node and a description

&#61656; Determine the address type on the general attributes tab

&#61656; For organizational addresses one has to specify the address number, for any other one has to specify the person number and the address number

&#61656; In the box additional addresses one can maintain other attributes to specify how to display the address

Printing graphics:

Goto tcode se78 to import graphics into the SAP system. The transaction imports the graphics and stores it in the BDS (business transaction server) and then it can be displayed in the form.

&#61656; To create the graphic node , call the context menu for that node in the tree structure and choose create->graphic

&#61656; Enter a name for the node and the description

&#61656; On the general attributes determine whether a colored or a black and white

&#61656; Use the fields object , id and name to identify the graphic

Displaying a static table

Use node type template to display a table whose layout and size is determined before the runtime of the print program.

To create a template define a table layout to determine the cell structure for each line. The cells are used to display the cell structure for each line. The cells are used to display the contents of the successor nodes of the template node. This allows one to position text and a graphic side by side.

The template node is also used for label printing. To use a template one must do the following:

&#61656; Define the table layout

&#61656; Display the contents in the table cells

Define the table layout:

The table layout is used to determine the following,

&#61656; The number of lines and cells

&#61656; The height of each cell

&#61656; The width of each cell

&#61656; The alignment of the table in the window

&#61656; Whether and where to display separator lines or frames

Create a template node and maintain the attributes width, horizontal alignment and vertical alignment.

Use the table control on the template tab to define the layout of the lines. Each line of the template must have a definition.

Use the pattern box to select the desired table pattern.

Displaying contents in cells:

The template node defines the table layout. The successor nodes of the template determine the data to be displayed in the table cells.

Combining nodes:

The more extensive the form becomes, the lesser clear becomes the node hierarchy in the tree structure. To avoid this one can combine the related nodes by appending them under a folder node.

llet" style="margin-left:1.75in;text-indent:-.25in;mso-list:l8 level1 lfo23; tab-stops:list 1.75in">&#61656; The width of each cell

&#61656; The alignment of the table in the window

&#61656; Whether and where to display separator lines or frames

Create a template node and maintain the attributes width, horizontal alignment and vertical alignment.

Use the table control on the template tab to define the layout of the lines. Each line of the template must have a definition.

Use the pattern box to select the desired table pattern.

Displaying contents in cells:

The template node defines the table layout. The successor nodes of the template determine the data to be displayed in the table cells.

Smart forms is very similar to SAP scripts . This is also a tool which is extensively used to creat layouts and then a separate print program is created. This print program is used to create the output internal table which ibn turn is thrown to the smart form where the field values are displayed .

In the print program mentioned below ...an output internal table is created by populating certain fields from database tables into it . Once the output internal table is ready , then the function module SSF_FUNCTION_MODULE_NAME is called . Here , in the import parameters , the name of the smartform is given . The output of this function module is the name of another function module .

This function module is again called , in this examplpe , the name of the function module is "/1BCDWB/SF00000007" .

The output of this function module is the output internal table that we have created earlier in the program i.e.. I_YCUSTOMER .

So , in case of smart forms , we use 2 function modules for the processing of the smartform. Once this internal table is thrown from the smart form , then in the layout , the required fields can be displayed .

This is how a smartform works.

REPORT YSMARTLOK .

TABLES: YCUSTOMER.

DATA : FM_NAME TYPE RS38L_FNAM.

TYPES : BEGIN OF T_YCUSTOMER,

YKUNNR LIKE YCUSTOMER-YKUNNR,

YLAND1 LIKE YCUSTOMER-YLAND1,

YNAME1 LIKE YCUSTOMER-YNAME1,

YNAME2 LIKE YCUSTOMER-YNAME2,

YORT01 LIKE YCUSTOMER-YORT01,

END OF T_YCUSTOMER.

DATA : I_YCUSTOMER TYPE STANDARD TABLE OF T_YCUSTOMER WITH HEADER LINE .

DATA : WA_YCUSTOMER TYPE T_YCUSTOMER.

SELECT * FROM YCUSTOMER INTO TABLE I_YCUSTOMER.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'YSMARTLOK'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

  • IMPORTING

FM_NAME = FM_NAME

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

CALL FUNCTION '/1BCDWB/SF00000007'

  • 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

I_YCUSTOMER = I_YCUSTOMER

  • 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.