SAP ABAP On HANA - Top Interview Questions
SAP ABAP On HANA - Top Interview Questions
How much memory will be allocated for internal table and work area ?
8KB memory will be allocated for both internal tables and work areas and
it will be increased dynamically.
What are the differences between simple and interactive ABAP reports?
A simple ABAP report allows the user to interact with the whole business-
result data. In case of interactive reports user can interact with
specific result data at a time.
Can we write the code both call transaction and session method in single
program?
Yes it is possible to write call transaction and session in one program.
Why sapscripts are client dependent and smart forms are client
independent?
Smart forms create its own function module so it does not required to
transport the request through SCC1.As all the Development Object are
stored in client independent tables. Whereas SAP Script does not generate
any function module while executing so we need to transport the request
number through SCC1.Sap script is stroed in side the client depended
table as a TEXT. So sapscripts are client dependent and smartforms are
client independent.
WHAT ARE THE DIFFERENCES BETWEEN CLUSTER TABLES AND POOLED TABLES?
Cluster tables:
Table type in the ABAP Dictionary.
The data of several cluster tables is stored together in a single table
cluster in the database. A cluster table is thus known only in the ABAP
Dictionary, not in the database.
Pooled tables:
Table type in the ABAP Dictionary.
The data of several pooled tables are stored together as a table pool in
the database. Therefore, a pooled table is known in the ABAP Dictionary,
but not in the database.
WHAT IS AN INTERNAL TABLE? EXPLAIN THE DIFFERENT TYPES?
INTERNAL TABLE:
Data structure that exists only at program run time.
Internal tables are one of two structured data types in ABAP. They can
contain any number of identically structured rows, with or without a
header line.
The header line is similar to a structure and serves as the work area of
the internal table. The data type of individual rows can be either
elementary or structured.
Internal tables provide a means of taking data from a fixed structure and
storing it in working memory in ABAP.
The data is stored line by line in memory, and each line has the same
structure. In ABAP, internal tables fulfill the function of arrays. Since
they are dynamic data objects, they save the programmer the task of
dynamic memory management in his or her programs.
You should use internal tables whenever you want to process a data set
with a fixed structure within a program. A particularly important use for
internal tables is for storing and formatting data from a database table
within a program. They are also a good way of including very complicated
data structures in an ABAP program.
Like all elements in the ABAP type concept, internal tables can exist
both as data types and as data objects.
A data type is the abstract description of an internal table, either in a
program or centrally in the ABAP Dictionary, that you use to create a
concrete data object. The data type is also an attribute of an existing
data object.
TYPES OF INTERNAL TABLES:
HASHED TABLE:
This is the most appropriate type for any table where the main operation
is key access. You cannot access a hashed table using its index.
The response time for key access remains constant, regardless of the
number of table entries. Like database tables, hashed tables always have
a unique key. Hashed tables are useful if you want to construct and use
an internal table which resembles a database table or for processing
large amounts of data.
Hashed tables have no linear index.
You can only access a hashed table using its key. The response time is
independent of the number of table entries, and is constant, since the
system access the table entries using a hash algorithm. The key of a
hashed table must be unique. When you define the table, you must specify
the key as UNIQUE.
INDEX TABLE:
The operations listed below are only permitted for index tables (sorted
and standard tables). Some of them are restricted to standard tables.
Since it is quicker to access a table by index than by key, you should
always use specific index operations when you know that a particular
internal table is an index table.
In particular, the quickest way to fill a table line by line is to append
lines to a standard table, since a standard table cannot have a unique
key and therefore appends the lines without having to check the existing
lines in the table.
If you can either accommodate duplicate entries in a table, or exclude
them in a different way, it can be quicker to fill a standard table and
then sort it or assign it to a sorted table if the data does not have to
be inserted into the table in the correct sort sequence.
Furthermore, the performance of operations that change the internal
linear index has been improved in Release 4.5A. Previously, index
manipulation costs for inserting and deleting liens in standard tables
and sorted tables increased in linear relation to the number of lines.
From Release 4.5A, the index manipulation costs only increase
logarithmically with the number of lines, since the table indexes are now
maintained as a tree structure. This makes insertion and deletion
operations efficient, even in very large standard and sorted tables.
SORTED TABLES
This is the most appropriate type if you need a table which is sorted as
you fill it. You fill sorted tables using the INSERT statement.
Entries are inserted according to the sort sequence defined through the
table key. Any illegal entries are recognized as soon as you try to add
them to the table.
The response time for key access is logarithmically proportional to the
number of table entries, since the system always uses a binary search.
Sorted tables are particularly useful for partially sequential processing
in a LOOP if you specify the beginning of the table key in the WHERE
condition.
What is the difference between AT SELECTION-SCREEN and AT SELECTION-
SCREEN OUTPUT?
AT SELECTION-SCREEN is the PAI of the selection screen whereas AT
SELECTION-SCREEN OUTPUT is the PBO of the selection screen.
What is the difference between Master data and Transaction data in SAP?
Master data is data that does not change often and is always needed in
the same way by business.
Ex: One time activities like creating Company Codes, Materials, Vendors,
Customers etc.
Transaction data keeps on changing and deals with day to day activities
carried out in business.
Transactions done by or with Customers, Vendors, and Materials etc.
generate Transaction Data. So data related to Sales, Purchases,
Deliveries, Invoices etc. represent transaction data.
Some important transactions here for Master Data:
· Material: MM01 MM02 MM03.
· Vendor: XK01 , XK02 , XK03
· Customer: Xd01 , XD02 , XD03.
Some Important transactions for Transaction data:
· Purchase Order: ME21n , ME22n , ME23n.
· Sales Order: VA01 , VA02 , VA03.
· Goods Receipt: MIGO.
· Invoices: MIRO.
What are the Data types of the ABAP/4 layer?
Possible ABAP/4 data types:
C: Character.
D: Date, format YYYYMMDD.
F: Floating-point number in DOUBLE PRECISION (8 bytes).
I: Integer.
N: Numerical character string of arbitrary length.
P: Amount of counter field (packed; implementation depends on h/w
platform).
S: Time Stamp YYYYMMDDHHMMSS.
V: Character string of variable length, length is given in the first two
bytes.
X: Hexadecimal (binary) storage.
You are running a report. It is taking long time for execution. What
steps will you do to reduce the execution time?
· Run time analysis
· System Trace
· Extended code check
· Performance tuning
What is the difference between report and script?
Script is a static form which is used to print company forms like Sales
Order, Purchase order etc.
Report is an executable program which can be static or interactive.
How do you get functional specs when you are assigned some object?
Generally Functional Specifications will be sending through emails(In
support process, they may come in a specific tool like: remide, radix).
What is the difference between the function module and a normal ABAP/4
subroutine?
In contrast to normal subroutines function modules have uniquely defined
interface.
Sub routines do not return values.
Sub routines do not return exceptions.
Sub routines cannot be tested independently.
Declaring data as common parts is not possible for function modules.
Function modules are stored in a central library.
Can you move a Smartform from one SAP system to another without using
transports?
Yes, this can be achieved using the Upload/Download feature for
Smartforms. One can download the Smartform from one system and save it as
an XML file. Once that is done, the XML file can be used to upload the
Smartform in another system.
How do you find the name of the Function Module for a Smartform?
The function module for Smartform is created when the Smartform is
activated. You can find the name of the Function Module for a Smartform
by going to Environment --> Function Module Name.
In selection screen I have three fields, plant mat no and material group.
If I input plant how do I get the mat no and material group based on
plant dynamically
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL.
CALL FUNCTION -> F4IF_INT_TABLE_VALUE_REQUEST to get material and
material group for the plant.
How do you read/write files from/to the presentation server in SAP ABAP ?
You need use the below Function Modules to read/write :
GUI_UPLOAD --> To read data from file into an internal table
GUI_DOWNLOAD --> To write data from internal table to a file on
presentation server
What is the structure of the BDC table?
The BDCDATA consists of the following fields:
PROGRAM [CHAR 40] - Online program name.
DYNPRO [NUMC 4] - Screen number.
DYNBEGIN [CHAR 1] - Flag to indicate the start of a new screen.
FNAM [CHAR 132] - Field name of a screen field to be filled with data.
FVAL [CHAR 132] - The actual value to be filled into the specified screen
field.
Can we use call transaction and session method in the same program ?
explain ?
Yes, we can call call transaction and session method in same program,
generally we use call transaction for updating and session method for
logging errors in the same program .
How many main windows can we define per form and per page in sapscripts?
In sapscripts we can define one main window and 99 windows per page
How will create standard text? How will you insert standard text in SAP
Script?
SO10 is the transaction code for creating standard texts. To create
standard text in SE71 go to ,main menu ->insert ->standard text or by
using control command .
Can we display multiple ALV`s in the same screen without using container
?
We can display multiple ALV`s in the same screen by using blocked list
ALV
Can we have the same append structure in more then one Database Table ?
No, you can not have same append structure in more than one database
table