Documente Academic
Documente Profesional
Documente Cultură
BY ----Arjun
Overview
SMART FORM
Printer
ABAP
Application Function
program module
(generated)
Fax
Database
Sapscripts
Sapscripts are clinet dependent.
Smartforms
Smartforms are client independent.
Create a Smartform.
Click on Environment
Function module name.
That means, Once you create a smartstyle, we can reuse the same
COMPONENTS OF SMARTFORMS:-
1.Global Settings
Form Attribute
Form Interface
Global Definition
who created,Date,time,
package,translate options,
default smartstyle,
page
Window
Graphic
Address
Text
Table
-- Header
-- Body
Template
Folder
Program Lines
Alternative
Command
Loop
This will contain all the pages and the windows, which are used in
the smartform.
Selected node
Attributes
Navigation tree Form Painter
(of selected node)
Click on Create.
Name is &V_NAME&.
Date is &SFSY-DATE&
Time is &SFSY-TIME&
Create
Window
Create
Text
Template is a node which has a fixed layout i.e. fixed no. of rows
and columns.
Templates are same as table i.e. Templates will not expand whereas
Tables expand dynamically with no. of records.
Create
Template
%Template
Click on Pencil Icon and Divide %c1 into 3 Columns and 2 rows
A Popup is displayed .
Create
Text
Create
Programlines
V_NAME = ‘DEL’.
SAVE,ACTIVATE .
TextModules In Smarforms:-
Interactive ALV
hierarchical ALV
Blocked ALV
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 68
» ALV with Structures
Business Requirement
STEPS
Structure Name
Program Name
Itab Name
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 69
FieldCatelog: It is an int.Table which contains the list o the fields to
be displayed in ALV Report
1. COL_POS = 1.
C – Indicates color
X – Color Numbers
Y – Backgroundcolor – 1 On BG color
0 off BG color
Generation of Fieldcatelog :
1)Manually
2)Automatically by using FM
Declare the internal table and work area for the field catalog
Fill the fieldcatelog Itab with all fields and their corresponding
properties.
wa_fcat-col_pos = 1. "v_pos.
wa_fcat-fieldname = 'KUNNR'.
*wa_fcat-tabname = 'I_KNA1'.
WA_FCAT-SELTEXT_L = 'CUST_NUM'.
*WA_FCAT-EDIT = 'X'.
WA_FCAT-EMPHASIZE = 'C610'.
WA_FCAT-REF_TABNAME = 'KNA1'.
Call the function module and Export the field catalog in internal table
as exporting parameters to IT_FCAT.
Steps:
wa_layout-zebra = 'X'.
wa_layout-colwidth_optimize = 'X'.
* wa_layout-edit = 'X'.
* wa_layout-no_vline = 'X'.
wa_layout-no_hline = 'X'.
WA_FCAT-COL_POS = ’5’.
WA_FCAT-FIELDNAME = 'NETWR'.
WA_FCAT-SELTEXT_M = 'NETPRICE‘.
WA_FCAT-DO_SUM = 'X'.
APPEND WA_FCAT TO I_FCAT.
WA_SORT-FIELDNAME = 'VBELN'.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO I_SORT.
Declare the internal table and work area for the sorting
WA_SORT-FIELDNAME = 'VBELN'.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO I_SORT.
But this is obsolete because, the function module uses the old
syntax for declaring internal tables
I.e. the internal table should be created as below and all the
fields in the internal table must be declared using LIKE statement not
the TYPE statement.
DATA: BEGIN OF I_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
MEINS LIKE MARA-MEINS,
END OF I_MARA.
Top-Of-Page
End-Of-List
At User command
Set PF status
STEP1: “OAER” is the T-Code for upload the Logo’s into SAP.
=> Go to OAER Tcode.
ClassName – Pictures
ClassType – OT
ObjectKey – ARJUN
Click on the Standard Document Types
Double Click on the SCREEN Option for browse the image.
STEP4:
Call Function ‘REUSE_ALV_GRID_DISPLAY’
Exporting
I_Callback_Programme = SY – REPID
IT_Events = I_EVENTS
Tables
T_OutTab = I_MARA.
Write the code in Subroutines for Header data and Item Data.