KEMBAR78
SAP ABAP Questions | PDF | Databases | Database Index
0% found this document useful (0 votes)
59 views86 pages

SAP ABAP Questions

Uploaded by

Poornima C N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views86 pages

SAP ABAP Questions

Uploaded by

Poornima C N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

1

Sap Abap Question Bank


What is SAP ABAP?
Can you define what the SAP ABAP is?
Define SAP ABAP in simple terms?
What do you know about SAP ABAP?
ABAP is abbreviated as Advanced Business Application programming and is a programming
language developed by SAP. ABAP is a 4th generation language used for developing and managing
SAP application programs that include Reports, Interfaces, Forms, Module pools, Data conversions,
user exits, workflows, and BADIs.
ABAP is a default programming language for all languages of SAP and was introduced with the base
of JAVA.
What is the main use of SAP ABAP on Business purpose?
What purpose does SAP ABAP do in the software industry? What is the main moto of SAP ABAP?
ABAP is an important component of SAP technology. ABAP is a high-level programming language
that is used for developing business applications. This language is used for creating programs for
the client-server R/3 system. ABAP is a default programming language for all languages of SAP and
was introduced with the base of JAVA.
What Is Sap R/3?
What is the meaning of SAP R/3?
SAP R/3 is a client-server architecture. In R/3, R stands for Real-time, and three stands for 3-tier
architecture. SAP R/3 refers to systems application and processing structure for real-time data
processing. SAP R/3 has a 3-tier architecture, i.e., Presentation layer, Application layer, and
Database layer.
What are the layers of data descriptions in R/3?
 Presentation or External Layer
 Application or ABAP/4 Layer
 Database Layer
Explain SAP ABAP 3-tier architecture?
Explain the 3-tier architecture of SAP ABAP?
Explain SAP ABAP architecture?
SAP R/3 has a 3-tier architecture, i.e., Presentation layer, Application layer, and Database layer.

DOCUMENT PREPARED BY SONU JANGIR |


2

The Presentation layer is an interface between the R/3 system and its end-users. This layer is
distributed to clients, customers, or individual users' workstations. It receives the data from the
input devices and sends it to the application layer (server) to process the data. Moreover, it is also
responsible for receiving the processed data from the application layer and sending the same to the
devices where the result is required to display.
The Application layer is an intermediate layer responsible for processing the inputs from the
presentation layer. The application layer is implemented using application servers. Application
server(s) can be one or multiple. Each Application server can contain either one or multiple services
to run an R/3 system. It communicates to the database layer with input from the presentation
layer, processes input, and sends the results back to the presentation layer. The application layer
contains the ABAP runtime environment where the ABAP programs are executed.
The Database layer contains the central database system of all the data in the R/3 system. This
database layer installs on different servers due to security, performance, and processing issues. This
layer is responsible for processing the application layer's requests and sending back the required
information. In general, SQL or ORACLE servers are used in the database layer.
Define ABAP/4 layer?
ABAP/4 layer specifies the data formats used by the ABAP/4 processor.
What are the components in Sap Application Server?
The components are -
 Work Processes
 Dispatcher
 Gateway
 Shared Memory
Define Database layer?
Database layer contains the central database system of all the data in the R/3 system. This database
layer installs on different servers due to security, performance, and processing issues. This layer is
responsible for processing the application layer's requests and sending back the required
information. In general, SQL or ORACLE servers are used in the database layer.
What is the meaning of these terms in SAP: application server and presentation server?
What are presentation and application servers in SAP?
An Application server manages the output/input of ABAP/4 programs and interprets them.
Application servers are groups of executables.

DOCUMENT PREPARED BY SONU JANGIR |


3

Presentation servers are user programs from the workstations named - Sapgui.exe.
What is the way for accessing data that is found on an application server and on a presentation
server in ABAP/4?
In an ABAP/4 program how do you access data that exists on a presentation server v/s on an
application server?
We should use these modules - UPLOAD or WS_UPLOAD for the presentation server and OPEN
DATASET, CLOSE DATASET, READ DATASET for the application server.
How do you read files from the Application server?
To read files from Application server, we need to use the commands -
 OPEN DATASET - Opens the file(dataset) either in read /write mode.
 READ DATASET - Read the file.
 CLOSE DATASET - Close the dataset once the date has been read.
How do you read/write files from/to the presentation server in SAP ABAP?
We need to use the below Function Modules to read/write -
 GUI_UPLOAD - To read data from the file into an internal table.
 GUI_DOWNLOAD - To write data from an internal table to a file on the presentation server.
Differentiate between ABAP memory and SAP memory?
What Are the Differences Between Sap Memory and ABAP Memory?
 SAP memory is a global memory.
 ABAP memory is local memory.
What is dispatcher?
Define dispatcher?
What do you know about the term dispatcher?
SAP dispatcher is a control agent that manages resources for the R/3 applications.
What is the different ABAP/4 editors? What are the differences?
What are the different ABAP editors?
What are the different types of ABAP Editors?
What are the different types of editors available for ABAP?
There are two editors available in ABAP, and those are - SE38 and SE80.
 In SE38, we can create programs, view online reports, and perform all the objects
developments.
 In SE80, there are additional features such as creating packages, function groups, module
pools, classes, programs, and BSP applications apart from the above.

DOCUMENT PREPARED BY SONU JANGIR |


4

What is the use of different editors in ABAP?


We can create programs, view online reports, and perform all the objects developments, packages,
function groups, module pools, classes, programs, and BSP applications using editors.
How many maximum sessions can be open in Sapgui?
There are maximum 6 sessions open in SAPgui.

Program Structure
What contain data only during the runtime of a program?
Structures can contain data only during the runtime of a program.
What is the typical structure of an ABAP program?
HEADER, BODY, FOOTER
Explain the structure of the ABAP program?
The typical structure of the ABAP program includes header, body, and footer.
What is conversion & interface programs in Sap?
 CONVERSION - Legacy system to flat file.
 INTERFACE - Flat file to SAP system.
Which transaction code used to analyse the performance of ABAP program?
Transaction Code AL21.

Statements
What is types statement in SAP ABAP programing?
How do we separate these statements: ASSIGN and MOVE?
ASSIGN: At data object assigning, the data objects technical attributes are verified by the system for
compatibility with every type specifications of the field symbol (ASSIGN TO). General attributes can
be taken by the field symbol if they are not found in the field type specifications.
MOVE: The MOVE statement is used for providing data object values to variables. It can be found as
text symbol, literal, constant but it is not necessary to be found as a variable.
What is the use of CONDENSE statement in ABAP programming?
CONDENSE statement used to remove blank characters.
What ABAP statement will trigger list generation?
The first WRITE statement encountered in an ABAP program triggers the list processing. Upon
completion of the program, the list is output. The system generates some standard headings for list
output that includes the program name and a page number in the heading.

DOCUMENT PREPARED BY SONU JANGIR |


5

What two statements are required in an ABAP program to output an icon using a write statement?
There are 2 statements required in the ABAP program -
 The INCLUDE statement is required in the program.
 The WRITE statement will have the following syntax - WRITE AS ICON.
How do we make a separation between these terms: appending, input, and output?
Appending used to write the record at the end of the file after opening.
Input used to read the file until end of the file after opening.
Output used to write the records to the file from beginning after opening. If any records already
existed in the file, that are overwritten in Output.
What is the syntax and function used for command AUTHORITY CHECK?
AUTHORITY=CHECK OBJECT
IF SY-SUBRC NE 0.
The authorization verification from the user for starting a specific action is made by AUTHORITY
CHECK.
What is the role of the following commands: IMPORT and EXPORT? When we use IMPORT? what is
the way for passing multiple data groups?
IMPORT: The statement used or reading the data objects from the memory into a ABAP/4 program.
IMPORT has the following syntax - IMPORT … FROM MEMORY ID. The data objects that are read
found in a memory cluster in the form of a list. Without the option "TO" the same name will be
found at assigning the data object from the memory to the one from the application.

EXPORT: The statement used for reading data objects from the ABAP/4 program into memory.
EXPORT has the following syntax - EXPORT … TO MEMORY ID. A cluster in the memory where the
data objects are deposited in the form of a list.
How do we describe the “CHECK” statements and what is their mechanism?
The "Check" statement is used for finishing one loop conditionally, when the condition says true the
rest of the statements from the actual statement block gets ignored and begin the next loop.

Processing Data
What is the difference between Master data and Transaction data in SAP?
Master data is data that does not change often and is always required by business.
Ex: One-time activities like creating Company Codes, Materials, Vendors, Customers etc.

DOCUMENT PREPARED BY SONU JANGIR |


6

Transaction data keeps on changing and deals with day to day activities carried out in business.
Transactions performed by or with Customers, Vendors, and Materials etc., generates Transaction
Data.

Some important transactions for Master Data are -


Material: MM01 MM02 MM03.
Vendor: XK01 , XK02 , XK03
Customer: Xd01 , XD02 , XD03.

Some Important transactions for Transaction data are -


Purchase Order: ME21n , ME22n , ME23n.
Sales Order: VA01 , VA02 , VA03.
Goods Receipt: MIGO.
Invoices: MIRO.

Data Types
How to define parameters as a data type?
PARAMETERS P_INPUT (10) TYPE C.
You want to insert an integer field containing value 1 to a character field, how this can be done?
The built-in conversion rules apply automatically and converts the integer value to character value
while assigning a integer field to a character field.
What is the use of data type C?
Variables of data type C are used for holding alphanumeric characters from a minimum length of 1
character to a maximum length of 65,535 characters. By default, these are aligned to the left.
Can you print decimals in type N? What is difference between float and packed data type?
No, we cannot print decimals in type N because decimal places are not permitted with N data type.
Float Data Type - It cannot be declared in Parameters.
Packed Number - It can be declared in Parameters.
What is the difference between a substructure and an append structure?
In case of a substructure, the reference originates in the table itself in the form of a statement
include.
In case of an append structure, the table itself remains unchanged and the reference originates in
the append structure.

DOCUMENT PREPARED BY SONU JANGIR |


7

How is conversion of data types done between ABAP/4 and DB layer?


How is conversion of data types done between ABAP/4 & DB layer?
Database interface is responsible for the conversion between ABAP/4 data types and the database
layer.
How is conversion of data types done between ABAP/4 and external level?
How is conversion of data types done between ABAP/4 & external level?
Conversion between the external layer and the ABAP/4 layer is accomplished in the SAP dialog
manager DYNP.
What are the Data types of the external layer?
ACCP, CHAR, CLNT, CUKY, CURR, DATS, DEC, FLTP, INT1, INT2, INT4, LANG, LCHR, LRAW, NUMC,
PREC, QUAN, RAW, TIMS, UNIT, VARC.
What are the Data types of the ABAP/4 layer?
ABAP/4 data types are specified below -
 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 or counter field (packed; implementation depends on hardware platform).
 S: Time stamp YYYYMMDDHHMMSS.
 T: Time of day HHMMSS.
 V: Character string of variable length, length is given in the first two bytes.
 X: Hexadecimal (binary) storage.
Do you know about the different data types of internal tables?
Key, Line, and Table are the three different data types of internal tables.
What is the difference between data type D and data type DATS?
D data type is 8-character length. For example, 00000000
DATS data type is 10-character length. For example, 00.00.0000
What is the difference between 'TYPE' and 'LIKE'?
'Type' used to assign data type directly to the data object while declaring.
'Like' used to assign the data type of another object to the data object while declaring.
'Type' refers the existing data type while 'Like' refers to the existing data object.
Why do we use TYPES statement in ABAP programming?
DOCUMENT PREPARED BY SONU JANGIR |
8

TYPES statement is used to pass user defined structure in an ABAP program.

Large Data Volumes Processing


Which program is used when large amounts of data needs to be displayed?
Report Programs are used when large amounts of data need to be displayed.

Variables
When you declare a variable in an ABAP program, what are the key points you should consider?
The variables are always declared at the beginning of the program or subroutine or include. Below
are the some of rules to follow while declaring variables -
 They must begin with a letter.
 Can be a maximum size of 30 characters.
 Cannot include + , : or ( ) in the name.
 Cannot use a reserved word.
Name a few system global variables you can use in ABAP programs?
SY-SUBRC, SY-DBCNT, SY-LILLI, SY-DATUM, SY-UZEIT, SY-UCOMM, SY-TABIX.
In what way are Get and SET different?
GET PARAMETER ID FIELD: The value placed in ID is moved in the variable by the statement, if a
value is not found in SAP memory, the system configures SY-SUBRC to 4, otherwise is 0.
SET PARAMETER ID FIELD: The field contents from ID are stored in SAP memory in a code with up to
20 characters in length. If a value is found there already it gets overwritten. If there is no ID, we
should make a new parameter object by double-clicking the ABAP Editor.
How the values will be passed to RFC Function module Pass by Value or Pass by reference?
Always Pass by Value.
RFC is Remote Function call cannot access the values with Pass by reference.
What are field symbols in SAP ABAP?
Field symbols can point to any data object in ABAP/4 and to structures defined in ABAP/4
dictionary. All operations we have programmed with the field symbol are carried out with the
assigned field.
What are the system fields? Explain?
What is System Variable in ABAP?

DOCUMENT PREPARED BY SONU JANGIR |


9

The ABAP system fields are active in all ABAP programs. They are filled by the runtime environment,
and we can query their values in a program to find out states of the system. Although they are
variables, we should not assign our own values to them, since this may overwrite information that
is important for the normal running of the program. However, there are some isolated cases in
which we may need to overwrite a system variable. For example, by assigning a new value to the
field SY-LSIND, we can control navigation within details lists.
What is a multiple line field?
A multiple line field that allows the user to enter multiple lines of data into it.
How do you populate data into a multiple line field?
To populate data into a multiple line field, an index (Line index) is added to the field name to
indicate which line is to be populated by the BDC session.

Date And Time


What is the format of storing date and time in SAP?
How Are the Date and Time Field Values Stored in Sap?
DD.MM.YYYY. HH:MM:SS.

Message Handling
What is the use of message command in a report? What are the different message types?
Mention the different types of messages that appear in the program system.
Messages are used to describe what is happening in the program execution to the programmer or
user. Messages represents with a three-digit number. Messages range starts from 000 to 999.

Messages are basically six types. Those are -

The message appears in a separate dialog box and the program execution get terminated.
A Abend
When the user has confirmed the message, control returns to the next-highest area menu.

E Error An error dialog appears, or the program terminates depending on the program condition.

The message appears in a separate dialog box.


I Information Once the user has confirmed the message, the program execution continues from the next
statement coded immediately after the MESSAGE statement.

DOCUMENT PREPARED BY SONU JANGIR |


10

The total program execution continues normally, and the message is displayed in the status
S Success
bar of the screen.

An error message is displayed in the status bar of the screen and the program execution
W Warning
terminates.

No message is displayed.
Exit or
X The program terminates with a short dump.
Abort
Program terminations with a short dump normally only occur when a runtime error occurs.

Loop Statements
CHAIN…ENDCHAIN and LOOP ENDLOOP statements are allowed in call sub screen?
The statement CALL SUBSCREEN cannot be used between the statements LOOP and ENDLOOP or
CHAIN and ENDCHAIN.
What is the significance of hide?
It stores the click value and display the related record in the secondary list.
Where do you code the hide statement?
In a LOOP statement.
What is read line in ABAP?
READ LINE and READ CURRENT LINE – These statements are used to read data from the lines of
existing list levels. These statements are connected to the HIDE technique.

Loop Control Statements


Control break events in ABAP?
 AT-FIRST: This is used execute the statements before records are processed.
 AT-LAST: This event is used to execute the statements after all records are processed.
 AT-NEW: This event is used to execute the statement before group of records are
processed.
 AT-END: This event is used to execute the statements after processing of group of records.

Data Dictionary

DOCUMENT PREPARED BY SONU JANGIR |


11

What is ABAP Data Dictionary?


What is an ABAP data dictionary?
What is a data dictionary?
What do you mean by an ABAP data dictionary?
What is the meaning data dictionary in ABAP?
What do you mean by the data dictionary in ABAP?
ABAP Dictionary used to create and manage data definitions (metadata). The ABAP Dictionary
allows a central description of all the data used in the system. New or modified information is
automatically provided for all the system components. Data Dictionary ensures data integrity, data
consistency and data security.

The ABAP Dictionary supports the definition of user-defined types (data elements, structures, and
table types). We can create the corresponding objects (tables or views) in the relational database
using these data definitions. The ABAP Dictionary describes the logical structure of the objects used
in application development and shows how they are mapped to the relational database in tables or
views.
What is the use of ABAP data dictionary?
The ABAP Dictionary describes the logical structure of the objects used in application development
and shows how they are mapped to the relational database in tables or views.
What are the uses of the information in the Data dictionary?
The following information is useful and can directly access from the Data dictionary -
 Information on fields displayed with F1 help
 Possible entries for fields displayed with F4 help
 Match code and help views search utilities
What function does data dictionary perform?
Central information repository for application and system data. The ABAP Dictionary contains data
definitions (metadata) that allow us to describe all the data structures in the system (like tables,
views, and data types) in one place. This eliminates redundancy.
Mention the various types of objects of the data dictionary?
Specify the types of Data Dictionary Objects?
The different types of data dictionary objects are -
 Tables

DOCUMENT PREPARED BY SONU JANGIR |


12

 Views
 Domain
 Data Element
 Type Groups
 Search Helps/Match code Objects
 Lock Objects
 Structures
 Table Types
What are the basic objects of the data dictionary?
 Tables
 Domains
 Data elements
 Structures
 Type Groups
 Table Types
What are the aggregate objects in the Dictionary?
What are the aggregate objects in the data dictionary?
 Views
 Match codes
 Lock objects
What are the features of ABAP/4 Dictionary?
The most important features of ABAP/4 dictionary are -
 Integrated to ABAP/4 Development Workbench
 Active in the runtime environment
How many types of tables exist and What are they in Data Dictionary?
There are 4 Types of Tables in ABAP dictionary -
 Transparent tables - Exists with the same structure both in dictionary as well as in database
exactly with the same data and fields. Both Open SQL and Native SQL can be used.
 Pool tables - Pooled tables in the dictionary has a many-to-one relation with the table in
database. Table in the database has the different name as in the dictionary. Pooled table
are stored in table pool at the database level.
 Cluster tables - These are logical tables that are arranged as records of transparent tables.
One cannot use Native SQL on these tables (only Open SQL). They are not manageable
directly using database system tools.

DOCUMENT PREPARED BY SONU JANGIR |


13

 Internal tables - Internal table is a temporary table stored in the RAM of the application
server. It gets created during the program execution and gets deleted once the program
ends.
Which objects do NOT support re-usability in ABAP Dictionary?
All local objects are not reusable.
What Is the Step-by-step Process to Create A Table in Data Dictionary?
Steps to create a table -
 Creating domains (data type, field length, Range).
 Creating data elements (properties and type for a table field).
 Creating tables (SE11).
Can a transparent table exist in Data Dictionary but not in the Database physically?
No, Transparent table do exist with the same structure both in the dictionary as well as in the
database. And also exactly with the same data and fields.
What Is the meaning of ABAP editor integrated with ABAP Data Dictionary?
ABAP Editor is a tool in the ABAP Workbench in which we enter the source code of ABAP programs
and check their syntax. We can also navigate from the ABAP Editor to the other tools in the ABAP
Workbench.
How can we set the tablespaces and extent sizes?
We can specify the extent sizes and the tablespace (physical storage area in the database) for a
transparent table by setting the size category and data class.
What is the function of the correction system?
The correction system manages the changes to internal system components such as objects of the
ABAP/4 Dictionary.
What functions does a data dictionary perform?
The functions performed by the data dictionary in a data management system are -
 Management of data definitions.
 Provision of information for evaluation.
 Support for software development.
 Support form documentation.
 Ensures the data definitions are flexible and up to date.
What is the significance of Technical settings (specified while creating a table in the data
dictionary)?
What is a Table attribute?

DOCUMENT PREPARED BY SONU JANGIR |


14

The table attributes define who is responsible for maintaining a table and which types of access can
access data.
The most important table attributes are -
 Delivery class
 Table maintenance
 Activation type.
What is the significance of Delivery Class?
The delivery class controls the degree to which the SAP user or the customer is responsible for
table maintenance.
It also -
 Determines whether SAP 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.
What is the difference between table and structure in ABAP data dictionary?
Differentiate between structure and table in the data dictionary?
The difference between table and structure are -

TABLE STRUCTURE

Table can store data physically Structure can't store data physically.

Table can include primary key. Structure can't include primary key.

Table can include technical attribute. Structure can't have a technical attribute.

Explain the use of logical block in SAP ABAP program and data dictionary?
In ABAP, the group of programs into modular units using modularization called as logical blocks. It
helps in increasing the program readability and redundancy in process of creating it and during the
maintenance cycle. It also helps in reusing the code again.
ABAP data dictionary is used to define the logical structure of objects in the development of
application and mapping to the relational database in tables and views.
State of the objects that constitute the data dictionary.
Some of the objects that constitute data dictionary are as follows - tables, domain, views, data
element, search helps or match code objects, type groups, look objects, table types, structure.
What are domains and data element?

DOCUMENT PREPARED BY SONU JANGIR |


15

Domain - Domain is a central object for explaining the technical characteristics of an attribute of a
business objects. It describes the value range of the field.
Data Element – Data element is used to describe the semantic definition of the table fields like
description the field. Data element describes how a field can be displayed to end-user.
What is a data class in SAP Data Dictionary?
A data class is a class that contains only fields and crude methods for accessing other classes. Data
classes are classified into four types depending on the type of data they contain -
 Master Data: Data change very rarely.
 Transaction Data: Data changes are depending on requirements.
 Organization Data: Data is a customized and entered to the system when the system is
configured. It is rarely changed.
 System Data: Data is used by the SAP R/3 system.
What is a size category in SAP Data Dictionary?
The Size category describes the possible space requirement for the table in the database.
What is a match code in SAP Data Dictionary?
Match Code is a tool to help us to search for data records in the system. Match codes are an
efficient and user-friendly search tool where key of a record is unknown.
What is the function of a Domain in SAP Data Dictionary?
A domain describes the technical settings of a table field. A domain defines a value range, that sets
the allowable values for the fields that are referring to this domain. A single domain can be used as
origin for any number of fields that are identical in structure.
What is delivery class in SAP Data Dictionary?
Delivery class to control the transport of table data for an installation, upgrade, or client copy and
transports between customer systems. The delivery class is also used in the extended table
maintenance.
To create a transparent table, which data dictionary object is selected?
Database table.
What are the two different ways of building a match code object?
A match code can be built in two different ways -
 Logical structure - The matchcode data is setup temporarily when the match code is
accessed. (Update type I, K).
 Physical structure - The match code data is physically stored in a separate table in the
database. (Update type A, S, P).
DOCUMENT PREPARED BY SONU JANGIR |
16

What is Repository Info. Systems?


Repository Info. Systems is a tool that makes data stored in the ABAP/4 Dictionary available.

Data Elements

Difference between domain and data element? What is aggregate object?


Domain - Specifies the technical attributes of a data element that are its data type, length, possible
values, and appearance on the screen. Each data element has an underlying domain. A single
domain can be the basis for several data elements. Domains are objects in the ABAP Dictionary.
Data Element - Specifies the business function of a table field and its technical attributes are based
on a domain. Its business function is described by its field labels and documentation.
Aggregate Object – Views, Match Code and Lock objects are called aggregate objects because they
are formed from several related table.
Can you delete a domain which is being used by data elements?
Yes
What is the function of a data element?
A data element describes the role played by a domain in a technical context. A data element
contains semantic information.
Can a domain, assigned to a data element be changed?
Yes. We can assign a domain to data element by just overwriting the entry in the field domain.
Can you delete data element which is being used by table fields?
No.
Can you define a field without a data element?
Can you define a field without a data element in SAP ABAP?
Can we create field without data element and how?
Yes. There is no domain for a field if we want to specify no data element. We can enter data type
and field length and a short text directly in the table maintenance.
Can you delete a domain, which is being used by data elements?
Can you delete data element, which is being used by table fields?

DOCUMENT PREPARED BY SONU JANGIR |


17

No, we cannot delete data element that is being used by table fields.
No, when we try to do so, it throws an error.

Database Access
What are the ways you can do the tuning? What are the major steps will you use for these?
Tuning can be done in three ways -
 disk i/o
 SQL tuning
 memory tuning
Before performing tuning, we should get the status of the database using oracle utility called
statpack and tkprof.
What are the two methods of modifying Sap standard tables?
Mention what are the two methods of modifying SAP standard tables?
There are two methods for modifying SAP standard tables -
 Append structures
 Customizing includes
What is the difference between a 'Database index' and a 'Match code'?
'Database Index' contains fields from one table.
'Match Code' contain fields from several tables. Match code objects can build on cluster tables,
transparent tables, and pooled tables.
What are the different databases Integrities?
Mention the various databases integrities?
The different types of database integrities are specified below -
 Semantic Integrity
 Relational Integrity
 Primary Key Integrity
 Value Set Integrity
 Foreign Key Integrity
 Operational Integrity
ABAP query is used for?
ABAP Query (also known as an SAP Query or Query) is a powerful tool used to generate simple
reports without any coding.
Which transaction code is used to creating a query?
DOCUMENT PREPARED BY SONU JANGIR |
18

SQ01 is a transaction code used for SAP Query: Maintain queries in SAP.
What is match code? How it is different from database index?
Differentiate between database index and match code?
Match Code is a tool to help us to search for data records in the system. Match codes are an
efficient and user-friendly search tool where key of a record is unknown.
Match code objects builds on cluster tables, transparent tables, and pooled tables.
Database index contains fields only from one table.
What is SAP memory and ABAP memory?
SAP memory is a global memory.
ABAP memory is local memory.
How is conversion of data types done between ABAP/4 & DB layer?
Database interface is responsible for the conversion between ABAP/4 data types and the database
layer.
Difference between SY-TABIX and SY-INDEX? Where it is used? Can you check SY-SUBRC after
performing?
SY-TABIX - Current line of an internal table. SY-TABIX is set by the statements below, however only
for index tables. The field is either not set or is set to 0 for hashed tables.
 APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall
number of entries in the table.
 COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table
has the type HASHED TABLE, SY-TABIX is set to 0.
 LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop loss. At
the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is
set to 0 if the table has the type HASHED TABLE.
 READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and
the system does not find a line, SY-TABIX contains the total number of lines, or one more
than the total number of lines. SY-INDEX is undefined if a linear search fails to return an
entry.
 SEARCH FOR sets SY-TABIX to the index of the table line in which the search string is found.
SY_INDEX - In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the
current pass.
What is the difference between get and get late?

DOCUMENT PREPARED BY SONU JANGIR |


19

GET -
Syntax - GET <nodename>.
GET event occurs(triggers) when the logical database has read a line from the node <nodename>
and makes it available to the work area in the program declared using the statement NODES
<nodename>.
GET LATE -
Syntax - GET <nodename> LATE
GET LATE event is triggered when all the data records for a node and all the data records of the
sub-nodes under it in the hierarchy of the logical database have been read.
What are the System Fields you have worked with? Explain?
The following list specifies some of the system fields(30) -
 SY-DBSYS - Central Database
 SY-HOST - Server
 SY-OPSYS - Operating System
 SY-SAPRL - SAP Release
 SY-SYSID - System Name
 SY-LANGU - User Logon Language
 SY-MANDT - Client
 SY-UNAME - Logon Username
 SY-DATLO - Local Date
 SY-DATUM - Server Date
 SY-TIMLO - Local Time
 SY-UZEIT - Server Time
 SY-DYNNR - Screen Number
 SY-REPID - Current ABAP program
 SY-TCODE - Transaction Code
 SY-ULINE - Horizontal Line
 SY-VLINE - Vertical Line
 SY-INDEX - Number of current loop Pass
 SY-TABIX - Current line of internal table
 SY-DBCNT - Number of table entries processed
 SY-SUBRC - Return Code
 SY-UCOMM - Function Code
 SY-LINCT - Page Length of list

DOCUMENT PREPARED BY SONU JANGIR |


20

 SY-LINNO - Current Line


 SY-PAGNO - Current Page Number
 SY-LSIND - Index of List
 SY-MSGID - Message Class
 SY-MSGNO - Message Number
 SY-MSGTY - Message Type
 SY-SPONO - Spool number during printing
What is the transaction code for Table Maintenance?
SM30.
Explain what is the difference between Primary key and Unique key?
Primary Key – It can accept 0 value and cannot be NULL.
Unique Key – It can be NULL.
What are Joins and different types Joins?
Mention the types of joins?
There are four types of Joins -
 Self-Join
 Inner Join
 Outer Join
 Equi Join
How do you display a data in a Detail List?
By using two statements -
 Top-of-page during line-selection
 At line-selection
What are the System Table used in ABAP?
 Sales Document: Item Data – VBAP
 Sales Document: Partner – VBPA
 Sales Document: Header Data – VBAK
 Sales Document Flow – VBFA
 Sales Document: Delivery Item Data - LIPS
 Customer Master – KNA1
 Material Data – MARA
 Conditions (Transaction Data) – KONV
What is get cursor field?

DOCUMENT PREPARED BY SONU JANGIR |


21

GET CURSOR statement transfers the name of the screen element on which the cursor is positioned
during a user action into the variable <field>.
GET CURSOR FIELD <field> [OFFSET <offset>] [LINE <line>] [VALUE <value>] LENGTH <length>].
What is database utility?
Database utility is an interface between the ABAP/4 Dictionary and the underlying the SAP system.
What are the basic functions of Database utility?
The basic functions of database utility are -
 Create database objects
 Delete database objects
 Adjust database objects to changed ABAP/4 dictionary definition
Logical databases are created by transaction?
Transaction SE36.
What are the main events of which are used for Logical Database?
Explain what are the events used for Logical Database?
The main events used for Logical Database are as specified below -
 GET - The programs used for Logical Database are executed with the help of GET event. It
mainly takes place when a line from the node was read by the logical database. GET
statements determine the depth of the logical database.
 PUT - The program flow is directed by the PUT event.
Explain what Is A Logical Database?
What do you mean by a Logical database?
What are logical databases?
A logical database is a special ABAP/4 program that combines the contents of certain database
tables. Logical database is mostly involved in retrieving data for the concerned application
programs. Logical database has the data created by linking more than one table of the database in
the special ABAP program. Logical database is specially created during the program running and
used to read data from the database tables by linking them.
LDB offers an easy-to-use selection-screens. We can modify the pre-generated selection-screen
based on our requirements. It offers reasonable data selections and functions to check whether
user input is complete, correct, and plausible. It contains central authorization checks for database
accesses. Enhancements such as improved performance immediately apply to all report programs
that uses the logical database.

DOCUMENT PREPARED BY SONU JANGIR |


22

What are the advantages/disadvantages of logical databases?


Advantages -
 No need of programming for retrieval, meaning for data selection.
 Easy to use standard user interface, have check completeness of user input.
Disadvantages -
 Fast in case of lesser no. of tables however if the table is in the lowest level of hierarchy, all
upper level tables should be read so performance is slower.
What are the disadvantages of logical databases?
If we do not specify a logical database in the program attributes, the GET events never occur.
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.
If we are using logical databases, how will you modify the Selection-screen Elements?
Select-options: dname for deptt-dname.
What is the difference between unique key and primary key?
The unique key accepts null values; however, the primary key does not accept null values. Primary
key can accept zero value but not null.
Do you know about several database integrities?
List the various database integrities.
There are several database integrities and some of them are - primary key integrity, operational
integrity, relational integrity, and semantic integrity.
Can you create callable component of program code in a single ABAP/4 program?
Yes, we can either create include program in the database or define Macros.
What is the function of the append statement in SAP ABAP?
When the internal table ends, a record needs to be added at the certain specified work area. The
function of the append statement is to add the record.
Can data be put directly into the database?
No. The data can put into the database only after the data has been entered via transaction.
What are indexes in SAP tables?
Indexes are specified as a copy of a database table reduced to specific fields. This data exists in
sorted form. This sorting form improve fast access to the field of the tables. In the order that other
fields are also read, a pointer to the associated record of the actual table are included in the index.

DOCUMENT PREPARED BY SONU JANGIR |


23

The indexes are activated along with the table and are created automatically with it in the
database.
Difference between transparent tables and pooled tables?
Transparent tables in the dictionary has a one-to-one relation with the table in database. Its
structure corresponds to single database field. Table in the database has the same name as in the
dictionary. Transparent table holds application data.
Pooled tables in the dictionary has a many-to-one relation with the table in database. Table in the
database has the different name as in the dictionary. Pooled table are stored in table pool at the
database level.
What is an ABAP/4 Query in SAP?
ABAP/4 Query is a powerful tool to generate simple reports without any coding. ABAP/4 Query can
generate the following 3 simple reports -
 Basic List - It is the simple reports.
 Statistics - Reports with statistical functions like Average, Percentages.
 Ranked Lists - For analytical reports.
For creating a ABAP/4 Query, programmer has to create user group and a functional group.
Functional group can be created using with or without logical database table. Finally, assign user
group to functional group. Finally, create a query on the functional group generated.
Select up to 1 row and select single difference?
Select single fetches first matching record. If more than one matching record are there, then only
the first matching record will be considered and other records will not be considered. Whereas,
select up to 1 row will fetch all the matching records from the database.
What is the difference between VIEW and a TABLE in SAP?
A table physically stores data. A view does not store any data on its own. It can contain data from
multiple tables and it just accesses/reads data from those tables.
What are two methods of modifying SAP standard tables?
 Append Structures.
 Customizing Includes.
How to avoid Transport Request in Table maintenance Generator?
select 'No, or user, recording routine' while creating TMG.
How data is stored in cluster table?

DOCUMENT PREPARED BY SONU JANGIR |


24

Cluster table stores the data as name value pair. A cluster table contains data from multiple DDIC
tables.
How can I copy a standard table to make my own z_table?
Go to transaction SE11. Press "Copy" button to copy table. Enter the name of the standard table
and in the target table enter Z_table name and press enter.
I have a z_table, I wants to add one more field to the table without disturbing previous data, what
should I do?
While adjusting database table in SE14, select 'Save Data' radio button.
Can we have the same append structure in more than one Database Table?
No, we cannot have same append structure in more than one database table.
What is the role of NAST table in SAP?
After the final selection of the output is performed and the application document is saved, entries
are created in the NAST table with application ID, Application document number, output type,
output medium, output timing and Status code.
What is the role of TNAPR table in SAP?
Stores all the forms, driver programs and all NACE settings.
What are different database tables in SAP ABAP?
3
How to find the return code of a SQL stmt in ABAP programs?
Open SQL has 2 system fields with return codes -
 SY-SUBRC
 SY-DBCNT

Data Objects
Which objects are independent transport objects?
Below list specifies some of the independent transport objects –
 Domains
 Data elements
 Tables
 Technical settings for tables
 Secondary indexes for transparent tables
 Structures

DOCUMENT PREPARED BY SONU JANGIR |


25

 Views
 Match code objects
 Match code IDs
 Lock objects
What are local objects?
What are local objects in SAP?
Local objects are independent units of correction and transport system.
What is a Development class?
Development class enables us to correct and transport related objects as a unit. Related objects
from the ABAP/4 repository are assigned to the development class.
What are the two ways for restricting the value range for a domain?
 By specifying fixed values.
 By specifying a value table.
What are base tables of an aggregate object?
The tables producing an aggregate object (primary and secondary) are the base tables of aggregate
object.
What is the function of a Domain?
A domain describes the technical settings of a table field. A domain defines a value range, that sets
the allowable values for the fields that are referring to this domain. A single domain can be used as
origin for any number of fields that are identical in structure.
What is the difference between a structure and a table?
The difference between table and structure are -

TABLE STRUCTURE

Table can store data physically. Structure can't store data physically.

Table can include primary key. Structure can't include primary key.

Table can include technical attribute. Structure can't have a technical attribute.

Is there any way to restrict value range for a domain?


Yes. We can use fixed values to further restrict the value range of a domain. If we define fixed
values for a domain, these are used in the input check in screen templates.
How do we describe activation?

DOCUMENT PREPARED BY SONU JANGIR |


26

At the time of activation, the runtime object is created. These are buffered for the purpose of faster
access from the application program. If we take table as example, it contains details regarding the
following objects of table - domain, data elements, field definition, table definition.
How to transport text elements in SAP ABAP?
If it is first time, text elements automatically transport along with the program. If we change them
next time, it asks for TR. The elements gets moved, when TR gets moved.
What is client dependent objects in ABAP/SAP?
SAP Script layout, text element, and some DDIC objects.

Data Types in ABAP Dictionary


What are data dictionary objects?
What are different types of data dictionary objects?
The different types of data dictionary objects are -
 Tables
 Views
 Domain
 Data Element
 Type Groups
 Search Helps/Match code Objects
 Lock Objects
 Structures
 Table Types
Where do you find data dictionary in SAP menu tree?
There are three ways to open Data dictionary and those are -
 From SAP Menu tree of SAP GUI screen.
 From ABAP workbench, click on 'Development' folder to find ABAP Dictionary.
 Go to SE11 transaction.
What is the process of creating a table in the data dictionary?
The first thing that we should do is create domains. Next, we should begin with creating data
elements like properties. The last step is to create the tables.

Structures

DOCUMENT PREPARED BY SONU JANGIR |


27

What is the maximum number of structures that can be included in a table or structure?
Nine
What is the difference between a Substructure and an Append Structure?
In case of a substructure, the reference originates in the table itself in the form of a statement
include.
In case of an append structure, the table itself remains unchanged and the reference originates in
the append structure.
If a table that is to be extended contains a long field, we cannot use append structures. Why?
No append structures can be added to tables with long fields (data types VARC, LCHR or LRAW).
This is because a long field must always be the last field in the table. However, structures with long
fields can be enhanced with append structures.

Tables
What is a table pool?
What is a table pool in SAP?
A table pool (or pool) is used to combine several logical tables in the ABAP/4 Dictionary. The pool
definition consists of at least two keys fields and a long argument field (VARDATA).

views
What is a View?
View is a logical representation of summarized data from one or more tables. The view structure
can be defined by specifying table names and required field names from the joined tables.
View is not stored physically. View used to combine the data from one or more tables. The table
fields that are not used in the view definition can be hidden which causes minimization of
interfaces.
What is View? Different types of View. Explain?
Explain View and its different types?
View is a logical representation of summarized data from one or more tables. The view structure
can be defined by specifying table names and required field names from the joined tables.
View is not stored physically. View used to combine the data from one or more tables. The table
fields that are not used in the view definition can be hidden which causes minimization of

DOCUMENT PREPARED BY SONU JANGIR |


28

interfaces.
ABAP supports four different view types and those are -
 Database views
 Projection views
 Help views
 Maintenance views
What are the different types of Views in Sap R/3 System?
How many types of Views are there?
ABAP supports four different view types and those are -
 Database views
 Projection views
 Help views
 Maintenance views
What are the 2 other types of Views, which are not allowed in Release 3.0?
 Structure Views
 Entity Views
The data of a view is not physically stored but derived from one or more tables. (T/F).
True

Search Help
What is a Match Code?
Match Code is a tool to help us to search for data records in the system. Match codes are an
efficient and user-friendly search tool where key of a record is unknown.
What are the two levels in defining a Match Code?
 Match Code object
 Match Code Id
What is the maximum number of match code Id’s that can be defined for one Match code object?
A match code ID is a one-character ID that can be either a letter or a number.
Can we define our own Match Code ID’s for SAP Match codes?
Yes, the numbers 0 to 9 are reserved for us to create our own Match Code IDs for SAP defined
match code object.
What is an update type with reference to a Match code ID?

DOCUMENT PREPARED BY SONU JANGIR |


29

If the data in one of the base tables of a match code ID changes, the match code data should be
updated. The update type specifies when the match code is to be updated and how it is to be
updated. The update type also specifies which method should use for Building match codes. We
should specify the update type when you define a match code ID.
Can match code object contain IDs with different update types?
Yes
What are the update types possible?
 The following update types are possible -
 Update type A: The match code data is updated asynchronously to database changes.
 Update type S: The match code data is updated synchronously to database changes.
 Update type P: The match code data is updated by the application program.
 Update type I: Access to the match code data is managed using a database view.
 Update type K: Access to the match code is achieved by calling a function module.
What is input template in search help?
The input template often contains more fields (often only display fields) containing further
explanatory information about the search field. The input help should also update the contents of
these fields in this case.

Lock Objects
What is Locking?
Explain the Lock Objects and mechanism?
Lock mechanism allows simultaneous accessing of same data records by two or more users at the
same time. Functional Modules are responsible for set and release the locks. Function modules are
automatically generated from the lock objects definition in the ABAP/4 Dictionary.
When these functional modules are called, the retrieved table rows get locked or unlocked with the
definition of certain values to the fields.
What do we mean by Lock Mechanism?
What is lock mechanism? How do we create lock objects in ABAP?
Define Lock Mechanism. How do we create Lock Objects in ABAP?
SE11 transaction used to create lock objects.

Lock mechanism allows simultaneous accessing of same data records by two or more users at the

DOCUMENT PREPARED BY SONU JANGIR |


30

same time. Functional Modules are responsible for set and release the locks. Function modules are
automatically generated from the lock objects definition in the ABAP/4 Dictionary.
When these functional modules are called, the retrieved table rows get locked or unlocked with the
definition of certain values to the fields.

Lock objects are used to avoid the inconsistency while accessing the data during its insertion or
updation in the database. Tables data records that are required to be locked during its insertion or
updation must be defined in a Lock Object with their key fields.

Lock mechanism satisfies below two main functions -


 A program can communicate to the other programs with the data records that are just
reading or changing.
 A program can prevent itself from reading data that is just being changed by another
program.
What is lock object?
What is the use of lock objects?
Lock objects are used to synchronize the access of several users using same data by more than one
program. Lock objects are used to avoid the inconsistency when data is inserted or changed in the
database. Tables data records that are locked should be defined in a Lock Object along with their
key fields.
Why is a lock object needed?
The function of the Lock Object is to prevent inconsistencies or incorrect information to occur when
different types of data inserted in the database.
What are the functions of Lock Objects?
Lock objects main function is to synchronize the access of several users using same data by more
than one program. Lock objects are used to avoid the inconsistency when data is inserted or
changed in the database.

Internal Tables
What are the internal tables?
What are internal tables?
What is an internal table?

DOCUMENT PREPARED BY SONU JANGIR |


31

Internal table is a temporary table that is created, used during the program execution, and deleted
before the program terminated. Internal tables used to store the dynamic data sets from a fixed
structure in the main/working memory in ABAP. The lifetime of the table is until end of the program
execution. Internal tables fulfill the function of arrays in ABAP.
Explain the different types?
How many types of internal table?
What types of Internal tables exist?
The Internal table type are -
Standard Internal Tables -
This table type is particularly appropriate if we want to address individual table entries using the
index. This is the quickest way to access table entries. To fill a standard table, append lines using
the (APPEND) statement. Standard tables have a linear index. We can access them using either the
index or the key. If we use the key, the response time is in linear relationship to the number of table
entries. The key of a standard table is always non-unique, and we may not include any specification
for the uniqueness in the table definition.

Sorted Internal Tables -


Sorted tables are always saved sorted by key. They also have a linear key. Like standard tables, we
can access them using either the table index or the key. The key of a sorted table can be either
unique, or non-unique, and we should specify either UNIQUE or NON-UNIQUE in the table
definition. Standard tables and sorted tables both belong to the generic group index tables. This
table type is particularly suitable if we want the table to be sorted while we are still adding entries
to it.

Hashed Internal Tables -


Hashes tables have no internal linear index. We can only access hashed tables by specifying the key.
The response time is constant, regardless of the number of table entries, since the search uses a
hash algorithm. The key of a hashed table must be unique, and we must specify UNIQUE in the
table definition. This table type is particularly suitable if we want mainly to use key access for table
entries. We cannot access hashed tables using the index.

Index Tables -
DOCUMENT PREPARED BY SONU JANGIR |
32

Index table is only used to specify the type of generic parameters in a FORM or FUNCTION. That
means we can't create a table of type INDEX. Internal tables are not DB tables. Standard and Sorted
tables in combined are basically called as Index tables and there nothing else.
What do you understand by work area and internal tables in ABAP? Why do we use it?
Both are temporary memory areas and are used to store the data at run-time.
Internal tables and work areas represents the instances of database tables.
Explain the use of insert and append statement in SAP ABAP?
Why are insert and append statement used in SAP ABAP?
Append statement used to add a record at the end of internal table in work area.
Insert statement used to add a record at specified location of internal table in work area.
How memory management happens for internal tables and work areas in ABAP?
8KB memory is allocated to internal table and work areas initially and increases dynamically when
required.
What are the Data Types of Internal Tables?
There are three types of internal tables and those are -
1. Line
2. Key
3. Table
If internal table used in for all entries in empty, then what happens?
No, records will be displayed.
What Is the difference between Sum and Collect?
Sum: We can only use this statement within a LOOP. If we use SUM in an AT - ENDAT block, the
system calculates totals for the numeric fields of all lines in the current line group and writes them
to the corresponding fields in the work area. If you use the SUM statement outside an AT - ENDAT
block, the system calculates totals for the numeric fields of all lines of the internal table in each
loop pass and writes them to the corresponding fields of the work area.
COLLECT: It allows us to create unique or summarized datasets. The system first tries to find a table
entry corresponding to the table key. The key values are taken either from the header line of the
internal table itab, or from the explicitly specified work area wa.
What are Internal Tables? How do you get the number of lines in an Internal Table? How to use a
specific number occurs statement?

DOCUMENT PREPARED BY SONU JANGIR |


33

 It is a standard data type object, that exists only during the runtime of the program. They
are used to perform table calculations on subsets of database tables and for re-organizing
the contents of database tables according to users need.
 Using SY-DBCNT.
 The number of memory allocations the system needs to allocate for the next record
population.
Do you know about the different data types of internal tables?
Key, Line, and Table are the three different data types of internal tables.
What are the uses of append statement and insert in SAP ABAP?
State the two methods needed to modify the standard tables of SAP.
The append statement is used to add a record at the end of the internal table.
The Insert statement used to add a record at a specific location.
What is the meaning of Data Clusters?
Data clusters provides a way to group every type of complex internal data object from an
application in ABAP/4. They are also placed in the memory of ABAP/4 for a limited time or for a
longer time. The databases of this type have the name accordingly, they are named cluster
databases and their construction as predefined. The placing of this type of data clusters is a feature
of ABAP/4. With the support of SQL statements, it is possible to enter cluster databases and the
data clusters that have been placed in ABAP/4 can be decoded only by ABAP/4.
At the creation of internal tables what is the criteria configuration of the value of an occurs?
We should configure the occurs value to make optimizations. Below are some notes to keep in mind
before configuration -
a. The default size declared should maintain in the roll area for the faster program access.
b. The whole data area of the application should be less than 64 kilobytes.
c. The data inserted that is bigger than the default size is placed in the roll file and the
program getting accessed slow. So the data should be lesser size than default size for
insertion.
What is the best way for reading database table lines in an internal table in the form of packs of a
known size?
SELECT * FROM SPFLI INTO TABLE ITAB PACKAGE SIZE N (N being the variable). We should give a
name to the WILDCARD (*) characters that are meant to be compared with numeric and character
strings.
How can we describe the following commands: MODIFY LINE and READ LINE?

DOCUMENT PREPARED BY SONU JANGIR |


34

The MODIFY LINE statement is meant for changing the lines of a full list from inside the program.
READ LINE statement is used for reading data on the lines from the current levels. READ LINE is the
same as READ CURRENT LINE and they are both related to HIDE.
Which are the buffering types?
Buffering types are full, generic, or single record.
 In Full buffering, the entire table or nothing found in the buffer.
 In Generic buffering, the generic locations are buffered entirely.
 In Single record buffering, the currently accessed records loaded into buffers.
What is generic key and generic area?
The generic key is the left part of the table key. The generic area represents every record that
correspond to generic key fields.
What is an internal table and work area in SAP ABAP?
Internal tables and work areas are temporary memory areas that are used to store data at run-
time. Internal tables and work areas are instances of database tables.
How much memory will be allocated for internal table and work area?
8KB memory allocated for both internal tables and work areas and can increased dynamically.
What is difference between append and insert statements in SAP ABAP?
Append statement is used to add a record at bottom of a internal table from work area .
Insert statement is used to insert a record at a specified position of an internal table from work
area.
What is occurs in internal table?
Occurs addition to the declaration gives initial size to that table. Occur statement allocates 8kb of
memory to the internal table.
What is the difference between CHECK TABLE and VALUE TABLE?
CHECK TABLE -
A foreign key links two tables T1 and T2 by assigning fields of table T1 to the primary key fields of
table T2. Table T2 is then known as the check table of the foreign key.

VALUE TABLE -
Sometimes when we define a domain, we already know that all fields of the domain need to be
checked against a table. We can store this information in the domain definition by specifying a
value table.

DOCUMENT PREPARED BY SONU JANGIR |


35

If we try to define a foreign key for a field that points to this domain, the value table of the domain
is proposed as the check table for the foreign key.
What is the difference between SY-INDEX and SY-TABIX?
What is the difference between SY-TABIX and SY-INDEX?
SY-TABIX is a system variable that stores the index current processing record of an internal table.
SY-INDEX is a system variable that acts as a loop iteration counter, it stores loop iteration number.

So, when we are looping over an internal table, we use SY-TABIX.


LOOP AT ITAB INTO WA. **SY-TABIX stores index number of internal table record
ENDLOOP.

When we use DO ENDDO / WHILE for looping, there is no table involved. So, we use SY-INDEX.
DO 10 times. **SY-INDEX stores number of iterations of loop
ENDDO.
Can we sort internal table without using SORT statement? Explain?
We can sort internal table without using SORT statement by declaring sorted internal table. For ex -
DATA <new-sort-table> TYPE SORTED TABLE OF <input-table>.
What is difference between Internal Table without Header Line and Internal Table with Header
Line.
Internal Table without Header Line creates an internal table and work area separately. When the
Internal Table with header table creates the work area automatically with the same name of the
internal table.
Describe Internal Table and Work area?
An Internal table is a temporary table that contains the records of an ABAP Program while the
program is being executed. An internal table exists only during run time of a SAP program. Internal
table are used to process large volumes of data by using the ABAP language. We should declare an
internal table in an ABAP program when we need to retrieve data from database tables. Internal
table can act as data type and data object.
A work area is a temporary memory space that helps in reading and modifying the data of an
internal table line by line.
What will happen if I sort a sorted internal table?
Nothing will happen because the table is already sorted.
DOCUMENT PREPARED BY SONU JANGIR |
36

Modularization
What is Modularization and its benefits?
If the program contains the same or similar blocks of statements or required to process the same
function several times, we can avoid redundancy by using modularization techniques. By using
modularizing, we can make the ABAP/4 programs easy to read and improve their structure.
Modularized programs are also easier to maintain and to update.
Explain the benefits of modularization technique?
What is the benefit of using modularization techniques?
By using modularization techniques, we can -
 Avoid redundancy by reusing the code block wherever required.
 Make them easy to read and improve their structure.
 Make them easier to maintain and update.
How can you create callable modules of program code within one ABAP/4 program?
Callable modules can be created -
 By defining Macros.
 By creating include programs in the library.
Why do we use logical blocks in ABAP program?
Modularization involves the organizing the programs as modular units which are also called as
logical blocks. It reduces redundancy and increases program readability during the maintenance
cycle.
On which event we can validate the input fields in module programs?
In PAI.

Macros
Describe the Difference Between Macro and Subroutine?
Can you highlight the differences between Macro and Subroutine?
Macros can only be used in the program they are defined in and only after the definition are
expanded at compilatio/ generation. A MACRO is more or less an abbreviation for some lines of
code that are used more than once or twice.Since debugging a MACRO is not really possible,
prevent the use of them (I’ve never used them, but seen them in action).
Subroutines (FORM) can be called from both the program they are defined in and other programs.

DOCUMENT PREPARED BY SONU JANGIR |


37

A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a
subroutine that is called external. If the subroutine is used only local (called internal) use a FORM. If
the subroutine is called external (used by more than one program) use a FUNCTION.

Subroutines
What is a subroutine?
What are subroutines in SAP Programs?
Explain Subroutine in SAP ABAP?
Subroutines are procedures that can define in any program and call from any ABAP program.
Subroutines normally contains sections code or algorithms.
Subroutines can be defined anywhere in the program and no restriction on where to define.
Subroutines can be defined using FORM and ENDFORM statements.
PERFORM statement used to call the subroutine. PERFORM and FORM must contain the same
number of parameters.
What are the various types of parameters and how are they distinguished from one another?
What are different types of parameters? How can you distinguish between different kinds of
parameters?
The different types of parameters by their coding placement are -
 Formal Parameters - These are defined during the definition of subroutine with the 'FORM'
statement.
 Actual Parameters - These are specified during the call of a subroutine with the 'PERFORM'
statement.
The different kind of parameters by their functionality are -
 Input parameters are used to pass data to subroutines.
 Output parameters are used to pass data from subroutines.
Describe the Difference Between Macro and Subroutine?
Macros can only be used in the program they are defined in and only after the definition are
expanded at compilatio/ generation. A MACRO is more or less an abbreviation for some lines of
code that are used more than once or twice.Since debugging a MACRO is not really possible,
prevent the use of them (I’ve never used them, but seen them in action).

Subroutines (FORM) can be called from both the program they are defined in and other programs.

DOCUMENT PREPARED BY SONU JANGIR |


38

A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a
subroutine that is called external. If the subroutine is used only local (called internal) use a FORM. If
the subroutine is called external (used by more than one program) use a FUNCTION.
What are the parameters that are used?
The two main parameters used and those are - formal parameters and actual parameters.
What are the ways in which both formal and actual parameters are different?
The manner of functionality is the only thing that differentiates formal and actual parameters.
What is the difference between PASS BY VALUE and PASS BY REFERENCE?
These concepts are generally used for Function modules or Subroutines etc.
For example, we are passing a variable lv_num using the function module -
CALL FUNCTION 'NEW_FM1'
EXPORTING
VAR = lv_num.

When we PASS lv_num by VALUE, the actual value of lv_num is copied into VAR.
When we PASS lv_num by REFERENCE, the reference, or the memory address of lv_num is passed
to the Function module. So, VAR and lv_num refers to the same memory address and have the
same value.
What are conversion routines in SAP ABAP?
Conversion routines implements nonstandard conversions from display format to sap internal
format and vice-versa.
What is the difference between the function module and a normal ABAP/4 subroutine?
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.
Is it possible to call a subroutine of one program from another program?
True.
Can we call subroutine in another program? and what is the syntax?
Yes, we can call using external subroutine.
syntax-
perform form_tc(report_name).

Function Modules
DOCUMENT PREPARED BY SONU JANGIR |
39

What is the Function Module in BDC?


Function modules in BDC performed in a sequence to transfer the data successfully.
List down the functional modules used in sequence in BDC?
Which function modules can be used to transfer the data using BDC programming?
These are the 3 functional modules that are used in a sequence to perform a data transfer
successfully using BDC programming -
 BDC_OPEN_GROUP - Parameters like Name of the client, sessions and username are
specified in these functional modules.
 BDC_INSERT - It is used to insert the data for one transaction into a session.
 BDC_CLOSE_GROUP - This is used to close the batch input session.
Define Function Group. What are the differences between Function Module and Function Group?
Function Group and Function Module are logically belonging together. Function groups are
considered as containers of the Function Modules. The differences between Function Groups and
Function Modules are as follows -
 Function Groups need not be defined in Function Module however, the function modules
must be defined in Function Groups.
 Function Modules can be called from various kinds of programs. Function Groups cannot be
called.
 Function Groups acts as Function Module's containers, but the function modules don’t act
as containers.
What statement will be found in an SAP application program that implements a function module
exit?
“CALL CUSTOMER” statement used to determine if a function module exit exists.
Explain the relationship between a functional area, user group and query when developing queries
using the SAP Query tool?
 Functional areas and user groups are organizational elements used in SAP Query that
should be created in the order specified by user to query environment.
 The data that is used to define the query specified in a functional area.
 Users are assigned to user groups. Functional areas are also assigned to the user group
allowing users to create and start querying based on the data in that functional area.
Multiple functional areas can be assigned to a user group and a functional area can be
assigned to several different groups.
What is Function Group? Difference between function group and Function Module?

DOCUMENT PREPARED BY SONU JANGIR |


40

Function Groups act as containers for Function Modules that logically belong together.
Function Groups -
 These cannot be defined in a Function Module.
 It cannot be called.
 They are containers for Function Module.
Function Modules -
 These must be defined in a Function Group.
 It can be called from any program.
 They are not containers for Function Group.
What is an RFC?
Remote Function Call.
Create any functions? How to go about it?
Steps for creating the Functions -
First Procedure -
1. /nSE37
2. Goto
3. Function Group (FG)
4. Create Group
5. Name of FG (ZTC_FG)
6. Short Text
7. Save
8. Local Object
Second Procedure -
 Environment
 Inactive Object
 Function Group (ZTC_FG)
 Activate
 Back
Third Procedure -
 Name of Function Module (ZTC_FM)
 Create
 Write FG Name (ZTC_FG)
 Short Text
 Save

DOCUMENT PREPARED BY SONU JANGIR |


41

Fourth Procedure -
Call function ‘ZTC_FM’.
What are the function modules used in F4 Help?
There are two types of function modules used in F4 help -
 F4IF_FIELD_VALUE_REQUEST
 F4IF_INT_TABLE_VALUE_REQUEST
How do you write a function module in Sap? Describe?
 Called program - SE37 - Creating function group, function module by assigning attributes,
importing, exporting, tables, and exceptions.
 Calling program - SE38 - In program, click pattern and write function name- provide export,
import, tables, exception values.
What are the exceptions in function module?
Exception is a runtime errors that occurs during the function module execution. Normally
exceptions might occur due to performing an invalid operation or invalid movements. Exception
disturbs the normal flow of the execution.
What are different types of attributes of Function Module?
Do you know about the types of attributes of the function module?
There are 6 attributes of function module -
 Import
 Export
 Table
 Changing
 Source
 Exception
Can function modules be called from other kinds of programs?
Yes, Function Modules can be called from several other types of programs.
Type of parameters to pass to RFC pass by value or pass by reference?
Always Pass by Value.
RFC is Remote Function call cannot access the values with Pass by reference.
How to debug RFC Function module?
SE38 -> Utilities -> Settings -> ABAP Editor -> Debugging.
The above path activates the external debugging and choose the New Debugger option in ABAP
debugger. Go to the place in the code and put break point, popup appear then choose the HTTP

DOCUMENT PREPARED BY SONU JANGIR |


42

break point. If we are triggering the RFC from SAP portal make sure that both the user ID should be
same. If the users are different then provide the XI/Portal User ID in the user’s field.
What is difference between Function module and RFC?
In a function module, passing data using call by reference. In particular, the tables parameter
should call using "call by reference" by passing memory address.
In an RFC, passing data is by value. The reason behind this is, it’s going to access other system while
doing the above by reference wouldn't work as we are into another system whose memory id will
not match.
What is the difference between BAPI and RFC?
A BAPI are standard SAP function modules provided by SAP for remote access. Also, they are part of
Business Object Repository (BOR).
RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call
programs external to R/3 from an R/3 system. BAPI are RFC enabled function modules. The
difference between RFC and BAPI are business objects. We create business objects and those are
then registered in our BOR (Business Object Repository) that can be accessed outside the SAP
system by using some other applications (Non-SAP) such as VB or JAVA.
What is a function Group in SAP?
Function Group is a collection of function modules that shares global data with each other.
When an ABAP/4 program contains a CALL FUNCTION statement, the system loads the entire
function group in with the program code at run time. Every function module belongs to a function
group.
What are the types of parameters in the function modules?
 EXPORTING: for passing data to the called function.
 IMPORTING: for receiving data returned from the function module.
 TABLES: for passing internal tables only, by reference (that is, by address).
 CHANGING: for passing parameters to and from the function.
What is extension in and extension out in BAPI?
BAPI extension is used to update custom fields of a table.
BAPI extension out is used to retrieve custom fields of a table.

SAP Scripts
What are the components of SAP scripts?

DOCUMENT PREPARED BY SONU JANGIR |


43

SAP scripts are a word processing tool. It has a function like standard text and layout sets. Its layout
set consists of - Windows and pages, Character formats, Paragraph formats etc.
How can you debug a script form?
To debug a script form, go through the below menu path -
SE71 -> enter the form name -> utilities -> activate debugger
Mention the components of SAP Scripts?
SAP scripts are word processing tools. So, the functions in SAP scripts relate to standard texts and
layout sets. These layouts have several components, that are -
 Windows and Pages
 Character Formats
 Paragraph Formats
 Fonts
What are the different functions used in Sap Script? What are the parameters used in each
function?
What are the function modules used in a Sap Script driver program?
Mention the different functions of the SAP Script?
There are three different functions used in SAP Script -
 OPEN_FORM
 WRITE_FORM
 CLOSE_FORM
Parameters in Each Function -
 OPEN_FORM
o Exporting
o Form
o Language
 WRITE_FORM
o Exporting
o Element
o Window
 CLOSE_FORM
What are standard layouts sets in the Sap Script?
There are four standard layouts in the SAP Script -
 Header

DOCUMENT PREPARED BY SONU JANGIR |


44

 Logo
 Main Window
 Footer
Difference between Sap Script and Report?
SAP Script is an integrated text management system of the SAP R/3 System. Those are two types -
 PC Editor
 Line Editor
What are the types of windows in Sap Script?
There are five Standard Layouts in SAP Script -
 Page
 Window
 Page Window
 Paragraph Format
 Character Format
Logo in Sap Script?
RSTXLDMC OR Steps for making and inserting Logo in SAP Script -
First Procedure -
 Draw the picture
 Save it
 SE78
 Write name & Choose Color
 Click on Import
 Browse picture
 Enter
Second Procedure -
 SE71
 Insert
 Graphics
 Click on stored on document server
 Execute
 Choose name of BMAP
If I forgot some command in Sap Script E.g.: Suppress Zero Display - How to find it?

DOCUMENT PREPARED BY SONU JANGIR |


45

This command used to suppress the entire screens. This command allows us to perform screen
processing "in the background". Suppressing screens is useful when we are branching to list-mode
from a transaction dialog step.
Can there be more than 1 main window in Sap Script?
No, there cannot be more than 1 main window in SAP Script because in WRITE_FORM, it asks for
the parameter Window that will create the problem.
WRITE_FORM
 Exporting
 Element
 Window
How to debug a script in ABAP?
Go to SE71, give layout set name, go to utilities select debugger mode on.
In Sap Scripts, how will you link form with the event driven?
In PAI, define function code and write code for the same.
How many default tab Strips are there? How to insert more tabs in it?
There are 2 default Tab strips. Screen painter attributes contain Tab Title, that is used to insert
more tabs in tab strip.
What is the meaning of an SAP Script and what is the role of it?
SAPScript is a tool used to create and maintain forms for sending across and mass printing. The tool
can develop the forms that supports printing, faxing, e-mailing or XML generated outputs.
Scripts are older version of SAP print forms. SAP Scripts are client dependent and not visible to
other clients. Advanced version of script is client independent and they will be visible in all clients.
SE71 is the transaction code for creating SAPScripts. The SAP system has a standard SAPscript form
that are used as a template for form creation. The SAPScript form structure contains of 2 key
components and those are −
 Content − This can be either text or graphics.
 Layout − The form content appears.
Which are the variables that we can utilize for data output in SAP Script?
Tables, name-fields
What is the meaning of a Compare Tool in SAP Script?
There are many utilities within SAP Script for object comparison between clients. With the Compare
Tool, we can make many things like - verifying if an object can be found in each of the two clients or

DOCUMENT PREPARED BY SONU JANGIR |


46

showing why multiple versions of an object are different. For the page layout management or
format the text in a document, we can use Layout Sets. The Standard styles and layout sets are
found in Client 000 in the SAP system.
How can we describe better the SAP Script?
SAP Script is the text handling system of SAP R/3 and it has a high degree of integration in the SAP
system. It is standard and most used tool for several tasks that involves the processing of text in the
entire SAP system.
Can we describe the way in which the Layout Sets are backed up, uploaded, and downloaded in SAP
Script?
For the SAP Script backup, we have go to transaction SE71 to select utilities. And then copy from
client then Give source from name then source client (000 default) and Target from name. For
downloading, we should go to transaction SE71. We must write the name of the form and then
select Display, utilities, form info, List and hit Save to PC file.
For upload, we should create form with page and then window, pagewindow with the downloaded
PC file.
What is the way to count pages the SAP Script outputs?
page, nextPage.
How can we classify the SAP Script components?
SAP Script can be classified into - SAP Script text, Layout Set, Symbols, ABAP print program and
function modules such as read text, open/close form and others.
What is the way to deposit the text in SAP Script?
For text storage, SAO Script uses ITF or the Interchange Text Format. However, it has the options to
convert RTF or Rich Text Format and ASCII that are formats for other text processors.
What activity is the most time-consuming from all in SAP Script coding?
The most time-consuming is when we define Layout Sets.
How do we define the data tab space in SAP Script and where?
We may define the tabs after we define the text element paragraphs.
How can we introduce a logo in our program and what is the name of the program for logo upload
and what syntax can be used for this in SAP Script?
We can use the “RSTXLDMC” report for uploading a logo and the statement to upload is -
/:INCLUDE ’ZHEX-MACRO-XXX’ OBJECTTEXTID ST LANGUAGE ’E’. The name of the object is
represented by ‘XXX’.
DOCUMENT PREPARED BY SONU JANGIR |
47

What purpose has an ABAP application in SAP Script?


The purpose of an ABAP application can include multiple things like -
 It produces the processing logic definition of the Layout Set, or what order the elements of
text have and when are they used again.
 It brings the data from the R/3 program that is found in the database.
 It selects a Layout Set to print.
 Chooses printer, fax or monitor as the output device.
 It gives print configurations regarding the counting of pages that are going to print.
How do we import or use graphics in Sap Script?
For importing graphics in SAP, use the transaction SE78.
How do we load graphics like logos in SAP Script?
We can load graphics like files with the .tif extension in SAP Script in standard text with the aid of
RSTXLDMC.
Which are the most used programs from SAP Script?
RSTXFCON used for the transformation of the page format.
RSTXSCRP used for downloading and uploading the layout sets.
RSTXDBUG used for the debugging of SAP Script.
RSTXSCRP used for moving script files from system to system.
RSWBO052 used to modify development classes of different objects.
RSTBSERV used for table contents comparison between clients.
How can we copy a table from client to client?
RSCLTCOP used to copy a table from client to client.
How to debug sapscripts?
How do we debug sapscript?
How to debug sapscripts in SAP?
Two ways to debug SAPSCRIPT. Those are -
 Go to SE71 and from menu bar select Utilities -> activate debugger. Then go to SE38 to
execute the print program, it automatically goes to debugging mode.
 Run the program RSTXDBUG in SE38. Execute it. A message show that debugger is
activated. Now open the print program in se38 and execute, we will notice that the print
program is automatically diverted to debugging mode.
Why sapscripts are client dependent and smart forms are client independent.?
Are sapscripts client dependent or independent?

DOCUMENT PREPARED BY SONU JANGIR |


48

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 stored inside the client depended table as a TEXT. So sapscripts
are client dependent and smartforms are client independent.
What are components of Layout Set in sapscript?
Header Data, Page, Page Windows, Windows, Paragraph Format and Character Format are the
components of sapscript layout.
Differentiate between Page1 & Page2 format in sapscript?
Page1 format - In this all pages have the same format.
Page2 format - In this there is variation in page format i.e. first page has different format than
second page.
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.
Differentiate between Character format & Paragraph format in sapscript?
Paragraph format is used for formatting a paragraph and we can add tabs in paragraph format. We
can use character format in paragraph format.
Character format are used for assigning various attributes of font like size, type, bold etc.
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 use Function Modules in sapscript layout set?
No, we cannot use Function Modules in sapscript layout set.
Can we use Subroutine within a sapscript Layout set?
Yes, we can use suproutines/performs in sapscript layout set.
Can we call another Form from same print program in sapscript?
Yes, we can call other forms in the same print program/driver program.
How do you upload logo in SAP script?
We can upload logo using standard program RSTXLDMC or using transaction code SE78.
What are the differences between scripts & smart forms?
Tcode used to download / upload sapscript?
RSTXSCRP
DOCUMENT PREPARED BY SONU JANGIR |
49

How can we implement the tab sets in Layout Sets?


We can do implement by defining the paragraphs using defined tabs.
What is the way to define the text symbols?
We can define the text symbols with the aid of the control command DEFINE x1='56'.
What commands are used in ABAP/4 for connecting a Layout Set?
We can use the following: the call functions OPEN-form, WRITE-form or CLOSE-form.
Which are the commands mainly used for control SAP Scripts?
The main control commands are PROTECT, ENDPROTECT, DEFINE, NEW-PAGE, INCLUDE, IF, ENDIF.

Smart Forms
What are smart forms in SAP?
What are Smart Forms?
Define Smart Forms?
Explain the Smart forms in SAP ABAP program?
What do you mean by Smart Forms?
SAP Smart Forms is tool used to print and send documents. This is extremely useful in developing
forms, PDF files, e-mails, and documents for the Internet. The tool provides an interface to build
and maintain the layout and logic of a form.
SAP Smart Forms used to create/modify forms by using simple graphical tools instead of using any
programming tool. A user with no programming knowledge can configure these forms with data for
a business process effortlessly.
What Is the difference between OPEN_FORM and CLOSE_FORM?
OPEN_FORM is a function module that opens layout set printing. This is the first function module
should call to use other layout function modules - WRITE_FORM, START_FORM, CONTROL_FORM
etc.
CLOSE_FORM is a function module that closes the layout printing. This is the last function module
should call. CLOSE_FORM is basically associated with completing or concluding the form printing.
The layout set opened by OPEN_FORM should be closed by CLOSE_FORM function module,
otherwise output does not appear. We can use any number of OPEN_FORM, CLOSE_FORM
functions in one single program. However, CLOSE_FORM should be coded for every OPEN_FORM in
the program or vice versa.
Forcing a page break within table loop?

DOCUMENT PREPARED BY SONU JANGIR |


50

Create a loop over the table. Place a Command node before the table in the loop that forces a
NEWPAGE on whatever condition we want. Then only loop through a subset of the internal table
(based on the conditions in the Command node) of the elements in the Table node.
Font style and Font size in Smart Forms?
Goto Transaction SMARTSTYLES.
There we can create Paragraph formats etc just like in sapscript.
Then the window under OUTPUT OPTIONS we can include this SMARTSTYLE and use the Paragraph
and character formats.
Line in Smart form?
Line can be drawn in two ways -
 We can use a window that takes up the width that has a height of 1 mm of our page. Then we
should put a frame around it (in window output options). Thus, we have to draw a box that
looks like a line.
 We can just draw “__” across the page and play with the fonts so that it joins each
UNDER_SCORE.
Difference between ‘form interface’ and ‘global definitions’ in global settings of smart forms?
Form Interface is where we declare "what must be passed in and out of the smart form" (in - from
the print program to the smart form. out - from the smart form to the print program).
Global definitions are where we declare “the data that is used within the smart form on a global
scope". ie: anything we declare can be used in any other node in the form.
How to find smart forms function module name?
Once we have activated the smart form, go to the environment -> function module name. There we
can get the name of function module name.
What is smart forms output difference?
Problem with Smart forms: If two printers are differently configured and the difference is the
output characters size. If we print the form on these printers, the output gets printed differently on
each printer.
It happens only when the two printers having different Printer Controls. To resolve the problem,
printer control setting should be same for both printers.
To resolve this, go to SPAD Menu (Spool Administrator Menu). There we can see the difference in
the Printer Control and modify the printer control setting for both the printers as same. then it will
be ok. And, we have to check what is the device type used for both the output devices.

DOCUMENT PREPARED BY SONU JANGIR |


51

How to convert smart forms output to PDF?


There is a way to download smart form in PDF format.
Do the following -
1. Print the smart form to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4
and entering the noted spool number.
How does one transport SMARTFORM? SE01?
A smart form are transported as same as any other object. If it is assigned to a development class,
that is attached to a transport layer and it gets transported.
Once the definition is transported, and when it is called, the function module is regenerated.
What are the differences between scripts & smart forms?
 Multiple page formats are possible in smartforms which is not the case in SAPScripts.
 It is possible to have a smartform without a main window.
 Labels cannot be created in smartforms.
 Routines can be written in smartforms tool.
 Smartforms generates a function module when activated.
 Unlike sapscripts (RSTXSCRP), we cannot upload/download Smartform to our local hard disk.
What is the use of Folder in Smart forms?
Just to group nodes, doesn’t affect any functionality. we can group nodes into a folder.
What is the difference in a Table and a Template in Smart form?
A Template has fixed number of rows and columns whereas a Table can have any number of rows
and columns i.e. We can have a internal table with contents associated to a Table element but not
to a Template.
Can you move a Smart form from one SAP system to another without using transports?
Yes, this can be achieved using the Upload/Download feature for Smart forms. We can download
the Smart form from one system and save it as an XML file. Once the download completed, the XML
file can be used to upload the Smart form in another system.
Can you have a Smart form without a main window?
Yes, we can create a Smartform without a Main Window. But there is no need to do anything of
such sort. Whenever we create a Smartform, a main window is created by default.

DOCUMENT PREPARED BY SONU JANGIR |


52

How do you find the name of the Function Module for a Smart form?
How do you find the name of the Function Module for a Smart form? When is this function module
created?
The function module for Smartform is created when the Smartform is activated. We can find the
name of the Function Module for a Smartform by going to "Environment -> Function Module
Name".
What is a Final Window in smart forms?
Final Window is called after all the other windows are called in a Smartform.
In Smart forms after final window, can we create secondary window?
Final Window is called after all the other windows are called in a Smartform.

Customer Exits And User Exits


What are the various types of customer exits?
 Menu exits
 Screen exits
 Function module exits
 Keyword exits
What is a menu exit?
Adds items to the pull-down menus in standard R/3 applications.
What is a screen exit?
Adding fields to the screens within R/3 applications. SAP creates screen exits by placing special sub
screen areas within a standard R/3 screen and calling a customer sub screen from the standard
dynpro’s flow logic.
What is a function module exit?
Adding functionality to R/3 applications. Function module exit plays a role in both menu and screen
exits.
What is a keyword exit?
Add documentation to the data elements of key words defined in the ABAP/4 Dictionary. The
system displays this documentation whenever a user presses F1 to get online help for a screen
field.
How does SAP organize its exits?

DOCUMENT PREPARED BY SONU JANGIR |


53

SAP organizes its exits in packages that are called SAP enhancements. Each SAP enhancement can
contain many individual exits.
What is the length of function code at user-command?
Each menu function, push button, or function key has an associated function code of length FOUR
that is available in the system field SYUCOMM after the user action.
What is the difference between BADI and User Exits?
BADI is object oriented. However, User Exits is not.
BADI is client independent. User exit is client dependent.
In BADI, multiple implementations is possible. However, it is not possible in User Exit.

Report Programming
How can you format the data before write statement in the report?
The reports output can be formatted by using the loop event like below -
 .at first
 .at new
 .at last
Mention what is ALV programming in ABAP? When is this grid used in ABAP?
ALV stands for Application List Viewer. To enhance the report output, SAP provides a set of ALV
function modules. The ALV function modules improve the functionality and readability of any report
output. It is an efficient tool used for arranging the columns in a report output.
What is pretty printer?
What is the use of 'pretty printer'?
Why is pretty printer user in ABAP?
What need does pretty printer user fulfill in ABAP?
Why you use Pretty Printer?
Pretty printer is used to format the ABAP code.
Explain the difference between dialog program and a report?
Differentiate between report and dialog program?
A report is an executable program and can execute directly without any support. Dialog is a module
pool program that executed via a transaction only. Dialog programming is used for customizations
of screens.

DOCUMENT PREPARED BY SONU JANGIR |


54

What are the different types of ABAP reports in SAP?


Types of ABAP reports in SAP?
There are 7 report types in SAP ABAP and those are -
 Executable program
 Interface pool
 Function groups
 Include
 Class pool
 Module pool
 Subroutine pool
These reports are available in reports attributes screen.
Define ALV programming in ABAP.
Define ALV Programming in SAP ABAP. When is it used?
ALV or Application List Viewer enhances the reports output in SAP systems. This type of
programming is achieved to improve the functionality, readability, and modularity of report
outputs. ALV programming restores the process of arranging columns in a report output.
What are the functions of message command available in a report? Mention its types.
What is the message command used for in a report?
Messages are used to describe what is happening in the program execution to the programmer or
user. Messages represents with a three-digit number. Messages range starts from 000 to 999.
Messages are basically six types. Those are -

The message appears in a separate dialog box and the program execution get terminated.
A Abend
When the user has confirmed the message, control returns to the next-highest area menu.

E Error An error dialog appears, or the program terminates depending on the program condition.

The message appears in a separate dialog box.


I Information Once the user has confirmed the message, the program execution continues from the next
statement coded immediately after the MESSAGE statement.

The total program execution continues normally, and the message is displayed in the status
S Success
bar of the screen.

An error message is displayed in the status bar of the screen and the program execution
W Warning
terminates.

DOCUMENT PREPARED BY SONU JANGIR |


55

No message is displayed.
Exit or
X The program terminates with a short dump.
Abort
Program terminations with a short dump normally only occur when a runtime error occurs.

Difference between Sap Script and Report?


SAP Script is the integrated text management system of the SAP R/3 System. SAP Scripts are two
types -
 PC Editor
 Line Editor
Reports are the way to display data fetched from database table onto screen or directly output it to
a printer. Report are two types -
 Classical
 Interactive
What are the Events used in ABAP in the order of execution?
The Events used in ABAP are -
 INITIALIZATION
 AT SELECTION-SCREEN
 AT SELECTION-SCREEN ON <field>
 START-OF-SELECTION
 TOP-OF-PAGE
 TOP-OF-PAGE DURING LINE SELECTION
 END-OF-PAGE
 END-OF-SELECTION
 AT USER-COMMAND
 AT LINE-SELECTION
 AT PF<NN>
 GET
 GET LATE.
 AT User Command
Explain what are interactive reports?
An output list that displays the basic details and allow user to interact, so that a new list is
populated based on user-selection. With interactive list, the user can actively control data retrieval
and display during the session.

DOCUMENT PREPARED BY SONU JANGIR |


56

What is an Interactive Report? What is the obvious difference of such report compared with
classical type reports?
An output list that displays the basic details and allow user to interact, so that a new list is
populated based on user-selection. With interactive list, the user can actively control data retrieval
and display during the session.
The differences between the interactive report and classical type reports -
 The list produced by classical report does not allow user to interact with the system
whereas the list produced by interactive report allows the user to interact with the system.
 Once a classical report, executed user loses control whereas Interactive, user has control.
 In classical report, drilling is not possible whereas in interactive, drilling is possible.
What are the commands used for Interactive Reports?
Top-of-Page during line-selection.
What are the Events used in Interactive Reports?
What are the events in interactive reporting?
There are three events of Interactive Reports -
 At PF(nn)
 At line-selection
 At user-command
How do you move on to the next screen in Interactive Reporting?
Write code of the following -
 Top-of-Page during line-selection
 At line-selection
What are differences between at SELECTION-SCREEN and at SELECTION-SCREEN output?
What is the difference between AT SELECTION-SCREEN and AT SELECTION-SCREEN OUTPUT?
AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtime
environment has passed all the input data from the selection screen to the ABAP program.
AT SELECTION-SCREEN OUTPUT event block allows you to modify the selection screen directly
before it is displayed.
Which event is executed first at-selection-screen or at-selection-screen-output in sap ABAP?
Before screen display - AT SELECTION-SCREEN OUTPUT will trigger first.
After screen is displayed - AT SELECTION-SCREEN will trigger first.
What is the inside concept in Select-options?

DOCUMENT PREPARED BY SONU JANGIR |


57

Select-options are displayed on the selection screen for the user to enter values.
Different Properties of Select-options -
 Visible Length
 Matchcode Object
 Memory ID
 Lowercase
 Obligatory
 No Display
 Modify ID
What are the page windows? How many main windows will be there in A page window?
In Page Window, we define the margins for left, width, upper and height for the layout of Header,
Logo, Main, & Footer.
What is a drill down report?
Drill down report is an Interactive report where the user can get more relevant data by selecting
explicitly.
What is the difference between interactive and drill down reports?
 ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click)
or AT USER-COMMAND (pressing a button). We can use these events to move through
layers of information about individual items in a list.
 Drill down report is nothing but interactive report...drilldown means above paragraph only.
What is ALV programming in ABAP? When is this grid used in ABAP?
ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules that
can be put into use to embellish the output of a report. This set of ALV functions is used to enhance
the readability and functionality of any report output. Cases arise in sap when the output of a
report contains columns extending more than 255 characters in length. In such cases, this set of
ALV functions can help choose selected columns and arrange the different columns from a report
output and also save different variants for report display. This is a very efficient tool for dynamically
sorting and arranging the columns from a report output. The report output can contain up to 90
columns in the display with the wide array of display options.
What do you understand by ALV programming in ABAP?
In ABAP, ALV means Application List Viewer.
What is ALV programming used for?

DOCUMENT PREPARED BY SONU JANGIR |


58

Some of the functions of the ALV are used to enhance the quality of the report. It also helps in
making the report easier to read and understand. Assets like rows and columns can also be inserted
with the help of ALV.
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.
What is the event that will be triggered first in an ABAP report?
Initialization event is triggered first if user executes an ABAP report. However, if the program is of
type 1, M, F, or S; then LOAD-OF-PROGRAM is triggered first and then INITIALIZATION event.
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.
How many lists can be displayed through an interactive report?
Maximum 21 lists can be displayed (1 basic list 20 secondary lists).
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 that is used to print company forms like Sales Order, Purchase order etc.
Report is an executable program that can be static or interactive.
In interactive report if user 19 times double clicked, again he wants to main screen. how can do
this?
If SY-UCOMM ='BACK'.
Leave to screen 0.
Endif.

When top of the page event is triggered?


After executing first write statement in start-of-selection event.
I have 1 basic list and 15 secondary list in interactive report. If I am in 9th list, how can I come
directly to the basic list?
System variable SY-LSIND stores the list number, by using this we can go to basic list.
How do write an ALV program using VBRK-header, VBRP-item?

DOCUMENT PREPARED BY SONU JANGIR |


59

Billing document
1. Header -VBRK
2. Item- VBRP
Input: sales org, billing date, billing document.
Output: invoice no, invoice date, billing type, sales org, invoice quantity, selling price, billing time.
What will you Code in START-OF-SELECTION & END-OF-SELECTION?
START-OF-SELECTION & END-OF-SELECTION contains the code block that process the data of the
logical database.
For example, the code below reads table STDUDENT and writes the logical database information to
internal table ISTUDENT.
START-OF-SELECTION
SELECT * FROM STDUDENT INTO CORRESPONDING FIELDS OF ISTUDENT
WHERE STUDENTNO IN BETWEEN (01, 20).
APPEND ISTUDENT.
ENDSELECT.
END-OF-SELECTION

When do we use END-OF-SELECTION?


How can END-OF-SELECTION be used?
When do we use the END-OF-SELECTION?
We mostly use END-OF-SELECTION for the summary/results of reports.
END-OF-SELECTION is used mostly when logical database used in the report creation and triggered
when all selection gets completed from the database.

The END-OF-SELECTION event is triggered in executable programs once the logical database has
finished all data reading and before the list processor is started.
END-OF-SELECTION describes the server that all the database reading is completed, and no further
reading is going to take place.
Once the system has read and processed all database tables of a logical database, use the keyword
END-OF-SELECTION to define a processing block.

If any program with a logical database reading only requires the implementation of event block
END-OF-SELECTION. Otherwise, there is no need to implement the event block END-OF-SELECTION.

Screens

DOCUMENT PREPARED BY SONU JANGIR |


60

What are the various events associated with Screen Programming?


Explain what are the events in Screen Programming?
List the various events associated with Screen Programming.
The following are the events associated with Screen Programming -
 Process before output (PBO) - This event gets processed before displaying the screen.
 Process after input (PAI) - This event is processed while the user interaction continues with
the screen.
 Process on help (POH) - This even gets process on request by a user after pressing F1. The
program gets coded in various event blocks. The present screen gets processed by the
system.
 Process on value (POV) - This gets processed by pressing F4 by users. The program gets
coded in various event blocks.
What are the various types of Selection Screen Event?
SELECTION-SCREEN BEGIN OF BLOCK xyz WITH FRAME TITLE T01.
SELECTION-SCREEN BEGIN OF SCREEN 700 AS WINDOW.
CALL SELECTION-SCREEN 700 STARTING AT 10 10.
What is the difference between Call Screen and Leave Screen?
Call Screen: Calling a single screen is a special case of embedding a screen sequence. If we want to
prevent the called screen from covering the current screen completely, we can use the CALL
SCREEN statement with the STARTING AT and ENDING AT.
For example -
CALL SCREEN 700.
CALL SCREEN 700 STARTING AT 10 10 ENDING AT 20 20.

LEAVE SCREEN statement ends the current screen and calls the subsequent screen.
For example -
LEAVE SCREEN.
LEAVE TO SCREEN 900.
Can we have more than one Selection-screen and How?
Yes, we can have more than one selection screen.
How to declare select-option as a parameter?

DOCUMENT PREPARED BY SONU JANGIR |


61

SELECT-OPTIONS are displayed on the selection screen for the user to enter values.
For example - Select-options: sno for student-dept.
What are the differences between SE01, SE09 and SE10?
 SE01 - Correction & Transport Organizer
 SE09 - Workbench Organizer
 SE10 - Customizing Organizer
What is the list of screen elements?
There are 13 screen elements -
 Input / output fields
 Text fields
 Checkbox
 Radio button
 Push Button
 Drop down list
 Subscreen
 Table control
 Tabstrip control
 Custom control
 Box
 Status icons
 OK_CODE fields
How to create checkbox in selection-screen using write statement?
By using "WRITE AS CHECKBOX", we can print check box.
What are dynamic modifications of a screen? explain?
Dynamic modifications are changing the screen (hiding/enabling/disabling of screen elements)
based on user actions. This can be done by using event AT-SELECTION-SCREEN OUTPUT.
How do you find the information on the current screen?
The information on the current screen can be found at menu path System -> Status.

Dialog Programming

DOCUMENT PREPARED BY SONU JANGIR |


62

Explain the difference between dialog program and a report?


Differentiate between report and dialog program?
A report is an executable program and can execute directly without any support. Dialog is a module
pool program that executed via a transaction only. Dialog programming is used for customizations
of screens.

File Handling

What are datasets in ABAP?


The sequential files (on application server) are called datasets. They are used for file handling in
SAP.
What is Dataset and how you use it?
The sequential files (on application server) are called datasets. They are used for file handling in
SAP.
ABAP/4 provides three statements for handling files -
 The OPEN DATASET statement opens a file.
 The CLOSE DATASET statement closes a file.
 The DELETE DATASET statement deletes a file.
Below are the list of modes used for processing along with above -
 To open a file for read access, use the FOR INPUT option of the OPEN DATASET statement.
 To open a file for write access, use the FOR OUTPUT option of the OPEN DATASET
statement.
 To open a file for appending data to the file, use the FOR APPENDING option of the OPEN
DATASET statement.
 To process a file in binary mode, use the IN BINARY MODE option of the OPEN DATASET
statement.
 To process a file in text mode, use the IN-TEXT MODE option of the OPEN DATASET
statement.
 To open a file at a specific position, use the AT POSITION option of the OPEN DATASET
statement.
 To close a file on the application server, use the CLOSE DATASET statement.
 To delete a file on the application server, use the DELETE DATASET statement.

DOCUMENT PREPARED BY SONU JANGIR |


63

 To write data to a file on the application server, use the TRANSFER statement.
 To read data from a file on the application server, use the READ DATASET statement.
WHAT are the commands that allow you to process sequential file? And what is their syntax?
 OPEN DTASET for <input/output> in mode at POSITION MESSAGE
 READ DATASET (reading)
 READ DATASET INTO
 TRANSFER (writing)
 CLOSE DATASET
 DELETE DATASET
 TRANSFER to
What is the process for transferring data from legacy system to SAP?
FTP file transfer, manufacturer specific field transfer, NFS (network file system) / BDC.
Explain the process to transfer a record to a dataset?
TRANSFER to.
Why batch input?
Batch input is one of the primary ways to transfer the data into the SAP system. Batch input used to
input a large amount of information at off-peak times. Batch input is used for bulk data transfers
and not for real-time data transfers.
Explain at high level, the batch input process?
Batch data places into queues called batch input sessions and then execute the application
programs for maintenance into the database.
What are the function modules associated with batch input?
These are the 3 functional modules that are used in a sequence to perform a data transfer
successfully using BDC programming -
 BDC_OPEN_GROUP - Parameters like Name of the client, sessions and username are
specified in these functional modules.
 BDC_INSERT - It is used to insert the data for one transaction into a session.
 BDC_CLOSE_GROUP - This is used to close the batch input session.
What is the meaning of Field group, extract data set?
Extract data sets are made of group of records. Every record may have same structure, or a record
may have different structure from other. Every record type of an extract dataset can be defined as
a field group with the statement FIELD GROUPS. The FIELD GROUPS statement brings multiple fields
together with providing one single name.

DOCUMENT PREPARED BY SONU JANGIR |


64

Field groups do not generate field space however they show the fields that already exist. Field
groups shows the records content if the records are met in the extract dataset.
For reading we use READ DATASET, for writing we use TRANSFER and for mode at POSITION
MESSAGE, OPEN DATASET.
 READ DATASET INTO
 CLOSE DATASET
 DELETE DATASET
 TRANSFER

OPEN And Native SQL


What is open sql Vs native sql?


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 accessing 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.
In the 'select' statement what is 'group by'?
Group by clause is used to fetch the data from the table by the specified field.
What will you use SELECT SINGLE or SELECT UPTO 1 ROWS?
It is particularly important for us to understand the difference between SELECT SINGLE and SELECT
UP TO 1 ROWS... We use select single when we need to get one record form data base table with
where condition, we should pass key field in where condition.
We use SELECT UP TO 1 ROWS to get a single record from data base table where there is no key
field at our side.
In simple SELECT SINGLE is used to get exact record from data base whereas SELECT UP TO 1 ROWS
is use to get approximate record from data base.
What is the function of using the insert statement in SAP ABAP?

DOCUMENT PREPARED BY SONU JANGIR |


65

The insert statement helps in the adding of a record at a certain specified location.
What is Asynchronous and Synchronous update?
Asynchronous Update – The program does not wait for the work process to finish the update.
Commit Work.
Synchronous Update – The program waits for the work process to finish the update. Commit Work
and Wait.

Classes

Describe the data classes?


What are the data classes in ABAP?
What are Data Classes?
What are the different types of data classes? Define them.
What is a Data Class?
Describe data classes in SAP?
A data class is a class that contains only fields and crude methods for accessing other classes. Data
classes are classified into four types depending on the type of data they contain -
 Master Data: Data change very rarely.
 Transaction Data: Data changes are depending on requirements.
 Organization Data: Data is a customized and entered to the system when the system is
configured. It is rarely changed.
 System Data: Data is used by the SAP R/3 system.
In BAPIs, which method is used for mass processing?
Replicate() and SaveReplica().
Why pass by reference cannot be used in BAPI?
RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call
programs external to R/3 from an R/3 system. BAPI are RFC enabled function modules.

In an RFC, passing data is by value. The reason behind this is, it’s going to access other system while
doing the above by reference wouldn't work as we are into another system whose memory id will
not match.

DOCUMENT PREPARED BY SONU JANGIR |


66

What is sequence of event triggered in Report?


The events triggering order in report is -
 Initialization
 At Selection-Screen
 Start-of-Selection
 Get
 Get Late
 End-of-Selection
 Top-of-Page
 End-of-Page
 At Line Selection
 At User Command
 At PF (nn)
What are the events in ABAP language?
The events are as follows -
 Initialization
 At selection-screen
 Start-of-selection
 End-of-selection
 Top-of-page
 End-of-page
 At line-selection
 At user-command
 At PF
 Get
 At New
 At LAST
 AT END
 AT FIRST
BOR stands for?
The Business Object Repository (BOR) is the object-oriented repository in the R/3 System.
Can we store a version of abject without releasing it?
Yes
What is an ABAP instance?

DOCUMENT PREPARED BY SONU JANGIR |


67

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.

Object Oriented
Mention the difference between ABAP and OOABAP? In what situation do you use OOABAP?
What is the different between ABAP and OOABAP? Why do we use OOABAP?
Differentiate between ABAP and OOABAP?
Differentiate between OOABAP and ABAP?
ABAP is used to develop traditional programs in R/3.
OOABAP involves in object-oriented programming concepts. These are used to develop BSP/ PCUI
applications and other applications that require the derivation of OOP concepts. These applications
use BADI's and Smart Forms etc. that are with OOPs features.
Define the various contents of Technical Specifications?
List the various contents of Technical Specifications?
What are the contents in technical specifications?
Technical Specifications consists of 5 contents -
 Data Class
 Buffering Permission
 Size Category
 Login
 Buffering Type
When is OOABAP used?
OOABAP is used when BSP/PCUI applications requires to be developed.

Business Add-Ins
What is a BADI?
What do you understand by BADI?
Business add-in (BADI) is a source plug-in provides enhancements to the standard version of the
system. The enhancement technique uses the object-oriented method.
BADI accommodate specific user requirements involved in standard delivery of the business
process. These are customer specific and not provided by standard code in SAP.

DOCUMENT PREPARED BY SONU JANGIR |


68

BADI provides a mechanism to change the functionality of a well-defined business function without
making changes to the delivered source code. BADI implementations are classes that implement
the BADI interface.
How does BADI typically enhance the program?
BADI is the enhancement to add some additional functionality to the existing application program
by the SAP programmer or user. A customized or standard logic to enhance the SAP system
functionality. BADI should be defined to create an interface and implemented by one or more
classes to enhance the SAP application.
What is the difference between BADI, and user Exits?
BADI is object oriented however user exits is not. BADI is client independent however user exit is
client dependent. In BADI, multiple implementations are possible. In User Exit, multiple
implementations are not possible.

Web Dynpro
What is webdynpro for ABAP?
What is Web Dynpro and why it is used?
What is ABAP Web Dynpro? Why it is used?
What is Web Dynpro? Why is it used?
Web Dynpro for ABAP is the SAP standard user interface technology for developing Web
applications in the ABAP environment. It consists of a runtime and graphical development
environment with special Web Dynpro tools. Web Dynpro tools are integrated in the ABAP
Workbench (SE80).
Web Dynpro uses ABAP as a programming language. It uses ABAP stack to execute the Web Dynpro
ABAP objects. Web dynpro for ABAP supports ALV, select-options etc,. ABAP Web dynpro is not
highly developed language.
What are the benefits of using Web Dynpro?
 Reduces the implementation effort by using graphical tools.
 Reuse and better maintainability of components for development.
 Layout and navigation are easily changed using the Web Dynpro tools.
 User interface accessibility is supported.
 Full integration in the ABAP development environment.
 Structural changes are easy.

DOCUMENT PREPARED BY SONU JANGIR |


69

 Automatic data transportation using data binding.


Explain Web Dynpro and its benefits?
Web Dynpro for ABAP is the SAP standard user interface technology for developing Web
applications in the ABAP environment. It consists of a runtime and graphical development
environment with special Web Dynpro tools. Web Dynpro tools are integrated in the ABAP
Workbench (SE80).
Web Dynpro uses ABAP as a programming language. It uses ABAP stack to execute the Web Dynpro
ABAP objects. Web dynpro for ABAP supports ALV, select-options etc,. ABAP Web dynpro is not
highly developed language.
Web Dynpro benefits are specified below –
 Reduces the implementation effort by using graphical tools.
 Reuse and better maintainability of components for development.
 Layout and navigation are easily changed using the Web Dynpro tools.
 User interface accessibility is supported.
 Full integration in the ABAP development environment.
 Structural changes are easy.
 Automatic data transportation using data binding.
How do you access ABAP Web Dynpro workbench? What is object list and its component?
Use SE80 transaction to access Web Dynpro runtime environment and graphical tools in ABAP
workbench.
Object list contains −
 Dynpro Component
 Controller
 Interface
 View
 Web Dynpro application
What is MVC programming model in Web Dynpro?
Web Dynpro applications are based on MVC model, whereas −
Model - This allows the access to back end data in a Web Dynpro application.
View - This is used to ensure the representation of data in a web browser.
Controller - This is used to control communication between Model and view where it takes input
from users, processes data from model and displays the data in browser.
What is a view in Web Dynpro component?

DOCUMENT PREPARED BY SONU JANGIR |


70

Each Web Dynpro application contains at least one view and it is used to define layout of a user
interface. Each view consists of multiple user element and a controller and context.
The controller is used to process user request and data. Context contains data to that elements of
view are bound.
What is the use of inbound and outbound plug in Dynpro component?
The inbound and outbound plugs are part of view controller.
Inbound plug defines the starting point of view.
Outbound plug describes about the subsequent view to be called.
Why do we use window in Web Dynpro application development?
In Web Dynpro, window uses multiple views or view sets.
A view can only be displayed when it is embedding in a view.
A window always contains one or more views that are connected by navigation links.
What is the use of messages in Web Dynpro?
In ABAP Workbench, we can create and show messages with information for end users of Dynpro
application. These messages are displayed on the screen. These are user interactive messages that
displays important information about Web Dynpro application.
What are the different scenarios that can be used to create interactive forms in Web Dynpro?
 Interactive Scenario
 Print Scenario
 Offline Scenario
 Using digital signature
What is SAP list viewer in Web Dynpro application development?
Define SAP List Viewer in Web Dynpro Application Development?
SAP List viewer used to add ALV component and provides a flexible environment to display lists and
tabular structure. A standard output consists of header, tool bar and an output table.
User can make the settings to add column display, aggregations, sorting options using additional
dialog boxes.
Why do we use events and actions in Web Dynpro?
Events can be created to enable communication between controllers. We can allow one controller
to trigger events in different controller. All events created in component controller; they are
available in component.

DOCUMENT PREPARED BY SONU JANGIR |


71

What is the URL of Web Dynpro application? How it is generated?


How to generate URL of Web Dynpro Applications?
In a Web Dynpro application, url automatically gets generated. We can find the generated URL of
application in Properties tab.
URL structure can be of two types –
SAP namespace
<schema>://<host>.<domain>.<extension>:<port>/sap/abap/webdynpro/<namespace>/<applicatio
n name>
Custom namespace
<schema>://<host>.<domain>.<extension>:<port>/sap/abap/xyz/<namespace>/webdynpro/<applic
ation name>
How do you manage different object versions in a Web Dynpro application?
Version management used to manage older version of an object, compare versions or to reset
them. In version management, we can store different versions of ABAP development objects.
In an ABAP workbench, we can compare different versions of −
 Views
 Windows
 Controllers

Report Programming
How can you format the data before write statement in the report?
The reports output can be formatted by using the loop event like below -
 .at first
 .at new
 .at last
Mention what is ALV programming in ABAP? When is this grid used in ABAP?
ALV stands for Application List Viewer. To enhance the report output, SAP provides a set of ALV
function modules. The ALV function modules improve the functionality and readability of any report
output. It is an efficient tool used for arranging the columns in a report output.
What is pretty printer?
What is the use of 'pretty printer'?
Why is pretty printer user in ABAP?

DOCUMENT PREPARED BY SONU JANGIR |


72

What need does pretty printer user fulfill in ABAP?


Why you use Pretty Printer?
Pretty printer is used to format the ABAP code.
Explain the difference between dialog program and a report?
Differentiate between report and dialog program?
A report is an executable program and can execute directly without any support. Dialog is a module
pool program that executed via a transaction only. Dialog programming is used for customizations
of screens.
What are the different types of ABAP reports in SAP?
Types of ABAP reports in SAP?
There are 7 report types in SAP ABAP and those are -
 Executable program
 Interface pool
 Function groups
 Include
 Class pool
 Module pool
 Subroutine pool
These reports are available in reports attributes screen.
Define ALV programming in ABAP.
Define ALV Programming in SAP ABAP. When is it used?
ALV or Application List Viewer enhances the reports output in SAP systems. This type of
programming is achieved to improve the functionality, readability, and modularity of report
outputs. ALV programming restores the process of arranging columns in a report output.
What are the functions of message command available in a report? Mention its types.
What is the message command used for in a report?
Messages are used to describe what is happening in the program execution to the programmer or
user. Messages represents with a three-digit number. Messages range starts from 000 to 999.
Messages are basically six types. Those are -

The message appears in a separate dialog box and the program execution get
A Abend
terminated.

DOCUMENT PREPARED BY SONU JANGIR |


73

When the user has confirmed the message, control returns to the next-highest area
menu.

An error dialog appears, or the program terminates depending on the program


E Error
condition.

The message appears in a separate dialog box.


I Information Once the user has confirmed the message, the program execution continues from the
next statement coded immediately after the MESSAGE statement.

The total program execution continues normally, and the message is displayed in the
S Success
status bar of the screen.

An error message is displayed in the status bar of the screen and the program execution
W Warning
terminates.

No message is displayed.
Exit or The program terminates with a short dump.
X
Abort Program terminations with a short dump normally only occur when a runtime error
occurs.

Difference between Sap Script and Report?


SAP Script is the integrated text management system of the SAP R/3 System. SAP Scripts are two
types -
 PC Editor
 Line Editor
Reports are the way to display data fetched from database table onto screen or directly output it to
a printer. Report are two types -
 Classical
 Interactive
What are the Events used in ABAP in the order of execution?
The Events used in ABAP are -
 INITIALIZATION
 AT SELECTION-SCREEN

DOCUMENT PREPARED BY SONU JANGIR |


74

 AT SELECTION-SCREEN ON <field>
 START-OF-SELECTION
 TOP-OF-PAGE
 TOP-OF-PAGE DURING LINE SELECTION
 END-OF-PAGE
 END-OF-SELECTION
 AT USER-COMMAND
 AT LINE-SELECTION
 AT PF<NN>
 GET
 GET LATE.
 AT User Command
Explain what are interactive reports?
An output list that displays the basic details and allow user to interact, so that a new list is
populated based on user-selection. With interactive list, the user can actively control data retrieval
and display during the session.
What is an Interactive Report? What is the obvious difference of such report compared with
classical type reports?
An output list that displays the basic details and allow user to interact, so that a new list is
populated based on user-selection. With interactive list, the user can actively control data retrieval
and display during the session.
The differences between the interactive report and classical type reports -
 The list produced by classical report does not allow user to interact with the system
whereas the list produced by interactive report allows the user to interact with the system.
 Once a classical report, executed user loses control whereas Interactive, user has control.
 In classical report, drilling is not possible whereas in interactive, drilling is possible.
What are the commands used for Interactive Reports?
Top-of-Page during line-selection.
What are the Events used in Interactive Reports?
What are the events in interactive reporting?
There are three events of Interactive Reports -
 At PF(nn)
 At line-selection
 At user-command
DOCUMENT PREPARED BY SONU JANGIR |
75

How do you move on to the next screen in Interactive Reporting?


Write code of the following -
 Top-of-Page during line-selection
 At line-selection
What are differences between at SELECTION-SCREEN and at SELECTION-SCREEN output?
What is the difference between AT SELECTION-SCREEN and AT SELECTION-SCREEN OUTPUT?
AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtime
environment has passed all the input data from the selection screen to the ABAP program.
AT SELECTION-SCREEN OUTPUT event block allows you to modify the selection screen directly
before it is displayed.
Which event is executed first at-selection-screen or at-selection-screen-output in sap ABAP?
Before screen display - AT SELECTION-SCREEN OUTPUT will trigger first.
After screen is displayed - AT SELECTION-SCREEN will trigger first.
What is the inside concept in Select-options?
Select-options are displayed on the selection screen for the user to enter values.
Different Properties of Select-options -
 Visible Length
 Matchcode Object
 Memory ID
 Lowercase
 Obligatory
 No Display
 Modify ID
What are the page windows? How many main windows will be there in A page window?
In Page Window, we define the margins for left, width, upper and height for the layout of Header,
Logo, Main, & Footer.
What is a drill down report?
Drill down report is an Interactive report where the user can get more relevant data by selecting
explicitly.
What is the difference between interactive and drill down reports?
 ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click)
or AT USER-COMMAND (pressing a button). We can use these events to move through
layers of information about individual items in a list.

DOCUMENT PREPARED BY SONU JANGIR |


76

 Drill down report is nothing but interactive report...drilldown means above paragraph only.
What is ALV programming in ABAP? When is this grid used in ABAP?
ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules that
can be put into use to embellish the output of a report. This set of ALV functions is used to enhance
the readability and functionality of any report output. Cases arise in sap when the output of a
report contains columns extending more than 255 characters in length. In such cases, this set of
ALV functions can help choose selected columns and arrange the different columns from a report
output and also save different variants for report display. This is a very efficient tool for dynamically
sorting and arranging the columns from a report output. The report output can contain up to 90
columns in the display with the wide array of display options.
What do you understand by ALV programming in ABAP?
In ABAP, ALV means Application List Viewer.
What is ALV programming used for?
Some of the functions of the ALV are used to enhance the quality of the report. It also helps in
making the report easier to read and understand. Assets like rows and columns can also be inserted
with the help of ALV.
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.
What is the event that will be triggered first in an ABAP report?
Initialization event is triggered first if user executes an ABAP report. However, if the program is of
type 1, M, F, or S; then LOAD-OF-PROGRAM is triggered first and then INITIALIZATION event.
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.
How many lists can be displayed through an interactive report?
Maximum 21 lists can be displayed (1 basic list 20 secondary lists).
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

DOCUMENT PREPARED BY SONU JANGIR |


77

What is the difference between report and script?


Script is a static form that is used to print company forms like Sales Order, Purchase order etc.
Report is an executable program that can be static or interactive.
In interactive report if user 19 times double clicked, again he wants to main screen. how can do
this?
If SY-UCOMM ='BACK'.
Leave to screen 0.
Endif.

When top of the page event is triggered?


After executing first write statement in start-of-selection event.
I have 1 basic list and 15 secondary list in interactive report. If I am in 9th list, how can I come
directly to the basic list?
System variable SY-LSIND stores the list number, by using this we can go to basic list.
How do write an ALV program using VBRK-header, VBRP-item?
Billing document
1. Header -VBRK
2. Item- VBRP
Input: sales org, billing date, billing document.
Output: invoice no, invoice date, billing type, sales org, invoice quantity, selling price, billing time.
What will you Code in START-OF-SELECTION & END-OF-SELECTION?
START-OF-SELECTION & END-OF-SELECTION contains the code block that process the data of the
logical database.
For example, the code below reads table STDUDENT and writes the logical database information to
internal table ISTUDENT.
START-OF-SELECTION
SELECT * FROM STDUDENT INTO CORRESPONDING FIELDS OF ISTUDENT
WHERE STUDENTNO IN BETWEEN (01, 20).
APPEND ISTUDENT.
ENDSELECT.
END-OF-SELECTION

When do we use END-OF-SELECTION?


How can END-OF-SELECTION be used?
When do we use the END-OF-SELECTION?
We mostly use END-OF-SELECTION for the summary/results of reports.
END-OF-SELECTION is used mostly when logical database used in the report creation and triggered
when all selection gets completed from the database.

DOCUMENT PREPARED BY SONU JANGIR |


78

The END-OF-SELECTION event is triggered in executable programs once the logical database has
finished all data reading and before the list processor is started.
END-OF-SELECTION describes the server that all the database reading is completed, and no further
reading is going to take place.
Once the system has read and processed all database tables of a logical database, use the keyword
END-OF-SELECTION to define a processing block.

If any program with a logical database reading only requires the implementation of event block
END-OF-SELECTION. Otherwise, there is no need to implement the event block END-OF-SELECTION.

Screens
What are the various events associated with Screen Programming?
Explain what are the events in Screen Programming?
List the various events associated with Screen Programming.
The following are the events associated with Screen Programming -
 Process before output (PBO) - This event gets processed before displaying the screen.
 Process after input (PAI) - This event is processed while the user interaction continues with
the screen.
 Process on help (POH) - This even gets process on request by a user after pressing F1. The
program gets coded in various event blocks. The present screen gets processed by the
system.
 Process on value (POV) - This gets processed by pressing F4 by users. The program gets
coded in various event blocks.
What are the various types of Selection Screen Event?
SELECTION-SCREEN BEGIN OF BLOCK xyz WITH FRAME TITLE T01.
SELECTION-SCREEN BEGIN OF SCREEN 700 AS WINDOW.
CALL SELECTION-SCREEN 700 STARTING AT 10 10.
What is the difference between Call Screen and Leave Screen?
Call Screen: Calling a single screen is a special case of embedding a screen sequence. If we want to
prevent the called screen from covering the current screen completely, we can use the CALL
SCREEN statement with the STARTING AT and ENDING AT.
For example -

DOCUMENT PREPARED BY SONU JANGIR |


79

CALL SCREEN 700.


CALL SCREEN 700 STARTING AT 10 10 ENDING AT 20 20.

LEAVE SCREEN statement ends the current screen and calls the subsequent screen.
For example -
LEAVE SCREEN.
LEAVE TO SCREEN 900.
Can we have more than one Selection-screen and How?
Yes, we can have more than one selection screen.
How to declare select-option as a parameter?
SELECT-OPTIONS are displayed on the selection screen for the user to enter values.
For example - Select-options: sno for student-dept.
What are the differences between SE01, SE09 and SE10?
 SE01 - Correction & Transport Organizer
 SE09 - Workbench Organizer
 SE10 - Customizing Organizer
What is the list of screen elements?
There are 13 screen elements -
 Input / output fields
 Text fields
 Checkbox
 Radio button
 Push Button
 Drop down list
 Subscreen
 Table control
 Tabstrip control
 Custom control
 Box
 Status icons
 OK_CODE fields
How to create checkbox in selection-screen using write statement?
By using "WRITE AS CHECKBOX", we can print check box.

DOCUMENT PREPARED BY SONU JANGIR |


80

What are dynamic modifications of a screen? explain?


Dynamic modifications are changing the screen (hiding/enabling/disabling of screen elements)
based on user actions. This can be done by using event AT-SELECTION-SCREEN OUTPUT.
How do you find the information on the current screen?
The information on the current screen can be found at menu path System -> Status.

Dialog Programming
Explain the difference between dialog program and a report?
Differentiate between report and dialog program?
A report is an executable program and can execute directly without any support. Dialog is a module
pool program that executed via a transaction only. Dialog programming is used for customizations
of screens.

File Handling
What are datasets in ABAP?
The sequential files (on application server) are called datasets. They are used for file handling in
SAP.
What is Dataset and how you use it?
The sequential files (on application server) are called datasets. They are used for file handling in
SAP.
ABAP/4 provides three statements for handling files -
 The OPEN DATASET statement opens a file.
 The CLOSE DATASET statement closes a file.
 The DELETE DATASET statement deletes a file.
Below are the list of modes used for processing along with above -
 To open a file for read access, use the FOR INPUT option of the OPEN DATASET statement.
 To open a file for write access, use the FOR OUTPUT option of the OPEN DATASET
statement.
 To open a file for appending data to the file, use the FOR APPENDING option of the OPEN
DATASET statement.
 To process a file in binary mode, use the IN BINARY MODE option of the OPEN DATASET
statement.
 To process a file in text mode, use the IN-TEXT MODE option of the OPEN DATASET
statement.

DOCUMENT PREPARED BY SONU JANGIR |


81

 To open a file at a specific position, use the AT POSITION option of the OPEN DATASET
statement.
 To close a file on the application server, use the CLOSE DATASET statement.
 To delete a file on the application server, use the DELETE DATASET statement.
 To write data to a file on the application server, use the TRANSFER statement.
 To read data from a file on the application server, use the READ DATASET statement.
WHAT are the commands that allow you to process sequential file? And what is their syntax?
 OPEN DTASET for <input/output> in mode at POSITION MESSAGE
 READ DATASET (reading)
 READ DATASET INTO
 TRANSFER (writing)
 CLOSE DATASET
 DELETE DATASET
 TRANSFER to
What is the process for transferring data from legacy system to SAP?
FTP file transfer, manufacturer specific field transfer, NFS (network file system) / BDC.
Explain the process to transfer a record to a dataset?
TRANSFER to.
Why batch input?
Batch input is one of the primary ways to transfer the data into the SAP system. Batch input used to
input a large amount of information at off-peak times. Batch input is used for bulk data transfers
and not for real-time data transfers.
Explain at high level, the batch input process?
Batch data places into queues called batch input sessions and then execute the application
programs for maintenance into the database.
What are the function modules associated with batch input?
These are the 3 functional modules that are used in a sequence to perform a data transfer
successfully using BDC programming -
 BDC_OPEN_GROUP - Parameters like Name of the client, sessions and username are
specified in these functional modules.
 BDC_INSERT - It is used to insert the data for one transaction into a session.
 BDC_CLOSE_GROUP - This is used to close the batch input session.
What is the meaning of Field group, extract data set?

DOCUMENT PREPARED BY SONU JANGIR |


82

Extract data sets are made of group of records. Every record may have same structure, or a record
may have different structure from other. Every record type of an extract dataset can be defined as
a field group with the statement FIELD GROUPS. The FIELD GROUPS statement brings multiple fields
together with providing one single name.
Field groups do not generate field space however they show the fields that already exist. Field
groups shows the records content if the records are met in the extract dataset.
For reading we use READ DATASET, for writing we use TRANSFER and for mode at POSITION
MESSAGE, OPEN DATASET.
 READ DATASET INTO
 CLOSE DATASET
 DELETE DATASET
 TRANSFER

OPEN And Native SQL


What is open sql Vs native sql?
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 accessing 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.
In the 'select' statement what is 'group by'?
Group by clause is used to fetch the data from the table by the specified field.
What will you use SELECT SINGLE or SELECT UPTO 1 ROWS?
It is particularly important for us to understand the difference between SELECT SINGLE and SELECT
UP TO 1 ROWS... We use select single when we need to get one record form data base table with
where condition, we should pass key field in where condition.
We use SELECT UP TO 1 ROWS to get a single record from data base table where there is no key
field at our side.

DOCUMENT PREPARED BY SONU JANGIR |


83

In simple SELECT SINGLE is used to get exact record from data base whereas SELECT UP TO 1 ROWS
is use to get approximate record from data base.
What is the function of using the insert statement in SAP ABAP?
The insert statement helps in the adding of a record at a certain specified location.
What is Asynchronous and Synchronous update?
Asynchronous Update – The program does not wait for the work process to finish the update.
Commit Work.
Synchronous Update – The program waits for the work process to finish the update. Commit Work
and Wait.

Classes
Describe the data classes?
What are the data classes in ABAP?
What are Data Classes?
What are the different types of data classes? Define them.
What is a Data Class?
Describe data classes in SAP?
A data class is a class that contains only fields and crude methods for accessing other classes. Data
classes are classified into four types depending on the type of data they contain -
 Master Data: Data change very rarely.
 Transaction Data: Data changes are depending on requirements.
 Organization Data: Data is a customized and entered to the system when the system is
configured. It is rarely changed.
 System Data: Data is used by the SAP R/3 system.
In BAPIs, which method is used for mass processing?
Replicate() and SaveReplica().
Why pass by reference cannot be used in BAPI?
RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call
programs external to R/3 from an R/3 system. BAPI are RFC enabled function modules.

In an RFC, passing data is by value. The reason behind this is, it’s going to access other system while

DOCUMENT PREPARED BY SONU JANGIR |


84

doing the above by reference wouldn't work as we are into another system whose memory id will
not match.
What is sequence of event triggered in Report?
The events triggering order in report is -
 Initialization
 At Selection-Screen
 Start-of-Selection
 Get
 Get Late
 End-of-Selection
 Top-of-Page
 End-of-Page
 At Line Selection
 At User Command
 At PF (nn)
What are the events in ABAP language?
The events are as follows -
 Initialization
 At selection-screen
 Start-of-selection
 End-of-selection
 Top-of-page
 End-of-page
 At line-selection
 At user-command
 At PF
 Get
 At New
 At LAST
 AT END
 AT FIRST
BOR stands for?
The Business Object Repository (BOR) is the object-oriented repository in the R/3 System.
Can we store a version of abject without releasing it?

DOCUMENT PREPARED BY SONU JANGIR |


85

Yes
What is an ABAP instance?
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.

Object Oriented
Mention the difference between ABAP and OOABAP? In what situation do you use OOABAP?
What is the different between ABAP and OOABAP? Why do we use OOABAP?
Differentiate between ABAP and OOABAP?
Differentiate between OOABAP and ABAP?
ABAP is used to develop traditional programs in R/3.
OOABAP involves in object-oriented programming concepts. These are used to develop BSP/ PCUI
applications and other applications that require the derivation of OOP concepts. These applications
use BADI's and Smart Forms etc. that are with OOPs features.
Define the various contents of Technical Specifications?
List the various contents of Technical Specifications?
What are the contents in technical specifications?
Technical Specifications consists of 5 contents -
 Data Class
 Buffering Permission
 Size Category
 Login
 Buffering Type
When is OOABAP used?
OOABAP is used when BSP/PCUI applications requires to be developed.

Business Add-Ins
What is a BADI?
What do you understand by BADI?
Business add-in (BADI) is a source plug-in provides enhancements to the standard version of the
system. The enhancement technique uses the object-oriented method.

DOCUMENT PREPARED BY SONU JANGIR |


86

BADI accommodate specific user requirements involved in standard delivery of the business
process. These are customer specific and not provided by standard code in SAP.
BADI provides a mechanism to change the functionality of a well-defined business function without
making changes to the delivered source code. BADI implementations are classes that implement
the BADI interface.
How does BADI typically enhance the program?
BADI is the enhancement to add some additional functionality to the existing application program
by the SAP programmer or user. A customized or standard logic to enhance the SAP system
functionality. BADI should be defined to create an interface and implemented by one or more
classes to enhance the SAP application.
What is the difference between BADI, and user Exits?
BADI is object oriented however user exits is not. BADI is client independent however user exit is
client dependent. In BADI, multiple implementations are possible. In User Exit, multiple
implementations are not possible.

DOCUMENT PREPARED BY SONU JANGIR |

You might also like