0% found this document useful (0 votes)
131 views

SAP ABAP On HANA - Top Interview Questions

The document provides answers to frequently asked questions about ABAP (Advanced Business Application Programming) in SAP. It discusses topics like internal tables and work areas in ABAP, how to read data from database tables, differences between append and insert statements, types of ABAP reports, events in interactive reporting, and debugging techniques for ABAP programs and SAPScripts. The document aims to help those preparing for ABAP interviews by providing concise explanations to common interview questions.

Uploaded by

Aditya Gupta
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)
131 views

SAP ABAP On HANA - Top Interview Questions

The document provides answers to frequently asked questions about ABAP (Advanced Business Application Programming) in SAP. It discusses topics like internal tables and work areas in ABAP, how to read data from database tables, differences between append and insert statements, types of ABAP reports, events in interactive reporting, and debugging techniques for ABAP programs and SAPScripts. The document aims to help those preparing for ABAP interviews by providing concise explanations to common interview questions.

Uploaded by

Aditya Gupta
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/ 19

SAP ABAP on HANA

TOP INTERVIEW QUESTIONS


ABAP TOP INTERVIEW QUESTIONS
Sanjo Thomas 08:33:00

What is an internal table and work area in SAP ABAP ?


Internal tables and work areas are temporary memory areas which 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 will be allocated for both internal tables and work areas and
it will be increased dynamically.

What is types statement in SAP ABAP programing ?


Types is a statement which is used to define user-defined structure in
SAP ABAP programming .
TYPES : BEGIN OF TY_TABLE,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
MEINS TYPE MARA-MEINS,
END OF TY_TABLE.

How do you read data from database table in SAP ABAP ?


The only way to read data from database table in SAP ABAP is using select
(open SQL) statements.

What is difference between append and insert statements in SAP ABAP ?


Append is statement which is used to add a record at bottom of a internal
table from work area .
Insert is a statement which is used to insert a record at a specified
position of an internal table from work area.

What is webdynpro for ABAP ?


Webdynpro for ABAP is SAP web interface model which is used to develop
web applications in SAP.

What is the event that will be triggered first in an ABAP report?


Initialization event is triggered first if user executes an ABAP report.
But 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.

Types of ABAP reports in SAP?


ABAP report types are of 7 types. ABAP report types are available in
reports attributes screen.
Executable program.
Function group (containing function modules)
Include
Interface pool
Class pool
Module pool
Subroutine pool

How many lists can be displayed through an interactive report?


Maximum 21 lists can be displayed (1 basic list 20 secondary lists).

what are the events in interactive reporting?


AT LINE-SELECTION Moment at which the user selects a line by double
clicking on it or by positioning the cursor on it and pressing F2.
AT USER-COMMAND Moment at which the user presses a function key.
TOP-OF-PAGE DURING Moment during list processing of a secondary list
LINE-SELECTION Secondary list at which a new page starts.

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 (for example, FREE), which is available in
the system field SYUCOMM after the user action.

What is an ABAP data dictionary?


ABAP 4 data dictionary describes the logical structures of the objects
used in application development and shows how they are mapped to the
underlying relational database in tables/views.

What are domains and data element?


Domains:Domain is the central object for describing the technical
characteristics of an attribute of an business objects. It describes the
value range of the field. Data Element: It 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 foreign key relationship?


A relationship which can be defined between tables and must be explicitly
defined at field level. Foreign keys are used to ensure the consistency
of data. Data entered should be checked against existing data to ensure
that there are now contradiction. While defining foreign key relationship
cardinality has to be specified. Cardinality mentions how many dependent
records or how referenced records are possible.

Describe data classes in SAP ?


Master data: It is the data which is seldomly changed. Transaction data:
It is the data which is often changed. Organization data: It is a
customizing data which is entered in the system when the system is
configured and is then rarely changed. System data:It is the data which
R/3 system needs for itself.

What are indexes in SAP tables?


Indexes are described as a copy of a database table reduced to specific
fields. This data exists in sorted form. This sorting form ease fast
access to the field of the tables. In order that other fields are also
read, a pointer to the associated record of the actual table are included
in the index. Yhe 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: 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.
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.

What is BDC programming ?


Transferring of large/external/legacy data into SAP system using Batch
Input programming. Batch input is a automatic procedure referred to as
BDC(Batch Data Communications).The central component of the transfer is a
queue file which receives the data via a batch input programs and groups
associated data into sessions.

What are internal tables?


Internal tables are a standard data type object which exists only during
the runtime of the program. They are used to perform table calculations
on subsets of database tables and for re-organising the contents of
database tables according to users need.

What are the components of SAP scripts?


SAP scripts is a word processing tool of SAP which has the following
components: Standard text. It is like a standard normal documents. Layout
sets. - Layout set consists of the following components: Windows and
pages, Paragraph formats, Character formats. Creating forms in the R/3
system. Every layout set consists of Header, paragraph, and character
string. ABAP/4 program.

Can we write the code both call transaction and session method in single
program?
Yes it is possible to write call transaction and session in one program.

Which BDC technique you prefer?


If we want to transfer large amount of data and when we need to use more
than one transaction code we prefer session method. For small or less
amount of data and for single transaction use call transaction. (This is
more genric answer but you can add more on to this if you have worked on
BDC)

When you prefer LSMW in SAP?


When we need to update medium amount of data we use LSMW. LSMW is also
used when the person like functional consultant has less programming
language.

Difference between .include and .append?


Include structure allows to add one or more structure into structure or
table.Also placed positioning anywhere. Upto 6 include structure can be
used in a table.
Append structure can be placed only at the end of a structure or table
which also stops further insertion of fields.Only one append structure
can be used.

How to debug sapscripts ?


Two ways to debug sapscript .
First way is goto SE 71 and from menu bar select Utilities->activate
debugger .then goto SE38 execute the print program ,it automatically goes
to debugging mode
The other way is , run the program RSTXDBUG in se 38 . execute it . a
message will show that debugger is activated .now open the print program
in se 38, execute and you will notice that the print programm is
automatically diverted to debugging mode.

What is occurs in internal table?


Occurs addition to the Declaration will give initial size to that
table.occur statement allocates 8kb of memory to the internal table.

Type of parameters to pass to RFC pass by value or pass by reference ?


Always Pass by Value.
RFC is Remote Function call so it can not access the values with Pass by
reference.

Buffering concept usage in SAP Tables?


There are three type of buffer
1 single record
2 generic buffer
3 full buffer
Buffering is use for improve performance. it improves performance 10 to
100 times more

Which BDC you prefer for data migration?


If we want to transfer large amount of data and when we need to use more
than one transaction code we prefer session method. For small or less
amount of data and for single transaction use call transaction.

Preformance techniques in ABAP reports


1. The sequence of fields must be same as per database table
2. During writing select query write all fields in sequence as per
database table.
3. Never write select statements inside loop. endloop.
4. Use st05 SQL trace, se30 run time analysis, code inspector, SLIN
(Extended Program Check),etc.
5. Use select single * statement instead of select *
6. Always use primary key
7. Use binary search but before using binary search sort that table.
How to debug sapscripts in SAP?
Two ways to debug SAPSCRIPT.
1. Goto SE 71 and from menu bar select Utilities->activate debugger
.then go to SE38 execute the print program ,it automatically goes to
debugging mode
2. Run the program RSTXDBUG in SE38 . execute it . a message will
show that debugger is activated .now open the print program in se 38 and
execute, you will notice that the print program is automatically diverted
to debugging mode.
What is occurs in internal table?
Occurs addition to the Declaration will give initial size to that table.
Occur statement allocates 8kb of memory to the internal table.

How the values will be passed to RFC Function module PassbyValue or


Passbyreference?
Always Pass by Value.
RFC is Remote Function call so it can not access the values with Pass by
reference.

Select up to 1 row and select single difference ?


Select single fetches first matching record. If more than one matching
records are there then only the first matching record will be considered
other records will not be taken into account. Whereas select up to 1 rows
will fetch all the matching records from the database. (Again it will
assign only One Record to the internal table/Work area)

How to Debug RFC Function module?


SE38 -> Utilities -> Settings -> ABAP Editor -> Debugging Activate the
external debugging and choose the New Debugger option in ABAP debugger.
Go to the particular place in the code and put break point, pop will
appear then choose the HTTP break point. If you 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 users
field.

Why sapscripts are client dependent and smart forms are client
independent?
Smart forms create its own function module so it does not required to
transport the request through SCC1.As all the Development Object are
stored in client independent tables. Whereas SAP Script does not generate
any function module while executing so we need to transport the request
number through SCC1.Sap script is stroed in side the client depended
table as a TEXT. So sapscripts are client dependent and smartforms are
client independent.

Control break events in ABAP?


1. AT-FIRST: This is used when we want to execute the statements before
records are processed.
2. AT-LAST: This event is used when we want to execute the statements
after all records are processed.
3. AT-NEW: This event is used when we want to execute the statement
before group of records are processed.
4. AT-END: This event is used when we want to execute the statements
after processing of group of records.
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 you define a domain, you already know that all fields that
use the domain will need to be checked against a particular table. You
can store this information in the domain definition by specifying a value
table.
If you 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 ARE THE DIFFERENCES BETWEEN CLUSTER TABLES AND POOLED TABLES?
Cluster tables:
Table type in the ABAP Dictionary.
The data of several cluster tables is stored together in a single table
cluster in the database. A cluster table is thus known only in the ABAP
Dictionary, not in the database.
Pooled tables:
Table type in the ABAP Dictionary.
The data of several pooled tables are stored together as a table pool in
the database. Therefore, a pooled table is known in the ABAP Dictionary,
but not in the database.
WHAT IS AN INTERNAL TABLE? EXPLAIN THE DIFFERENT TYPES?
INTERNAL TABLE:
Data structure that exists only at program run time.
Internal tables are one of two structured data types in ABAP. They can
contain any number of identically structured rows, with or without a
header line.
The header line is similar to a structure and serves as the work area of
the internal table. The data type of individual rows can be either
elementary or structured.
Internal tables provide a means of taking data from a fixed structure and
storing it in working memory in ABAP.
The data is stored line by line in memory, and each line has the same
structure. In ABAP, internal tables fulfill the function of arrays. Since
they are dynamic data objects, they save the programmer the task of
dynamic memory management in his or her programs.
You should use internal tables whenever you want to process a data set
with a fixed structure within a program. A particularly important use for
internal tables is for storing and formatting data from a database table
within a program. They are also a good way of including very complicated
data structures in an ABAP program.
Like all elements in the ABAP type concept, internal tables can exist
both as data types and as data objects.
A data type is the abstract description of an internal table, either in a
program or centrally in the ABAP Dictionary, that you use to create a
concrete data object. The data type is also an attribute of an existing
data object.
TYPES OF INTERNAL TABLES:
HASHED TABLE:
This is the most appropriate type for any table where the main operation
is key access. You cannot access a hashed table using its index.
The response time for key access remains constant, regardless of the
number of table entries. Like database tables, hashed tables always have
a unique key. Hashed tables are useful if you want to construct and use
an internal table which resembles a database table or for processing
large amounts of data.
Hashed tables have no linear index.
You can only access a hashed table using its key. The response time is
independent of the number of table entries, and is constant, since the
system access the table entries using a hash algorithm. The key of a
hashed table must be unique. When you define the table, you must specify
the key as UNIQUE.
INDEX TABLE:
The operations listed below are only permitted for index tables (sorted
and standard tables). Some of them are restricted to standard tables.
Since it is quicker to access a table by index than by key, you should
always use specific index operations when you know that a particular
internal table is an index table.
In particular, the quickest way to fill a table line by line is to append
lines to a standard table, since a standard table cannot have a unique
key and therefore appends the lines without having to check the existing
lines in the table.
If you can either accommodate duplicate entries in a table, or exclude
them in a different way, it can be quicker to fill a standard table and
then sort it or assign it to a sorted table if the data does not have to
be inserted into the table in the correct sort sequence.
Furthermore, the performance of operations that change the internal
linear index has been improved in Release 4.5A. Previously, index
manipulation costs for inserting and deleting liens in standard tables
and sorted tables increased in linear relation to the number of lines.
From Release 4.5A, the index manipulation costs only increase
logarithmically with the number of lines, since the table indexes are now
maintained as a tree structure. This makes insertion and deletion
operations efficient, even in very large standard and sorted tables.
SORTED TABLES
This is the most appropriate type if you need a table which is sorted as
you fill it. You fill sorted tables using the INSERT statement.
Entries are inserted according to the sort sequence defined through the
table key. Any illegal entries are recognized as soon as you try to add
them to the table.
The response time for key access is logarithmically proportional to the
number of table entries, since the system always uses a binary search.
Sorted tables are particularly useful for partially sequential processing
in a LOOP if you specify the beginning of the table key in the WHERE
condition.
What is the difference between AT SELECTION-SCREEN and AT SELECTION-
SCREEN OUTPUT?
AT SELECTION-SCREEN is the PAI of the selection screen whereas AT
SELECTION-SCREEN OUTPUT is the PBO of the selection screen.

What is the difference between SY-INDEX and SY-TABIX?


Sy-TABIX : SY-TABIX is a syatem variable which stores the index current
processing record of an internal table.
SY-INDX : SY-INDEX is a system variable which acts as a loop iteration
counter, it stores loop iteration number.
So when you are looping over an internal table, you use SY-TABIX.
LOOP AT ITAB INTO WA. **SY-TABIX stores index number of internal table
record ENDLOOP.
When you use DO ENDDO / WHILE for looping, there is no table involved. So
you use SY-INDEX.
DO 10 times. **SY-INDEX stores number of iteration of loop ENDDO.

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 is the difference between PASS BY VALUE and PASS BY REFERENCE?


These concepts are generally used for Function modules or Subroutines
etc. and their meaning can be taken literally.
Say we are passing a variable lv_var:
CALL FUNCTION 'DEMO_FM'
EXPORTING
VAR = lv_var.
When we PASS lv_var by VALUE , the actual value of lv_var is copied into
VAR.
When we PASS lv_var by REFERENCE , the reference or the memory address of
lv_var is passed to the Function module. So VAR and lv_var will refer to
the same memory address and have the same value.

What is the difference between Master data and Transaction data in SAP?
Master data is data that does not change often and is always needed in
the same way by business.
Ex: One time activities like creating Company Codes, Materials, Vendors,
Customers etc.
Transaction data keeps on changing and deals with day to day activities
carried out in business.
Transactions done by or with Customers, Vendors, and Materials etc.
generate Transaction Data. So data related to Sales, Purchases,
Deliveries, Invoices etc. represent transaction data.
Some important transactions here for Master Data:
· Material: MM01 MM02 MM03.
· Vendor: XK01 , XK02 , XK03
· Customer: Xd01 , XD02 , XD03.
Some Important transactions for Transaction data:
· Purchase Order: ME21n , ME22n , ME23n.
· Sales Order: VA01 , VA02 , VA03.
· Goods Receipt: MIGO.
· Invoices: MIRO.
What are the Data types of the ABAP/4 layer?
Possible ABAP/4 data types:
C: Character.
D: Date, format YYYYMMDD.
F: Floating-point number in DOUBLE PRECISION (8 bytes).
I: Integer.
N: Numerical character string of arbitrary length.
P: Amount of counter field (packed; implementation depends on h/w
platform).
S: Time Stamp YYYYMMDDHHMMSS.
V: Character string of variable length, length is given in the first two
bytes.
X: Hexadecimal (binary) storage.

What are local objects in SAP?


Local objects (Dev class$TMP) are independent of correction and transport
system.

What are two methods of modifying SAP standard tables?


1.Append Structures and
2.Customizing Includes.

To how many tables can an append structure be assigned?


Only One..Append structure can not be reusable, we can not use it for
multiple tables.

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 aid where key of a
record is unknown.

Can you delete a domain, which is being used by data elements?


No, when we try to do it it will through an error

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, which sets the permissible
data values for the fields, which refers to this domain.
· A single domain can be used as basis for any number of fields
that are identical in structure.
Can you delete data element, which is being used by table fields.
No, we can not delete data element which is being used by table fields.

What are subroutines in SAP Programs?


Subroutines are program modules, which can be called from other ABAP/4
programs or within the same program.

What will you use SELECT SINGLE or SELECT UPTO 1 ROWS?


It is very 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.
Example:
SELECT SINGLE * FROM MARA
INTO WA_MARA WHERE MATNR = '00001'. "here matnr is key field
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.
Example:
SELECT * FROM MARA INTO WA_MARA
UP TO 1 ROWS
WHERE MTART = 'FERT'. "here mtart is not a key field
In simple SELECT SINGLE is used to get exact record from data base where
as SELECT UP TO 1 ROWS is use to get approximate record from data base.

How to transport variants in SAP ABAP?


We use RSTRANSP program to transport variants in SAP ABAP, go to SE38,
provide RSTRANSP execute, provide program name, variant name, execute
create transport.

How to create checkbox in selection-screen using write statement?


By using
WRITE AS CHECKBOX we can print check box.

Can a domain, assigned to a data element be changed?


Yes It can be changed. We can do it by just overwriting the entry in the
field domain.

What is a Data Class in SAP Data Dictionary?


Data class determined the physical area of table inside database, it is
available under technical settings of table in Se11...Example: APPL0,
APPL1 etc

What is a Size Category in SAP Data Dictionary?


The Size category describes the probable space requirement of the table
in the database.

Difference between IDOC and IDOC type?


IDOC type specifies Data Structure and IDOC is the instance based on IDOC
type. Example: MATMAS, CREMAS etc

What is a table pool in SAP?


Table pool (or pool) is used to combine several logical tables in the
ABAP/4 Dictionary. The definition of a pool consists of at least two key
fields and a long argument field (VARDATA).

What is the difference between SY-TABIX and SY-INDEX?


SY-TABIX : Stores current line of an internal table
SY-INDEX : loop iteration counter in do and while loops

Which client number you use for the current project?


Client is the independent entity in the system to provide data security,
for this question you can say : 100, 200, 400 etc (Please don`t say 800,
most of the times this client is used in practice versions only)

You are running a report. It is taking long time for execution. What
steps will you do to reduce the execution time?
· Run time analysis
· System Trace
· Extended code check
· Performance tuning
What is the difference between report and script?
Script is a static form which is used to print company forms like Sales
Order, Purchase order etc.
Report is an executable program which can be static or interactive.
How do you get functional specs when you are assigned some object?
Generally Functional Specifications will be sending through emails(In
support process, they may come in a specific tool like: remide, radix).

What are conversion routines in SAP ABAP?


These are objects which are used to convert data from display format to
SAP internal format and from SAP internal format to display format.

What is Modularization and its benefits?


If the program contains the same or similar blocks of statements or it is
required to process the same function several times, we can avoid
redundancy by using modularization techniques. By modularizing the ABAP/4
programs we make them easy to read and improve their structure.
Modularized programs are also easier to maintain and to update.

What is the difference between the function module and a normal ABAP/4
subroutine?
In contrast to normal subroutines function modules have uniquely defined
interface.
Sub routines do not return values.
Sub routines do not return exceptions.
Sub routines cannot be tested independently.
Declaring data as common parts is not possible for function modules.
Function modules are stored in a central library.

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 logical databases? What are the advantages/disadvantages of


logical databases?
A Logical Database is a hierarchical structure of tables. Use the GET
statement to process Logical Databases.
- LDB consists of logically related tables grouped together and used for
reading and processing data.
- Advantages = 1. No need of programming for retrieval , meaning for data
selection.
- 2. Easy to use standard user interface, have check completeness of user
input.
Disadvantages = 1. Fast in case of lesser no. of tables But if the table
is in the lowest level of hierarchy, all upper level tables should be
read so performance is slower.

How to transport text elements in SAP ABAP?


If is is first time, they will automatically transport along with the
program, if you change them next time, it will ask for TR, you can move
that TR

What is the last entry in all BDC tables?


In all BDC tables the last entry is to save the data by using the field
name BDC_OKCODE and a field value of of ?/11?.

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 the difference between Leave Transaction and Call Transaction?


In contrast to LEAVE TO TRANSACTION, the CALL TRANSACTION statement
causes the system to start a new SAP LUW. This second SAP LUW runs
parallel to the SAP LUW for the calling transaction.

Which event is executed first at-selection-screen or at-selection-screen-


output in sap abap?
Before screen screen display : AT SELECTION-SCREEN OUTPUT will trigger
first.
After screen is displayed : AT SELECTION-SCREEN will trigger first.

What is the difference between Structure and work area?


Structure and Work area have same functionality but structure is defined
in data dictionary and can be used in both program level and data
dictionary, work area can only be used in program.

what is structure of IDOC?


IDOC has three type of records: 1.Control Record -- contains control info
ex: receiver port etc 2. Data record -- Contains IDOC data 3.Status --
holds IDOC status.

What is the use of Folder in Smartforms ?


Just to group nodes, dosen`t effect any functionality, we can group nodes
into a folder.

what is extension in and extension out in BAPI ?


BAPI extension is used to update custom fields of a table (ex: MARA).
BAPI extension out is used to retrieve custom fields of a table.

In interactive report if user 19 times double clicked, again he want to


main screen.. how can do this?
If Sy-ucomm ='BACK'. Leave to screen 0. Endif.

Can you have a Smartform without a main window?


Yes, you can create a Smartform without a Main Window. But there is no
need to do anything of such sort. Whenever you create a Smartform, a main
window is created by default. I can't think of a situation , where you
will have a situation in which it is mandatory for you to remove the Main
Window. But still I have seen this question in ABAP interviews. So I have
put it here.

Can you move a Smartform from one SAP system to another without using
transports?
Yes, this can be achieved using the Upload/Download feature for
Smartforms. One can download the Smartform from one system and save it as
an XML file. Once that is done, the XML file can be used to upload the
Smartform in another system.

What is the difference in a Table and a Template in Smartform?


A Template has fixed number of Rows and Columns whereas a Table can have
variable rows and columns i.e. you can have a internal table with
contents associated to a Table element but not to a Template.

How do you find the name of the Function Module for a Smartform?
The function module for Smartform is created when the Smartform is
activated. You can find the name of the Function Module for a Smartform
by going to Environment --> Function Module Name.

How data is stored in cluster table?


Each field of cluster table behaves as tables which contains the no. of
entries.

What are client dependant objects in abap/sap?


SAP Script layout, text element, and some DDIC objects.

In selection screen I have three fields, plant mat no and material group.
If I input plant how do I get the mat no and material group based on
plant dynamically
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL.
CALL FUNCTION -> F4IF_INT_TABLE_VALUE_REQUEST to get material and
material group for the plant.

How do you get output from IDOC


Data in IDOc is stored in segments, the output from Idoc is obtained by
reading the data stored in its respective segments.

When top of the page event is triggered?


After executing first write statement in start-of-selection event.

Can we create field without data element and how?


In SE11 one option is available above the fields strip. Data element/
direct type.

How do we debug sapscript?


Go to SE71 give lay set name , go to utilities select debugger mode on.

How can I copy a standard table to make my own z_table.


Go to transaction SE11. Then there is one option to copy table. Press
that button. Enter the name of the standard table and in the Target table
enter Z table name and press enter.

What is the use of "FOR ALL ENTRIES" in SAP ABAP ?


SELECT FOR ALL ENTRIES is the best alternative for SELECT WITH JOINS,
this statement is very helpful for reading data from more than 2 tables.
To avoid nested select statements we use SELECT FOR ALL ENTRIES
statement. Performance wise SELECT FOR ALL ENTRIES is better to use.
How do you find the name of the Function Module for a Smartform? When is
this function module created?
The function module for Smartform is created when the Smartform is
activated. You can find the name of the Function Module for a Smartform
by going to Environment --> Function Module Name.

What is a Final Window in smartforms?


Final Window is called after all the other windows are called in a
Smartform.

What is the transaction for Recording BDC ?


Transaction Code for recording is SHDB

How do you read files from the Application server ?


To read files from Application server You need to use the commands:
OPEN DATASET ---> opens the file(dataset) either in read /write mode.
<.p>
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 ?
You need use the below Function Modules to read/write :
GUI_UPLOAD --> To read data from file into an internal table
GUI_DOWNLOAD --> To write data from internal table to a file on
presentation server
What is the structure of the BDC table?
The BDCDATA consists of the following fields:
PROGRAM [CHAR 40] - Online program name.
DYNPRO [NUMC 4] - Screen number.
DYNBEGIN [CHAR 1] - Flag to indicate the start of a new screen.
FNAM [CHAR 132] - Field name of a screen field to be filled with data.
FVAL [CHAR 132] - The actual value to be filled into the specified screen
field.

How do you do BDC for a table control?


With other things as usual, there is a special trick that you have to use
while doing BDC for table control. You need to use the BDC OKCODE '=P+' .
Its the BCD_OKCODE for Page down that can be used for scrolling down in
table control.

Are sapscripts client dependent or independent ?


Whenever we create a sapscript internally it is stored as text, as per
SAP standards all text data is client dependent. SAPSCRIPTS are client
dependent.

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.
What are the difference between Table and Structure?
The major difference is , the Data Base tables hold the physical data
where as Structures doesn't hold any data.

What are field symbols in SAP ABAP?


Field symbols are like pointers in C that can point to any data object in
ABAP/4 and to structures defined in ABAP/4 dictionary. All operations you
have programmed with the field symbol are carried out with the assigned
field.

Can you have a Smartform without a main window?


Yes, you can create a Smartform without a Main Window. But there is no
need to do anything of such sort. Whenever you create a Smartform, a main
window is created by default. I can't think of a situation , where you
will have a situation in which it is mandatory for you to remove the Main
Window. But still I have seen this question in ABAP interviews. So I have
put it here.

Can we sort internal table without using SORT statement ? Explain ?


We can sort internal table without using SORT statement by declaring
sorted internal table . ex: DATA : IT_MARA TYPE SORTED TABLE OF MARA.

What are dynamic modifications of a screen? explain?


Dynamic modifications are changing the screen(hiding/enabling/disabling
etc of screen elements) based on user actions, this can be done by using
event AT-SELECTION-SCREEN OUTPUT.

Can we use call transaction and session method in the same program ?
explain ?
Yes, we can call call transaction and session method in same program,
generally we use call transaction for updating and session method for
logging errors in the same program .

How many main windows can we define per form and per page in sapscripts?
In sapscripts we can define one main window and 99 windows per page

Differentiate between Character format & Paragraph format in sapscript?


Paragraph format is used for formatting a paragraph, we can add tabs in
this.We can use character format in paragraph format.
Character format are used for assigning various attributes of font like
size, type, bold etc.

What is SAP style maintainace ?


It is a collection of character and paragraph format.

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 can not 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.

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

How do we generate IDOC in SAP ?


We can generate IDOC using function module MASTER_IDOC_DISTRIBUTE

How to reprocess error IDOC's ?


We can reprocess error IDOC's(status 51) using program RBDAGAIN

How to reprocess edited IDOC's ?


We can reprocess edited IDOC's using program RBDAGAIE (Se38 prorgram)

Can we have the same append structure in more then one Database Table ?
No, you can not have same append structure in more than one database
table

What is TMG in SAP ?


TMG stands for Table Maintenance generator. It is a tool available in
ABAP by which we can add or delete multiple records at a time and it is
executed or triggered by the transaction code SM30.

Difference between select option and ranges in SAP ABAP ?


The main difference between select option and ranges is that ranges
implicitly or automatically creates internal table with fields like
OPTION,LOW,HIGH,SIGN,etc . Where as in case of select option we have to
explicitly create internal table.
When you declares a select options it will implicitly declare an internal
table (ranges) for you.
While using RANGES syntax u can declare internal table explicitly.
The only need of declaring ranges is when you are not taking input from
the user but you want make limit based selection at that time it will be
use full e.g.
SELECT ** from ** where MATNR in val_range .
Can you define a field without a data element in SAP ABAP ?
Yes. If you want to specify no data element and therefore no domain for a
field, you can enter data type and field length and a short text directly
in the table maintenance.

what is the tcode for output types ?


NACE or NACO is used to trace output types. And also it supports to track
program and layout used for smartforms or sapscripts!
What is the diff between select single star and select up to ?
While retrieving data based on primary key use select single whereas
retrieving based on non-primary key use select up to.

What is difference between Function module and RFC?


Function Module: In a function module passing data is by call by
reference in particular the tables parameter has to by call by reference
by passing memory. RFC: In a RFC passing data is by value the reason is
its going to access other system while doing the above by reference
wouldn't work as we r into another system whose memory id will not
match,this is the basic cause for creation of RFC.

What is the difference between BAPI and RFC?


A BAPIâ❬❢s are standard SAP function modules provided by SAP for
remote access. Also they are part of Business ObjectRepository(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. You create business objects and those are then
registered in your BOR (Business Object Repository) which can be accessed
outside the SAP system by using some other applications (Non-SAP) such as
VB or JAVA.

What is the role of NAST table in SAP ?


After the final selection of the output is done 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 and driver programs and as well as all NACE
settings.

How to create a JOB in SAP ?


1. SM 36 2. JOB NAME JOB CLASS < SAVE > 3. ABAP PROGRAM NAME : VARIANT :
< CHECK > < SAVE> 4. START CONDITION IMMEDIATE 5. OWN JOBS < CHECK > &
RELEASE < SAVE > < CHECK > < IMMEDIATE > 6. SEE JOB LOG FOR STATUS 7.
CLICK ON FINISHED PROGRAM & GOTO [ SPOOL ] DISPLAY

What is database LUW in SAP ?


database LUW is an inseparable sequence of database operations that ends
with a database commit. The database LUW is either fully executed by the
database system or not at all. Once a database LUW has been successfully
executed, the database will be in a consistent state. If an error occurs
within a database LUW, all of the database changes since the beginning of
the database LUW are reversed. This leaves the database in the state it
was in before the transaction started.

What is the role of MODIF ID in abap ?


Please find in this example: TABLES SAPLANE. ... SELECT-OPTIONS S_PTYPE
FOR SAPLANE-PLANETYPE MODIF ID ABC. ... AT SELECTION-SCREEN OUTPUT. LOOP
AT SCREEN. IF SCREEN-GROUP1 = 'ABC'. SCREEN-INTENSIFIED = '1'. MODIFY
SCREEN. ENDIF. ENDLOOP.
Describe Internal Table and Work area?
An Internal table is a temporary table that contains the records of an
Advanced Business Application Programming 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 must declare an internal table in an ABAP program when you need to
retrieve data from database tables. Internal table can act as data type
and data object. A data type is the abstract description of data object
an internal table is accessed by using the concept of work area, a work
area is a temporary memory space that helps you in reading and modifying
the data of an internal table line by line.

You might also like