Professional Documents
Culture Documents
Types: TY_
Itab T_
Workarea W_
Global variables G_
Select-options --- S_
Parameters P_
Local variables L_
Field-symbols FS_
SD Reports -- ZVXXX
MM Reports ZMXXX
PP Reports ZCXXX
FI Reports -- ZFXXX
(XXX) denotes the consecutive number of the report.
Ex: 001,002 so on..
Tcodes also have the same convention as for reports.
Custom BAPI ZBAPI_RELEVANT NAME
Business Object name relevant name followed BY Z.
All selection-screen validation form names must start with VALIDATE_fieldname
For displaying F4 help,the formname should start with F4_fieldname.
While generating new version of the program, give the brief info at the top of the coding
about the changes done in the older version.
3 What are the contents in technical specifications?
Report/Object description,
Version History,document approvals
Input (selection-screen, parameters, table, fieldnames,mandatory fields,
default values,search helps),
Output format and fieldnames.
Program Pseudo Code, Unit testing.
4 What is an instance?
An Instance refers to the server/application server most of the times.
It is a set of R/3 processes providing services to the R/3 system.
A user logs on to the SAP system using an instance.
An SAP instance defines a group of resources such as memory, work processes and so on,
usually in support of a single application server or database server within a client/server
environment. Application servers share the same memory areas and are controlled by the same
dispatcher process.
When we call a function module, an instance of its function group and its data, is loaded into the
memory area of the internal session. An ABAP program can load several instances by calling
function modules from different function groups.
5 How to take care of performance in ABAP Development?
Using SQL trace (ST05), runtime analysis (SE30) and latest runtime analysis tcode is SAT
6 What is Function group? Difference between function group and function module?
A function group is a collection of logically related function modules that share global data with each
other. All the modules in the group are included in the same main program.
When an ABAP/4 program contains a CALL FUNCTION statement, the system loads the entire
function group in with the program code at runtime. Every function module belongs to a function
group.
Database views implement an inner join. The other view types implement an outer join.
In Inner join, we will get the records of the cross-product for which there is an entry in all tables
used in the view. With an outer join, records are also selected for which there is no entry in
some of the tables used in the view.
11 Can u print decimals in type n? what is difference between float and packed data type?
No,we cant print.
For float 8bytes,where as for type P b/w 1 - 16bytes.
The precision will be 16 decimal places for float.
In Packed data type, we can specify the number of decimal places while defining.
We cant use float type for declaring parameters, we can use packed data type.
12 What is step-loop? explain all the steps?
step loops are screen elements for displaying table-type data on a screen. From a programming standpoint,
especially concerning the data transfer, table controls and step loops are almost identical. Table controls are
ultimately an improvement of step loops, in terms of usability by the end user.
Step loops as structures in a screen do not have individual names. The screen can contain more
than one step-loop, but if so, you must program the LOOPENDLOOPs in the flow logic
accordingly. The ordering of the LOOPENDLOOPs must exactly parallel the order of the step
loops in the screen. The ordering tells the system which loop processing to apply to which loop.
Step loops in a screen are ordered primarily by screen row, and secondarily by screen column.
Transaction TZ61 (development class SDWA) implements a step loop version of the table you
saw in transaction TZ60.
http://help.sap.com/saphelp_nw04/helpdata/en/d1/80236c454211d189710000e8322d00/content.htm
* Empty loop is must for both table control and step loop
LOOP AT statement for step loops and Table controls is similar. Loop At statement transfers the data
to screen table. We need to have the Module to assign the values for the screen table.
In module pool program we need to define the cursor.
Date: CL TYPE i.
* Cursor parameter tells which line of step loop display should start.
Module Set in module pool program assigns the values to step loop fields, which is similar to
table controls.
13 What is the initial value and maximum length of all data type?
The default value assigned to a variable when it is declared with a predefined datatype.
Data Type
Initial
Valid
Initial value
Meaning
1 - 16
Packed number
1 - 65535
Character types
C
'
'
Text field
(alphanumeric characters)
'00000000'
Date field
(Format: YYYYMMDD)
1 - 65535
'0 0'
'000000'
Time field
(format: HHMMSS)
Hexadecimal type
X
1 - 65535
X'0 0'
14 What are the ways to find out the tables used in the program?
Hexadecimal field
why?
No we cant get. We can show two pop-up windows based on click event.
16 What are the different functions used in sapscript ? What are the parameters used in function?
There are three different functions used in SAP Script.
1. OPEN_FORM
Parameters :
Exporting
Form
Language
2. WRITE_FORM
Parameters:
Exporting
Element
Window
3. CLOSE_FORM
17 What is sequence of event triggered in report?
There are 6 events in report:
1)
Initialization
2)
At Selection-Screen
3)
Start-of-Selection
4)
Get
5)
Get Late
6)
End-of-Selection
7)
Top-of-Page
8)
End-of-Page
9)
At Line Selection
10)
At User Command
11)
At PF (nn)
X(4)
SY-FDPOS
SY-TFILL
X(4)
SY-TLENG
X(4)
SY-TOCCU
X(4)
SY-INDEX
SY-STEPL
SY-LOOPC
After
DESCRIBE TABLE ,
LOOP AT,
and
READ TABLE
Logical databases are special ABAP programs that retrieve data and make it available to
application programs. The most common use of logical databases is still to read data from
database tables and linking them to executable ABAP programs while setting the program
contents. We can edit logical databases using the Logical Database Builder in the ABAP
Workbench.
Tcode: SE36
29 What are the events used for Logical Database ?
Two Events
1) GET - This is the most important event for executable programs that use a logical database. It
occurs when the logical database has read a line from the node <table> and made it available to
the program in the work area declared using the statement NODES <table>. The depth to which
the logical database is read is determined by the GET statements
2) PUT - The PUT statement directs the program flow according to the
structure of the logical database.
initialization, at selection-screen, start-of-selection, get, get late, end-of-selection
Advantages:
i)check functions which check that user input is complete, correct, and plausible.
ii)Meaningful data selection.
iii)central authorization checks for database accesses.
iv)good read access performance while retaining the hierarchical data view determined by the
application logic.
dis advantages:
i)If we dont specify a logical database in the program attributes, the GET events never occur.
ii)There is no ENDGET command, so the code block associated with an event ends with the next
event statement (such as another GET or an END-OF-SELECTION).
30 What is the difference between Get and Get Late ?
GET - After the logical database has read an entry from the node <table>.
GET LATE - After all of the nodes of the logical database have been processed
that are below <table> in the database hierarchy.
31 What are the Types Of Internal Tables ?
32 What are the events used in ABAP in the order of execution ?
33 What are Interactive Reports ?
34What are the commands used for interactive reports ?
35 What are the system fields u have worked with ? Explain ?
36 What is the difference between Primary key and Unique Key ?
Primary Key It can accepts 0 value and cannot be NULL.
Unique Key It can be NULL.
38 If u are using Logical Databases how will u modify the selection-screen elements ?
39 What is an RFC ?
40 If u are using RFC and passing values to a remote system how does it work ?
41 What are the events in Screen Programming ?
42 What is the significance of HIDE ?
43 Where do u code the HIDE statement ?
44 Types of BDC's ?
45 Advantages & Disadvantages of different types of BDC's ?
46 What are the events used in Interactive Reports.
47 What is an RDBMS ?
49 What will you code in START-OF-SELECTION & END-OF-SELECTON & why ?
51 Which is the default join ?
Inner Join.
52 How do u display a data in a Detail List ?
53 What are the types of windows in SAPSCRIPT ?
54 What are the function modules used in a SAPSCRIPT driver program ?
55 What are Extracts ?
Since internal tables have fixed line structures, they are not suited to handle data sets with
varying structures. For this purpose, ABAP offers the possibility to create so-called extract
datasets (extracts, for short).
An extract is a sequential dataset in the memory area of the program. You can only address the
entries in the dataset within a special loop. The index or key access permitted with internal tables
is not allowed. You may only create one extract in any ABAP program. The size of an extract
dataset is, in principle, unlimited. Extracts larger than 500 KB are stored in operating system
files. The practical size of an extract is up to 2 GB, as long as there is enough space in the file
system.
An extract dataset consists of a sequence of records of a predefined structure. However, the
structure need not be identical for all records. In one extract dataset, you can store records of
different length and structure one after the other. You need not create an individual dataset for
each different structure you want to store. This fact reduces the maintenance effort considerably.
In contrast to internal tables, the system partly compresses extract datasets when storing them.
This reduces the storage space required. In addition, you need not specify the structure of an
extract dataset at the beginning of the program, but you can determine it dynamically during the
flow of the program.
You can use control level processing with extracts just as you can with internal tables. The
internal administration for extract datasets is optimized so that it is quicker to use an extract for
control level processing than an internal table.
Procedure for creating an extract:
...
1. Define the record types that you want to use in your extract dataset by declaring them
as field groups. The structure is defined by including fields in each field group.
Defining an Extract
REPORT demo_extract_field_groups.
NODES: spfli, sflight.
FIELD-GROUPS: header, flight_info, flight_date.
INSERT: spfli-carrid spfli-connid sflight-fldate
INTO header,
spfli-cityfrom spfli-cityto
INTO flight_info.
2.
Fill the extract dataset line by line by extracting the required data.
56 How would u go about improving the performance of a Program which selects data from
MSEG & MKPF ?
1.use Field -Symbols instead of work areas.
2.Use view WB2_V_MKPF_MSEG.
57 How does System work in case of a Interactive Report ?
58 what is LUW?
59 Different types of LUWs. What r they.
Two types of LUW are:
1) DB LUW - A database LUW is the mechanism used by the database to ensure that its data is
always consistent. A database LUW is an inseparable sequence of database operations that ends
with a database commit. The database LUW is either fully executed by the database system or
not at all. Once a database LUW has been successfully executed, the database will be in a
consistent state. If an error occurs within a database LUW, all of the database changes since the
beginning of the database LUW are reversed. This leaves the database in the state it had before
the transaction started.
2) SAP LUW - A logical unit consisting of dialog steps, whose changes are written to the
database in a single database LUW is called an SAP LUW. Unlike a database LUW, an SAP
LUW can span several dialog steps, and be executed using a series of different work processes
60 What is First event triggered in program?
61What are various Joins? What is right outer join ?
62How do u find out whether a file exits on the presentation server? eps_get_directory_listing for directory
64. Systems fields used - normal + interactive
65. Logo in SAPscript
66. If internal table used in for all entries in empty then what happens
will fetch all the records of the table.
67. If I forgot some command in sapscript eg: suppress zero display - How to do find it?
68. Have to write a BDC - how do u go about it?
69. What is Performance tuning
70. Define Documentation
71. Brief about Testing of programs
72. How do u move on to the next screen in interactive reporting?
73. Create any functions? How to go about it.
74. Advanced topics?
75. Function modules used in f4 help.
76. Work most on which module : Name a few tables.
78. From a table how do u find whether a material is used in another material BOM?
80. How u used logical database? How is data transferred to program?
Corresponding statement in LDB
81. How do u suppress fields on selection screen generated by LDB?
82. Can there be more than 1 main window ?
83. Global and local data in function modules.
84. What are the differences between sap memory and abap memory
ABAP memory is a memory area within the internal session (roll area) of an ABAP program and
any other program called from it using CALL TRANSACTION or SUBMIT.
ABAP memory is independent of the ABAP program or program module from which it was
generated. In other words, an object saved in ABAP memory can be read from any other ABAP
program in the same call chain. ABAP memory is not the same as the cross-transaction global
SAP memory.
This allows you to pass data from one module to another over several levels of the program
hierarchy. For example, you can pass data
and so on.
The contents of the memory are released when you leave the transaction.
Passing Data Between Programs
There are two ways of passing data to a called program:
Passing Data Using Internal Memory Areas
ABAP programs have access to two cross-program memory areas that can be used for passing
data.
SAP Memory
SAP memory is a memory area to which all main sessions within a SAPgui have access. You can
use SAP memory either to pass data from one program to another within a session, or to pass
data from one session to another. Application programs that use SAP memory must do so using
SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either
for a particular user or for a particular program at the time of logon using the SET PARAMETER
statement. Other ABAP programs can then retrieve the set parameters using the GET
PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on
screens (see below).
ABAP Memory
ABAP memory is a memory area that all ABAP programs within the same internal session can
access using the EXPORT and IMPORT statements. Data within this memory area remains
throughout a sequence of program calls, with the exception of LEAVE TO TRANSACTION. To
pass data to a program that you are calling, the data needs to be placed in ABAP memory before
the call is made from the internal calling session using the EXPORT statement. The internal
session of the called program then replaces that of the calling program. The program called can
then read from the ABAP memory using the IMPORT statement. If control is then returned to the
program that made the initial call, the same procedure operates in reverse .
If a transaction is called using LEAVE TO TRANSACTION, the ABAP memory and the call stack
are deleted. They cannot be used for data transfer.
Since objects belonging to ABAP objects can only be accessed within an internal session, it does
not make sense and is therefore forbidden (from a syntax point of view) to pass a reference to an
object to a calling program through the ABAP memory.
Filling Input Fields on an Initial Screen
Most programs that you call from other programs have their own initial screen that the user must
fill with values. For an executable program, this is normally the selection screen. The SUBMIT
statement has a series of additions that you can use to fill the input fields of the called selection
screen:
Filling the Selection Screen of a Called Program
SUBMIT... [VIA SELECTION-SCREEN]
[USING SELECTION-SET var]
[WITH sel criterion]
[WITH FREE SELECTIONS freesel]
[WITH SELECTION-TABLE rspar
You cannot fill the input fields of a screen using additions in the calling statement. Instead, you
can use SPA/GPA parameters.
Filling Initial Screens using SPA/GPA Parameters
SET PARAMETER ID pid FIELD f.
This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can
be up to 20 characters long. If there was already a value stored under pid, this statement
overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be
created as a Repository object.
To read an SPA/GPA parameter, use:
GET PARAMETER ID pid FIELD f.
This statement places the value stored under the pid ID into the variable f. If the system does
not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value
to 0.
To fill the initial screen of a program using SPA/GPA parameters, you normally only need the
SET PARAMETER statement.
The relevant fields must each be linked to an SPA/GPA parameter.
The graphical element (like company logo) should be in valid graphic file format like
.bmp or .jpg
Use appropriate software to convert the above file into a .TIFF file
The SAP system suggests a name for the file ( like ZHEX-MARCO-* ). The * indicates
the type of file. For e.g. if the file contains a logo then the name can be ZHEX-MACROLOGO
Running the program will convert this .TIFF file into a text element
Incorporate this converted logo in the appropriate window under the appropriate text
element by giving
INCLUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the first line
To exit the current screen and setting the next screen number as 0, we use LEAVE
SCREEN.
139. what is the transaction code for Table maintenance?
Table Maintenance Generator is a tool used to customize the tables created by end users
and can be changed as required, such as making an entry to that table, deleting an entry
etc.
In other words, table maintenance generator is a user interface tool which is used to change
the entry of the table or delete an entry from the table or create an entry for the table.
Tcode: SM30.
n=1: There is exactly one record assigned to the check table for each record of the
foreign key table.
n=C: The foreign key table may contain records which do not correspond to any record
of the check table because the foreign key field is empty. This can occur for example if
the field of the foreign key table is optional, in which case it does not have to be filled.
m=1: There is exactly one dependent record for each record of the check table.
m=C: There is at most one dependent record for each record of the check table.
m=N: There is at least one dependent record for each record of the check table.
m=CN: There may be any number of dependent records for each record of the check
table.
Field Symbols They are placeholder or symbolic names for the other fields. They do not
physically reserve space for a field, but point to its contents. It can point to any data objects.
Field-symbols <fs>
Field Groups Field groups does not reserve storage space but contains pointers
to existing fields.
Open SQL These statements are a subset of standard SQL. It consists of DML command
(Select, Insert, Update, Delete). It can simplify and speed up database access. Buffering is partly
stored in the working memory and shared memory. Data in buffer is not always up-to-date.
Native SQL They are loosely integrated into ABAP. It allows access to all functions containing
programming interface. They are not checked and converted. They are sent directly to the
database system. Programs that use Native SQL are specific to the database system for which
they were written. For e.g. to create or change table definition in the ABAP.