A Beginners-Guide-SAP-Smart-Forms

  • View
    1.964

  • Download
    1

Embed Size (px)

Text of A Beginners-Guide-SAP-Smart-Forms

Menu path: SAP Menu-- Tools ---- Form Printout ---- Smart Forms

Table of Contents

IntroductionPurpose of this Introduction.3Who will benefit.

3Prerequisites

3refresher on sapscript

3

Smart Forms: What is it?3SmartForms Vs SAP Script

4Main Advantages of Smart Forms4features introduced by sap in smart forms

4

architecture of sap smartform

5

hands on screen sequence

smartforms..

7

page and windows

12

smartstyle28

template

38

config setting...54

refresher on smartforms : summary

58

Introduction

Purpose of this Introduction

This introduction is intended to allow a quick entry into the work with the Smart Forms. SAP introduced SmartForms in 1998 to overcome the limitations in SAP Scripts. This document would help a beginner to start from scratch and generate his own Smart Forms. There is a self help screen sequence to guide the beginners to create Smartforms of their own and gain confidence

Who will benefit

All SAP users. Most of the new projects would be using this technology. Clients would increasingly demand smartforms to be used rather than sapscript.

Prerequisites

The user should know SAP Script. In this document I would briefly compare SAP script with SAP SMART Forms, highlighting the prominent features before moving on to how to work with SMART Forms, which is our focus.

SAP Script is SAP text management and form printing tool. By this we make a output look beautiful which is cumbersome to do by a report program.SAPscript consists of the following components:

An editor for entering and editing text Styles and forms for designing the print layout

A composer, which is the central module for output formatting

A programming interface for integrating SAPscript components in your own application programs and programming the output using forms

Various database tables for storing texts, styles and forms

Smart Forms: What is it?

We use SAP Smart Forms to create and maintain forms for mass printing in SAP Systems. SmartForms are easier to develop, maintain and transport than SAP Script.As output medium SAP Smart Forms support a printer, a fax, e-mail, or the Internet (by using the generated XML output).In addition to the tool, SAP delivers a selection of forms for central business processes like forms in the applications SD,FI, HR and CRM of the R/3 Release.

SmartForms Vs SAP Script

Multiple page formats are possible in smartforms which is not the case in SAPScripts

It is possible to have a smartform without a main window .

Labels cannot be created in smartforms.

Routines can be written in smartforms tool.

Smartforms generates a function module when activated.

Main Advantages of Smart Forms:

SAP Smart Forms offer the following advantages:

Creating and maintaining forms requiring half the time

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

Web Publishing using the generated XML output

The SAP Smart Forms has replaced the SAPscript forms. SAPscript forms will also be supported in the future; you can use them without making any changes for years to come. You can use SAPscript texts in the Smart Forms. Migration of SAPscript forms into Smart Forms is supported. Features introduced by SAP in Smart Forms:

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

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

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 we have to use the Drag&Drop, Cut&Paste. These actions do not include writing of coding lines or using a script language.

For web publishing, the system provides a generated XML output of the processed form.

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

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.

The smart forms also supports the postage optimizing.

In a smart form we describe:

The layout of the form (element positions on a page).

Individual elements to be displayed, for ex: text, graphics, addresses, tables etc.,

The form logic, for example to read the application data from internal tables, to introduce conditions and to control the process flows. 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.

All these will become clearer once we go through the self help screen sequence in the subsequent pages.Hands On Guide: This is a self-help guide lucidly illustrated with tips, meant for beginners.

We first go to SAP Menu: The path is SAP Menu ( Tools ( Form Printout ( Smart Forms

The transaction code (T code) : Smart Forms

Lets use forms starting with BC as SAP has created these for training purposes.

Lets use BC470_FLOWS to demonstrate the various elements of Smart Forms.

We now arrive at the Display Form screen, which is divided, into 3 main sections:

Navigation window, Form painter and Maintenance window. We will discuss each of these in detail

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.

Global setting is at the form level. You can access these from anywhere in the smart form

You can change the language by changing this field in Form Attribute: this will change the text

language (but not the layout).

Form interface tells us what are the import and export parameters, exceptions, tables etc that we

pass to the function module. These we can add but we cannot change/modify the default values

Lets add a Global Database for practice. I have created NUMC_DATE through TYPES

new type created in TYPES

Global definition is what we define in smart form. We can define our own variable, constants etc. that we can access in the code that we write. Here we would use we of the types, which we have defined earlier (char_fifteen) to declare CLERK.

Diff between TYPE and TYPES

TYPES: What we create: char, constants etc. TYPE is used to choose from standard SAP data type

Pages and Windows

In smart form, page is at the highest level: SAP processes the first page, next page and then Terms

General Terms and Conditionsif u wish to change the order, just drag and drop the sequence.

1 OF 10 ETC

initialize or increase counter

Conditional breaknext page of next page become term page (SAP stops processing /

execution of this page)

U can define print mode globally for all the pages instead of declaring this at each page

Now lets create our own smart form Lets copy a standard smart form [BC470_FLOWS]of SAP

and create ZBC470_FLOWS_AVID. Then we would play around with its different elements.

Lets create a new page in our object.

This is the page we created. Lets name it as Test1.

I have changed the sequence by dragging and drop. Now Test1 appears before the First Page.

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. We take a detour from the smartform screen and open Form Graphics screen. Transaction code: Se78

Now lets go back to the main screen Background Pic

Here there are 3 options : Black and white, color and dynamic bitmap pictures. We name the background picture and choose the determine dynamically option.

Note: Runtime color .use the field with ampersand.

Now after the Page, we create a new Window. There will be output options, attributes and conditions in each window.

Cannot use main in this field because SAP creates Main by default and doesnt allow main as name.

You can have only we main page which u can stretch to multiple pages (you can copy and stretch it) but you can have multiple secondary windows.

Inside the main window we can add text as introduction to customize the form output. In Smart Form what you see is what you get.

In the output, we have the option of sizing and positioning the main window along with different shading and color choices.

We can have conditions.to be execut