Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Sap Script is pre defined template for the reports to be redirected to other devices[
printers / fax machine etc ].
by default SAP Script has a bug, as data from sap script text editor is displayed in ABAP
output device for twice, due to file buffering problem.
1) SE71 -> NAME THE SAPSCRIPTS ( Z/Y ) -> CREATE -> ENTER SHORT TEXT
IN ADMINISTRATIVE DATA -> CLICK ON PARAGRAPH SETTINGS TO CREATE
A PARA GRAPH -> NAME PARAGRAPH -> ENTER SHORT TEXT -> SAVE SAP
SCRIPT -> COME BACK TO HEADER DATA BASIC SETTING -> ENTER
DEFAULT PARAGRAPH CREATED -> CLICK ON LAYOUT FROM APPLICATION
TOOLBAR -> OPENS LAYOUT EDITOR -> RIGHT CLICK ON MAIN WINDOW ->
CHOOSE EDIT TEXT -> OPENS PC EDITOR WINDOW , CHANGE THIS EDITOR
TO LINE EDITOR USING MENU "GOTO" -> CHANGE EDITOR -> IN THE FIRST
LINE DEFINE ELEMENT IN COMMAND LINE ENTER "/E" -> NAME THE
ELEMENT IN LINE EDITOR, AFTER ELEMENT DEFINITION ENTER ACTUAL
TEXT TO BE DISPLAYED ON REPORTS -> COME BACK -> SAVE -> ACTIVATE.
4TH MARCH
Send the data of internal table to the SAP script by displaying the company address
and logo and customer transactional details.
1 . Declere an internal table in SE38 get data from data base into itab.
Sending itab to the sap scripts.
data : itab like vbak occurs 0 with header line.
kunnr:
itab-vbeln
itab-erdat
itab-erzet
REPORT ZGET_VBAK_DATA .
Element in sap scripts are used to avoid data duplication from the sap script form
templates.
Elements even can be used to identify the area in sapscript forms. Abaper can define
multyple elements in Sap scripts.
But for 4.7 if we use only one write_form can invoke specified element data. But it
can't call other elements data defined sap script.
If Window is specified as Main Window, default existing window can be deleted and
abaper can invoke windows created as main.
Note : If a window is specified as main window then only can invoke from invoking
programs.
if the main window properties are not added by abaper then default will be treated as sub
windows with type as "variable" window or "constant" window.
These sub windows will be called automatically when ever main window is invoked.
To invoke main window we need to use "write_form" function module, single write_form
is enough to call all sub windows defined in the sap scripts.
If the window is specified as Main window then abaper has to call the second window
as main with write_form.
Generating boxes in sap scripts.
5TH MARCH
SMARTFORMS OPTIONS
SMARTFORM IS A COLLECTION OF FORMS, STYLES AND TEXT STYLES.
FORM IS A COLLECTION OF
I) GLOBAL SETTINGS
IS A COLLECTION OF
1) FORM ATTRIBUTES
Is the option is similer to sapscript header data. It controls the saved
information of the sap script and output settings as output page format and page settings.
2) Form Interface
Is the option controls the function module arguments as
"import","export","tables" and "exceptions". Using this option abaper can declare
variables in smart forms.
3) Global definitions
if any global definition to be provided locally to the smartforms with out
taking any arguments from invoking program we can use this option. This option is
similer to "MPP" top include file.
smartforms -> enter name in form (zfrm9301) -> create -> enter short descriptions in
form attributes -> double click on form interface to define any arguments for the
smartforms -> expand pages -> and expand windows -> right click on window -> create
-> text component opens an interface in right panel-> enter text in PC editor or line editor
as a part of sapscript editor -> save the smartform -> activate -> and execute the
smartform to generate function module.
Note : function module name generated by sap for smartforms are autogenerated by sap.
using the name of function module assgned with smartforms can be called by any
program to redirect their data to other devices.
invoking program
7TH MARCH
Smart Forms :
Advanced concepts of SAP Scripts.
Smartform = sap scripts + FM + MPP features.
1) SMARTFORMS , DEFAULT
i) No Bugs
ii) Independent on Elements.
2) SMARTFORMS WITH ARGUMENTS.
3) SMARTFORMS WITH IMAGES.
i) table
Boxes and Shadings , color settings, Patterns for boxes and Also Line types.
ii) data
Abaper can use Internal table loop at <itab> options from this to display the data
in main area.
iii) output options
Controls the style to be added for the table.
i) Table Option:
a) Table Painter
controls the patterns, box shadings and colors to be applied for table data.
b) Details
Table Width and line Types , Number of fields in a line.
This Line type can be added for Header, Main and Footer data of Table Object.
click on data tab strip -> define loop statement -> declare Ktab Into Ktab ( where ktab is
internal table defined in form interface for KNA1) table.
for the table object assign line type for Header and Main Area using following
right click on Header of table1 Object -> create -> table line -> open an interface ->
specify line type as "%ltype1" -> based on number of columns defined in line type SAP
adds fields under Header data of Table object -> fields added in the form of cells , each
cell represents a column to be display in the header area.
A cell is also a container of "text" , "graphics" or Address window -> for Each cell
abaper can add text
( Internally Sap Scrit Data )
Repeat the same step for main area and footer data also.