Вы находитесь на странице: 1из 77

- 1 -

ABAP FAQs on Reports / Scripts / BDC / Dialogs


ABAP Reporting
SAP TERMINOLOGY
Master data is a collection of information about a person or an object, e.g. a cost object, vendor, or G/L
account. For example, a vendor master record contains not only general information such as the vendors
name and address, but also specific information, such as payment terms and delivery instructions. Generally
for end users, master data is reference data that you will loo up and use, but not create or change.
Transactional data is data related to a single business event such as a purchase re!uisition or a re!uest
for payment. "hen you create a re!uisition, for example, #$% creates an electronic document for that
particular transaction. #$% gives the transaction a document number and adds the document to the
transaction data that is already in the system. "henever you complete a transaction in #$%, that is, when
you create, change, or print a document in #$%, this document number appears at the bottom of the screen.
Workflo
$ routing tool in #$% that forwards documents for review or approval. For example, a re!uisition that needs
to be approved is sent to the appropriate approver&s inbox. "orflow is also used to route journal vouchers,
credit card charges, and other documents in #$%.
!ost O"#ect$
$ 'ost (bject collects expenses and revenues for a particular purpose, such as a research project. )n #$%
there are three types of cost objects* 'ost 'enter, )nternal (rder, and "+# ,"or +readown #tructure-
.lement ,see below for definition-.
!ost !enter$
General or operating Cost Objects are nown in #$% as 'ost 'enters. 'ost 'enters are budgeted on the
fiscal year%
Internal Order$
$ non/sponsored 'ost (bject ,for example, funding from the 0)1 %rovost- used to track costs over periods
other than fiscal years. )nternal (rders are often created to trac gifts or endowments at 0)1.
WBS Ele&ent$ "+# .lements are funded by outside sponsors and are used to trac costs of a particular
research project over the entire span of its activity. 1hey may also be created to trac other sponsored
activities, such as gifts.
G'L Acco(nt$
G/L accounts are also called 'ost .lements in #$%. 1hey are a classification by expense or revenue type.
)n the '( ,'ontrolling- module of #$%, the term 'ost .lement is used. )n the F)
,Financial- module, the term G/L $ccount is used. 1hese terms are used interchangeably for reporting,
re!uisitions, and journal vouchers.
)ata"ase ta"les and open S*L
Add a single record to a database table
insert into 2database table3 values 2wor area3
Inserting all lines from an internal table into a database table
insert 2database table3 from table 2internal table3
!elete all records
#elect 4 from 5mellemtab.
delete 5mellemtab.
- 2 -
endselect.
!eleting records using records from an internal table
delete employees from table itab.
* + A
BASIS LAYER
W,at are t,e central interfaces of t,e R'- s.ste& /
/ %resentation interface
6atabase interface
(perating system interface
W,ic, interface controls ,at is s,on on t,e p%c% /
- %resentation interface
W,ic, interface con0erts S*L re1(ire&ents in t,e SAP de0elop&ent s.ste& to t,ose of t,e
data"ase /
- 6atabase interface
W,at is SAP dispatc,er /
/ #$% dispatcher is the control agent which manages the
resources for the 7/8 applications.
W,at are t,e f(nctions of dispatc,er /
/ "#ual distribution of transaction load to the work processes
$anagement of buffer areas in main memory
)ntegration of the presentation levels
(rgani5ation of communication activies
W,at is a ork process /
/ $ wor process is where individual dialog steps are actually processed and the wor is
done. .ach wor process handles one type of re!uest.
Na&e 0ario(s ork processes of R'- s.ste& /
9- 6ialog or (nline , processes only one re!uest at a time -
:- +acground , started at a specified time -
8- ;pdate , primary or secondary -
<- .n!ue, loc mechanism -
=- #pool , generated online or during bac ground processing For printing -
W,at are t,e t.pes of 2pdate re1(ests /
/ $n update re!uest can be divided into one primary %&'( and several )econdary update
components %&*(. 1ime/critical operations are placed in >9 component and those whose timing are
less critical are placed in >: components. )f a >9 update fails, >: components will not be
processed.
W,at are t,e roll and page areas /
/ 7oll and page areas are )A+ ,-. buffers used to store
user contexts , process re!uests - . 1he #$% dispatcher assigns
process re!uests to wor processes as they are received. )f
the wor process is unavailable the process re!uests are !ueued in the roll and page
areas.
%aging area holds data from the application programs.
7oll area holds data from previous dialog steps and data that characteri5es user.
W,at is a Spool re1(est /
- 3 -
/ #pool re!uests are generated during dialog or background processing and placed in the spool
database with information about the printer and print format. 1he actual data is placed in the 1em
#e ,1emporary #e!uential objects-.
W,at are t,e different data"ase integrities /
- #emantic integrity
/ 7elational integrity
3 %rimary ey integrity
3 >alue set integrity
3 Foreign ey integrity and
/ (perational integrity.
)ATA )I!TIONARY %
T.pe of a ta"le or str(ct(re

1he table type determines how the logical table description defined in
the $+$%/< 6ictionary is reproduced on the database.

1here are the following table types*
o transparent table
o structure
o append structure

For internal purposes, such as storing control data or update texts,
there are in addition the following table types*
o pooled table
o cluster table
o generated view structure

Transparent ta"le

1here is a physical table on the database for each transparent table. 1he
names of the physical tables and the logical table definition in the
$+$%/< 6ictionary correspond.

$ll business data and application data are stored in transparent tables.

Str(ct(re

?o data records exist in the database for a structure. #tructures are
used for the interface definition between programs or between screens and
programs.

Append str(ct(re

$n append structure defines a set of fields which belong to another table
or structure but which are treated in the correction administration as
its own object.
$ppend structures are used to support modifications.

Pooled ta"le

%ooled tables can be used to store control data ,e.g. screen se!uences,
program parameters or temporary data-. #everal pooled tables can be
combined to form a table pool. 1he table pool corresponds to a physical
table on the database in which all the records of the allocated pooled
tables are stored.

!l(ster ta"le

- 4 -
'luster tables contain continuous text, for example, documentation. #everal cluster tables can be
combined to form a table cluster. #everal logical lines of different tables are combined to form a physical
record
in this table type. 1his permits object/by/object storage or
object/by/object access. )n order to combine tables in clusters, at least
parts of the eys must agree. #everal cluster tables are stored in one
corresponding table on the database.

Generated 0ie str(ct(re

)n activation a structure is generated for a view. 1his structure serves as interface for the runtime
environment. )t does not generally appear in
the $+$%/< 6ictionary.
W,at is a )ata !lass/
1he 6ata class determines in which tablespace the table is stored when it
is created in the database.
W,at is a Si4e !ategor./
1he #i5e category describes the probable space re!uirement of the table
in the database.
5o Man. t.pes of si4e categories and data classes are t,ere/
1here are five si5e categories ,@/<- and 99 data classes, only three of
which are appropriate for application tables*
/ $%%L@ / 0aster data ,data fre!uently accessed but rarely updated-
/ $%%L9 / 1ransaction data ,data that is changed fre!unetly-
/ $%%L: / (rganisational data ,customi5ing data that is entered when system is
configured and then rarely changed-
W,at are control ta"les/
1he values specified for the si5e category and data class are mapped to
database/specific values via control tables.
W,at is t,e f(nction of t,e transport s.ste& and ork"enc, organiser/
1he function of the transport system and the "orbench (rgani5er is to
manage any changes made to objects of the $+$%/< 6evelopment "orbench
and to transport these changes between different #$% systems.
W,at is a ta"le pool/
$ table pool ,or pool- is used to combine several logical tables in the
$+$%/< 6ictionary. 1he definition of a pool consists of at least two ey
fields and a long argument field ,>$76$1$-.
W,at are pooled ta"les/
1hese are logical tables which must be assigned to a table pool when they
are defined. %ooled tables can be used to store control data ,such as
screen se!uences or program parameters-.
W,at is a ta"le cl(ster/
$ table cluster combines several logical tables in the $+$%/< 6ictionary.
#everal logical rows from different cluster tables are brought together
in a single physical record. 1he records from the cluster tables
assigned to a cluster are thus stored in a single common table in the
database.
W,ic, o"#ects are independent transport o"#ects/
6omains, 6ata elements, 1ables, 1echnical settings for tables,
#econdary indexes for transparent tables, #tructures, >iews,
- 5 -
0atchcode objects, 0atchcode )6s, Loc objects.
W,at are t,e )ata t.pes of t,e e6ternal la.er/
$''%, 'A$7, 'L?1, ';BC,';77, 6$1#, 6.', FL1%, )?19,)?1:, )?1<, L$?G, L'A7,L7$",
?;0', %7.', D;$?,7$" ,1)0#, ;?)1, >$7'.
W,at are t,e )ata t.pes of t,e ABAP'7 la.er/
%ossible $+$%/< data types*
'* 'haracter.
6* 6ate, format CCCC0066.
F* Floating/point number in 6(;+L. %7.')#)(? ,E bytes-.
)* )nteger.
?* ?umerical character string of arbitrary length.
%* $mount or counter field ,pacedF implementation depends on hardware
platform-.
#* 1ime stamp CCCC0066AA00##.
1* 1ime of day AA00##.
>* 'haracter string of variable length, length is given in the first
two bytes.
G* Aexadecimal ,binary- storage.
5o can e set t,e ta"lespaces and e6tent si4es /
Cou can specify the extent si5es and the tablespace ,physical storage
area in the database- in which a transparent table is to be stored by
setting the si5e category and data class.
W,at is a data dictionar. /
6ata dictionary is a central source of data in a data management system. )ts main function is to support
the .)t has details about
/ "hat data is contained H
/ "hat are the attributes of the data H
/ "hat is the relationship existing between the various data elements H
W,at f(nctions does a data dictionar. perfor& /
)n a data management system, the principal functions performed by the data dictionary are
/ 0anagement of data definitions
/ %rovision of information for evaluation
/ #upport for software development
/ #upport form documentation
/ .nsuring that the data definitions are flexible and up/to/date.
A field containing c(rrenc. a&o(nts 8data t.pe !2RR9 &(st "e assigned to a reference ta"le and a
reference field% E6plain%
$s a reference table, a system table containing all the valid currencies is assigned or any other table which
contains a field with the currency ey format. 1his field is called as reference field.
1he assignment of the field containing currency amounts to the reference field is made at runtime. 1he
value in the reference field determines the currency of the amount.
W,at is t,e significance of Tec,nical settings 8specified ,ile creating a ta"le in t,e data
dictionar.9 /
+y specifying technical settings we can control how database tables are created in the database.
1he technical settings allows us to
/ optimi5e storage space re!uiremnets
/ table access behaviour
/ buffering re!uired
/ changes to entries logged
- 6 -
W,at is t,e significance of )eli0er. !lass /
/ 1he delivery class controls the degree to which the #$% or the customer is responsible for table
maintenance
/ whether #$% provides the table with or without contents.
/ determines the table type.
/ determines how the table behaves when it is first installed, at upgrade, when it is transported,
and when a client copy is performed.
W,at is t,e &a6i&(& n(&"er of str(ct(res t,at can "e incl(ded in a ta"le or str(ct(re
/ ?ine.
W,at are t,e to &et,ods of &odif.ing Sap standard ta"les /
/ $ppend #tructures and
/ 'ustomi5ing )ncludes.
W,at is t,e difference "eteen a S("str(ct(re and an Append Str(ct(re /
/ )n case of a substructure, the reference originates in the table itself, in the forma of a statement
.include... .
- )n case of an append structure, the table itself remains unchanged and the refrence originates
in the append structure.
W,at are t,e to a.s for restricting t,e 0al(e range for a do&ain /
/ +y specifying fixed values.
/ +y stipulating a value table.
W,at is a Matc, !ode /
0atch 'ode is a tool to help us to search for data records in the system. 0atch codes are an efficient and
user/friendly search aid where ey of a record is unnown.
W,at are t,e to le0els in defining a Matc, !ode /
/ 0atch 'ode object
/ 0atch 'ode )d.
W,at is t,e &a6i&(& n(&"er of &atc, code Id:s t,at can "e defined for one Matc, code o"#ect /
/ 8I. $ match code )d is a one character )6 which can be a letter or a number.
!an e define o(r on Matc, !ode I):s for SAP Matc,codes /
Ces, the numbers @ to J are reserved for us to create our own 0atch 'ode )6s for a #$% defined
0atchcode object.
W,at is an 2pdate t.pe it, reference to a Matc, code I)/
)f the data in one of the base tables of a matchcode )6 changes, the matchcode data has to be updated. 1he
update type stipulates when the matchcode is to be updated and how it is to be done. 1he update type also
specifies which method is to be used for +uilding matchcodes . Cou must specify the update type when you
define a matchcode )6.
W,at are con0ersion ro(tines /
- ?on standard conversions from display format to sap internal format and vice/versa are
implemented with so called conversion routines.
Aggregated O"#ects
>iews, matchcodes, and loc objects are also called aggregate objects because they are formed from
several related tables.
W,at is a ;ie /
- 7 -
/ $ view is a logical view on one or more tables. $ view on one or more tables i.e, the data from a view
is not actually physically stored instead being derived from one or more tables. $ view can be used to
summari5e data which is distributed among several tables
5o &an. t.pes of ;ies are t,ere /
- )ata"ase ;ie 8SE<<9
6atabase views are implement an inner join, that is, only records of the primary table ,selected via the
join operation- for which the corresponding records of the secondary tables also exist are fetched.
)nconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
)n database views, the join conditions can be formulated using e!uality relationships between any base
fields. )n the other types of view, they must be taen from existing foreign eys. 1hat is, tables can only
be collected in a maintenance or help view if they are lined to one another via foreign eys.
- 5elp ;ie 8 SE=79
Aelp views are used to output additional information when the online help system is called.
"hen the F< button is pressed for a screen field, a chec is first made on whether a matchcode is
defined for this field. )f this is not the case, the help view is displayed in which the chec table of the
field is the primary table. 1hus, for each table no more than one help view can be created, that is, a
table can only be primary table in at most one help view.
- Pro#ection ;ie
%rojection views are used to suppress or mas certain fields in a table ,projection-, thus minimi5ing the
number of interfaces. 1his means that only the data that is actually re!uired is exchanged when the
database is accessed.
$ projection view can draw upon only one table. #election conditions cannot be specified for projection
views.
- Maintenance ;ie , SE=7 9
0aintenance views enable a business/oriented approach to looing at data, while at
the same time, maing it possible to maintain the data involved. 6ata from several
tables can be summari5ed in a maintenance view and maintained collectively via this
view. 1hat is, the data is entered via the view and then distributed to the underlying
tables by the system.
W,at is Locking /
- "hen two users simultaneously attempt to access the same data record, this is synchronised by a
loc mechanism.
"hen dialog transactions are programmed, locs are set and released by calling certain function modules.
1hese function modules are generated automatically from the definition of so/called loc objects in the
$+$%/< 6ictionary.
1o synchroni5e the access to a table by setting and removing locs, a Loc object has to be defined in the
$+$%/< 6ictionary. $ctivating the loc object automatically creates function modules for setting and
removing locs. 1hese function modules must be included when programming interactive transactions.
/ock $echanism
1o set locs, a loc object must be defined in the $+$%/< 6ictionary. )n this loc object, those tables in
which data records are to be loced by calling a loc are determined. $ll tables included in a loc object
must be connected to each other via foreign eys. 1he ey fields of the tables in a loc object form the Loc
arguments for the tables. 1he loc arguments are the basis for formulating the logical condition for
identifying the records to be loced.
- 8 -
"hen activating this loc object, two function modules+ with the names .?D;.;.K2(bjectKname3 and
6.D;.;.K2(bjectKname3 are generated.
E6a&ple $
+roblem
Cou wish to prevent a user from being able to change the name of a course or the name of the professor
with responsibility for the course at a time when another user is editing the course description ,which
contains this information-.
)olution
1he problem described above can be solved by defining a loc object .K;B;7#. 1his is done by defining
primary and secondary tables in the loc object. 1able ;B;7# is chec table of table ;B7#+, so ;B;7#
should be selected as primary table and ;B7#+ as secondary table of the loc object.
1he Lock arg(&ent in this case is the field combination F$+?7, B7#?7, and #%7$# ,i.e %rimary Bey
'ombination-.
1he Loc mode #hared is to be selected here. 1his allows several users to access the data
simultaneously in display mode.
1he loc mode in the generated function modules for setting ,.?D;.;.K.K;B;7#- and releasing
,6.D;.;.K.K;B;7#- locs is therefore set to shared as default, but can be overridden by calling the
function modules.
)f the function module .?D;.;.K.K;B;7# is called with F$+?7 L &9& and B7#?7 L &8&, the record for
course 8 in faculty 9 is loced in table ;B;7#. Furthermore, all the course descriptions for this course are
loced in table ;B7#+ since field #%7$# was not specified when the function module was called. )n such
cases, the loc is made generically for a field which is not defined.
)f the function module 6.D;.;.K.K;B;7# is now called with F$+?7 L &9&, B7#?7 L &8& and #%7$# L
&6&, the German course description is unloced. $ll other course descriptions remain loced.
W,at is data"ase (tilit. /
- 6atabase utility is the interface between the $+$%/< 6ictionary and the underlying the #$%
system.
1he database utility is the interface between the $+$%/< 6ictionary and the relational database underlying
the #$% system. Cou can call the database utility from the initial screen of the $+$%/< 6ictionary with
;tilities M 6atabase utility.
1he database utility allows you to create, delete and convert objects from the $+$%/< 6ictionary in the
database.
MO)2LARI>ATION
W,at is Mod(lari4ation and its "enefits/
)f the program contains the same or similar blocs of statements or it is re!uired to process the same
function several times, we can avoid redundancy by using modulari5ation techni!ues. +y modulari5ing the
$+$%/< programs we mae them easy to read and improve their structure. 0odulari5ed programs are also
easier to maintain and to update.
5o can e create calla"le &od(les of progra& code it,in one ABAP'7 Progra&/
$. +y defining macros.
+. +y creating include programs in the library.
W,at are s("ro(tines/
#ubroutines are program modules which can be called from other $+$%/< programs or within the same
program.
- 9 -
W,at are t,e t.pes of S("ro(tines/
$. )nternal #ubroutines* 1he source code of the internal subroutines will be in the same $+$%/<
program as the calling procedure ,internal call-.
+. .xternal #ubroutines* 1he source code of the external subroutines will be in an $+$%/< program
other than the calling procedure.
W,at are t,e different t.pes of para&eters/
Formal parameters* %arameters which are defined during the definition of subroutine with the F(70
statement.
$ctual parameters* %arameters which are specified during the call of a subroutine with the %.7F(70
statement.
5o can one disting(is, "eteen different kinds of para&eters/
$. )nput parameters are used to pass data to subroutines.
+. (utput parameters are used to pass data from subroutines.
W,at are t,e different &et,ods of passing data/
$. 'alling by reference* 6uring a subroutine call, only the address of the actual parameter is
transferred to the formal parameters. 1he formal parameter has no memory of its own, and we
wor with the field of the calling program within the subroutine. )f we change the formal parameter,
the field contents in the calling program also change.
+. 'alling by value* 6uring a subroutine call, the formal parameters are created as copies of the
actual parameters. 1he formal parameters have memory of their own. 'hanges to the formal
parameters have no effect on the actual parameters.
'. 'alling by value and result* 6uring a subroutine call, the formal parameters are created as copies
of the actual parameters. 1he formal parameters have their own memory space. 'hanges to the
formal parameters are copied to the actual parameters at the end of the subroutine.
0he method by which internal tables are passed is 1y ,eference.
W,at is t,e difference "eteen t,e f(nction &od(le and a nor&al ABAP'7 s("ro(tine/
)n contrast to normal subroutines function modules have uni!uely defined interface.
#ub routines do not return values.
#ub routines do not return exceptions.
#ub routines cannot be tested independently.
6eclaring data as common parts is not possible for function modules. Function modules are stored in a
central library.
W,at is a f(nction gro(p/
$ function group is a collection of logically related modules that share global data with each other. $ll the
modules in the group are included in the same main program. "hen an $+$%/< program contains a '$LL
F;?'1)(? statement, the system loads the entire function group in with the program code at runtime.
.very function module belongs to a function group.
W,at is t,e difference "eteen internal ta"les and e6tract datasets/
$. 1he lines of an internal table always have the same structure. +y using extract datasets, you can
handle groups of data with different structure and get statistical figures from the grouped data.
+. Cou have to define the structure of the internal table at the begining. Cou need not define the
structure of the extract dataset.
'. )n contrast to internal tables, the system partly compresses extract datasets when storing them.
1his reduces the storage space re!uired.
6. )nternal tables re!uire special wor area for interface whereas extract datasets do not need a
special wor area for interface.
- 10 -
LOGI!AL )ATABASE%
W,at are logical data"ases/ W,at are t,e ad0antages'disad0antages of logical data"ases/
$ns */ $ Logical 6atabase is a hierarchical structure of tables. ;se the G.1 statement to process Logical
6atabases.
- L6+ consists of logically related tables grouped together N used for reading and processing data.
- $dvantages L 9. ?o need of programming for retrieval , meaning for data selection
- :. .asy to use standard user interface, have chec completeness of user input.
6isadvantages L 9. Fast in case of lesser no. of tables +ut if the table is in the lowest level of hierarchy, all
upper level tables should be read so performance is slower.
Preparation of t,e data records ". t,e L%)%B and reading of t,e data records in t,e act(al report are
acco&plis,ed it, t,e co&&and pair%
/ %ut and Get.
T,e t,ree &ain ele&ents of L)B are
/ #tructure, #elections, 6atabase %rogram.
W,at sort of ta"les one can (se in designing t,e ,ierarc,. of a L)B /
/ 1ables which are having Foreign ey relations.
T,e str(ct(re of Logical )ata"ases relfects t,e ???????????????? dependencies of ,ierarc,ical
ta"les in t,e SAP S.ste&%
3 Foreign ey
If .o( ant to i&pro0e t,e response ti&e 8 ti&e to access data 9 Logical )ataBases per&its .o( to
ac,ie0e t,is (sing ??????????????
/ >)."#.
W,at are t,e ad0antages of Logical )ataBases /
/ )t offers an easy/to/use selection screen. Cou can modify the
pre/generated selection screen to your needs. )t offers chec functions to
chec whether user input is complete, correct, and plausible.
)t offers reasonable data selections.
)t contains central authori5ation checs for
database accesses. .nhancements such as improved performance immediately apply to all
report programs that use the logical database.
Report @ORMATTING
In order to s(ppress t,e leading 4eros of a n(&"er field t,e ke.ords (sed are $
?(/O.7(.
T,e !o&&and t,at allos for 0ertical align&ent of fields one "elo t,e ot,er%
;?6.7.
In order to concatenate strings onl. for o(tp(t p(rposes t,e co&&and ????????? can "e (sed in
con#(nction it, t,e :Write: state&ent%
?(/G$%.
)ata can "e &o0ed fro& one field to anot,er (sing a :Write$: State&ent and stored in t,e desired
for&at%
17;.. "rite * 6ateK9 to 6ateK: format 66/00/CC.
In order to ,a0e "oldfaced te6t as o(tp(t t,e co&&and (sed is
"rite * 2f3 )?1.?#)F).6.
- 11 -
Backgro(nd and foregro(nd colors can "e interc,anged (sing t,e co&&and
Format inverse.
W,ic, datat.pe cannot "e (sed to define para&eters%
1ype F.
@or eac, ne e0entA t,e s.ste& resets all for&atting options to t,eir defa(lt 0al(es% 17;..
T,e processing "lock folloing EN)3O@3PAGE is processed onl. if .o( reser0e lines for t,e footer
in t,e LINE3!O2NT option of t,e REPORT state&ent%
To e6ec(te a page "reak (nder t,e condition t,at less t,an a certain n(&"er of lines is left on a page
is ac,ei0ed ". ????????????????????????%
7.#.7>. n lines.
W,at is t,e li&it for t,e lengt, of a page if t,e page lengt, is not specified in t,e report state&ent%
I@,@@@ Lines.
5o can S.&"ols or R'- icons "e o(tp(t on t,e screen/
"7)1. 2symbol/name3 $# #C0+(L.
"7)1. 2icon/name3 $# )'(?.
REPORTING 3 GENERAL
W,at are reports/ and ,o do .o( set (p reports/
$ report program reads and analy5es data from one or more database tables without modifying the
database. ;sually, the result of such a report program is in the form of a list which is output to the screen or
sent to a printer.
W,at are t,e different t.pes of progra&s/
) )nclude %rogram
0 0odule %ool
F Function 0odules
# .xternal #ubroutines
9 (nline program
E0ents in Reporting / E6plain /
1he following events occur at runtime of a typical report program which uses logical databases*
.vent eyword .vent
//////////////////////////////////////////////////////////////////////////////////////////////////
INITIALI>ATION %oint before the selection screen
is displayed
"hen you start a program in which a selection screen is defined ,either in the program itself or in the lined
logical database program-, the system normally processes this selection screen first. )f you want to execute
a processing bloc before the selection screen is processed, you can assign it to the event eyword
)?)1)$L)O$1)(?.
AT SELE!TION3S!REEN %oint after processing user
input on the selection screen while
the selection screen is still active
- 12 -
1he event eyword $1 #.L.'1)(?/#'7..? provides you with several possibilities to carry out processing
blocs while the system is processing the selection screen.
START3O@3SELE!TION %oint after processing the selection screen
1he event #1$71/(F/#.L.'1)(? gives you the possibility of creating a processing bloc after processing
the selection screen and before accessing database tables using a logical database. Cou can use this
processing bloc, for example, to set the values of internal fields or to write informational statements onto
the output screen.
$t the #1$71/(F/#.L.'1)(? event, also all statements are processed that are not attached to an event
eyword except those that are written behind a F(70/.?6F(70 bloc
GET Bta"leC %oint at which the logical database
offers a line of the database table 2table3.
1he most important event for report programs with an attached logical database is the moment at which the
logical database program has read a line from a database table ,see $ccessing 6ata ;sing Logical
6atabases -. 1o start a processing bloc at this event, use the G.1 statement as follows*
#yntax
G.1 2table3 PF).L6# 2list3Q.
$fter this statement, you can wor with the current line of the database table 2table3. 1he data is provided in
the table wor area 2table3.
GET Bta"leC LATE %oint after processing all tables which
are hierarchically subordinate to the database table
2table3 in the structure of the logical database.
1o start a processing bloc at the moment after the system has processed all database tables of a logical
database that are hierarchically inferior to a specific database table, use the event eyword G.1 as follows*
#yntax
G.1 2table3 L$1. PF).L6# 2list3Q.
)n analogy to report programs that use only #.L.'1 statements ,see table in 'omparison of $ccess
0ethods -, the processing bloc of a G.1 2table3 L$1. statement would appear directly before the
.?6#.L.'1 statement in the #.L.'1 loop for the database table 2table3.

EN)3O@3SELE!TION %oint after processing all lines offered
by the logical database.
1o define a processing bloc after the system has read and processed all database tables of a logical
database, use the eyword .?6/(F/#.L.'1)(?.
1he following events occur during the processing of the output list of a report program*
.vent eyword .vent
//////////////////////////////////////////////////////////////////////////////////////////////////
TOP3O@3PAGE %oint during list processing when
a new page is started
EN)3O@3PAGE %oint during list processing when a page
is ended
1he following events occur during the display of the output list of a report program*
.vent eyword .vent
////////////////////////////////////////////////////////////////////////////////////////////////////
AT LINE3SELE!TION %oint at which the user selects a line
- 13 -
AT 2SER3!OMMAN) %oint at which the user presses a
function ey or enters a command in the
command field.
AT P@BnnC %oint at which the user presses the
function ey with the function code %F2n3
"ith the selection screen, $+$%/< offers an interactive element also for report programs. Cou can define a
selection screen without having to bother about all the details re!uired in dialog programming.
1he selection screen is always processed directly after a report program is started. 1he user can enter field
values and selection criteria on this screen.
1he main purpose of the selection screen is to enable the user to control the database selections of the
report program. )f a report program is started from another $+$%/< program with the #;+0)1 statement
,see 'alling 7eports-, the selection screen objects also serve as a data interface,
"ith a selection screen defined in the report program, you can enable the user to
R assign values to variables with the %$7$0.1.7# statement
R determine selection criteria with the #.L.'1/(%1)(?# statement
5o do .o( read selected lines of data"ase ta"le into an internal ta"le in packages of predefined
si4e%
#.L.'1 4 F7(0 2#%FL)3 )?1( 1$+L. 2)1$+3 PA!DAGE SI>E BNC%
where &n: is variable.
?ame the WIL)!AR) characters which are used for comparisions with c,aracter strings S n(&eric
strings%
&T& and &K&.
5o to specif. a client for data"ase ta"le processing%
1$+L.# #%FL).
#.L.'1 4 F7(0 #%FL) 'L).?1 #%.')F).6
"A.7. 0$?61 +.1"..? &@@9& $?6 &@@8&.
...
.?6#.L.'1.
Acti0ation N 6uring activation, the runtime object of aggregate object or tables is created. 1he runtime
object is buffered so that the application program can access it !uicly. 7untime object has information
about the following objects of table
/ domain N data elements N field definition N table definition
Lock Mec,anis& N prevents a new database operation being started an existing one has been correctly
completed. "hen conversion is done, loc is created automatically and released only when conversion
is successful.
'learing of locs
restart adjustment N attempt is made to continue conversion at the point of termination
'ancel adjustment N loc entry is simply deleted from table
;ersion Manage&ent f(nctions E
- 'anceling changes N reset revised version to active version
- #toring changes N active version will be temporarily stored in version
#witching changes N switch between active and revised versions
Version catalog N list of all existing versions of an object
- 7evised version N produced when we edit an existing object
- 14 -
- $ctive version N produced when we activate an object
- 1emporary version N produced when we copy the active version temporarily to the database with store
version functions
- Aistorical versions N created when 9. 'orrection is created : correction is
released
Ta"le B(ffering $ Possi"le "(ffering t.pes
- full buffering N either, whole table or none of the table is located in the buffer ,1ables up to 8@ b done
in client dependent fully buffered tables-
- Generic buffering N generic areas of the table are fully buffered.
- Generic ey N left justified section of primary ey of a table.
- generic area N all records for which fields of generic ey correspond
- #ingle record buffering N records actually being accessed are loaded to buffers, large records where
few records are accessed.
Internal Ta"les / T.pes /
STAN)AR) ta"le
Bey access to a standard table uses a linear search. 1his means that the time re!uired for a search is in
linear relation to the number of table entries.
Cou should use index operations to access standard tables.
SORTE) ta"le
6efines the table as one that is always saved correctly sorted.
Bey access to a sorted table uses a binary ey. )f the ey is not uni!ue, the system taes the entry with the
lowest index. 1he runtime re!uired for ey access is logarithmically related to the number of table entries.
5AS5E) ta"le
6efines the table as one that is managed with an internal hash procedure
Cou can only access a hashed table using the generic ey operations or other generic operations , #(71,
L((%, and so on-. .xplicit or implicit index operations ,such as L((% ... F7(0 oe )?#.71 itab within a
L((%- are not allowed.
IN)EF ta"le
$ table that can be accessed using an index.
)ndex table is only used to specify the type of generic parameters in a F(70 or F;?'1)(?. 1hat means
that you can&t create a table of type )?6.G.
#tandard tables and sorted tables are index tables.
S.nta6 $
6$1$ itab 1C%. table type of line type P")1A ;?)D;./?(?/;?)D;. B.C 2ey3Q P)initial si5e nQ P")1A
A.$6.7 L)?.Q
W,at are )ATA !L2STERS /
Cou can group any complex internal data objects of an $+$%/< program together in data clusters and store
them temporarily in $+$%/< memory or for longer periods in databases. Cou can store data clusters in
special databases of the $+$%/< 6ictionary. 1hese databases are nown as $+$%/< cluster databases and
have a predefined structure.#toring a data cluster is specific to $+$%/<. $lthough you can also access
- 15 -
cluster databases using #DL statements, only $+$%/< statements are able to decode the structure of the
stored data cluster.
)escri"e t,e f(nctions of t,e de"(gger screen%
- Single step8@=9 / ;se this option to step through the program state&ent ". state&ent. 1his allows
you to branch into subroutines and function modules, and to execute these routines step by step as
well. (nce a subroutine or function module has been processed, control returns to the statement
following the '$LL F;?'1)(? or %.7F(70 statement.
- E6ec(te8@G93 ;se this option to process a program line ". line. $ll of the statements on the current line
are processed in a single step. )f you are positioned on a line that calls a subroutine and you choose
"xecute, the 6ebugger processes the whole subroutine and then moves on to the line following the
subroutine call. 1his allows you to jump through the statements within the subroutine.
- Ret(rn8@H9 / 1he 6ebugger ret(rns from a routine to the point at which control returns to the main
program. ;se this option to return from a subroutine, function module, or called program to the calling
program.
- !ontin(e8@I93 ;se this option to process the program up to the next dynamic or static breapoint or up
to the cursor position. )f there are no more breapoints in the program and no cursor has been set, the
system exits debugging mode and executes the rest of the program normally.
/ Ta"les / 6isplay the contents of internal tables.
Pro"le&$5o to r(n a progra& in "ackgro(nd/
#olution *.xecute the 7eport
)n the selection screen *$fter filling the screen fields press FJ.
$ screen appears re!uesting ; to print the +acground %arameters
4.nter the output device,.g A%LU /#$%: etc-
4)n the spool options ;nchec %rint immedietly,;nchec delete after output,and new spool re!uest.
%ress enter.
$nother screen appears with heading start time .; can press start immly ,then save
?ow the +acground job is scheduled for the given program .
1o >iew the status of bacground Uob,1he transaction code is #08V.
.xecute from the resulting screen .Uob overview //3From the Uob list select ;r program and select
#pool from the application toolbar(utput 'ontroller *List of #pool 7e!uests#elect ;r #pool re!uest
and clic 6isplay icon from the overview screen .
; will be displayed with the List.
'aution *#ee to that the list with does not exceed :== columns ,)f it exceeds the extra columns will be
truncated in +acground
W,at are presentation and application ser0ers in SAP/
$ presentation server is actually a program named #apgui.exe. )t is usually installed on a users
worstation.
Application server is a set of executables that collectively interpret the $+$%/< programs and manage
the input S output for them.
In an ABAP'7 progra& ,o do .o( access data t,at e6ists on a presentation ser0er 0's on an
application ser0er/
For presentation server use ;%L($6 or "#K;%L($6 function modules.
For application server use (%.? 6$1$#.1, 7.$6 6$1$#.1 and 'L(#. 6$1$#.1 commands.
)escri"e t,e s.nta6 and f(nction of t,e A2T5ORITY !5E!D co&&and/
$ns */ $;1A(7)1C N 'A.'B (+U.'1 2object name3
)6 2name93 F).L6 2f93
)6 2name:3 F).L6 2f:3
W
)F #C/#;+7' ?. @.
- 16 -
0he A203O,I045C3"C6 checks whether a user has the appropriate authori7ation to execute a particular
activity.
E6plain t,e EFPORT and IMPORT co&&ands/ 5o can .o( pass &ore t,an one gro(p of data ".
(sing IMPORT co&&ands/
EFPORT $3
1o read data objects from an $+$% program into $+$% memory, use the following statement*
#yntax
.G%(71 2f93 PF7(0 2g 93Q 2f :3 PF7(0 2g :3Q ... 1( 0.0(7C )6 2ey3.
1his statement stores the data objects specified in the list as a cluster in memory. )f you do not use the
option F7(0 2f i 3, the data object 2f i 3 is saved under its own name. )f you use the F7(0 2g i 3 option,
the data objet 2g i 3 is saved under the name 2f i 3. 1he name 2ey3 identifies the cluster in memory. )t may
be up to 8: characters long.
1he .G%(71 statement always completely overwrites the contents of any existing data cluster with the
same name 2ey3.
IMPORT $3
1o read data objects from $+$% memory into an $+$% program, use the following statement*
#yntax
)0%(71 2f93 P1( 2g 93Q 2f :3 P1( 2g :3Q ... F7(0 0.0(7C )6 2ey3.
1his statement reads the data objects specified in the list from a cluster in memory. )f you do not use the 1(
2g i 3 option, the data object 2f i 3 in memory is assigned to the data object in the program with the same
name. )f you do use the option, the data object 2f i 3 is read from memory into the field 2g i 3. 1he name
2ey3 identifies the cluster in memory. )t may be up to 8: characters long.
Cou do not have to read all of the objects stored under a particular name 2ey3. Cou can restrict the number
of objects by specifying their names. )f the memory does not contain any objects under the name 2ey3, #C/
#;+7' is set to <. )f, on the other hand, there is a data cluster in memory with the name 2ey3, #C/#;+7'
is always @, regardless of whether it contained the data object 2f i 3. )f the cluster does not contain the data
object 2f i 3, the target field remains unchanged.
E6plain t,e REA) LINE and MO)I@Y LINE co&&ands%
7.$6 L)?. */ ;se the statements 7.$6 L)?. and 7.$6 ';77.?1 L)?. to read data from the lines of
existing list levels. 1hese statements are closely connected to the A)6. techni!ue.
0(6)FC L)?. */ 1o modify the lines of a completed list from within the program, use the 0(6)FC L)?.
statement.
W,at are t,e differences "eteen calling a progra&A transaction Jit, ret(rnK and Jit,o(t ret(rnK
and ,o can eac, "e acco&plis,ed/
%rogram
/#;+0)1 2rep3X,2field3- P$?6 7.1;7?Q P2options3Q.
)f you use $?6 7.1;7?, the system stores the data of the calling executable program and returns to the
calling after processing the called program. 1he system resumes executing the calling program at the
statement following the call.
)f you omit the $?6 7.1;7? addition, all data and list levels of the calling program ,the entire internal
session- are deleted. $fter the called executable program has finished, control returns to the level from
which you started the calling program.
1ransaction
/'$LL 17$?#$'1)(? 2tcod3 P$?6 #B)% F)7#1 #'7..?Q P;#)?G 2itab3Q.
1his statement saves the data of the calling program, and starts transaction 2tcod3. $t the end of the
transaction, the system returns to the statement following the call in the calling report.
/L.$>. 1( 17$?#$'1)(? 2tcod3 P$?6 #B)% F)7#1 #'7..?Q.
1his statement ends the calling program and starts transaction 2tcod3. 1his deletes the call stac ,internal
sessions- of all previous programs. $t the end of the transaction, the system returns to the area menu from
which the original program in the call stac was started.
- 17 -
W,at are t,e differences "eteen t,e para&eter SET and GET/
SET %$7$0.1.7 )6 2pid3 F).L6 2f3.
1his statement saves the contents of field 2f3 under the )6 2pid3 in the #$% memory. 1he code 2pid3 can
be up to :@ characters long. )f there was already a value stored under 2pid3, this statement overwrites it. )f
the )6 2pid3 does not exist, double/clic 2pid3 in the $+$% .ditor to create a new parameter object.
GET %$7$0.1.7 )6 2pid3 F).L6 2f3.
1his statement fills the value stored under the )6 2pid3 into the variable 2f3. )f the system does not find a
value for 2pid3 in the #$% memory, it sets #C/#;+7' to <, otherwise to @.
W5AT are t,e co&&ands t,at allo .o( to process se1(ential file/ And ,at is t,eir s.nta6/
7.$6 6$1$#.1 ,reading- and 17$?#F.7 ,writing-
(%.? 61$#.1 2dataset name3 for 2input output appending3 in 2binary text 3 mode at %(#)1)(?
2position3 0.##$G. 2field3
7.$6 6$1$#.1 2dataset name 3 )?1( 2field3
'L(#. 6$1$#.1 2dataset name3
6.L.1. 6$1$#.1 2dataset name3
17$?#F.7 2field3 to 2dataset name3
W,at is t,e difference "eteen opening a dataset for inp(tA o(tp(tA appending/
F(7 (;1%;1
(pens the file for writing if exists it is overwritten if not then it is created.
F(7 )?%;1
(pens an existing file for reading.
F(7 $%%.?6)?G
(pens the file for writing at the end of the file .)f it does not exist, it is
created, if opened, you return to the end.
W,en an internal ta"le is createdA t,e settings criteria for t,e 0al(e of occ(rs/
1he objective of setting the value of an occurs for an internal table is a !uestion of optimi5ation. 1he
following facts should be taen into account when maing such decision.
9- 1he complete data area of a program is I<@@@ bytes.
:- 1he initial si5e declared is ept in roll area ,!uicer access to program-
8- 6ata entered that exceeds the initial si5e stores in the roll file ,#lower access to program-
Cou should also analy5e the expected volume and access rates before maing the decision.
)efine L!,eck L state&entsA ,o it orks/
1o terminate a single loop pass conditionally, use the 'A.'B 2condition3 statement in the statement bloc
of the loop.
)f the condition is not true, any remaining statements in the current statement bloc after the 'A.'B
statement are ignored, and the next loop pass starts. 2condition3 can be any logical expression.
E6plain @ield Gro(p8e6tract dataset9/
$n extract dataset consists of a se!uence of records. 1hese records may have different structures. $ll
records with the same structure form a record type. Cou must define each record type of an extract dataset
as a field group, using the F).L6/G7(;%# statement.
F).L6/G7(;%# 2fg3.
1his statement defines a field group 2fg3. $ field group combines several fields under one name. For clarity,
you should declare your field groups at the end of the declaration part of your program.
$ field group does not reserve storage space for the fields, but contains pointers to existing fields. "hen
filling the extract dataset with records, these pointers determine the contents of the stored records.
W,at is t,e difference "eteen Mo0e + assign state&ent/
- 18 -
Mo0e */ 1o assign the value of a data object 2f93 to a variable 2f:3, use the following statement*
0(>. 2f93 1( 2f:3.
or the e!uivalent statement
2f:3 L 2f93.
1he contents of 2f93 remain unchanged. 2f93 does not have to be a variable / it can also be a literal, a text
symbol, or a constant. Cou must always specify decimal points with a period ,.-, regardless of the users
personal settings.
0ultiple value assignments in the form
2f<3 L 2f83 L 2f:3 L 2f93.
Assign */ $##)G? 2f3 1( 2F#3.
"hen you assign the data object, the system checs whether the technical attributes of the data object 2f3
correspond to any type specifications for the field symbol 2F#3. 1he field symbol adopts any generic
attributes of 2f3 that are not contained in its own type specification. Following the assignment, it points to 2f3
in memory.
5o do .o( r(n a report for a ro in ta"le/
;sing Graphics 0ultiplexer. 1here is an option some thing similar to screen capture which captures data
only. ;sing that data you can draw graphs ,86 and :6-. 1his option is available all the time from 0enuY /3
Generate Graphics which captures the data then you need to drag and select the data you want to draw a
graph on. (nce you select you can clic on Graphics, which launches graphics multiplexer.
Me&or. Manage&ent
#$% memory ,Global 0emory-* / is available to a user during the entire duration of a terminal
session. )ts contents are retained across transaction boundaries as well as external and internal
sessions.
.xternal session* / when user logs on to 7/8 system, the system creates a new terminal session
called external session. ..g. #ystem 'reate #ession.
)nternal session* / created by calling a transaction ,with '$LL 17$?#$'1)(?-, a dialog module ,with
'$LL 6)$L(G- or a report ,with #;+0)1 or 7.1;7?-.
For external session* / internal sessions are allowed.
7oll area* / 6ata areas of used programs are created in roll areas for each internal session.
%osting data between internal sessions* / .G%(71 1( 0.0(7C and )0%(71 F7(0 0.0(7C.
0ain program group* / 'reated when exporting an internal session.
$dditional program group* / )f a function module belonging to a function group not so far loaded,
additional program group is created.
#ubroutine call* / "hen external subroutine is called, system loads the relevant program and adds it
to the program group of calling program.
"or areas* / +oth table S common worareas with the same name are created once for each
program group and then shared by all programs in the group.
List system* / 'onsists of basic list and all details list belonging to basic list assigned to exactly one
screen level.
;ser interface* / (nly program has its own user interface. )nternal sessions interface is initially empty.
#pecial user interface has to be activated using #.1 %F/#1$1;# statement.
$+$%/< memory* / 7etained only during the lifetime of an external session.
6ata cluster* / Group of several data objects.
6ata objects* / ;nits of data, which a program processes at runtime.
5o do .o( rite a )ATA o"#ect fro& ABAP'7 progra& to ABAP'7 &e&or. and restore t,e sa&e
fro& &e&or. to progra&%
.G%(71 2f93 PF7(0 2g93Q 2f:3 PF7(0 2g:3Q ... 1( 0.0(7C )6 2ey3.
1he )6 2ey3, which can be up to 8: characters long, identifies the data in memory.
State&ent (sed to delete data o"#ects in ABAP'7 &e&or.%
F7.. 0.0(7C P)6 2ey3Q.
- 19 -
5o ill .o( create a file on application ser0er
(pen dataset 2dsn3 for output.
ABAP'7 state&ent for opening a file on application ser0er for reading ???????????%
(pen dataset 2dsn3 for input.
5o ill .o( transfer data into a file in application ser0er /
6ata fname,I@- value &mCF)L.&.
6ata num type i.
(pen dataset fname for output.
6o 9@ times.
?um L ?um Z 9.
1ransfer num to fname.
.nddo.
.....etc.
Na&e t,e f(nction &od(les to rite data fro& an Internal Ta"le to t,e Presentation Ser0er%
6("?L($6 and "#K6("?L($6.
Na&e t,e f(nction &od(les to read data fro& Presentation Ser0er into an Internal Ta"le%
;%L($6 and "#K;%L($6.
Na&e t,e f(nction &od(le t,at can "e (sed to gi0e infor&ation a"o(t files on Presentation Ser0er
and a"o(t it:s Operating S.ste&%
"#KD;.7C.
Na&e t,e ABAP'7 ke. ord for seac,ing a string in an Internal Ta"le%
#.$7'A 2itab3 F(7 2str3 2options3.
5o o(ld .o( find t,e attri"(tes of a data t.pe or data o"#ect /
6.#'7)+. F).L6 2f3 PL.?G1A 2l3Q P1C%. 2t3 P'(0%(?.?1# 2n3QQ
P(;1%;1/L.?G1A 2o3Q P6.')0$L# 2d3Q
P.6)1 0$#B 2m3Q.
W,ic, f(nction &od(le o(ld .o( (se to c,eck t,e (ser:s a(t,ori4ation to access files "efore
opening a file/
$;1A(7)1CK'A.'BK6$1$#.1
Na&e t,e f(nction &od(le (sed to con0ert logical file na&es to p,.sical file na&es in ABAP'7
progra&s%
F)L.KG.1K?$0..
W,at does !5AIN %%%%EN) !5AIN do/
#ometimes you want to chec several fields as a group. 1o do this, include the fields in a F).L6 statement,
and enclose everything in a 'A$)?/.?6'A$)? bloc.
"xample
4444 #creen flow logic* 4444
'A$)?.
F).L6* #%FL)/'$77)6, #%FL)/'(??)6.
0(6;L. 'A.'BKFL)GA1.
.?6'A$)?.
"hen an error is found inside a chain, the screen is re/displayed, and all fields found anywhere in the chain
are input/enabled. $ll non/chain fields remain disabled.
W,at does an e6tract state&ent do in t,e ABAP progra&/
- 20 -
Fills the fields groups with values.
W,at ,appens ,en a ta"le is acti0ated in ))/
/$ table definition is generated
/ 0ap to the database system
/For each table, a table of the same name with the same fields and
corresponding data type is created in database. N %rimary index is
generated automatically
W,at is a c,eck ta"le and ,at is a 0al(e ta"le/
- "hen we define a foreign ey in a table ,$-. )f this ey refers to primary ey of another table ,+-. 1able
+ is chec table
Fields referring to a domain may assume values contained in the
corresponding fields of the value table. Field referring to the domain
should have a foreign ey
W,at is !TS and W,at do .o( kno a"o(t it/ M !TS is !orrection and Transport S.ste&s N
- 'orrection system manages the internal system components lie objects lie only original version of the
object exists. )t stores all changes made to the object.
- 1ransport system allows to transports the object from on #$% system to another ,6evelopment system
to %roduction system-. )t allows to over write or delete existing object in target system and import new
objects to target systems.
6uring development wor we start by opening a tas ,correction- to
which we can assign new and changed objects. (nce changes have
been made, transport new or changed objects to other #$% system by
means of transport ,'hange- re!uest.
5a0e .o( (sed SAP s(pplied progra&s to load &aster data/
- #$% supplied +6' programs N 70@I++)@ ,%urchase re!uisitions-
- 706$1)?6 ,0aterial master- 7F+)B7@@ ,>endor 0asters-
/ 7F+)6.@@ ,'ustomer 0aster- 7>)?>+@@ ,#ales (rder-
W,at are t,e Tec,ni1(es in0ol0ed in (sing SAP s(pplied progra&s/ )o .o( prefer to rite .o(r
on progra&s to load &aster data/ W,./
- )dentify relevant fields
- 0aintain transfer structure , %redefined N first one is always session record-
- #ession record structure , Aeader 6ata, )tem , #1C%. N record type -
- Fields in session structure N #1C%., G7(;% , 0$?61, ;#.7?$0. , ?( 6$1$
- Fields in header structure N consists of transaction code also N #1C%., +00@@, 1'(6.,0$1?7 and
Fields in )tem / )1.0# W
- 0aintain transfer file N sample data set creation
5o do .o( set (p "ackgro(nd #o"s in SAP/ W,at are t,e steps/ W,at are e0ents dri0en "atc,
#o"s/
- 'reate a job using function module U(+/(%.?
- 'ollect the job specifications.
- $dd a job step to the job with the function module U(+/#;+0)1.
- 'lose the job and pass it to +acground processing system for execution with the function module U(+/
'L(#.
- .>.?1 67)>.? +$1'A U(+# */
- 1ypes L #ystem events N triggered when activation of new operation mode taes place
- ;ser events / 1riggered from $+$%/< or external program.
- 1riggering an event notifies the bacground processing that named condition has been reached. 1he
+acground system reacts by starting any jobs that were waiting for the event.
1ransaction codes related to bacground jobs creation and processing are */
#08I,Uob creation-
- 21 -
#08V,Uob selection and execution-.
W,at are presentation and application ser0ers in SAP/
/$ presentation server is actually a program named #apgui.exe. )t is usually installed on a users
worstation.
/ $pplication server is a set of executables that collectively interpret the $+$%/< programs and manage the
input S output for them.
In an ABAP'7 progra& ,o do .o( access data t,at e6ists on a presentation ser0er 0's on an
application ser0er/
- For presentation server use ;%L($6 or "#K;%L($6 function modules.
For application server use (%.? 6$1$#.1, 7.$6 6$1$#.1 and 'L(#. 6$1$#.1 commands.
W,at is t,e difference "eteen S.nc,rono(s and As.nc,rono(s (pdates /
/ $ program ass the system to perform a certain tas, and then either waits or doesn&t wait for the
tas to finish. )n synchronous processing, the program waits* control returns to the program only
when the tas has been completed. )n asynchronous processing, the program does not wait* the
system returns control after merely logging the re!uest for execution.
Transferring SPA'GPA Para&eters to Transactions
1o fill the input fields of a called transaction with data from the calling program, you can use the #%$/G%$
techni!ue. #%$/G%$ parameters are values that the system stores in the global, user/related #$% memory.
Cou use the #$% memory to transfer values between programs beyond the borders of transactions. $ user
can access the values stored in the #$% memory during one terminal session for all modes used in parallel.
To fill an SPA/GPA parameter, use:
#yntax
#.1 %$7$0.1.7 )6 2pid3 F).L6 2f3.
To read an SPA/GPA parameter into an ABAP program, use:
#yntax
G.1 %$7$0.1.7 )6 2pid3 F).L6 2f3.
W,at is t,e difference "eteen !o&&it3Work and Roll"ack3Work tasks /
3 !o&&it3Work statement [performs\ many functions relevant to synchroni5ed execution of tass.
7ollbac/"or statement [cancels\ all re!uests relevant to synchroni5ed execution of tass.
W,at are t,e different data"ase integrities /
- #emantic integrity
/ 7elational integrity
3 %rimary ey integrity
3 >alue set integrity
3 Foreign ey integrity and
/ (perational integrity.
W,at is SAP locking /
/ )t is a mechanism for defining and applying logical locs to database objects.
W,at does a lock o"#ect in0ol0e /
/ 1he tables
/ 1he loc argument.
W,at are t,e different kinds of lock &odes /
/ #hared loc
/ .xclusive loc
/ .xtended exclusive list.
- 22 -
5o can a lock o"#ect "e called in t,e transaction /
- +y calling En1(e(e Block o"#ectC and )e1(e(e Block o"#ectC in the transaction.
W,at are t,e e0ents ". ,ic, e can progra& O,elp te6tsP and displa. Opossi"le 0al(es listsP /
/ %7('.## (? A.L%/7.D;.#1 ,%(A-
/ %7('.## (? >$L;./7.D;.#1 ,%(>-.
W,at are f(nction &od(les / T.pes of para&eters /
/ Function modules are general/purpose library routines that are available system/wide.
/ )n general, function module can have four types of parameters*
/ .G%(71)?G* for passing data to the called function
/ )0%(71)?G* for receiving data returned from the function module
/ 1$+L.#* for passing internal tables only, by reference ,that is, by address-
/ 'A$?G)?G* for passing parameters to and from the function
5o to send a report to t,e printer instead of displa.ing it on t,e screen /
/ "e can send a report to the printer instead of displaying it on the screen. 1o do this, use the
eywords 1( #$%/#%((L*
#;+0)1 7#FLF)?6 ... 1( #$%/#%((L 6.#1)?$1)(? &L1=@&.
5o can e send data to e6ternal progra&s /
/ ;sing #%$/G%$ parameters ,#$% memory-
/ ;sing .G%(71/)0%(71 data ,$+$%/< memory-
W,at are t,e differences "eteen SELE!T3OPTIONSA;ARIANTS AN) PARAMETERS/
1o enter values for variables on the selection screen, you must define the variables using the
%$7$0.1.7# statement.
1o enter a range of values for the variables on the selection screen we use #.L.'1/(%1)(?# statement.
)f you want to run the same report program with the same selections at regular intervals ,for example, for
monthly sales statistics-, )n, $+$%/< offers you combine the desired values for all these selections in one
selection set. #uch a selection set is called a >$7)$?1#.
W,at is SPA ' GPA / W,en do .o( (se it/
1o fill the input fields of a called transaction with data from the report, you can use the #%$/G%$ techni!ue.
#%$/G%$ parameters are values that the system stores in the global, user/related #$% memory. Cou use
the #$% memory to transfer values between programs. $ user can access the values stored in the #$%
memory during one terminal session for all modes used in parallel.
;sually, the input fields on the initial screen of a transaction are connected to #%$/G%$ parameters. )f you
fill these parameters from within your program before calling the transaction, the system fills the input fields
with the corresponding values.
W,. and ,o do .o( displa. a &essage/ W,at are t,e &essage t.pes/
$n $+$%/< module lets the system now that an error has occurred by issuing information,error or warning
messages. you can also use success messages when a particular action is performed successfully. "hen
the user presses .?1.7, the current process is interrupted. 1he system returns the user to the #$% main
menu using $bend message.
0essage is displayed using 0.##$G. Gnnn, where G is the type of the message and nnn is the number of
the message.
Cou have to declare the )d of the message class in the program using
0.##$G./)6 cc,where cc is the message class.
5o and ,ere do Yo( create Message class/
Cou can create a message class from two places in the system*
9- From an (bject class object list ,in the (bject +rowser-
:- From an $+$%/< module ,in the $+$%/< editor-
- 23 -
W,at do .o( define in t,e )ata ele&ent and )o&ain/
8or !ata "lement
1he information includes the field&s representation on the screen in the form of F).L6 1.G1#, '(L;0?
'$%1)(?# in list outputs of the table contents and the format of the output via %$7$0.1.7 )6# and
(nline field documentation.
8or !omain
6ata 1ype,Field Length and the allowed data values are defined .
W,at is t,e difference "eteen a pool ta"le and a transparent ta"le/
0ransparent 0able
$ tran table has a one to one relataionship in the database. 1he table in the dictionary has the
same name, same no of fields, and the fields have the same name as in the 78 table defn. $ transparent
tabel has application data ,0aster and 1ransaction-.
+ooled 0able
$ pool table has &an. to one relation with the table in the database. For one table in the database
there r many tables in the dictionary. 1ha table in the database has a diff name than in the table in the data
dict, it has diff no of fields and field names are different. $ pooled table is stored in the pool at the database
level. $ table poo is a databse table with a special struct that enables the data of many 78 tables to be
stored in it. )t can hold only pooled tables.
W,at are field s.&"ols and field gro(ps/ 5a0e .o( (sed co&ponent id6 of str(ct(re it, field
gro(ps/
$ field symbol does not physically reserve space for a field, but points to a field which is not nown until
runtime of the program. Field symbols are comparable to the concept of pointers as used in the
programming language '.
$n extract dataset consists of a se!uence of records. 1hese records may have different structures. $ll
records with the same structure form a record type. Cou must define each record type of an extract dataset
as a field group, using the F).L6/G7(;%# statement.
W,at is t,e step ". step process to create a ta"le in data dictionar./
9. #electing the table fields
:. 0aintaining foreign eys
8. 'reating secondary indexes ,optional-
<. 0aintaining technical settings
=. $ctivating a table
W,at is t,e ad0antage of str(ct(res and ,o do .o( (se t,e& in A"ap'7 progra&s/
$ structure is defined in the $+$%/< 6ictionary lie a table and can be accessed from $+$%/< programs.
$ny change to the definition of the structure in the $+$%/< 6ictionary is automatically implemented in all
programs.
"hile data in tables is stored permanently in the database, structures contain data only during the runtime of
a program.
#tructures are used in abap/< programs to transfer data between programs as it is globally
defined.#tructures are used in particular for defining data at the interface between module pools and
screens and for standardi5ing parameters for function modules.
W,at does an e6tract state&ent do in t,e A"ap'7 progra&/
"ith the first .G17$'1 statement of a report, the system creates the extract dataset and adds the first
extract record. "ith each subse!uent .G17$'1 statement, the system adds another extract record to the
- 24 -
extract dataset.
W,at is a collect state&ent and ,o is it different fro& t,e append state&ent/
1o fill an internal table with lines which have uni!ue standard eys, we use the '(LL.'1 statement.
)f an entry with the same ey already exists, the '(LL.'1 statement does not append a new line as
$%%.?6 statement, but adds the contents of the numeric fields in the wor area to the contents of the
numeric fields in the existing entry.
W,at is an open S*L 0s Nati0e S*L%
(pen #DL allows you to access all database tables nown to the #$% system, regardless of the database
manufacturer. #ometimes, however, we may want to use database/specific #DL statements called ?ative
#DL in your $+$%/< program.
1o avoid incompatibilities between different database tables and also to mae $+$%/< programs
independent of the database system in use, #$% has created a set of separate #DL statements called (pen
#DL. (pen #DL contains a subset of standard #DL statements as well as some enhancements which are
specific to #$%.
$ database interface translates #$%&s (pen #DL statements into #DL commands specific to the database
in use. ?ative #DL statements access the database directly.
W,at does an EFE! S*L state&ent do in ABAP/ W,at is t,e disad0antage of (sing it/
1o use a ?ative #DL statement, it must be preceded by an .G.' #DL statement and concluded by an
.?6.G.' statement.
$n $+$%/< program with ?ative #DL statements does not generally run with different databases.
W,at are t,e e0ents (sed in ABAP7/
1he events are
)?)1)$L)O$1)(?
$1 #.L.'1)(?/#'7..?
$1 #.L.'1)(?/#'7..? (? 2field3
#1$71/(F/#.L.'1)(?
1(%/(F/%$G.
1(%/(F/%$G. 6;7)?G L)?. #.L.'1)(?
.?6/(F/%$G.
.?6/(F/#.L.'1)(?
$1 ;#.7/'(00$?6
$1 L)?./#.L.'1)(?
$1 %F2??3
G.1
G.1 L$1..
$1 ;ser 'ommand
W,at is an interacti0e reports / W,at is t,e o"0io(s difference of s(c, reports it, 5TML t.pe
reports/
)nteractive reporting allows the user to participate actively in retrieving and presenting data during the
session. )nstead of one extensive and detailed list, with interactive reporting you create a condensed basic
list from which the user can call detailed information by positioning the cursor and entering commands.
)nteractive reporting thus reduces information retrieval to the data actually re!uired.
6etailed information is presented in secondary lists. $ secondary list may either overlay the basic list
completely or appear in an additional dialog window on the same screen. 1he secondary list can itself be
interactive again.
$part from creating secondary lists, interactive reporting also allows to call transactions or other reports
from lists. 1hese programs then use values displayed in the list as input values. 1he user can, for example,
call a transaction from within a list to change the database table whose data is displayed in the list.
- 25 -
W,at ,appens ,en a ta"le is acti0ated in ))/
"hen the table is activated, a physical table definition in the database is added to the table definition stored
in the $+$%/< 6ictionary. 1he database/independent table definition from the $+$%/< 6ictionary is
translated into a definition of the relevant database.
W,at is a c,eck ta"le and W,at is a 0al(e ta"le/
1he relational data model contains not only tables, but also relationships between tables. 1hese
relationships are defined in the $+$%/< 6ictionary by foreign eys. $n important function of foreign eys is
to support data integrity in the relational data model. Foreign ey fields may assume only those values
allowed by the chec table, in other words, values occurring in the primary ey of the chec table.
$ foreign ey provides a lin between two tables, for eg.,19 and 1: by including a reference in table 19 to
the primary ey of table 1:. For this purpose, Foreign ey fields assigned to the primary ey fields of 1: are
included in 19. 1able 19, which is the one being checed, is called a foreign ey table, and table 1: is called
a chec table. 1he terms dependent ,foreign ey- table and referenced ,chec- table are also used.
>$L;. 1$+L.*)f the domain of the chec field has a value table, this is proposed by the system as chec
table in the foreign field maintenance. 1he ey fields of the value table are in this case assigned fields of the
foreign ey table with the same domain. 1hese fields may assume only those values allowed by the value
table.
1he value range of the domain can be defined by specifying value table.$ll table fields referring to this
domain can then be checed against the corresponding field of this value table.)n order the chec can be
executed, a foreign ey must be defined for the value table.
W,at are &atc,codes/ )escri"e/
$ matchcode is a tool to search for data records in the system. 0atchcodes are an efficient and user/friendly
search aid for cases where the ey of a record is unnown.
)t consists of two stages one is 0atch code object and the other is 0atchcode )6.
$ matchcode object describes the set of all possible search paths for a search term.
0atchcode )6 describes a special search path for a search term.
W,at are ranges/ W,at are n(&"er ranges/
)t is often necessary to directly access individual records in a data structure. 1his is done using uni!ue eys.
?umber ranges are used to assign numbers to individual database records for a commercial object, to
complete the ey. #uch numbers are e.g. order numbers or material master numbers.
5o do .o( 0alidate t,e selection criteria of a report/ And ,o do .o( displa. initial 0al(es in a
selection screen/
1he selection criteria is validated in the processing bloc of the $1 #.L.'1)(? #'7..? event for the input
values on the screen and respective messages can be sent.
1o display initial values in the selection screen*
;se )?)1)$L)O$1)(? .>.?1
;se 6.F$;L1 >$L;. option of %$7$0.1.7# #tatement
;se #%$/G%$ %arameters ,%)6s-.
W,at is t,e !lient concept in SAP/ W,at is t,e &eaning of !lient independent/
)n commercial, organi5ational and technical terms, the client is a self contained unit in the 78 system, with
separate set of 0aster data and its own set of 1ables.
"hen a change is made in one client all other clients are affected in the system / this type of objects are
called 'lient independent objects.
W,at is Internal ta"le/
)nternal tables are table objects that only exist for the runtime of the program. 1here are several
$+$% statements for woring with internal tables, for example, append, insert, delete, or find lines.
1he number of lines of an internal table is extended dynamically at runtime as re!uired.
- 26 -
Cou can use internal tables for table calculations on subsets of database tables. For example, you can read
a part of one or more database tables into an internal table.
1hey also allow you to reorgani5e their contents to suit the needs of your program. Cou can, for example,
read particular entries from one or more large customer tables into an internal table, and then use them to
create a list. "hen you run your program, you can access this data directly, instead of having to search for
each record in the database.
W,at is a 0ariant and ,ere do .o( (se it/
)f you want to run a report program with same selections at regular intervals ,for example, for
monthly sales statistics-, you would not want to enter the same values each time. #o, $+$%/< offers you a
possibility to combine the desired values for all these selections in one selection set. Cou can create as
many different selection sets as you lie for each report program and they remain assigned only to the report
program in !uestion. #uch a selection set is called a variant.
;sing >ariants (nline
;sing >ariants in +acground %rocessing
(nline, starting a report via variant saves the user wor,minimi5es input errors. )n bacground processing, a
variant is the only possibility you have to pass values for the selections.
1o fill certain selections with values that change according to the application, you use a variant, which taes
the variable values from 1able T;AR;.
W,at is set para&eter and get para&eter/
"e can pass data to a called program using #%$/G%$ parameters. #%$/G%$ parameters are field
values saved globally in memory. .ach parameter is identified by a three/character code* you can define
these parameters in the object browser by selecting (ther objects on the first screen. 1he #%$/G%$ storage
is user/specific and valid throughout all the user&s sessions.by using the #.1 %$7$0.1.7 or G.1
%$7$0.1.7 statements
1hese statements let you store and retrieve #%$/G%$ values from an $+$%/< program. )f the selection
screens for the two transactions do not share the same re!uired fields, use these statements to store screen
fields explicitly by name.
+efore calling the new transaction from a %$) module, store the caller transaction&s fields under one name*
#.1 %$7$0.1.7 )6 &7)6& F).L6 2F).L6 ?$0.93.
1he system stores the value in 2field name93 in the #%$ parameter &7)6&. 1he three/character identifier
&7)6& must be defined in the #$% table 1%$7$. )f the #%$ parameter &7)6& already contains a value, the
#.1 %$7$0.1.7 statement overwrites it ,with the contents of 2F).L6 ?$0.93-.
)n the %+( module for the called transaction, retrieve the fields under the other name*
G.1 %$7$01.7 )6 &7)6& F).L6 2F).L6 ?$0.:3.
W,at is field s.&"ol/
$ field symbol does not physically reserve space for a field, but points to a field which is not nown
until runtime of the program. #ometimes you only now which field you want to process, and how you want
to process it, at runtime.
For this purpose, you can create field symbols in your program. $t runtime, you can assign real fields to
such field symbols. $ll operations which you have programmed with the field symbol are then carried out
with the assigned field. $fter successful assignment, there is no difference in $+$%/< whether you reference
the field symbol or the field itself.
5o to (se a grid list/
;se Function 0odule 6isplayK4L)#1. )n ;r program .%ut all the data that ; want to output in its final format
and then pass this internal table to the function module
0wo types of grid list .
- 27 -
6)#%L$CKG7)6KL)#1,>ersion <.@b-
6)#%L$CK+$#)'KL)#1,>ersion <.Ib-
'alculate the subtotal etc and save it as a variant ,Aowever while printing it will print all the enties of the
fields
5o to pass data fro& t,e for& to t,e S("ro(tine progra&/
;se structure )1'#C
5o can e pass selection and para&eter data to a report /
3 1here are three options for passing selection and parameter data to the report.
. using #;+0)1...")1A
. using a report variant
. using a 7$?G. table
Standard Progra&s t,at e0er. ABAPer S,(d Dno
7#$>GL@@ 1able adjustment across clients
7#+6'#;+ 7elease batch/input sessions automatically 7#'L1'(% 'opy
tables across clients
7#)?'L@@ .xtended program list
7#(7$7.L Get the (racle 7elease
7#%$7$0 6isplay all instance parameters
7#1G#'7% 1ransport #$%script files across systems
7G;G+7@@ #ubstitution/>alidation utility
7#;#7@@8 'hec the passwords of users #$%4 and 66)' in all clients
7#;#7@@I List users last login
7#1GL60' 1o Load L(G(s to application server
Interacti0e Reporting
)nteractive reporting allows the user to participate actively in retrieving and presenting data during the
session. )nstead of one extensive and detailed list, with interactive reporting you create a condensed basic
list from which the user can call detailed information by positioning the cursor and entering commands.
)nteractive reporting thus reduces information retrieval to the data actually re!uired.
W,at are t,e e0ent ke. ords in interacti0e reporting /
E0ent ke.ord E0ent
$1 L)?./#.L.'1)(? 0oment at which the user selects a line by double/
clicing on it or by positioning the cursor on it and
pressing F:.
$1 ;#.7/'(00$?6 0oment at which the user presses a function ey.
1(%/(F/%$G. 6;7)?G L)?./
#.L.'1)(?
0oment during list processing of a secondary list at
which a new page starts.
W,at is secondar. list /
#econdary lists allow you to enhance the information presented in the basic list. 1he user can, for example,
select a line of the basic list for which he wants to see more detailed information. Cou display these details
on a secondary list.#econdary lists may either overlay the basic list completely or you can display them in an
extra window on the screen. 1he secondary lists can themselves be interactive again.
5o to select 0alid lines for secondar. list /
1o prevent the user from selecting invalid lines, $+$%/< offers several possibilities. $t the end of the
processing bloc .?6/(F/#.L.'1)(?, delete the contents of one or more fields you previously stored for
valid lines using the A)6. statement. $t the event $1 L)?./#.L.'1)(?, chec whether the wor area is
initial or whether the A)6. statement stored field contents there. )n the latter case, create a secondary list,
since you previously stored field contents for valid lines only. $fter processing the secondary list, clear the
wor area again. 1his prevents the user from trying to create further secondary lists from the secondary list
- 28 -
displayed.
5o to create (ser interfaces for lists /
1he 7/8 system automatically generates a graphical user interface ,G;)- for your lists that offers the basic
functions for list processing, such as saving or printing the list. )f you want to include additional functionality,
such as pushbuttons, you must define your own interface status.1o create a new status, the 6evelopment
"orbench offers the 0enu %ainter. "ith the 0enu %ainter,you can create menus and application
toolbars.$nd you can assign Function eys to certain functions. $t the beginning of the statement bloc of
$1 .?6/(F/#.L.'1)(?, activate the status of the basic list using the statement* #.1 %F/#1$1;#
&#1$1;#&.
!an e call reports and transactions fro& interacti0e reporting lists /
C.#.)nteractive reporting also allows you to call transactions or other reports from lists. 1hese programs
then use values displayed in the list as input values.1he user can, for example, call a transaction from within
a list to change the database table whose data is displayed in the list.
5o to &aintain lists /
1o return from a high list level to the next/lower level ,#C/L#)?6-, the user chooses +ac on a secondary
list.1he system then releases the currently displayed list and activates the list created one step earlier.1he
system deletes the contents of the released list.1o explicitly specify the list level into which you want to place
output, set the #C/L#)?6 field. 1he system accepts only index values which correspond to existing list
levels.)t then deletes all existing list levels whose index is greater or e!ual to the index you specify.For
example, if you set #C/L#)?6 to @, the system deletes all secondary lists and overwrites the basic list with
the current secondary list.
W,at are t,e page ,eaders for secondar. lists/
(n secondary lists, the system does not display a standard page header and it does not trigger the event
1(%/(F/%$G..1o create page headers for secondary list, you must enhance 1(%/(F/%$G.*
)yntax 1(%/(F/%$G. 6;7)?G L)?./#.L.'1)(?. 1he system triggers this event for each secondary
list. )f you want to create different page headers for different list levels, you must program the processing
bloc of this event accordingly, for example by using system fields such as #C/L#)?6 or #C/%FB.C in
control statements ,)F, '$#.-.
W,at is &eant ". stacked list /
$ #taced list is nothing but secondary list and is displayed on a full/si5e screen unless you have specified
its coordinates using the window command.
Is t,e "asic list deleted ,en t,e ne list is created/
?(.)t is not deleted and you can return bac to it using one of the standard navigation functions lie clicing
on the bac button or the cancel button.
W,at is &eant ". ,otspots /
Aotspot is a list area where the mouse pointer appears as an upright hand symbol."hen a user points to
that area,and the hand cursor is active-,a single/clic does the same thing as a double/clic. Aotspots are
supported from 7/8 release 8.@c.
In ,ic, s.ste& field does t,e na&e of c(rrent g(i stat(s is t,ere /
1he name of the current G;) #1$1;# is available in the system field #C/%FB.C.
W,at is &eant ". ,ide area /
1he hide command temporarily stores the contents of the field at the current line in a system/controlled
memory called the A)6. $7.$.$t an interactive event,the contents of the field is restored from the A)6.
$7.$. "hen calling a secondary list from a list line for which the A)6. fields are stored, the system fills the
stored values bac into the variables in the program. )n the program code, insert the A)6. statement directly
after the "7)1. statement for the current line.
- 29 -
W,en t,e get c(rsor co&&and (sed in interacti0e lists /
)f the hidden information is not sufficient to uni!uely identify the selected line ,the command G.1 ';7#(7
is used.1he G.1 ';7#(7 command returns the name of the field at the cursor position in a field specified
after the addition field,and the value of the selected field in a field specified after value.
5o to pass data fro& list to report /
$+$%/< provides three ways of passing data*
///%assing data automatically using system fields
///;sing statements in the program to fetch data
///%assing list attributes
5o to call ot,er progra&s /

Report Transaction
'all and return #;+0)1 $?6 7.1;7? '$LL 17$?#$'1)(?
'all without return #;+0)1 L.$>. 1( 17$?#$'1)(?
S.ste& fields (sed in interacti0e Reporting
1he SY3LSIN) system field contains the index of the list currently created. "hile creating a basic list, #C/
L#)?6 e!uals @.
"ith each interactive event, the system automatically sets the following system fields*
S.ste& field Infor&ation

#C/L)?'1 total line count of a list
#C/L)??( current line no where cursor is placed.
SY3LSIN) )ndex of the list currently created during the current event ,basic list L @-

#C/L)#1) )ndex of the list level from which the event was triggered

#C/L)LL) $bsolute number of the line from which the event was triggered

#C/L)#.L 'ontents of the line from which the event was triggered

#C/';7(" %osition of the line in the window from which the event was triggered ,counting starts with
9-

#C/';'(L %osition of the column in the window from which the event was triggered ,counting starts
with :-

#C/;'(00 Function code that triggered the event

#C/%FB.C $lways contains the status of the current list.

TOP3O@3PAGE )2RING LINE3SELE!TION%
1he system triggers this event for each secondary list. )f you want to create different page headers for
different list levels, you must program the processing bloc of this event accordingly, for example by using
system fields such as #C/L#)?6 or #C/%FB.C in control statements ,)F, '$#.-.
- 30 -
)ata fro& S.ste& @ields of Interacti0e Lists
From system fields, you retrieve the following information* the index of a list, the position of the list in the
output window, and the location of the cursor. 1he only system field that contains the contents of the
selected line is #C/L)#.L.
Passing )ata ". Progra& State&ents
1o pass individual output fields or additional information from a line to the corresponding processing bloc
during an interactive event, use these statements*
5I)E
1he A)6. statement is one of the fundamental statements for interactive reporting. ;sing the A)6.
techni!ue, you can at the moment you create a list level define, which information later to pass to the
subse!uent secondary lists.
#yntax A)6. 2f3.
.g A)6.* #%FL)/'$77)6, #%FL)/'(??)6, ?;0.
REA) LINE
;se the statements 7.$6 L)?. and 7.$6 ';77.?1 L)?. to explicitly read data from the lines of existing
list levels. 1hese statements are tightly connected to the A)6.
techni!ue.
#yntax *
7.$6 L)?. 2lin3 P)?6.G 2idx3Q
PF).L6 >$L;. 2f93 P)?1( 2g 93Q... 2f n3 P)?1( 2g n3QQ
P(F ';77.?1 %$G.X(F %$G. 2p3Q.
.g *
7.$6 L)?. #C/)?6.G F).L6 >$L;. +(G.
GET !2RSOR
;se the statements G.1 ';7#(7 F).L6 and G.1 ';7#(7 L)?. to pass the output field or output line on
which the cursor was positioned during the interactive event to the processing bloc.
#yntax
G.1 ';7#(7 F).L6 2f3 P(FF#.1 2off3Q PL)?. 2lin3Q
P>$L;. 2val3Q PL.?G1A 2len3Q.
SET !2RSOR
1o set the cursor, use the #.1 ';7#(7 statement. 1his statement sets the cursor in the most recently
created list. "hile creating the basic list, this is always the basic list itself. "hile creating a secondary list,
this is the previous list.
#.1 ';7#(7 2col3 2lin3.
1his statement sets the cursor to column 2col3 of line 2lin3 of the output window.
!alling Progra&s
)f you need to program an extensive application, one single program will become very complex. 1o mae the
program easier to read, it is often reasonable to divide the re!uired functions among several programs.
$+$% allows you to call reports as well as transactions using these statements*
- 31 -
7eport 1ransaction

'all without return #;+0)1 L.$>. 1( 17$?#$'1)(?

'all and return #;+0)1 $?6 7.1;7? '$LL 17$?#$'1)(?

T.pical Str(ct(re of ABAP Progra&
9. 7eport 6efinitions 4
:. 1able and 6ata definitions 4
8. )nitiali5ation event
<. #creen #elect (ptions/)nputs 4
=. #election/screen event
I. #tart/of/selection event
V. %erforms and other .vents 4
#tatements
E. .nd/of/selection event
<% Initiali4ation
1riggered prior to first display of selection screen
1o specify 6efault value in #.L.'1/(%1)(?#
Q% At Selection3Screen
%rocessed after the selection screen value are entered
For validation of screen accepts
7eturns bac to #.L.'1/(%1)(?#
<. START3O@3SELE!TION + EN)3O@3SELE!TION
1his is implicit in any $+$%/< program
#tart S end of main processing logic
0ore in use with logical database access
$ll #tatements between #1$71/(F/#.L.'1)(? and .?6/(F/.L.'1)(? is only executed
+y 6efault , no need to have .?6/(F/#.L.'1)(?
.ach procedural statement in an $+$% program automatically belongs to #1$71/(F/
#.L.'1)(?
- 32 -
=. @or& E0ent
#imilar to %.7F(70/#;+7(;1)?.#
#1$71# with F(70 and ends with .?6F(70
$ll statements between .?6F(70 and end of program are never processed
#imilarly all statements between .?6F(70 and event eyword are never processed.
I. Li&itations of Si&ple PER@ORM
>alues can be passed through %.7F(70 to F(70.
Giving the flexibility to use the same subroutine multiple number of times.
#yntax9* %.7F(70 2GGGG3 using 2CCC3
changing 20003

F(70 2GGGG3 using 2CCC3 lie 2OOO3
changing 20003 lie 2???3 / %ass by reference
(7
F(70 2GGGG3 using value ,CCC- lie 2OOO3 / %ass by value, creates another copy of
the variable.
.xample9*
%.7F(70 date/invert using in/date
'hanging out/date
F(70 date/invert using in/date lie datum
#yntax:* %.7F(70 function/name,program- )F F(;?6.
.xample:* %.7F(70 A.$6.7,F(70%((L- )F F(;?6.
I. Get e0ent
G.1 2 table name 3
7eads data of all columns from all database table falling in the hierarchy
?eeds to mention table name in
1$+L.#* parametersWWW
(nly fields part of the tables mentioned in the 1$+L.#* parameter can be viewed S edited
V. To E6it fro& an E0ent
.xit N )t exits from the respective subroutine were this syntax is used , generally condition for
the .G)1 is stated before this syntax
'hec / here the conditional chec is done at the same time .
- 33 -
'A.'B 2condition3
)f the condition is not satisfied, the system leaves the subroutine and resumes
the processing after the %.7F(70 statement
#top N it is the abrupt stopping the program flow
E. !ALLing @(nctional Mod(les
#yntax*
'$LL F;?'1)(? 2module3
P.G%(71)?G f9 L a9 .... fn L anQ
P)0%(71)?G f9 L a9 .... fn L anQ
P'A$?G)?G f9 L a9 .... fn L anQ
P1$+L.# f9 L a9 .... fn L anQ
P.G'.%1)(?# e9 L r9 .... en L rn
.xample*
'$LL F;?'1)(? &OK6$1.K'(?>.7#)(?&
.G%(71)?G #16K6$1. L G.?K6$1.
)0%(71)?G 'AK6$1. L ?."K6$1.
R% List E0ents
1(%/(f/%$G., .?6/(F/%$G.,
$1 L)?./#.L.'1)(?, $1 ;#.7/'(00$?6
1hese events are triggered by the $+$% runtime environment while a list is being created or
when a user performs an action on a list. 1he statement in these blocs can format the list or
process the users re!uest.
ABAP PER@ORMAN!E ISS2ES%
ABAP'7 Opti&i4ation
;se the G.1 7;? 1)0. command to help evaluate performance. )t&s hard to now whether that
optimi5ation techni!ue 7.$LLC helps unless you test it out. ;sing this tool can help you now what is
effective, under what inds of conditions. 1he G.1 7;? 1)0. has problems under multiple '%;s, so
you should use it to test small pieces of your program, rather than the whole program.
$void &#.L.'1 4&, especially in tables that have a lot of fields. ;se #.L.'1 $ + ' )?1( instead, so
that fields are only read if they are used. 1his can mae a very big difference.
Field/groups can be useful for multi/level sorting and displaying. Aowever, they write their data to the
system&s paging space, rather than to memory ,internal tables use memory-. For this reason, field/
groups are only appropriate for processing large lists ,e.g. over =@,@@@ records-. )f you have large lists,
you should wor with the systems administrator to decide the maximum amount of 7$0 your program
should use, and from that, calculate how much space your lists will use. 1hen you can decide whether
to write the data to memory or swap space. #ee the Fieldgroups $+$% example.
;se as many table eys as possible in the "A.7. part of your select statements.
"henever possible, design the program to access a relatively constant number of records ,for instance,
if you only access the transactions for one month, then there probably will be a reasonable range, lie
9:@@/9E@@, for the number of transactions inputted within that month-. 1hen use a #.L.'1 $ + ' )?1(
- 34 -
1$+L. )1$+ statement.
Get a good idea of how many records you will be accessing. Log into your productive system, and use
#.E@ /3 6ictionary (bjects ,press .dit-, enter the table name you want to see, and press 6isplay. Go
1o ;tilities /3 1able 'ontents to !uery the table contents and see the number of records. 1his is
extremely useful in optimi5ing a program&s memory allocation.
1ry to mae the user interface such that the program gradually unfolds more information to the user,
rather than giving a huge list of information all at once to the user.
6eclare your internal tables using ('';7# ?;0K7.'#, where ?;0K7.'# is the number of records
you expect to be accessing. )f the number of records exceeds ?;0K7.'#, the data will be ept in
swap space ,not memory-.
;se #.L.'1 $ + ' )?1( 1$+L. )1$+ whenever possible. 1his will read all of the records into the itab
in one operation, rather than repeated operations that result from a #.L.'1 $ + ' )?1( )1$+...
.?6#.L.'1 statement. 0ae sure that )1$+ is declared with ('';7# ?;0K7.'#, where
?;0K7.'# is the number of records you expect to access.
0any tables contain totals fields ,such as monthly expense totals-. ;se these avoid wasting resources
by calculating a total that has already been calculated and stored.
%rogram $nalysis ;tility
1o determine the usage of variables and subroutines within a program, you can use the $+$% utility called
]%rogram $nalysis included in transaction #.8E. 1o do so, execute transaction #.8E, enter your program
name, then use the path ;tilities /3 %rogram $nalysis
ABAP PER@ORMAN!E IMPRO;EMENTS ;IA )ATA )I!TIONARY
)?6.G '7.$1)(? #;GG.#1)(?# 7.L$1.6 1( 6$1$+$#. %.7F(70$?'.
R 1he columns at the beginning of an index are the most [common\. 1he most [common\ columns are
those where reports are selecting columns with no ranges / the where clause for these columns is an [e!ual
to\ expression. 7earrange columns of an index to match the selection criteria. For example, if a select
statement is written to include columns 9 and : with [e!ual to\ expressions in the where clause and column
8 and < are selected with value ranges, then the index should be created with columns in the se!uence of
9,:,8,<.
R 'olumns towards the end of the index are either infre!uently used in selects or are part of reporting
selects that involve ranges of values.
1$+L. 1C%. #;GG.#1)(?# 7.L$1.6 1( 6$1$+$#. %.7F(70$?'.
R ;se >)." tables to effectively join and [denormali5e\ related tables that are taing large amounts of
time to select for reporting. For example, at times where highly accessed tables normali5e description text
into one table and the header data into another table, it may mae sense to create a view table that joins the
relevant fields of the two associated with a poor performing $+$%.
For %((L tables that contain large amounts of data and are highly accessed, convert the pooled table
into a transparent table and add an index. %((L.6 tables are supposed to be collections of smaller
tables that are !uicly accessed from the database or are completely buffered in memory. %ooled
tables containing more than a few hundred rows and are accessed many times in a report or transaction
are candidates for %((L to 17$?#%$7.?1 'onversion. For example, table A!" contains tax
#urisdiction condition information and are accessed more t$an ten times in t$e sales order
create transaction% &f t$e entire 'nited States tax codes are loaded into t$ese condition tables,
t$e time to save a sales order increases to unacceptable levels% (onverting t$e tax condition
table to transparent and creating an index based upon t$e )e* fields, decreases processing time
from minutes to seconds%
R 6o not allow the use of L)B. in an #$% #DL statement accessing a large table.
- 35 -
R ;se internal tables in $+$%s to preselect values once and store values in memory for sorting and
searching purposes ,this is an assumption stated at the beginning of this discussion-.
R $void logical databases when not processing all row s of a table. )n fact, a logical database is merely
a group of nested #$% #DL #.L.'1 statements. )n general, when processing a small number of rows in a
larger table is re!uired, the use of internal tables and ?(1 using a logical database or nested selects will be
much better for performance.
ABAP IMPORTANT REPORTS
7#+6'+1'
#ubmit a +6' job with an internal batch number and wait for the end of the batch input session.
7#+6'#;+
7elease batch input sessions automatically
ABAP IMPORTANT T!O)ES
(##9 #$% (nline #ervice #ystem
#098 ;pdate monitor. "ill show update tass status. >ery useful to determine why an
update failed.
#@@9 $+$% 6evelopment "orbench
#.@9 (ld 1ransport S 'orrections screen
#.9@ ?ew 1ransport S 'orrection screen
#.@J "orbench (rgani5er
#.9I 6ata +rowser* )nitial #creen.
#.8@ $+$%/< 7untime $nalysis
#.8I $+$%/<* Logical 6atabases
#.8V $+$%/< Function 0odules
#.8E $+$% .ditor
#.8J #plitscreen .ditor* %rogram 'ompare
#.<9 0enu %ainter
#.=9 #creen %ainter* )nitial #creen.
#.V9 #$%script layout set
#.E@ $+$%/< 6evelopment "orbench (bject +rowser
#09: Loc table entries ,unloc loced tables-
#0:9 >iew the system log, very useful when you get a short dump. %rovides much
more info than short dump
#08= >iew +atch )nput #essions
#D@@ $+$%/< Duery* #tart Dueries
- 36 -
+6'
<
W,at s,o(ld "e t,e approac, for riting a B)! progra&/
$ns.* 9. $nalysis the 6ata. :. Generate #$% structure. 8. 6evelop transfer program <.
'reate se!uential file. =. 'reate batch input program. I. %rocess batch input data
Q W,at is t,e alternati0e to "atc, inp(t session/
$ns. * 'all transaction S call dialog
What are the steps in a BDC session ?
1he first step in a +6' session is to identify the screens of the transaction that the program will
process. ?ext step is to write a program to build the +6' table that will be used to submit the data to
#$%. 1he final step is to submit the +6' table to the system in the batch mode or as a single
transaction by the '$LL 17$?#$'1)(? command.
- W,at are t,e pro"le&s in processing "atc, inp(t sessions/ 5o is "atc, inp(t process
different fro& processing on line/
$ns.* #essions cannot be run in parallel and not fast.
7 W,at do .o( do ,en t,e s.ste& cras,es in t,e &iddle of a B)! "atc, session/
/'hec no. of records already updated and delete them from input file and run +6' again.
= W,at do .o( do it, errors in B)! "atc, session/
/$nalysis and correct input file format and entries in internal table +6'6$1$.
G W5AT are t,e co&&ands t,at allo .o( to process se1(ential file/ And ,at is t,eir s.nta6/
$ns */
7.$6 6$1$#.1 ,reading- and 17$?#F.7 ,writing-
(%.? 61$#.1 2dataset name3 for 2input output appending3 in 2binary text 3 mode at
%(#)1)(? 2position3 0.##$G. 2field3
7.$6 6$1$#.1 2dataset name 3 )?1( 2field3
'L(#. 6$1$#.1 2dataset name3
6.L.1. 6$1$#.1 2dataset name3
17$?#F.7 2field3 to 2dataset name3
H W,at is t,e process for transferring data fro& legac. s.ste& to SAP/
$ns */ F1% file transfer, 0anufacturer Nspecific field transfer ?F#,networ file system-/+6'.
I E6plain t,e process to transfer a record to a dataset/
$ns */ 17$?#F.7 2field3 to 2dataset name3.
R W,. "atc, inp(t/
$ns */ 1o input a large amount of information at off pea times.
<S !an data "e p(t directl. into t,e data"ase/
$ns */ ?o, only after the data has been entered via transaction.
<< E6plain at ,ig, le0elA t,e "atc, inp(t process/
$ns */ +atch data is placed into !ueues called batch input sessions , then placed into the application
programs for maintenance into the database.
<Q W,at are t,e f(nction &od(les associated it, "atc, inp(t/
$ns */ +6'K(%.?KG7(;% , +6'K'L(#.KG7(;% , +6'K)?#.71
<- W,at is t,e str(ct(re of t,e B)! ta"le/
- 37 -
$ns */ %rogram/6ynpro/start/field name/ field content.
<7 Write o(t a coding e6a&ple for filling a B)! Ta"le%
$ns */
F(70 2?$0.3
7.F..#A 2bdc table3
'L.$7 2bdc table3
0(>. 2program name 3 to 2bdc table3/%7(G7$0
2number93 1( 2bdc table3/6C?%7(
]G 1( 2bdc table3/6C?+.G)?
$%%.?6 2bdc table3
'L.$7 2bdc table3
0(>.* 2field93 1( 2bdc table3/F?$0
2field:3 1( 2bdc table3/F>$L
$%%.?6 2bdc table3
<= 5o do .o( find t,e transaction n(&"erA progra& n(&"er and field na&es/
$ns */
1ransaction no.,program no. N #ystem /3 status
Field names / F9, 1echnical help
<G W,at are t,e processing &odes for Batc, Inp(t/
$ns */ %rocess on screen,foreground- , 6isplay errors only and process in the bacground
<H W,at are t,e a0aila"le OD !odes t,at can "e (tili4ed d(ring "atc, inp(t processing/
$ns */
/n N terminates current batch input transaction and mars as incorrect.
/bdel N delete current batch input transaction from session.
/bend N terminate batch input processing and mar session as incorrect.
/bda N change display mode to process the session on screen instead of displaying only errors.
/bde N change display mode to display only errors instead of processing the session on the screen.
<I W,at is t,e effect of t,e B)!?!2RSOR field na&e in t,e B)! ta"le/
$ns */ Cou can set the cursor and enter as a corresponding field value the name of the field on which
the cursor is to be positioned .
<R 5o &an. t.pes of B)!s .o( ,a0e done/
Q< W,. .o( c,oose !all transaction and'or session &et,od/
'all transaction is mainly used when you want to update the database using a single transaction , you
can also update the database in asynchronous mode, where as session is used to perform huge
database updations using more than one transaction and which will last for a long time.
QQ How you trap errors in call ransaction
.rrors while updating the database using call transaction techni!ue are trapped using a structure
bdcmsgcall, whose field msgtyp become ]e when an error record is encountered. 1hose records are
formatted using formatKmessage function call in the desired format and stored in an internal table for
listing of all error records in one shot.
Q- What are !i""erent types o" #p!ate $o!es
)n +6's we have two types of updation modes N 9- #ynchronous :- $synchronous
Q7 What is $ain !i""erence %etween session $etho! an! &S'W
)n the context of session method,
the method of updating is [+atch )nput\ ,
we re!uire a program to be coded,
+ut in the context of L#0" method,
1he methods of updating
using [+atch )nput/6irection )nput\
from an )6(',
from a +$%) structure.
?o source code is re!uired, the complete operation is performed in 9I steps se!uence
Q= W,at is &ain difference "eteen !ATT and LSMW
;sing L#0" you can update any ind of data but no changes to database are allowed, where as
'$11 tool can update only master data, which also allows changes to the master data and also a
- 38 -
significant testing of data is possible
QG W,at is B)! and 5o .o( (se it/
+' +asis 'omponents//$+$% worbench//+' +asis %rogramming interfaces//6ata transfer
6uring data transfer, data is transferred from an external system into the #$% 7/8 #ystem.
^1ransfer data from an external system into an 7/8 #ystem as it is installed. ^1ransfer data regularly
from an external system into an 7/8 #ystem.
.xample* )f data for some departments in your company is input using a system other than the 7/8
#ystem, you can still integrate this data in the 7/8 #ystem. 1o do this, you export the data from the
external system and use a data transfer method to import it into the 7/8 #ystem.
+atch input with batch input sessions * 6ata consistency chec with the help of screen logic.
"ith the batch input method, an $+$% program reads the external data that is to be entered in the 7/8
#ystem and stores the data in a _batch input session_. 1he session records the actions that are re!uired
to transfer data into the system using normal #$% transactions.
"hen the program has generated the session, you can run the session to execute the #$% transactions
in it. Cou can explicitly start and monitor a session with the batch input management function ,by
choosing #ystem M #ervices M +atch input-, or have the session run in the bacground processing
system.
;se the +6'K(%.?KG7(;% function module to create a new session. (nce you have created a
session, then you can insert batch input data into it with +6'K)?#.71. ;se the +6'K)?#.71 function
module to add a transaction to a batch input session. ;se the +6'K'L(#.KG7(;% function module
to close a session after you have inserted all of your batch input data into it.
What is Dataset an! how you use it?
$+$%/< provides three statements for handling files*
1he (%.? 6$1$#.1 statement opens a file.
1he 'L(#. 6$1$#.1 statement closes a file.
1he 6.L.1. 6$1$#.1 statement deletes a file.
1o open a file for read access, use the F(7 )?%;1 option of the (%.? 6$1$#.1 statement
1o open a file for write access, use the F(7 (;1%;1 option of the (%.? 6$1$#.1 statement
1o open a file for appending data to the file, use the F(7 $%%.?6)?G option of the (%.? 6$1$#.1
statement
1o process a file in binary mode, use the )? +)?$7C 0(6. option of the (%.? 6$1$#.1 statement
1o process a file in text mode, use the )? 1.G1 0(6. option of the (%.? 6$1$#.1 statement
1o open a file at a specific position, use the $1 %(#)1)(? option of the (%.? 6$1$#.1 statement
"hen you wor with the operating systems ;?)G or ")?6("# ?1, you can send an operating system
command with the statement (%.? 6$1$#.1. 1o do so, use the option F)L1.7
1o receive the operating system message after trying to open a file, use the 0.##$G. option of the
(%.? 6$1$#.1 statement
1o close a file on the application server, use the 'L(#. 6$1$#.1 statement
1o delete a file on the application server, use the 6.L.1. 6$1$#.1 statement
1o write data to a file on the application server, use the 17$?#F.7 statement
1o read data from a file on the application server, use the 7.$6 6$1$#.1 statement.
- 39 -
-G Gi0e real ti&e ork done ". ( in B)! / Transactions (sed / para&eters passed it, f(nctions%
-H ill ask ( for screen no:s and d.npro na&es for B)! t,at ( sa. ( ,a0e done%
-R W,ic, tec,nical field in t,e B)!)ATA ta"le ,olds t,e last c(rsor position/
7< W,at is tr(e a"o(t t,e LSMW$ 8c,oose correct option's9
%art of the #$% system
%rocesses hierarchical data files ,header and position-
?eeds a source field for every target field
77 5o do .o( read a LO!AL se1(ential file/
7= How !o you write a se(uential "ile?
7G 5o do .o( send t,e B)!)ATA ta"le in a !all Transaction state&ent/
7H What loop !o you co!e "or a R)AD DAAS) state$ent?
=< What are the steps in a BDC session ?
1he first step in a +6' session is to identify the screens of the transaction that the program will
process. ?ext step is to write a program to build the +6' table that will be used to submit the data to
#$%. 1he final step is to submit the +6' table to the system in the batch mode or as a single
transaction by the '$LL 17$?#$'1)(? command.
=Q How !o you "in! the in"or$ation on the current screen ?
/ 1he information on the current screen can be found by #ystem #tatus command from any
menu.
=- How !o you sa*e !ata in BDC ta%les ?
/ 1he data in +6' tables is saved by using the field name ]+6'K(B'(6. and field value of
]/99
=7 What is the last entry in all BDC ta%les ?
/ )n all +6' tables, the last entry is to save the data by using the field name +6'K(B'(6. and
a field value of ]/99.
== What is a $ultiple line "iel! ?
/ $ multiple line field is a special ind of field which allows the user to enter multiple lines of data
into it.
=G How !o you populate !ata into a $ultiple line "iel! ?
- 1o populate data into a multiple line field, an index is added to the field name to indicate which
line is to be populated by the +6' session ,Line index -.
=H Write t,e B)! ta"le str(ct(re%
/ +6' table structure
- 40 -
@IEL) TYPE )ES!RIPTION
%rogram 'A$7,E- %rogram name of transaction
6yn%ro 'A$7,<- #creen number of transaction
6yn+egin 'A$7,9- )ndicator for new screen
Fnam 'A$7,8=- ?ame of database field from
#creen
Fval 'A$7,E@- >alue to submit to field
=I Does the CA&& RA+SAC,-+ $etho! allow $ultiple transactions to %e processe! %y SAP ?
/ ?o. 1he '$LL 17$?#$'1)(? method allows only a single transaction to be processed by
#$%.
=R )oes t,e B)!?INSERT f(nction allo &(ltiple transactions to "e processed ". SAP H
3 Yes%
GS What is the synta. "or /CA&& RA+SAC,-+ ?
/ '$LL 17$?#$'1)(? trans P using bdctab 0(6. mode Q.
1hree possible entries are there for 0(6..
$ / show all screens
. / show only screens with errors
? / show no screens
"hich mode of ]'$LL 17$?#$'1)(? method allows bacground processing H
/ ? is the only mode that allows bacground processing.
G< ,s it possi%le to use /CA&& RA+SAC,-+ without a BDC ta%le ?
/ Ces, it is possible to use ]'$LL 17$?#$'1)(? without a +6' table. )n such case, the
current program is suspended, the transaction specified is brought up, and a user must enter
the data into the screens.
GQ What is C-D) ?
/ 1'(6. is the transaction code for the transaction that should be used to process the data in
the +6' table being inserted.
G- What are the "unction $o!ules that nee! to %e calle! "ro$ BDC progra$ to su%$it the transactions "or
processing ?
/ +6'K(%.?KG7(;%
/ +6'K)?#.71
/ +6'K'L(#.KG7(;%
G7 How $any sessions will %e opene! using BDC0-P)+01R-#P ?
- (nly one session can be created using the +6'K(%.?KG7(;% functon.
G= What is /BACH ,+P# or /BDC ?
- 1he #$% system offers two primary methods ,+6' #.##)(? 0.1A(6, '$LL
17$?#$'1)(? 0.1A(6- for transferring data into the system from other systems and ?on/
#$% systems. 1hese two methods are collectively called as ]+$1'A )?%;1 or ]+atch 6ata
'ommunication ,+6'-.
GG What are the a!*antages in Batch ,nput ?
- 1he +atch )nput ensures 6ata integrity.
?o manual interaction is re!uired during 6ata transfer.
GH What is the "unctionality o" /Classical Batch ,nput ?
)n ]'lassical +atch )nput an $+$%/< program reads the external data that is to be entered in the #$%
system and stores the data in a +atch )nput session. 1his session stores the actions that are re!uired
to enter your data using normal #$% transactions.
GI Which Function 'o!ules are use! in /Classical Batch ,nput ?
- +6'K(%.?KG7(;% , +6'K)?#.71, +6'K'L(#.KG7(;%.
GR What is Synchronous Data%ase up!ate ?
- 6uring the processing no transaction is stored until the previous transaction has been written
- 41 -
to the 6atabase. 1his is called #ynchronous 6atabase update.
HS What are the !i""erences %etween CA&& RA+SAC,-+ an! BACH ,+P# S)SS,-+ ?
/ 1he most important aspects of the batch session interface are*
/ $synchronous processing
/ 1ransfers data for multiple transactions
/ #ynchronous database update
6uring processing, no transaction is started until the previous transaction has been written to
the database.
/ $ batch input processing log is generated for each session
/ #essions cannot be generated in parallel
1he most important aspects of the '$LL 17$?#$'1)(? ;#)?G interface are*
/ #ynchronous processing
/ 1ransfers data for a single transaction
/ #ynchronous and asynchronous database updating both possible
1he program specifies which ind of updating is desired.
/ #eparate L;" for the transaction
1he system performs a database commit immediately before and after the '$LL
17$?#$'1)(? ;#)?G statement.
- ?o batch input processing log is generated
H< What are the types o" Batch ,nput ?
- 'lassical +atch )nput
- 'all 1ransaction
- 'all 6ialog
HQ What is BDC0-2C-D) ?
- 1he command field is identified by a special name in batch input called +6'K(B'(6.. 1his
name is constant and always identifies the command field.
H- How can we e.ecute a "unction in a BDC session ?
- "e can execute a function in a transaction by entering the function code or function ey
number in the command field of an #$% session. $ function ey number must be prefixed with
the / ,slash- character. $ function code must be prefixed with the L character.
- .xample*
+6'6$1$/F?$0 L &+6'K(B'(6.&
+6'6$1$/F>$L L &L;%6$&
H7 How can we position the cursor on a particular "iel! ?
- +6'6$1$/F?$0 L ]+6'K';7#(7
+6'6$1$/F>$L L 2F).L6?$0.3
H= Who are Dialog users an! who are Bac3groun! users ?
- 6ialog users are normal interactive users in the #$% system. +acground users are user
master records that are specially defined for providing authori5ations for bacground
processing jobs.
HG What is the use o" BDC0,+S)R ?
- "e add a transaction to a +atch )nput #ession by using this function.
HH What are the up!ate $o!es in CA&& RA+SAC,-+ ?
- # * #ynchronous
- $ * $synchrnous
- L * Local
- 42 -
HI What !oes the $essage para$eter in!icates ?
- 1he message parameter indicates there all system messages issued during a '$LL
17$?#$'1)(? are written into the internal table 2itab3. 1he internal table must have the
structure of +6'0#G'(LL.
HR What is Direct ,nput ?
- 1o enhance the batch input procedure, the system offers the direct input techni!ue especially
for transferring large amount of data. 1his techni!ue doesnt create sessions but stores the
data directly. 1he direct input programs must be executed in the bac ground only. 1o
maintain and start these programs, use program 7+0>#A(" or the transaction +0>(.
IS What are the "eatures o" Recor!ing Function ?
- recording transaction runs
- creating batch input sessions from the recorded transaction runs.
- Generating a batch input program from the recorded data.
I< What is synchrnous !ata%ase up!ate ?
- 6uring the processing, no transaction is stored until the previous transaction has been written
to the database. 1his is called #ynchronous database update.
IQ 5o do .o( set (p "atc, process/
6ata analysis* $naly5e the data that is to be transferred to the #$% #ystem.
XX
Generate #$% structures* Generate #$% data structures for incorporation into your data export
program.
XX
6evelop transfer program* Cou can write the program in $+$%/< or as an external program.
XX
'reate se!uential file* .xport the data that is to be transferred, to a se!uential file.
XX
'reate batch input program* $+$%/< batch input program that will read the data to be transferred from
the se!uential file.
XX
%rocess batch input data* %rocess the data and add it to the #$% #ystem. Cou can do this either by*
batch/input session method or 'all transaction method.
XX
$nalyse results* 'hec that all data has been successfully processed.
XX
$nalyse .rror session* 'orrect and re/process erroneous data.
I- Where !o you use BDC?
transferring data from another system when you install your #$% #ystem
regularly transferring data that is captured by a non/#$% system in your company into the #$%
#ystem. $ssume, for example, that data collection in some areas of your company is still
performed by a non/#$% system. Cou can still consolidate all of your data in the #$% #ystem by
exporting the data from the other system and reading it into the #$% #ystem with batch input.
Cou can also use batch input to transfer data between two 7/8 #ystems. Aowever, there are more
direct methods for doing this, such as 7F' ,remote function calls-.
I7 What has to %e !one to the pac3e! "iel!s %e"ore su%$itting to a BDC session?
6eclare these fields in the internal table as characters and the length of the field should be same as the
field length of the field&s data element. 1his internal table is used to hold the data fetched from the
se!uential file using "#/upload function module
What is &S'W
1he L#0" is a cross/application component ,'$- of the #$% 7/8 #ystem.
1he tool has interfaces with the 6ata 1ransfer 'enter and with batch input and direct input processing
as well as standard interfaces +$%) and )6oc in 7/8.
- 43 -
1he L#0" comprises the following &ain f(nctions*
9. 7ead data ,legacy data in spreadsheet tables and/or se!uential files-.
Function ,ead data replaces and enhances functions )preadsheet interface and 3ost
interface of L#0" version 9.@. Cou can use any combination out of %' and server files now.
:. 'onvert data ,from the source into the target format-.
8. )mport data ,to the database used by the 7/8 application-.
C-D) 4 &S'W
SAP Scripts
W,at is sap script and la.o(t set/
$ns / #$%script is the integrated text management system of the #$% 7/8 #ystem. #$%script is tightly
integrated into the #$% #ystem. )t is used for many different word/processing tass all over the #$%
#ystem.
W,at is la.o(t set/
$ layout set in #$%script is used for page layout. 1he layout set contains various elements, which are used
for layout control of the individual pages and also contain layout information for texts which are to be output
on the individual pages.
1he layot of a document is defined in a layot set.
$ layout set specified the appearance and structure of a document.
Layout sets contain predefined text modules with space reserved for variable data. Cou can use these text
modules for different application.
- 44 -
.very #$%script document uses a layout set.
1o mae changes to your documents, such as moving a piece of text, or changing fonts, paragraph formats,
and tabs, you only need to change the layout set.
T,ere are to a.s of for&atting te6ts (sing la.o(t sets$
1he text is entered and output in standard text maintenance. Cou can assign any layout set. 1ext can
also be entered via the layout set a letter header, for example.
1he text is formatted via an $+$%/< program using a layout set. 1he program can either dynamically
output individual predefined text modules, text elements or transfer entire texts, which are to be output
in the layout set.
Yo( can (se #tyles to define t,e for&atting of t,e te6t in .o(r doc(&ents% A st.le
deter&ines te6t for&atting ". setting t,e paragrap, and c,aracter for&ats (sed in a
doc(&ent% Yo( canA for e6a&pleA (se a st.le to ,ig,lig,t c,aracter strings or ,ole
paragrap,s% Yo( can assign a st.le to an. te6t% T.picall.A ,oe0erA .o(Kll (se st.les
pri&aril. in t,e &ain indos of la.o(t setsA ,ere (sers t.pe or enter te6t directl.
in doc(&ents%
5eader data is fo(nd in "ot, st.le and la.o(t set &aintenance%
)n style maintenance, it is used primarily to present important information / designed to mae it easier
for the end user to select a style. 1he header data in layout set maintenance, on the other hand, is
used for information and control purposes.
"indows are defined in layout set maintenance. 1hey represent areas
which are positioned on pages as page windows and in which text is
later output. $t least one window must be defined for each layout set. )f
not, a text cannot be formatted by #$% script.
T,e folloing indo t.pes can "e (sed$
MAIN N 0ain window in which continuous text is output. 1his is the window used by dialog users of a
print program and layout set. For example the body text of a letter would be entered in 0$)?.
;AR N "indow with variable contents. 1he text can vary on each page in which the window is
positioned. >ariable windows are formatted for each page.
!ONST N "indow with constant contents which is only formatted once.
A la.o(t set ,as t,e folloing ele&ents$
5eader data / 6ata related to development ,created by, development class, etc.- and layout set
information ,which elements are used- are both stored in the header data. $ start page must be
entered here.
Paragrap, for&ats / %aragraph formats are re!uired in layout sets / as in styles / in order to format
texts. Aowever, they are also used for word processing in layout sets, for example, to format text
elements.
!,aracter for&ats / Cou can also use character formats to format texts or paragraphs. ;nlie
paragraph formats, however, they are used to format text within a paragraph.
Windows 4 Win!ows are na$es an! win!ow types5 which are not physically positione! until they are
allocate! to pages an! units o" $easure$ent are speci"ie!6
Pages / %ages are defined to provide the system with a start and end point in text formatting.
Page indos / %age windows are the combination of windows and pages, where the dimensions of a
window and its position on a page are specified.
1he purpose of SAP script control co&&ands is to allow control of the
- 45 -
output formatting. 1hese commands are not interpreted by the #$%script
editor, but are passed through to the #$%script 'omposer for processing. 1he
composer is the program that converts text from the form displayed in the editor to
the form used for printing.
W,at is SAPscript and e6plain its p(rpose/
#$% #cript is the #$% systems own text/proessing system. Coull find that it loos and feels a lot lie
other leading text/processing system that you may use on your personal computer.
.very company needs to output documents with a uniformly defined layout ,eg. )nvoices, delivery notes,
etc..- all the time.
1he basic layout of the document is pre/defined , but in many cases, other data has to be merged with
it, such as address data or purchase order items. 1his data might be entered manually by a employee,
or retrieved from a database table.
Large !uantities of these documents have to be produced. From printing is usually a mattter of large
print runs of documents such as payslips, checs, order confirmation, reminders etc.
#$%script has been developed to meet the above re!uirements. )1 is an integrated tool for text entry
and form printing in 7/8 applications.
1hese documents are normally provided by #$% but every organi5ation have their uni!ue wa!ys of
these documents so to customi5e these and for creating newer ones if re!uiredF #$% script is used.
W,at are co&ponents of SAPscript/
Layout set, #$%script 1ext, $+$% %rint program , symbols, function modules lie
openKform, closeKFrom, 7eadKtext etc,.
W,at are t,e ABAP'7 !o&&ands t,at link to a la.o(t set/
'all function (%.?/form.
'all function "7)1./from.
'all function 'L(#./from
I&porting Grap,ics 8Logos9 into SAPScript
1he program 7#1GL60' can be used to upload graphics ,file extension .tif on %' files- into individual
standard text.
Ot,er (sef(l progra&s for SAPScript
7#1GF'(? / 'onverts page format
7#1G#'7% / ;pload/6ownload layout sets
7#1G6+;G / #$%#cript debugger
)e"(g SAPScript
Cou can debug a #$%#cript* ;se 1ools / "ord %rocessing / Layout #et.
.nter name of layout set and then ;tilities / $ctivate 6ebugger.
)t is of no conse!uence which layout set you enter when selecting the #$%script debugger. ,0enu
path* 1ools/"ord/processing / Forms, ;tilities / $ctivate 6ebugger- 1he next layoutset called will invoe
the debugger. 1his is !uite handy when verifying which layoutset is being called ,>erifying customi5ing
settings-.
$nother way to set the #$%#cript debugger is to run program 7#1G6+;G.
"hen a Form is copied from one client to another .$nd )f ; try to display or change the form in the
copied client .1he possible error message cud be *
9.Form not found
1ry coping again specifing the language .
:.)F )1 dispalys an error message saying 1hat the text file is inconsistent .
1hen go to #.8E and 7un [7#1G'AB(\ .
- 46 -
)t will as for the form name ,then chec all the checboxes and then run the program.
?ote * all #cript related problems can be solved using %rogram ]7#1G4.
5o to take a "ack (p of script la.o(t into 2Kr ,ard disk and load it later
;se %rogram ,)09)C,+.
Use EXPORT mode, when downlodin! nd "#PORT when $%lodin! s&'i%() *on+( ,o'!e( (o !i-e (he ,o'm
nme in (he o./e&( ,ield) This will &'e(e s&'i%( wi(h (he sme nme s (h( o, (he o'i!inl s&'i%( ) ", s&'i%(
wi(h (he sme nme e0is(s in (he sme &lien( ,(hen i( will !i-e n e''o' 1O./e&( &nno( .e o-e'w'i((en + )
I ant to cop. ta"le across clients
;se %rogram 7#'L1'(%
To transfer script files across s.ste&s ,?ot 'lients- / ,)09)C,+
To co&pare t,e contents of a ta"le across clients* 7#1+#.7>
To c,ange t,e de0elop&ent class of an. o"#ect / 7#"+(@=:
W,at t.pe of 0aria"les nor&all. (sed in sap script to o(tp(t data/
S1ables name/ fieldsS.
5o do .o( n(&"er pages in sap script la.o(t o(tp(ts/
S page S
Snext %age S
W,at takes &ost ti&e in SAP script progra&&ing/
6efining layout set up / sets.
5o do .o( (se ta" sets in la.o(t sets/
6efine paragraph with defined tabs.
How !o you %ac3up sap script layout sets? Can you !ownloa! an! uploa!? How?
#$% script bacup */ )n transaction #.V9 goto ;tilities /3 'opy from client /3 Give source form name,
source client ,@@@ default-, 1arget form name.
6ownload */ #.V9, type form name /3 6isplay /3 ;tilities /3 form info /3 List /3 #ave to %' file.
;pload */ 'reate form with page, window, pagewindow with the help of downloaded %' file. 1ext
elements for %age windows to be copied from %' file.
W,at is !o&pare Tool in SAP Script /
#$% #cript offers tools for comparing objects across clients. "e can compare or copy the following
inds of objects.
#tyles
Layout sets
6ocuments
"ith the 'ompare tool we can do the following *
'hec whether an object exists in both clients
6isplay the differences between the versions of an object
La.o(t Sets are used to control page layout and text formatting in documents .
SAP Standard st.les and layout sets are always held in 'lient @@@.
In ,at for&at does SAP Script store te6t /
23Ps&'i%( (e0(s 'e s(o'ed in "n(e'&hn!e Te0( 4o'm( 5"T46) 23Ps&'i%( o,,e's &on-e'sion %'o!'ms ,o' (he (e0(
,ile ,o'm(s Ri&h Te0( 4o'm( 5RT46 nd 327"" s n in(e',&e (o o(he' wo'd %'o&esso's)
T,e 0ario(s indo t.pes in SAP Script are
0ain, >ariable and 'onstant.
- 47 -
T,e Ne3Page co&&and is used to force a %age brea in the text at any point.
Protect %%% Endprotect command pairs can be nested ,1rue / False-.
False.
)eli&iter + must be used immediately before and after the symbol.
W,at does t,e co&poser do/
1he final appearance of your documednt depends on interaction between the print program and the
layout set.
1he #$%script print program initiali5es the printing process. .very command entered using the
#$%script programming interfaces is transferred to the composer.
1he composer received layout information from the layout set specified by the print program. 1he
documents are formatted according to this layout information.
)f the documents contain variables, the compoer replaces these variables with data from the 7/8
system, such as the current date, or with the userdata selected by the print program.
1he print program controls the completion of thelayout set. (nce this is done, the composer places the
completed document in the spool.
W,ere do e define Ta" space for data in SAPScript/
"hen defining the paragraph for the text element we can define the 1$+# then. 1here is parameter
called 1$+# to be defined in paragraph definition.
,at is difference "eteen Windo + a Page Windo/
"indow* $n area that is predefined in the layout set. "indows are text modules, which are positioned
on a document page.
"e define the window type, 6efault %aragraph, specify the text elements or a #$%script text to be
included etc in the "indcow 'omponent.
%age"indow* we define the parameters of the earlier defined "indow, appearance on the document
lie left or right margins, "idth S Aeight.
W,at are s.&"oles + state t,eir different t.pes it, E%g%
$ #ymbol is a constant, which can be inserted in a document. )t saves the user unnecessary wor
when replacing sections of text, phrases, etc. .ach symbol has a name which is encloses by S.
.g. Svariable name S
#ystem symbols eg S6ateS, StimeS etc.
#tandard symbols *#tandard symbols are user/defined. 1hey are maintained centrally in table 1161G.
.g. S#G6AS for the opening salutation * [dear sir/madam\.
S0FGS for the closing salutation *\yours Faithfully\.
%rogram #ymbols * %rogram symbols display data from the $+$%/< program which has called the word
processing function .g. )tab/connid.
- 48 -
1ext symbols* Cou can define a text symbol for any text module. 1his symbol is valid only in the text
module for which you have defined it. .g. 6efine S#ymbolS L ]value.
5o do e define Te6t s.&"ols/
;sing the control command 6.F)?. Sx9S L ]=I.
State fe control co&&ands/%
%rotect .. endprotect, define, new/page, include.. ifW endif.
,at is t,e p(rpose of OProtect and EndProtectP/%
Cou can specify either in the style or in the layout set that a particular paragraph should not be slit in
two by a page bea. )f the page protect attribute is set then the complete paragraph is always output
ona single page. 1his property applies only to that particular paragraph. #$%#cript provides the
%7(1.'1W .?6%7(1.'1 command pair to allow you to define the areas to be protected against a
page bea on an individual basis. 1hus the %7(1.'1/.?6%7(1.'1 commands may be regarded as
a ind of conditional ?."/%$G. command, the condition being whether or not the lines enclosed
between the two commands fit in the space remaining in the current main window.
5o do e set t,e dateA ti&e for&at/
#.1 1)0. 0$#B * '(?7(L# 1A. 1)0. F).L6 F(70$1.
#.1 6$1. 0$#B * '(?17L# 1A. 6$1. F).L6 F(70$1.
.G. #et 1ime 0as L [ AA*00*##\.
,at is t,e role of an ABAP progr& in SAPScript/
7etrieves 7/8 application data from the database.
6efines the layout set processing logic , 1he order and repetition of text elements-.
'hooses a layout set for printing.
#elects the output device, such as printer,monitor, or fax.
#ets print attributes such as immediate output, number of copies ,and pages to beprinted.
5o to re(se so&e co&ponents of t,e script la.o(t to ot,er progra&/
Is this script layout is standard for all the printer: If not then y we are going for script layout:
Give me couple of methods that I will take standard script layout printout for different printer.
3ow u will analysis script program: % which goes to main and how many windows etc;.(
!an ; inserted logo on .o(r progra&/% Gi0e &e t,e progra& na&e ,ic, (ploads &. logo and
s.nta6 for logo inserting in sap script%
Ces u can insert a logo on your script layout.
;se this 7eport [RSTFL)M!\ which will uploads the logo.
;se the following statement which includes the logo on your script prog.
/* )?'L;6. &OA.G/0$'7(/GGG& (+U.'1 1.G1 )6 #1 L$?G;$G. &.&.
GGG N object name, u will gives ` runtime in rstxldmc program.
Gi0e &e s.nta6 for "o6 co&&and%
1O9 9+O) * $$ <I!03 = C$ 3"IG30 >?.@> C$ 8,A$" '= 0<
- 49 -
Script !o&&ands%
6efining a variable
6.F)?. S';#1S L &@@@@@@:9&.
)efine and insert a standard te6t$
#tandard texts is predifined textst that can be used in more than one form. #tandard texts are can be
created, changed and displayed using transaction #(9@.
1he text )6 is used to callsify texts.
1o include a stadard text in a form, use the )?'L;6. command*
/* )?'L;6. OK+'<I@K.G<KAF (+U.'1 1.G1 )6 #6>6
"hen formatting the standard text the %$7$G7$%A parameter is used. 1o center the text use*
/* )?'L;6. OK+'<I@K.G<KAF (+U.'1 1.G1 )6 #6>6 L$?G;$G. .? %$7$G7$%A '.
Formatting addresses
1he $667.##/.?6$667.## command formats addresses according to the postal norms of the
recipient&s country, as defined in the
country parameter.
$667.## 6.L)>.7C %$7$G7$%A $6
?$0. SB?$9/?$0.S
#17..1 SB?$9/#17$#S
%(#1'(6. SB?$9/%#1LOS
')1C SB?$9/(71@9S&
'(;?17C SB?$9/L$?69S
F7(0'(;?17C &6.&
.?6$667.##
$voiding pagebreas in a paragraph
/* %7(1.'1
*
*
/* .?6%7(1.'1
1he text lines to be protected are enclosed between the two commands
'onditonal text ouput )F / .?6)F
Cou can use )F/.?6)F lie in a normal $+$% program
/* )F condition
*
*
- 50 -
/* .?6)F
and
/* )F condition
*
/* .L#.
*
/* .?6)F
.xample*
/* )F S#%FL)/')1C1(S L _+.7L)?_
..... put some text here
/* .?6)F
S*mbols and (ontrol commands
#ymbols are placeholders for values that are inserted during print formatting.
#ymbols are indentified by name surrounded by _S_ and are not case sensitive
0ypes of symbols
#ystem symbols
)ATE 6ate
)AY 6ay
NAME?O@?)AY ?ame of day
MONT5 0onth
YEAR Cear
TIME 1ime
5O2RS Aours
MIN2TES 0inutes
SE!ON)S #econds
PAGE %age number
NEFTPAGE ?umber of next pagre
)E;I!E (utput device
SPA!E +lan space
2LINE ;nderline
;LINE >ertical line
Stan!ar! sy$%ols
#tandard symbols are user defined and are maintained in table TT)G8ta"le is not a0aila"le///9. Cou
use transaction #08@ to change or display standard symbols.
$n examples of standard symbols is S0FGS fot _Cours faithfully_
#tandard text
#tandard texts is predifined texts that can be used in more than one form. #tandard texts are can be
created, changed and displayed using transaction #(9@.
1he text )6 is used to classify texts.
1o include a standard text in a form, use the )?'L;6. command*
- 51 -
/* )?'L;6. OK+'<I@K.G<KAF (+U.'1 1.G1 )6 #6>6
"hen formatting the standard text the %$7$G7$%A parameter is used. 1o center the text use*
/* )?'L;6. 2name3 2%arameter3
2parameter3 L (bject, )6, Language, %aragraph
.xample*
/* )?'L;6. OK+'<I@K.G<KAF (+U.'1 1.G1 )6 #6>6 L$?G;$G. .? %$7$G7$%A '.
?ame* OK+'<I@K.G<KAF
(bject* 1ext
1ext id* #6>6 ,1ext id from #(9@-
Language* .?
%aragraph* ' ,'entered-
1ip* Cou can use menu )nsert/31ext/3#tandard to mae it easier to insert the text
%rogram symbols
%rogram symbols are for contents of database fields or global program symbols. "hen you print the
form, data from the database tables are printed isntead of the symbols.
)n the print program*
1$+L.#* na9.
)n the form*
SB?$9/?$0.9S
Formatting
S#C0+(LS Ao formatting
S#C0+(LT7S (ffset / (utput begins here. (ffset refers to formatted value
S#C0+(L8=9S Length / (utput data in the specified length
S#C0+(L8I9S #uppress initial value / )f the field has been initiali5ed, nothing is output
S#C0+(L8>9S #uppress leading 5eros
S#C0+(L8!9S 'ompress blan spaces / 'onsecutice spaces are compressed into a single space.
Leading spacesare suppressed.
S#C0+(L8R9S 7ight align output
S#C0+(L8S9S (perators are suppressed
S#C0+(L8U9S 6ictionary length / 1he data length is defined by the $+$% dictionary
S#C0+(L8I%Q9S 6ecimal format. Length E decimals :
S:te6t<:SYMBOL:te6tQ:S 1ext can be inserted before and after the symbol
- 52 -
(ontrol commands
'ontrol command are used to modify text output. ;se format ey /* in the format column.
/* )?'L;6.
/* 6.F)?.
/* $667.##.....?6$667.##
/* %7(1.'1......?6%7(1.'1
/* ?."/%$G.
/* )F.....?6)F
/* '$#.....?6'$#.
.xamples of control commands
)?'L;6.
)?'L;6. name 2parameter3
%arameters*
(+U.'1 ..g. 1.G1, 6(B; ,6ocument-, 6#C# ,Aypertext-.
)6 1ext )6 /1ext )6 is a way to group texts / #e transaction #(9@
L$?G;$G. )f the parameter is not specefied, the logon language will be used
%$7$G7$%A 1he text to be included is formatted using the style allocated. 1he %$7$G7$%A
parameter can be used to redefine the standard paragraph for this style for the current call. $ll 4/
paragraphs in the included text will then be formatted using the paragraph specified here.
-%7ect
&+
,anguage
Paragrap$
Standard texts are maintained in transaction S-.%
E6a&ple <$
Cou have created a standard text in #(9@ ?amed 0C1.G1 and with 1ext )d #1
/* )?'L;6. 0C1.G1 (+U.'1 text )6 st
E6a&ple Q$
Cou can also use a dynamic name so that you can retreive a ext depeding of the name variable*
/* )?'L;6. S#';#1(0/?$0.S text )6 st.
6epending on the name in the variable S#';#1(0/?$0.S different texts will be shown. ?ote that a
text with the name in the variable S#';#1(0/?$0.S name must be created in #(9@.
6.F)?.
/* 6.F)?. S#C0+(LS L &#tring9 #tring:&
/* 6.F)?. S';#1S L &@@@@@@:9&.
$667.##/.?667.##
1he $667.##/.?6$667.## command formats addresses according to the postal norms of the
recipient&s country, as defined in the
country parameter.
/* $667.## 6.L)>.7C %$7$G7$%A $6
- 53 -
/* ?$0. SB?$9/?$0.S
/* #17..1 SB?$9/#17$#S
/* %(#1'(6. SB?$9/%#1LOS
/* ')1C SB?$9/(71@9S
/* '(;?17C SB?$9/L$?69S
/* F7(0'(;?17C &6.&
/* .?6$667.##
i$e Date an! !eci$al "or$at
.xamples*
/* #.1 1)0. 0$#B L &AA*00&
/* #.1 6$1. 0$#B L &66.0000.CCCC&
/* #.1 '(;?17C &;#$&
Frames, lines and s$ading
B-8
6raws a box
S.nta6$
/* +(G 2xpos3 2ypos3 2width3 2height3 2frame3 2intensity3
1he intensity is the grey scale of the box as T. 1he frame parameters is the thicness of the frame.
6efault is @.
.ach of the paramteters ypos, xpos, width, height and frame muts be followed of the measurement unit*
TW ,twip-
PT ,point-
IN ,inch-
MM ,millimeter-
!M ,centimeter-
LN ,line-
!5 ,character-.
.xamples*
/* +(G G%(# &99.:9& 00 C%(# &=.89& 00 A.)GA1 &9@& 00 ")61A &:@& 00 )?1.?#)1C 9@ F7$0. @
1"
/* +(G F7$0. 9@ 1"
6raws a frame around the current window with a frame thicness of 9@ 1" ,L @.= %1-.
/* +(G )?1.?#)1C 9@
Fills the window bacground with shading having a gray scale of 9@ T.
/* +(G A.)GA1 @ 1" F7$0. 9@ 1"
6raws a hori5ontal line across the complete top edge of the window.
/* +(G ")61A @ 1" F7$0. 9@ 1"
6raws a vertical line along the complete height of the left hand edge of the window.
/* +(G ")61A &9V.=& '0 A.)GA1 9 '0 F7$0. 9@ 1" )?1.?#)1C 9=
/* +(G ")61A &9V.=& '0 A.)GA1 &98.=& '0 F7$0. 9@ 1"
/* +(G G%(# &9@.@& '0 ")61A @ 1" A.)GA1 &98.=& '0 F7$0. 9@ 1"
/* +(G G%(# &98.=& '0 ")61A @ 1" A.)GA1 &98.=& '0 F7$0. 9@ 1"
- 54 -
6raws two rectangles and two lines to construct a table of three columns with a highlighted heading
section.
P-S,,-+ an! S,9)
Cou can use the %(#)1)(? and #)O. commands to set default parmeters for a box. 1his can be usefull
if you have several boxes that share the same parameters.
.xample*
/* %(#)1)(? G(7)G)? &99.:9& C(7)G)? &=.89& 00
/* #)O. A.)GA1 &:& 00 ")61A &VI& 00
/* +(G F7$0. 9@ 1" )?1.?#)1C 9@
)f you want to set the position realtively to the window use %(#)1)(? ")?6(" to set the position to
the top/left start of the window. 1hen use %(#)1)(? to set the current position relatively to the start of
the "indow. ?ote that
you uses _Z_ or _/_ in the (7)G)? position to the set the position relatively.
/* %(#)1)(? ")?6("
/* %(#)1)(? G(7)G)? &Z=& 00 C(7)G)? &Z9@& 00
the position is now = 00 from the left and 9@ 00 from the top of the window.
?(1.* $fter using the position command you can move the current position realtively to the last used
position
/* %(#)1)(? G(7)G)? &Z9@& 00 C(7)G)? &Z:@& 00
?ow the position will be G L 9= and C L 8@
6rawing a line
Cou can draw a line by setting the Aeight or "idth of a box to @ and add a frame. ..g. a hori5ontal line*
/* #)O. A.)GA1 &@& 00 ")61A &:@@& 00
/* +(G F7$0. 9@ 1" G%(# &99.:9& 00 C%(# &9<.E9& 00 )?1.?#)1C 9@@
Win!ow an! Page
")?6(" sets the values for the width and height to the values of the current window ,default setting-.
%$G. #ets the values for the width and height to the values of the current output page.
.xamples*
/* #)O. ")?6("
#ets ")61A and A.)GA1 to the current window dimensions.
/* #)O. ")61A &8.=& '0 A.)GA1 &V.I& '0
#ets ")61A to 8.= cm and A.)GA1 to V.I cm.
/* %(#)1)(? ")?6("
/* %(#)1)(? G(7)G)? /:@ 1" C(7)G)? /:@ 1"
/* #)O. ")61A Z<@ 1" A.)GA1 Z<@ 1"
/* +(G F7$0. 9@ 1"
$ frame is added to the current window. 1he edges of the frame extend beyond the edges of the
window itself, so as to avoid obscuring the leading and trailing text characters.
- 55 -
/.% (alling a form from SapScript 0111112
/*6.F)?. S';#1S L &@@@@@@:9&.
/*%.7F(70 G.1K?$0. )? %7(G7$0 OK+'<I@K.G<KAF
/* ;#)?G S';#1S
/* 'A$?G)?G S?$0.S
/*.?6%.7F(70.
6ear S?$0.S
1he $+$% routine could be defined as follows*
)0%(71$?1* 1he structure itcsy must be used for the parameters.
7.%(71 OKA.?7)BFK#'7)%1KF(70 .
tables scustom.
form getKname tables inKtab structure itcsy
outKtab structure itcsy.
read table inKtab index 9.
select single 4 from scustom
where id L inKtab/value.
if sy/subrc L @.
read table outKtab index 9.
move scustom/name to outKtab/value.
modify outKtab index sy/tabix.
else.
read table outKtab index 9.
move &?o name& to outKtab/value.
modify outKtab index sy/tabix.
endif.
44 Cou could also fill the ouput parameter table this way
7.$6 1$+L. outKpar ")1A B.C &?$0.9&.
outKpar/value L lKname9.
0(6)FC outKpar )?6.G sy/tabix.
endform.
?ote that if you use more than one parameter you must use ;sing or 'hanging before every
parameter Y
/* %.7F(70 2form3 )? %7(G7$0 2prog3
/* ;#)?G S)?>$79S
/* ;#)?G S)?>$7:S
......
/* 'A$?G)?G S(;1>$79S
/* 'A$?G)?G S(;1>$7:S
......
/* .?6%.7F(70
/3% Structure of a print program
- 56 -
1he print program is used to print forms. 1he program retieves the necesary data from datbase tables,
defines the order of in which text elements are printed, chooses a form for printing and selects an output
device and print options.
(pen form printing / 0ust be called before woring with any of the other form function modules.
call f(nction :OPEN?@ORM:%%%%%
0ust be ended with function module 'L(#. F(70
41o begin several indentical forms containing different data within a single spool re!uest, begin each
form using #1$71KF(70, and end it using .?6KF(70
call f(ntion :START?@ORM:%%%%%
"rite text elements to a window of the form
call f(nction :WRITE?@ORM:%%%%%
.nds form
call f(ntion :EN)?@ORM:%%%%%
'loses form printing
call f(nction :!LOSE?@ORM:%...
.xamples of function calls
-P)+ F-R'
'$LL F;?'1)(? &(%.?KF(70&
.G%(71)?G
4 $%%L)'$1)(? L &1G&
4 $7'A)>.K)?6.G L
4 $7'A)>.K%$7$0# L
6.>)'. L &%7)?1.7&
6)$L(G L &G&
4 F(70 L & &
4 L$?G;$G. L #C/L$?G;
(%1)(?# L (%1)(?#
4 0$)LK#.?6.7 L
4 0$)LK7.')%).?1 L
4 0$)LK$%%LK(+U.'1 L
4 7$"K6$1$K)?1.7F$'. L &4&
)0%(71)?G
4 L$?G;$G. L
4 ?."K$7'A)>.K%$7$0# L
4 7.#;L1 L
.G'.%1)(?#
'$?'.L.6 L 9
6.>)'. L :
F(70 L 8
(%1)(?# L <
;?'L(#.6 L =
0$)LK(%1)(?# L I
$7'A)>.K.77(7 L V
)?>$L)6KF$GK?;0+.7 L E
0(7.K%$7$0#K?..6.6K)?K+$1'A L J
(1A.7# L 9@
.
- 57 -
SAR0F-R'
'$LL F;?'1)(? &#1$71KF(70&
.G%(71)?G
4 $7'A)>.K)?6.G L
F(70 L &0CKF(70&
4 L$?G;$G. L & &
4 #1$71%$G. L & &
4 %7(G7$0 L & &
0$)LK$%%LK(+U.'1 L
)0%(71)?G
4 L$?G;$G. L
.G'.%1)(?#
F(70 L 9
F(70$1 L :
;?.?6.6 L 8
;?(%.?.6 L <
;?;#.6 L =
(1A.7# L I
WR,)0F-R'
#ee &"7)1.KF(70&
)+D0F-R'
'$LL F;?'1)(? &.?6KF(70&
)0%(71)?G
4 7.#;L1 L
.G'.%1)(?#
4 ;?(%.?.6 L 9
+$6K%$G.F(70$1KF(7K%7)?1 L :
(1A.7# L 8
C&-S)0F-R'
#tructure for %rint options ,return values- / %ages selected for printing, ?umber of copies etc.
6$1$ +.G)? (F 7.#;L1.
)?'L;6. #17;'1;7. )1'%%.
6$1$ .?6 (F 7.#;L1.
'$LL F;?'1)(? &'L(#.KF(70&
)0%(71)?G
7.#;L1 L 7.#;L1
4 76)K7.#;L1 L
1$+L.#
4 (1F6$1$ L
.G'.%1)(?#
4 ;?(%.?.6 L 9
+$6K%$G.F(70$1KF(7K%7)?1 L :
4 #.?6K.77(7 L 8
4 (1A.7# L <.
/"% (-4T5-,6F-57 8 (alling (ommands 'sing a program
1he function module '(?17(LKF(70 can be used to create #ap#cript control statements from within
an $+$% program.
- 58 -
E6a&ple$
call function &'(?17(LKF(70&
.G%(71)?G
'(00$?6 L &%7(1.'1&.
call function &"7)1.KF(70&.....................
call function &'(?17(LKF(70&
.G%(71)?G
'(00$?6 L &.?6%7(1.'1&.
St.les
#tyles are used to predefine paragraph and character formats for forms. #$% provides several standard
styles e.g. for $ddress includes, on/line documentation and so on. Cou can define your own styles.
1o find styles, create styles and maintaine styles, use transaction #.V:.
Cou assign style to a text by using menu Format /3 #tyle
Cou can mae temporary style changes using the control command /* #1CL.
'sing grap$ics in SapScript
;se transaction #.VE to inmport graphics to #$%.
)n the form painter, you can either include directly to the form using menu .dit/3Graphic/3'reate or
using the )?'L;6. statement in a window.
1o use an )?'L;6. stanment, goto into the woindow script editor and use menu )nclude/3Graphic.
1he include can loo lie this for a bitmap*
/* +)10$% 0CL(G( (+U.'1 G7$%A)'# )6 +0$% 1C%. +0(?
Modifications
'onsiderations in connection with modifications
1he standard #$% print program should only be changed when it is absolutely necessary. )f additional
data is needed, these can in many cases be retrieved using a a %.7F(70 statement in the form
instead of changing the print program..
1here can be the following reasons to change the print program*
#tructureal changes
?ew text eloements are needed
%rint program to be used to print additional forms
6etermine/change which forms and printprograms that are used for printing
1he forms and print programs for a given output type and application can be found in table 1?$%7
%rocessing programs for output
;se view >K1?$%7 in ,1ransaction #.8@- to change entries.
- 59 -
I&port'E6port SapScript for& fro& P! file
;se $+$% program* 7#1G#'7%
S) 3 @inding t,e na&e of t,e print progra&
For #6 dopcuments you can use table 1?$%7 top find the name of the a
printprogram
Mod(le Pool
Transactions$
$ transaction is a program that conducts a dialog with the user. )n a typical dialog, the system displays
a screen on which the user can enter or re!uest information. +ased on the the user input or re!uest, the
program executes the appropriate actions lie, it branches to the next screen, displays an output, or
changes the database.
E6plain ,at is a transaction in SAP ter&inolog.%
/ )n #$% terminology, a transaction is series of logically connected dialog steps.
E6plain ,o SAP G2I ,andles o(tp(t screen for t,e (ser%
- ;ser terminal input is accepted by )A+ G2I and sent to the )A+ dispatcher. 1he dispatcher co/
ordinates the information exchange between the #$% G;)s and the wor processes. 1he
dispatcher first places the processing re!uest in re!uest !ueues, which it then processes. 1he
dispatcher dispatches the re#uests to the available work process. 1he actual processing taes
place in the wor process. "hen processing is complete, the result of a work process is returned
via the dispatcher to the )A+ G2I. 1he #$% G;) interprets the received data and generates the
output screen for the user.
W,at is L2W or )ata"ase L2W or )ata"ase Transaction /
- A B/2<C % logical unit of work ( is the span of time during which any database updates must be
performed . "ither they are all performed % committed ( D or they are all thrown away % rolled
back (.
/2< % or Bdatabase /2<C or Bdatabase transactionC (
1his is the set of updates terminated by a database commit. $ L;" lasts, at most, from one
screen change to the next , because the #$% system triggers database commits automatically at
every screen change -.
L;"s help to guarantee database integrity. "hen an L;" has been successfully concluded, the database
is once again in a correct state. )f, however, an error occurs within an L;", all database changes made
since the beginning of the L;" are canceled and the database is then in the same state as before the L;"
started.
An ,'9 begins
- .ach time you start a transaction
- "hen the database changes of the previous L;" have been confirmed ,database commit- or
- when the database changes of the previous L;" have been cancelled ,database rollbac-
An ,'9 ends
- "hen the database changes have been confirmed ,database commit- or
- "hen the database changes have been canceled ,database rollbac-
- 60 -
W,at is SAP L2W or 2pdate Transaction /
/ ;pdate transaction , or [#$% L;"\-
1his is a set of updates terminated by an $+$%/< commit. $ #$% L;" may last much longer than a
database L;", since most update processing extends over multiple transaction screens.1he programmer
terminates an update transaction by issuing a '(00)1 "(7B statement.
)oes t,e e6ternal progra& r(n in t,e sa&e SAP L2W as t,e callerA or in a separate one/
/ 1ransactions run with a separate #$% L;"
/ 7eports run with a separate #$% L;"
/ 6ialog modules run in the same #$% L;" as the caller
- Function modules run in the same #$% L;" as the caller
1he only exceptions to the above rules are function modules called with )? ;%6$1. 1$#B ,>:
function only- or )? +$'BG7(;?6 1$#B ,$L. applications-. 1hese always run in their own
,separate- update transactions.
W,at are t,e re1(ire&ents a dialog progra& &(st f(lfill /
- $ dialog program must fulfill the following re!uirements
. a user friendly user interface
. format and consistency checs for the data entered by the user
. easy correction of input errors
. access to data by storing it in the database.
W,at are t,e "asic co&ponents of dialog progra& /
- #creens ,6ynpros-
.ach dialog in an #$% system is controlled by dynpros. $ 6ynpro consists of a screen and its flow
logic and controls exactly one dialog step.
- $+$%/< module pool
.ach dynpro refers to exactly one $+$%/< dialog program. #uch a dialog program is also called a
module pool, since it consists of interactive modules.
W,at is a d.npro / W,at are its co&ponents /
- $ dynpro ,6Cnamic %7(gram- consists of a screen and its flow logic and controls exactly
one dialog step.
/ 1he different components of the dynpro are*
Flow logic* 'alls of the $+$%/< modules for a screen
#creen layout* %ositions of the texts, fields, pushbuttons, and so on for a screen
#creen attributes* ?umber of the screen, number of the subse!uent screen, and others
Field attributes* 6efinition of the attributes of the individual fields on a screen
W,at is screen flo logic/ W,at are t,e selections in it/ E6plain PAI and PBO/
Ans 3 Screen flo logic contains t,e proced(ral part of a screen% T,e screen flo logic is like an
ABAP progra& in t,at it ser0es as a container for processing "locks% T,ere are fo(r e0ent
"locksA eac, of ,ic, is introd(ced it, t,e screen ke.ord PRO!ESS$
%7('.## +.F(7. (;1%;1.
...
%7('.## $F1.7 )?%;1.
...
%7('.## (? A.L%/7.D;.#1.
...
%7('.## (? >$L;./7.D;.#1.
#elections are performed in %$).
PRO!ESS BE@ORE O2TP2T ,%+(- is automatically triggered after the %$) processing of the previous
screen and before the current screen is displayed. Cou can program the %+( processing of the screen
in this bloc. $t the end of the %+( processing, the screen is displayed.
- 61 -
PRO!ESS A@TER INP2T ,%$)- is triggered when the user chooses a function on the screen. Cou can
program the %$) processing of the screen in this bloc. $t the end of the %$).
processing, the system either calls the next screen or carries on processing at the point from which the
screen was called.
PRO!ESS ON 5ELP3RE*2EST ,%(A- and PRO!ESS ON ;AL2E3RE*2EST ,%(>- are triggered
when the user re!uests field help ,F9- or possible values help ,F<- respectively. Cou can program the
appropriate coding in the corresponding event blocs. $t the end of processing, the system carries on
processing the current screen.
!an e (se WRITE state&ent in screen fields / If not ,o is data transferred fro& field data to
screen fields
- "e cannot write field data to the screen using the "7)1. statement. 1he system instead transfers
data by comparing screen field names with $+$%/< variable names. )f both names are the same, it
transfers screen field values to $+$%/< program fields and vice/versa. 1his happens immediately
before and immediately after displaying the screen.
5o does t,e interaction "eteen t,e ).npro and t,e ABAP'7 &od(les takes place /
- $ transaction is a collection of screens and $+$%/< routines, controlled and executed by a 6ialog
processor. 1he 6ialog processor processes screen after screen, thereby triggering the appropriate
$+$%/< processing for each screen. For each screen, the system executes the flow logic that
contains the corresponding $+$%/< processing. 1he control passes from screen flow logic to
$+$%/< code and bac.
5o does t,e )ialog ,andle (ser re1(ests /
/ "hen an action is performed, the system triggers the %7('.## $F1.7 )?%;1 event. 1he data
passed includes field screen data entered by the user and a function code. $ function code is a
technical name that has been allocated in the #creen %ainter or 0enu %ainter to a menu entry, a
pushbutton, the .?1.7 ey or a function ey of a screen. $n internal wor field ,o/code- in the
%$) module evaluates the function code, and the appropriate
action is taen.
5o are t,e f(nction codes ,andled in flo logic /
/ "hen the user selects a function in a transaction, the system copies the function code into a
specially designated wor field called (BK'(6.. 1his field is global in the $+$%/< module pool.
1he (BK'(6. can then be evaluated in the corresponding %$) module.
1he function code is always passed in exactly the same way, regardless of whether it comes from a
screen&s pushbutton, a menu option, function ey or other G;) element.
W,at controls t,e screen flo /
- 1he #.1 #'7..? and L.$>. #'7..? statements control screen flow.
W,at are OfieldP and Oc,ainP state&ents /
- 1he F).L6 and 'A$)? flow logic statements let you program your own field checs. F).L6 and
'A$)? tell the system which fields you are checing,and whether the system should perform
checs in the flow logic or call an $+$%/< module.
W,at is an on OU3inp(t fieldP state&ent /
- (? 4/)?%;1
1he $+$%/< module is called if the user has entered a _4_ in the first character of the field, and the
field has the attribute 4/entry in the #creen %ainter. Cou can use this option in exceptional cases
where you want to chec only fields with certain inds of input.
W,at are conditional c,ain state&ents /
- (? 'A$)?/)?%;1 similar to (? )?%;1.
1he $+$%/< module is called if any one of the fields in the chain contains a value other than its
initial value ,blans or nulls-.
- 62 -
(? 'A$)?/7.D;.#1
1his condition functions just lie (? 7.D;.#1, but the $+$%/< module is called if any one of the
fields in the chain changes value.
W,at is Oat e6it3co&&andP /
- 1he flow logic eyword $1 .G)1/'(00$?6 is a special addition to the 0(6;L. statement in the
flow logic. $1 .G)1/'(00$?6 lets you call a module before the system executes the automatic
field checs.
W,ic, f(nction t.pe ,as to "e (sed for (sing Oat e6it3co&&andP /
- 1o use $1 .G)1/'(00$?6, we must assign a function type ]. to the relevant function in the
0enu %ainter or #creen %ainter.
W,at is t,e difference "eteen SET S!REEN and !ALL S!REEN /
"ith #.1 #'7..?, the current screen simply specifies the next screen in the chain. control branches
to this next screen as soon as the current screen has been processed. 7eturn from next screen to
current screen is not automatic. )t does not
interrupt processing of the current screen. )f we want to branch to the next screen without finishing the
current one, use L.$>. #'7..?.
"ith '$LL #'7..?, the current ,calling- chain is suspended, and a next screen ,or screen chain- is
called in. 1he called screen can then return to the suspended chain with the statement L.$>.
#'7..? 1( #'7..? @. #ometimes we might want to let an user call a popup screen from the main
application screen to let them enter secondary information. $fter they have completed their entries, the
users should be able to close the popup and return directly to the place where they left off in the main
screen. Aere comes '$LL #'7..? into picture. 1his statement lets us insert such a se!uence into the
current one.
!an e specif. t,e ne6t3screen n(&"er it, a 0aria"le% 8 Yes ' No 9%
Ces.
T,e field SY3)YNNR refers to ????????????????%
?umber of the current screen.
W,at is a dialog &od(le /
$ dialog module is a callable se!uence of screens that does not belong to a particular transaction.
6ialog modules have their own module pools, and can be called by any transaction.
T,e s.nta6 (sed to call a screen as a dialog "o6 8 pop(p 9 is ?????????????????%
'$LL #'7..? 2screen number3
#1$71)?G $1 2start column3 2start line3
.?6)?G $1 2end column3 2end line3 .
W,at is a Ocall &odeP /
)n the $+$%/< world, each stacable se!uence of screens is a _call mode_. 1his is important because of
the way you return from a given current se!uence. 1o terminate a call mode and return to a suspended
chain, set the _next screen_ to @ and leave to it*
L.$>. 1( #'7..? @ or , #.1 #'7..? @ and L.$>. #'7..? -. "hen you return to the
suspended chain, execution resumes with the statement directly following the original '$LL
#'7..? statement. 1he original se!uence of screens in a transaction is itself is a
calling mode. )f you L.$>. 1( #'7..? @ in this se!uence , that is, without having staced
any additional call modes -, you return from the transaction altogether.
T,e &a6i&(& n(&"er of calling &odes stacked at one ti&e is ??????%
?ine.
W,at is L2W or )ata"ase L2W or )ata"ase Transaction /
- 63 -
$ [L;"\ , logical unit of wor - is the span of time during which any database updates must be
performed in an [all or nothing\ manner. .ither they are all performed , committed - , or they are all
thrown away , rolled bac -. )n the $+$%/< world, L;"s and transactions can have several meanings*
L;" , or [database L;"\ or [database transaction\ -
1his is the set of updates terminated by a database commit. $ L;" lasts, at most, from one screen
change to the next , because the #$% system triggers database commits automatically at every screen
change -.
W,at is SAP L2W or 2pdate Transaction /
;pdate transaction , or [#$% L;"\-
1his is a set of updates terminated by an $+$%/< commit. $ #$% L;" may last much longer than a
database L;", since most update processing extends over multiple transaction screens.1he
programmer terminates an update transaction by issuing a '(00)1 "(7B statement.
W,at ,appens if onl. one of t,e co&&ands SET S!REEN and LEA;E S!REEN is (sed it,o(t
(sing t,e ot,er/
)f we use #.1 #'7..? without L.$>. #'7..?, the program finishes processing for the current
screen before branching to 2scr no3. )f we use L.$>. #'7..? without a #.1 #'7..? before it, the
current screen process will be terminated and branch directly to the screen specified as the default
next/screen in the screen attributes.
W,at is significance of t,e screen n(&"er JSK /
)n _calling mode_, the special screen number @ ,L.$>. 1( #'7..? @- causes the system to jump
bac to the previous call level. 1hat is, if you have called a screen se!uence with '$LL #'7..?
leaving to screen @ terminates the se!uence and returns to the calling screen. )f you have not called a
screen se!uence, L.$>. 1( #'7..? @ terminates the transaction.
W,at does t,e co&&and JS2PPRESS )IALOGK do /
#uppressing of entire screens is possible with this command. 1his command allows us to perform
screen processing [in the bacground\. #uppresing screens is useful when we are branching to list/
mode from a transaction dialog step.
W,at is t,e significance of t,e &e&or. ta"le JS!REENK /
$t runtime, attributes for each screen field are stored in the memory table called ]#'7..?. "e need
not declare this table in our program. 1he system maintains the table for us internally and updates it
with every screen change.
W,at are t,e fields in t,e &e&or. ta"le JS!REENK /
/ ?ame Length 6escription
W,. gro(ping of fields is re1(ired / W,at is t,e &a6i&(& n(&"er of &odification gro(ps for
eac, field /
/ )f the same attributes need to be changed for several fields at the same time these fields can be
grouped together. "e can specify up to four modification groups for each field.
W,at is a screen gro(p / 5o it is (sef(l /
#creen group is a field in the #creen $ttributes of a screen. Aere we can define a string of up to four
characters which is available at the screen runtime in the #C/6?G7 field. 7ather than maintaining field
selection separately for each screen of a program, we can combine logically associated screens
together in a screen group.
W,at is a S("screen / 5o can e (se a S("screen /
$ subscreen is an independent screen that is displayed in an area of another ,_main_- screen. 1o use a
subscreen we must call it in the flow logic , both %+( and %$) - of the main screen. 1he '$LL
#;+#'7..? statement tells the system to execute the %+( and %$) events for the subscreen as part
of the %+( or %$) events of the main screen. 1he flow logic of your main program should loo as
follows*
%7('.## +.F(7. (;%1%;1.
'$LL #;+#'7..? 2area3 )?'L;6)?G &2program3& &2screen3&.
%7('.## $F1.7 )?%;1.
- 64 -
'$LL #;+#'7..? 2area3.
$rea is the name of the subscreen area you defined in your main screen. 1his name can have up to ten
characters. %rogram is the name of the program to which the subscreen belongs and screen is the
subscreen&s number.
W,at are t,e restrictions on S("screens /
#ubscreens have several restrictions. 1hey cannot*
#et their own G;) status
Aave a named (B code
'all another screen
'ontain an $1 .G)1/'(00$?6 module
#upport positioning of the cursor
5o can e (se ' displa. ta"le data in a screen /
$+$%/< offers two mechanisms for displaying and using table data in a screen. 1hese mechanisms are
1$+L. '(?17(L# and #1.% L((%#.
W,at are t,e differences "eteen TABLE !ONTROLS and STEP LOOPS /
/ 1$+L. '(?17(L# are simply enhanced #1.% L((%# that display data with the loo and feel of
a table widget in a destop application. +ut from a programming standpoint, 1$+L. '(?17(L# and
#1.% L((%# are almost exactly the same. (ne major difference between #1.% L((%# and 1$+L.
'(?17(L# is in #1.% L((%# their table rows can span more than one line on the screen. +y
contrast the rows in a 1$+L. '(?17(L# are always single lines, but can be very long. , 1able control
rows are scrollable -. 1he structure of table controls is different from step loops. $ step loop, as a
screen object, is simply a series of field rows that appear as a repeating bloc. $ table control, as a
screen object consists of * i - table fields , displayed in the screen - ii - a control structure that
governs the table display and what the user can do with it.
W,. do e need to code a LOOP state&ent in "ot, t,e PBO and PAI e0ents for eac, ta"le in t,e
screen /
"e need to code a L((% statement in both %+( and %$) events for each table in the screen. 1his is
because the L((% statement causes the screen fields to be copied bac and forth between the
$+$%/< program and the screen field. For this reason, at least an empty L((%.......?6L((% must be
there.
T,e field SY3STEPL refers to ??????????????????? %
1he index of the screen table row that is currently being processed. 1he system variable #C/#1.%L
only has a meaning within the confines of L((%....?6L((% processing. (utside the loop, it has no
valid value.
5o can e declare a ta"le control in t,e ABAP'7 progra& /
;sing the syntax controls 2table control name3 type tableview using screen 2scr no3.
)ifferentiate "eteen static and d.na&ic step loops%
#tep loops fall into two classes* #tatic and dynamic. #tatic step loops have a fixed si5e that cannot be
changed at runtime. 6ynamic step loops are variable in si5e. )f the user re/si5es the window the
system automatically increases or decreases the number of step loops blocs displayed. )n any given
screen you can define any number of static step loops but only a single dynamic one.
W,at are t,e to a.s of prod(cing a list it,in a transaction /
+y submitting a separate report.
+y using lea0e to list3processing%
W,at is t,e (se of t,e state&ent Lea0e to list3processing /
Lea0e to list3processing statement is used to produce a list from a module pool. Lea0e to list3
processing statement allows to switch from dialog/mode to list/mode within a dialog program.
W,en ill t,e c(rrent screen processing ter&inates /
$ current screen processing terminates when control reaches either a Lea0e3screen or the end of PAI.
- 65 -
5o is t,e co&&and S(ppress3)ialog (sef(l /
#uppressing entire screens is possible using this command. 1his command allows
us to perform screen processing [in the bacground\. 1he system carries out all %+( and %$) logic, but
does not display the screen to the user. #uppressing screens is useful when we are branching to list/
mode from a transaction dialog step.
W,at ,appens if e (se Lea0e to list3processing it,o(t (sing S(ppress3)ialog /
)f we don&t use S(press3)ialog the next screen will be displayed but as empty.
when the user presses .?1.7, the standard list output is displayed.
5o t,e transactions t,at are progra&&ed ". t,e (ser can "e protected /
+y implementing an a(t,orit. c,eck.
W,at are t,e &odes in ,ic, an. (pdate tasks ork /
#ynchronous and $synchronous.
W,at is t,e difference "eteen S.nc,rono(s and As.nc,rono(s (pdates /
$ program ass the system to perform a certain tas, and then either waits or doesn&t wait for the tas
to finish. )n synchronous processing, the program waits* control returns to the program only when the
tas has been completed. )n asynchronous processing, the program does not wait* the system returns
control after merely logging the re!uest for execution.
W,at is t,e difference "eteen Lea0e Transaction and !all Transaction /
3 In contrast to LEA;E TO TRANSA!TIONA t,e !ALL TRANSA!TION state&ent ca(ses t,e s.ste& to
start a ne SAP L2W % T,is second SAP L2W r(ns parallel to t,e SAP L2W for t,e calling
transaction%
O0erall ,o do .o( rite transaction progra& in SAP/
'reate the transaction using object browser ,#.E@-
6efine the objects e.g. screen, 1ransactions. N 0odules N %+(, %$).
$nd you can create a transaction from #.J8 also.
)oes SAP ,as a G2I screen painter/ If .es W,at operating s.ste&s is it a0aila"le on/ W,at is
t,e ot,er t.pe of screen painter called/
Ces
(n what (# is it available N "indow based.
(ther type of screen painter N alpha numeric screen painter.
W,at are step loops/ 5o do .o( progra& page don page (p in step loop/
#tep loops* 0ethod of displaying a set of records.
%age down S %age up* decrement / increment base counter
)ndex L base Z sy/step9 N 9
Nor&all. ,o &an. and ,at files get created ,en a transaction progra& is ritten/ W,at is
top FFFFFFTOP progra&/
0ain program with $ )ncludes
) - 1(% )?'L;6. N GL(+$L 6$1$
)) - )nclude for %+(
)))- )nclude for %$)
)>- include for Forms
W,ere is processing logic located in an on3line progra&/
$ns */ $+$%/< program ,module pool-
)escri"e t,e online processor% W,at is its f(nction/
$ns */ 'ontrols the flow of online program.
5o are screen na&es defined/ )o .o( create a screen first or define .o(r progra& first/
$ns */ 6efine the program first and then create a screen.
- 66 -
W,at does PBO stands for/ W,en is t,e PBO logic perfor&ed/
$ns */ %7('.## +.F(7. (;1%;1 N%rocessed before the screen is displayed.
W,at does PAI stands for/ W,en is t,e PAI logic perfor&ed/
$ns */ %7('.## $F1.7 )?%;1 N%rocessed after the user has pressed .?1.7.
5o is data passed fro& t,e screen fields to t,e ABAP'7 progra&/
$ns */ 1hrough the flow logic.
W,at does t,e TOP Incl(de do for .o( as a progra&&er/
$ns* For global declarations.
W,at are t,e steps in creating screen/
W,ere are t,e &od(le state&ent declared/ W,ere is t,e logic it,in eac, &od(le/
$ns */
<% Go to #.<9 , #creen %ainter -
.nter the program name and screen number . %ress .nter.
Q% 6esign the screen and save, chec and activate it.
0odule statements are in the flow logic within each module is in the $+$%/< module pool
%rogram.
W,at is t,e significance of t,e ord JO2TP2TK in t,e declaration
0(6;L. 1.#1KB?("L.6G. (;1%;1
.?60(6;L..
$ns */ 1hen we now that it is part of the %+(, therefore is processed before the screen is presented.
)escri"e t,e fields on t,e screen /
$ns */ $ttributes screen , #creen types ,follow up screens , cursor position etc. $fter you have entered
the screen number, the screen branches to the screen attribute maintenance. .nter a short description ,
select the type ?(70$L and specify the number of the follow/up screen.
W,at are t,e t,ree co&ponents of ON3LINE progra&/
$ns */ #creen , $+$%/< program and transaction code.
W,at is gained ". (sing t,e )ictionar. @ields &en( option ,en creating .o(r screen/
$ns */ 1he fields you have created inherits the same attributes as those in the 6ata 6ictionary.
5o to !reate a c,eck"o6 A fra&eA p(s,"(ttons and radio "(ttons on a screen/
$ns */ Uust type a name and go to graphic element push button.
5o do .o( assign an OD?!O)E for a p(s, "(tton/ 5o it is (sed in .o(r ABAP/
$ns */ )n the field list ,name the element and give it the value that it will represent when pushed Cou
must mae sure that you clear the field that represents the pushbutton after every chec.
"hat automatic checs does the screen performH ,should be four-
)escri"e all fo(r and ,o t,e. are (sed/
$ns */ 1he field format, re!uired input, a foreign ey table ,parameters.
W,at are t,e to &et,ods to declare inp(t field as &andator./
)f you set re!uired field as program attribute, the user must enter a value in the field. 7e!uired fields
appear on the screen containing a !uestion mar ,H-.
5o does foreign ke. ork/ W,at .o( ,a0e to p(t in .o(r screen to identif. t,e foreign ke./
No/ T,en ,ere is t,e foreign ke. identified/
$ns */ Cou have defined a screen field by referring to a 6ata 6ictionary, which has a chec table. "hen
the foreign ey is checed the system compares the values of the fields to be checed with the contents
of the ey fields of the corresponding table.
- 67 -
W,at are t,e to effects of t,e foreign ke. fro& a (ser standpoint/
$ns */ %ossible entries S a chec against the ey field contents.
W,at is (ser defined 0alidation c,ecks in t,e flo logic/
$ns */ F).L6W#.L.'1 F).L6W>$L;.# or in the module pool F).L6W0(6;L..
)oes t,e 0al(e co&&and in t,e flo logic go in t,e PAI or t,e PBO e0ent/
$ns */ %$).
&f an error occurs in t$e module pool, :$ic$ fields are available for entr* and :$ic$ are displa*
onl* fields;
$ns */ (nly those fields defined with the F).L6 statement before 0(6;L. S relevant checs in a
chain.
W,en is t,e c,ain co&&and (sed in t,e PBO e0ent/
$ns */ )f you want to mae more than one field ready for input after an error.
W,at ta"le stores t,e online &essages/ W,at is t,e &essage class and ,at is its significance/
$ns */ 1able 19@@. 1he message class is a specific class of messages for a group of transactions.
9$at are t$e ! different message t*pes and $o: are t$e* $andled b* t$e s*stem; 9$at is t$en
difference bet:een t$e 9arning and <rror messages;
$ns */
$ * $bend 0essage displayed on the current screen and subse!uent tas terminated
) * )nformation 0essage displayed on the current screen , but user can continue program by pressing
.?1.7
.* .rror 0essage displayed on the current screen. "ith F).L6 statements , the fields concerned
become ready again for input and user is re!uired to mae the entry /entries again
" * "arning $s . message , but correcting input is optional
#* #uccess 0essage displayed on the follow/up screen as an ) message.
W,at does WIT5 state&ent add to a &essage/
$ns */ )n the place of the S or a the fields or values are placed in the error message.
W,at effect does t,e @IEL) state&ent ,a0e it,in t,e flo logic/
$ns */ 1he field statement resets the fields so those fields are ready for input again.
W,ere are t,e &essages displa.ed on t,e screen/
$ns */ $t the bottom.
Is t,e SET PARAMETER state&ent to "e iss(ed in PBO or PAI &od(le/ W,./
$ns */ %$), the value must be input into the fields first before it can be placed in the buffer.
9$ere does t$e G<T PA5A7<T<5 statement get its values; 9$ic$ field gets populated :it$ t$e
ne: value;
$ns */ From the buffer.
W,ere can t,e SET !2RSOR co&&and "e e6ec(ted/ W,at is its effect/
$ns */ )n %+(, 1o position the ';7#(7 in a particular field after the screen is displayed.
9$at are t$e matc$codes and $o: do t$e* affect t$e screen field; 9$ere are t$e* specified in
t$e online program;
$ns */ )n the %roperties window of the Field.
W,at is t,e effect of an ON !5AIN3RE*2EST co&&and in .o(r flo logic/
$ns */ "hen value of any of the fields between 'A$)?W...?6'A$)? is attempted to change.
W,at co&&ands are (sed to c,ange data"ase ta"le entries/
$ns */
5o can .o( c,eck if t,e c,anges to t,e data"ase ere s(ccessf(l/
$ns */
- 68 -
W,at is t,e difference "eteen t,e Long for& and t,e s,ort for& of &aking data"ase c,anges/
$ns */ Long Form*
;pdate 0$7$ and set brgew L @ where matnr L ]0$1Y.
1his is a standard (racle #tatement to modify the entry in the 6atabase.
#hort Form*
0$7$/0$1?7 L ]0$19. 0$7$/+7G." L @.
0odify 0$7$.
1his is an #$% defined statement to modify the table.
)t is more secure and consistent.
W,at is t,e ad0antages (sing t,e SAP long for& o0er t,e s,ort for& of data"ase c,anges/
$ns */ 0ay be Fast .ffect.
!an J,ereK cla(se "e (sed ,en (pdating data"ase entries/
$ns */ Ces.
)escri"e arra. operations and t,eir ad0antages/
$ns */
W,at is logical (nit of ork/ 5o is it defined/
$ns */ Logical ;nit of wor is a bloc of memory area where database contents are stored and
manipulated.
For every #$% application L;" is automatically created for database communication. +esides
this we have #$% L;" s also there.
W,at f(nction is perfor&ed ". t,e co&&it ork co&&and/
$ns */ "hen you perform 'ommit , all the L;" s wor will be reflected to the database.
W,. is it so i&portant for a progra&&er to c,eck t,e lock entries/
$ns */ 1o find out if record is loced and also to maintain data integrity.
5o can .o( find a lock entr. for a data"ase ta"le/
$ns */ 1he function module ].?D;.;. 2loc object3 checs whether a loc was triggered for the
same object. (therwise an exception F(7.)G?KL('B is carried out. )f the object is not loced the
function module sets the loc.
W,at steps are necessar. to set a lock on a record it,in a data"ase ta"le/
$ns */
.xecute '$LL F;?'1)(? statement
'$LL F;?'1)(? [.?D;.;. 2loc object3
.G%(71)?GW
.G'.%1)(?#W
'$#. #C/#;+7'.
.
.
.?6'$#..
5o do .o( (nlock t,e entr./ W,. is t,is necessar./
$ns */
.xecute the '$LL F;?'1)(? statement
'$LL F;?'1)(? ]6.D;.;. 2loc object3
.G%(71)?GW
)t is important to unloc the entry so others can update it.
W,at is t,e difference "eteen J!ALL S!REEN V V V J and JSET S!REEN VVV K
W LEA;E S!REEN/
$ns */
#.1 #'77.? statement sets or overwrites the follow/up screen.
L.$>. #'7..? executes the screen number currently in the follow/screen field
'$LL #'7..? interrupts the processing of the current screen to call a new screen or a chain of
screens, processing of the current screen is resumed directly after the call.
- 69 -
After a (A,, S(5<<4 command :$ere does t$e processing return after t$e screen $as been
executed;
$ns */ )t returns the processing to the calling screen.
W,ic, is t,e &ore si&ilar to a call it, ret(rnA t,e SET S!REEN or t,e !ALL S!REEN/
$ns */ 1he '$LL #'7..? command.
W,at f(nction is perfor&ed ". t,e SET S!REEN S co&&and/
$ns */ 7eturns to the original screen.
W,at are t,e &ain differences "eteen t,e repot stat(s and screen stat(s/
$ns */
W,ere &(st .o( place t,e SET P@3STAT2S co&&and in .o(r online progra&/
$ns */ %lace it in the %+( module of the screen.
W,. is it good idea to clear OD?!O)E field after deciding ,ic, action to take/
$ns */ Cou need to clear the (B code to avoid sending a screen that already has a function code.
5o do .o( specif. t,at a f(nction is an e6it t.pe co&&and/
$ns */ +y specifying function type . for the pushbuttons or menu options in the screen painter or menu
painter.
W,at is t,e p(rpose of t,e JAT EFIT3!OMMAN)K/
$ns */ ;sually there are many ways to leave a screen ,bac,exit,cancel- .1his command will perform
termination logic for all functions of type ..
W,at are screen gro(ps/
$ns */ $ group of screen fields such as radio buttons or checboxes.
W,at is t,e correct s.nta6 for d.na&icall. &odif.ing a large n(&"er of screen fields/
$ns */
0(6;L. 0(6)FC K#'7..?K(;1%;1
.
.
.
L((% $1 #'7..?
)F #'7..? NG7(;% L 86 ]G79
#'7..?/)?%;1L86 9
.?6)F.
)F #'7..?/?$0. L 86 ]1$+/F).L6
#'7..?/$'1)>.L86 @.
.?6)F.
0(6)FC #'7..?.
.?6L((%.
W,at is t,e na&e of t,e internal ta"le t,at stores t,e screen infor&ation/
$ns */ #'7..?.
W,at is t,e p(rpose of t,e MO)I@Y co&&and ,en perfor&ing t,e d.na&ic screen &odifications/
$ns */ after you activate or deactivate the field attributes by assigning them 9 or @, you save the
modifications via 0(6)FC #'7..? command.
)irection for t,e (se of c,eck "o6 and radio "(ttons in screen painter/
$ns */
'reating 7adio +utton and 'hec +oxes on the screen
Go to the full screen editor.
%lace an underscore at the point where you want to place the field.
6efine the name of the field using 2Field $ttributes3
%lace the cursor on the field and press 2Graphic element3
1hen press 27adio +uttons3 or 2'hec boxes3 depending on which graphic element you want
1hen you group related chec boxes and radio boxes.
- 70 -
W,at are (ser E6its and transactions/
$ns */ Generally, user exits are the forms defined within #$% standard code ,usually starting with user
exit-. 1hese predefined areas in the code allow programmers to insert custom defined code into the
standard processing of a transaction ,e.g. allow resorting of the batch se!uence in >$@9 batch
processing-. 1here are many specific examples if you are interested, but usually user exits are
searched for when a specific use is being analy5ed.
W,at ,appens if .o( enter S in NEFT Screen attri"(te/
$ns */ )t does not go to any other screen and it moves bac one level. Aowever you can control this in
run/time using #.1 #'7..? command.
5o to &odif. t,e attri"(tes of screen fields at r(n ti&e /%
"e loop through the fields of the screen. "hen you find the name of a screen field you want to
modify, set attributes for the field and use 0(6)FC #'7..? to update the
attribtes.
Cou can find the attributes in the internal table #'7..?.
1his loop maes some of the screen fields invisible ind a selection screen*
$1 #.L.'1)(?/#'7..? (;1%;1.
L((% $1 #'7..?.
)F screen/name L &%K>.7$+& (7
screen/name L &%K#1G19& (7
screen/name L &%K#1G1:& (7
screen/name L &TK%K>.7$+KTK$%%KT/1.G1& (7
screen/name L &TK%K#1G19KTK$%%KT/1.G1& (7
screen/name L &TK%K#1G1:KTK$%%KT/1.G1&.
screen/active L &@&.
0(6)FC #'7..?.
.?6)F.
.?6L((%.
5o to lea0e d.npro allt,o(g, re1(ired entr. not &ade /
)n the menu painter / Function attributes for the button, set Functional
type to . ,.xit command-
%7('.## $F1.7 )?%;1.
'all module that leaves screen before ;serK'ommandKxxxx is executed
0(6;L. 7eturn.xit $1 .G)1/'(00$?6.
0(6;L. userKcommandK9@@@.
0(6;L. returnexit.
'$#. sy/ucomm.
"A.? &'$?'&. _(r whatever you want to call it
'lear wKscreen.
L.$>. 1( #'7..? @.
.?6'$#..
.?60(6;L..
!alling a report fro& a d.npro
1here are to ways to do this*
;se leave to list/processing if you want to do it in your module pool. Cou will not be
able to use
selection/screens.
;se the submit statement to start a seperate report from your dynpro.
$nyone who have idea on how to now the selected value on run/timeH
Aow can get the table control attribute selected value H ) try to read the value in debuger which is b
- 71 -
,tableKcontrol/cols/selected-. 1here is no difference on the other row which is not selected.
1he tc/cols/selected is for column selection only. For row selection you have two scenarios
turn on the #el'olumn attribute in screen painter, give it a name and declare an abap variable
with the same name type ' length 9. )n your %$) loop at itab, when the selected row is
processed the abap variable will L &G&. $t this point you can save the record or ey.
you can determine which row the cursor is on in your table control as follows*
6$1$* L)?.K#.L L)B. #C/#1.%L,
1$+)G L)B. #C/1$+)G
G.1 ';7#(7 L)?. L)?.K#.L.
1$+)G L 2table control3/1(%KL)?. Z L)?.K#.L / 9.
1$+)G is now the index of the selected row.
F< Aelp / 'alling it from a program and limiting values H
1o avoid the standard F< help to be show, insert the event %7('.## (?/>$L;./7.D;.#1 in the
program and add a field statement for the field that should trigger the F< help. )n the mdoule called from
%7('.## (?/>$L;./7.D;.#1, call function module
F<)FKF).L6K>$L;.K7.D;.#1.
.xample 9 / 6ynpro
process before output.
.....
process after input.
.....
%7('.## (? >$L;./7.D;.#1.
F).L6 itK5sd@@@@8/prctr 0(6;L. f<KhelpKforKpctr.
0(6;L. f<KhelpKforKpctr )?%;1.
?(1.*
1abname/fieldname is the name of the table and field
for which F< should be shown.
4
6ynprog/6ynpnr/6ynprofield are the names of the %rogran/6ynpro/Field
in which the f< value should be returned.
4
>alue* 1he value of the 6ynpro fuield when calling the F< help.
Cou can limit the values shown, by inseting a value in this parameter
e.g &=@4& to show only values beginning with =@
'$LL F;?'1)(? &F<)FKF).L6K>$L;.K7.D;.#1&
.G%(71)?G
tabname L &O#6@@@@8&
fieldname L &%7'17&
4 #.$7'AA.L% L & &
4 #AL%%$7$0 L & &
dynpprog L &O#6@@@@:K+7;G.7B(?>KL)#1.&
dynpnr L &@9@@&
dynprofield L &)1KO#6@@@@8/%7'17&
- 72 -
4 #1.%L L @
value L &=@4&
4 0;L1)%L.K'A()'. L & &
4 6)#%L$C L & &
4 #;%%7.##K7.'(76L)#1 L & &
4 '$LL+$'BK%7(G7$0 L & &
4 '$LL+$'BKF(70 L & &
1$+L.#
4 7.1;7?K1$+ L
.G'.%1)(?#
4 F).L6K?(1KF(;?6 L 9
4 ?(KA.L%KF(7KF).L6 L :
4 )?'(?#)#1.?1KA.L% L 8
4 ?(K>$L;.#KF(;?6 L <
4 (1A.7# L =
.
)F sy/subrc 23 @.
0.##$G. )6 #C/0#G)6 1C%. #C/0#G1C ?;0+.7 #C/0#G?(
")1A #C/0#G>9 #C/0#G>: #C/0#G>8 #C/0#G><.
.?6)F.
.?60(6;L.. _ F<KhelpKforKpctr )?%;1.
W,at .o( can do it, a transaction 0ariant
)nsert default values into fields
hange the ready for input status for fields
Aide various screen elements, menu functions or entire screens
$djust table control settings
?ote* 1ransaction variants can only be used with dialog transactions.
5o to create a transaction 0ariant
1ransaction variants are created with transaction* #A6@
)n the field 1ransaction on #A6@ enter the transactioncode for the screen you want tpo modify ,..g.
>$@8- . )n the field >ariant on #A6@ enter the name you want to give the transaction variant ,..g.
O>$@8-
%ress 'reate
?ow the screen for the transaction is shown and you can enter default values in the fields of the screen
%ress .nter. ?ow a screen that enbles you to mae further customi5ing ,Aide, (utput only, )nvisible,
0andatory- if the screen fields is shown.
$fter you have finished customi5ing the screen press .nter to go to the next screen or ave and exit to
save the 1ransaction variant
5o to find (ser e6its
6isplay the program where you are searching for and exit and search for '$LL ';#1(0.7/.G)1
)f you now the .xit name, go to transaction '0(6. 'hoose menu ;tillities/3#$% .nhancements.
.nter the exit name and press enter.
Cou will now come to a screen that shows the function module exits for the exit.
;sing %roject management of #$% .nhancements
"e want to create a project to enahance trasnaction >$@9
Go to transaction '0(6
'reate a project called O>$@9
'hoose the .nhancement assign radio button and press the 'hange button
)n the first column enter ><=$@@@: %redefine sold/to party in sales document .
?ote that an enhancement can only be used i 9 project. )f the enhancement is
allready in use, and error message will be displayed
%ress #ave
- 73 -
%ress 'omponents. Cou can now see that enhancement uses user exit .G)1K#$%0><=$K@@:. 6ouble
clic on the exit.
?ow the function module is displayed. 6ouble clic on include OG>>$;@< in the function module
)nsert the following code into the include* .KB;??7 L &:9==&.
$ctivate the include program. Go bac to '0(6 and activate the project.
Goto transaction >$@9 and craete a salesorder. ?ote that #old/to/party now
automatically is _:9==_
1o run the transaction varian, you must create a new 1ransaction code in #.J8 that referes to the
1ransaction variant. 'hoose 1ransaction with variant as #tart object.
?ote* 1he transaction variant can also be called from a program that imcludes a call to function module
7#KA6#C#K'$LLK1'K>$7)$?1
!an a field e6it on a screen access t,e 0al(es entered ". a (ser on t,at screen for t,e screen
fields ot,er t,an t,e field for ,ic, t,e e6it ,as "een applied% if .es t,en ,o/
0aybe this function helps you* 6C?%K>$L;.#K7.$6. )t reads the dynpro/values before processing
%$).
W,at are e0ents in dialogs/
%rocess +efore (utput and
%rocess $fter )nput.
%rocess (n >alue
%rocess (n Aelp
0odule output.
0odule input.
W,at are significance of PBO and PAI/
+efore display the screen %+( is fired. 1his is for screen display
$fter giving the user input %$) is fired. 1his is for input validation
W,ere .o( ill 0alidate entries in t,e fields/
.ntries can be validated in %$).
Cou can validate in Field .xits also.
W,at is (se of !,ain and End!,ain/
For calling a particular %$) module if any one of fields in a group meets a condition, we use to combine all
such fields .
5o to c,ange screen d.na&icall./
+y modifying the screen attributes.
5o to capt(re c,anges on t,e screen fields/ Sa&e in case of ta"le control/
"e can capture changes on the screen fields using module on input and on re!uest.
If .o( are 0alidating contents of field "(t (ser ant to e6it fro& t,e transaction it,o(t
0alidating contentsX 5o to ,andle t,is scenario/
+y at exit/command we can do.
5o to pass field 0al(es fro& one screen to ot,er screen/
+y using set and get parameter id statements.
W,at is t,e difference in (sing !OMMIT WORD it,in a called transaction and it,in a called
dialog &od(le in an e6isting &od(le%
$ns.*
Transaction* )t will create a new L;" and so you have to say '(00)1 "(7B in a called transaction
for getting any of the update statements to be fruitful inside the called transaction.
)ialog &od(le* #ince no new L;" is created, '(00)1 "(7B is not necessary.
W,ic, Q transaction codes are (sed to &anage en,ance&ents/
- 74 -
$ns* #0(6 and '0(6
W,ic, en,ance&ent is localA ,ic, is glo"al$
Field .xits
#creen .xits
%rogram .xits
0enu .xits
W,ere can .o( create an en,ance&ent to s,o .o(r on @< 5elp on a field/
$ns* in %(A
W,at en,ance&ents can "e created (sing !&od/
$ns* 'ustomer .nhancements, i.e., Field .xits.
W,at is t,e code for s,oing a list prod(ced in a dialog progra&/
$ns* Leave screen.
Leave to List/processing.
(r
#ubmit 2program name3.
W,en is field Na&e< transported to t,e progra& in t,is coding$
Process After Inp(t%
Mod(le AB!%
@ield Na&e< Mod(le )E@%
W,at is t,e effect of S2PPRESS )IALOG in PBO/
@ield Na&eQ Mod(le G5I%
If an error &essage as raised in Mod(le G5IA ,ic, fields o(ld "e read. for inp(t/
$ns* 1he fields that are placed in 'A$)?WWW.?6'A$)?.
In ,ic, Q places co(ld .o( set t,e G2I stat(s and title "ar for a &odal dialog "o6/
W,at does !5AIN %%%%EN) !5AIN do/
#ometimes you want to chec several fields as a group. 1o do this, include the fields in a F).L6 statement,
and enclose everything in a 'A$)?/.?6'A$)? bloc.
.xample
4444 #creen flow logic* 4444
'A$)?.
F).L6* #%FL)/'$77)6, #%FL)/'(??)6.
0(6;L. 'A.'BKFL)GA1.
.?6'A$)?.
"hen an error is found inside a chain, the screen is re/displayed, and all fields found anywhere in the chain
are input/enabled. $ll non/chain fields remain disabled.
5o can .o( test flo logic/
'hec function checs the syntax,data/consisteny and screen layout of the screen.
1o test the syntax, from the menu path choose screen////3chec///////3 syntax.
1o test the data consistency, from the menu path choose screen////3chec//////3 consistency.
1o chec the layout,from ythe menu path choose screen/////3chec/////3layout.
W,at ,appens if .o( c,oose ,old data option in screen atri"(tes/
1o retain data entered by a user. 1he system automatically displays this data if the user returns to this
screen.
W,at ,appens if .o( enter S in NEFT screen attri"(te/
)n $+$%/< each stacable se!uence of screens is a _call mode_. 1his is important because of the way you
return from a given current se!uence. 1o terminate a call mode and return to a suspended chain, set the
- 75 -
_next screen_ to @ and leave to it*"hen you return to the suspended chain, execution resumes with the
statement directly following the original '$LL #'7..? statement.1he original se!uence of screens in a
transaction is itself a calling mode. 1he original se!uence of screens in a transaction is itself a calling mode.
)f you L.$>. 1( #'7..? @ in this se!uence ,that is, without having staced any additional call modes-,
you return from the transaction altogether.
5o &an. &en( titles .o( can ,a0e in a &ain &en(/
Cou can have six menus in a menu bar.)n addition to this system provides two more menus ie system and
help. Cou can have only one menu bar for a status.
Cou can maintain 9= entries in a menu and upto three levels.
W,at is t,e difference "eteen t,e Lc,ange on3inp(tL and L!,ange on re1(estL in t,e PAI of a
screen/
(? )?%;1
1he $+$%/< module is called only if the field contains a value other than its initial value. 1his initial value is
determined by the field&s data type* blans for character fields, 5eroes for numerics.
(? 7.D;.#1
1he $+$%/< module is called only if the user has entered a value in the field value since the last screen
display. 1he value counts as changed even if the user simply types in the value that was already there.
W,at are (ser e6its/ W,at is in0ol0ed in riting t,e&/ W,at preca(tions are needed/
;ser defined functionality included to predefined #$% standards. %oint in an #$% program where a
customer&s own program can be called. )n contrast to customer exits, user exits allow developers to
access and modify program components and data objects in the standard system. (n upgrade, each
user exit must be checed to ensure that it conforms to the standard system.
1here are two types of user exit*
;ser exits that use )?'L;6.s.
1hese are customer enhancements that are called directly in the program.
;ser exits that use tables.
1hese are used and managed using 'ustomi5ing.
#hould find the customer enhancements belonging to particular
development class.
What are the !i""erent ways in which you can $a3e changes to SAP stan!ar! so"tware ?
7$s(omi8in!
Enhn&emen(s (o (he 23P 2(nd'd
#odi,i&(ions (o (he 23P 2(nd'd
7$s(ome' *e-elo%men(
What is custo$i:ing ?
7$s(omi8in! is (he se((in! o, s9s(em %'me(e's -i 23P:s own in(e',&e)
Why !o you nee! enhance$ents ?
The s(nd'd %%li&(ions do no( o,,e' some o, (he ,$n&(ionli(9 9o$ need) The R;3 en&hn&emen( &on&e%( llows
9o$ (o dd 9o$' own ,$n&(ionli(9 (o 23P:s s(nd'd .$siness %%li&(ions)
What are the !i""erent types o" enhance$ents ?
Enhn&emen(s $sin! &$s(ome' e0i(s
7$s(ome's: %o(en(il 'e<$i'emen(s whi&h 'e no( in&l$ded in (he s(nd'd so,(w'e 'e in&o'%o'(ed in (he s(nd'd
s em%(9 modi,i&(ion :shells:) 7$s(ome's &n (hen ,ill (hese wi(h (hei' own &odin!) Enhn&emen(s &n 'el(e (o
%'o!'ms, men$s nd s&'eens) U%w'd &om%(i.ili(9 is ss$'ed) "n o(he' wo'ds, 23P !$'n(ees (h( (he /$m%
,'om (he s(nd'd so,(w'e (o (he e0i( nd (he in(e',&e whi&h &ll (he e0i( will 'emin -lid in ,$($'e 'eleses)
- 76 -
)nhance$ents to ABAP/; Dictionary ele$ents
These 'e 3=3P;4 *i&(ion'9 enhn&emen(s 5&'e(ion o, (.le %%ends6, (e0( enhn&emen(s 5&$s(ome'-s%e&i,i&
>e9 wo'ds nd do&$men((ion ,o' d( elemen(s6 nd ,ield e0i(s 5&'e(ion o, ddi(ionl &odin! ,o' d( elemen(s6)
What is custo$er !e*elop$ent ?
7'e(in! &$s(ome'-s%e&i,i& o./e&(s wi(hin (he &$s(ome' nme 'n!e)
What is SSCR ?
227R 523P 2o,(w'e 7hn!e Re!is('(ion6 is %'o&ed$'e, ,o' 'e!is(e'in! ll mn$l &hn!es (o 23P so$'&e
&odin! nd 23P *i&(ion'9 o./e&(s)
What is the !i""erence %etween $o!i"ications an! enhance$ents ?
#odi,i&(ions men m>in! &hn!es (o (he 23P s(nd'd ,$n&(ionli(9)
Enhn&emen(s men ddin! some ,$n&(ionli(9 (o 23P s(nd'd ,$n&(ionli(9)
What are the !isa!*antages o" $o!i"ication ?
#odi,9in! s(nd'd &ode &n led (o e''o's
#odi,i&(ions men mo'e wo'> d$'in! so,(w'e $%!'des
What are the a!*antages o" enhance$ents ?
*o no( ,,e&( s(nd'd 23P so$'&e &ode
*o no( ,,e&( so,(w'e $%!'des
when !o you opt "or $o!i"ication ?
7$s(ome' e0i(s 'e no( -il.le ,o' ll %'o!'ms nd s&'eens wi(hin (he R;3 s(nd'd %%li&(ions) ?o$ &n onl9
$se e0i(s i, (he9 l'ed9 e0is( wi(hin (he 23P R;3 29s(em ) O(he'wise 9o$ h-e (o o%( ,o' modi,i&(ions )
What are the *arious types o" custo$er e.its ?
#en$ e0i(s
2&'een e0i(s
4$n&(ion mod$le e0i(s
@e9wo'd e0i(s
What is a $enu e.it ?
3ddin! i(ems (o (he %$lldown men$s in s(nd'd R;3 %%li&(ions )
<=6What is a screen e.it ?
3ddin! ,ields (o (he s&'eens wi(hin R;3 %%li&(ions) 23P &'e(es s&'een e0i(s .9 %l&in! s%e&il s$.s&'een 'es
wi(hin s(nd'd R;3 s&'een nd &llin! &$s(ome' s$.s&'een ,'om wi(hin (he s(nd'd d9n%'o:s ,low lo!i&)
What is a "unction $o!ule e.it ?
3ddin! ,$n&(ionli(9 (o R;3 %%li&(ions) 4$n&(ion mod$le e0i(s %l9 'ole in .o(h men$ nd s&'een e0i(s)
What is a 3eywor! e.it ?
3dd do&$men((ion (o (he d( elemen(s o, >e9 wo'ds de,ined in (he 3=3P;4 *i&(ion'9) The s9s(em dis%l9s
(his do&$men((ion whene-e' $se' %'esses 41 (o !e( online hel% ,o' s&'een ,ield)
How !o SAP organi:es its e.its ?
23P o'!ni8es i(s e0i(s in %&>!es (h( 'e &lled 23P enhn&emen(s) E&h 23P enhn&emen( &n &on(in mn9
indi-id$l e0i(s)
What is an a!!4on pro7ect ?
To (>e d-n(!e o, (he e0i(s -il.le wi(hin s(nd'd R;3 %%li&(ions, 9o$ need (o &'e(e n dd-on %'o/e&()
This %'o/e&( le(s 9o$ o'!ni8e (he enhn&emen( %&>!es nd e0i(s 9o$ wn( (o $se) The dd-on %'o/e&( lso
llows 9o$ (o hn! dd-on ,$n&(ionli(9 on(o (he e0i( hoo>s &on(ined wi(h 23P enhn&emen(s)
- 77 -

Вам также может понравиться