Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

ABAP Guru

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

*****************Internal Table************************************************

1) Into corresponding fields of table itab.


Into table itab.
2) Append, Insert, Collect, Modify, Read, Delete internal table?
3) How do you delete records/particular record from internal table?
Delete Table itab with table key k1 = v1.
Delete Table itab from wa.
4) How do get number of lines in internal table?/number of lines/pages in a list?
Describe Table itab.
5) Export obj1…objn to Internal table itab.
Import obj1…objn from internal table itab.
6) How do you insert lines in internal table?
Insert lines of itab1 [from idx1][to idx2] into table itab2.
7) How do you modify internal table?
Modify Table itab from wa.
Modify dbtab from Table itab [Assigning<fs>|Reference into dref] [Transporting].
8) How do you read a record from internal table?
Read Table itab.
Read Table itab from wa.
Read Table itab index i.
Read Table itab with key = v [Binary Search].
Read Table itab with key k1 = v1…..kn = vn [Binary Search].
Read Table itab with key.
Read Table itab with table key k1 = v1…..kn = vn.
Read table itab into wa with key <id> = ‘100’ name=’rupa’ - To read particular field. (or)
READ TABLE ITAB INDEX 3. (recommended) (Or )
loop at itab.
If sy-tabix = 3. Write itab.
Endif.
Endloop.
9) What is read with binary search?
BINARY SEARCH DIVIDES THE ENTIRE SELECTION PROCESS INTO TWO PARTS SO ITS HELP FOR
PERFORMANCE TUNING.
10) Refresh, Free, Clear Have you used them?
Yes. REFRESH itab. The internal table itab is reset to its initial state, i.e. all table
entries are deleted. The header entry of a table with a header line remains unchanged. It can be
reset to its initial value using CLEAR. FREE itab can be used to free up the memory allocated to
the table.
11) Update dbtab from Table itab.
12) Control Level Events? Mandatory conditions to use Control Events?
Control Level Events are used in a loop over an internal table. Mandatory conditions: it has to be
sorted. AT FIRST, AT LAST, AT NEW, AT END OF, ON CHANGE OF.
For Example if we have 3 fields, if we specify 1 field,
AT NEW triggers when changes made from first column to the specified column. ON CHANGE OF
triggers when changes made to that particular specified column.

13) What are Internal table types? Difference between them?


Standard, Sorted, Hashed.
Standard & sorted has index access & Hashed key access.
Standard is primarily index access, Sorted is key access, Hashed is extensively key access.

14) When do we use Hashed table?


Hashed table is useful when you have to work with very big internal table and to read it
with "READ TABLE WITH KEY ..." The time access is constant! Access time using the key is
constant, regardless of the number of table entries. 

15) What is & Ways of creating internal table? WA?


Internal table is a temporary table which stores identically structured data records at runtime.
Internal table can be created in 3 ways using, transparent table, Structure, Table type.
WA is a memory area having the same structure of an internal table which can hold only one
record at a time. This is used to work on the body of the internal table.
WA can be created in 2 ways using Transparent table & Structure.

16) What is use of Occurs Statement?


Occurs addition determine the initial number of table lines created.
17) Why we use FOR ALL ENTRIES? Syntax? What we need to remember before using FOR ALL
ENTRIES? If Check table is blank, what will happen? To delete Duplicate entries, what has to be
done?
Outer join can be created using this addition to the where clause in a select statement. It speeds
up the performance tremendously. FOR ALL ENTRIES are used instead of nested select
statements. Things to remember – It has to be sorted,
a) Duplicates are automatically removed from the resulting data set. Hence care should be
taken that the unique key of the detail line items should be given in the select statement.
b) If the table on which the For All Entries IN clause is based is empty, all rows are selected into
the destination table. Hence it is advisable to check before-hand that the first table is not
empty.
c) If the table on which the For All Entries IN clause is based is very large, the performance will
go down instead of improving. Hence attempt should be made to keep the table size to a
moderate level.

Syntax: SELECT shkzg kokrs FROM bseg INTO TABLE it_bseg


FOR ALL ENTRIES IN it_bkpf WHERE bukrs EQ it_bkpf-bukrs.

18) For all entries – what is the purpose of sorting?


19) In sorted table if u are using non-unique fields in select statement, will that allow or it gives
error? If it allows what it takes as a Primary key?
20) What will happen if we use STOP, EXIT, CONTINUE, CHECK?
CHECK evaluates the subsequent logical expression. If it is true, the processing continues with the
next statement. CHECK with a negative outcome terminates the current loop pass and goes back
to the beginning of the loop to start the next pass, if there is one.
CONTINUE terminates the current loop pass, returns the processing to the beginning of the loop
and starts the next loop pass, if there is one.
Exits the current loop processing in loop.
Stop - This statement terminates a processing block in an executable program of type 1.

21) Did you work on Internal Table With headerline or without headerline? Disadvantages using
with headerline?
22) Distinct?
23) What is the difference between a primary index and a secondary index? What is a duplicate data
entry in an index? Can a primary index contain duplicates?
24) Collect?
COLLECT allows you to create unique or summarized datasets. Collect checks whether an entry
with the same key exists or not. If the system finds an entry, COLLECT statement does not
append a new line, but adds to the sum total of the existing entries. If it does not find an entry,
the system creates a new entry instead.

*****************Data Dictionary****************************************************

1) What is Data Dictionary?


It centrally describes and manages all the Data definitions used in the system. Data Dictionary is
completely integrated in the ABAP workbench. All the components of the workbench can
actively access the definitions stored in the ABAP dictionary.

2) What are the types of tables exists in Data Dictionary?


There are 3 types of tables: Transparent, Pooled & Cluster Tables.
3) Difference between Transparent & Pooled, Cluster tables?
a) You can read transparent tables directly on the DB from outside SAP with for instance an
SQL statement. A Clustered and a pooled table cannot be read from outside SAP because
certain data are clustered and pooled in one field as content can be variable in length and
build up. DB manipulations are limited for the same reason.
b) You can use open SQL statement or native SQL statement in transparent tables. You can use
only open SQL statement in Cluster & Pooled tables.
c) A transparent table in the dictionary has one to one relationship with a table in the
database. There is a physical table on the database for each transparent table. Cluster &
Pooled tables has many to one relationship with the table in the database. For one table
in the database, there are many tables in the r/3 dictionary.
d) Transparent tables stores Customer related data. Cluster & Pooled tables stores Control &
System information.

4) What are the advantages & disadvantages of Cluster & Pooled tables? Mention some of the
tables you worked on?
Advantages of Cluster & Pool tables:
a) Combination of tables stored into one table pool/ table cluster means Less tables to
manage, administration becomes simpler.
b) The data is stored in compressed form in the DB. Reduces the memory space required,
reduces the network load.
c) With cluster tables, functionally dependent data are read together, which results in fewer
database accesses.
Disadvantages:
Restricted DB functionality. No native SQL,, No Views, Joins,, No primary or secondary indices,,
No group by, order by,, No append.
Tables: CDHDR, CDPOS.

5) Have you created any ZTables? Yes.


6) What is Delivery Class? Types? [Appln, Customizing, Control, System Table].
The delivery class controls the transport of table data when installing or upgrading, in a client
copy and when transporting between customer systems.

7) What is Domain, Data Element?


Domain tells the Technical characteristics of a field ie,. It defines Data type & Length for a field.
& its value ranges.
Data Element defines Field text & F1 help for a field.

8) Can you create a field without using Data Element and Domain? Yes. Using BuiltIn type.
9) Can you create a Data Element without using Domain? Yes using Predefined type.

10) What is Check Table? Have you used it? Ex: Which one is check table & Value Table?
Check Table:
The name itself defines that it is the table which is giving the check function when the foreign
key is populated with some value.
I mean to say that at the time you are populating elements into the foreign key table at that
time you entered some value and pressed ENTER key on key board then system automatically
executes the select statement on the existing check table, in order to know whether this key's
entry exist in the check table or not.
So here the check table means the reference for comparison.
And foreign key table means referee which is asking for check.

11) What is Value Table?


Always Value table means table which contain the all possible existing value for that field(key).It
refers to F4 functionality. Usually we will create any value table whenever we are creating the
key's domain.
12) What is Search Help? Have you created SH? Types? Difference between them? How do you
define SH in program?
A search help is an object of the ABAP Dictionary with which input helps (F4 helps) can be
defined.
Elementary search helps implement a search path for determining the possible entries.
Collective search helps contain several elementary search helps.
13) What is Technical Settings? Data Class? Types? Size Category? Buffering? Logging?
Technical Setting:
You use the technical settings of a table to define how the table is handled when it is created in
the DB. You can define Data Class, Size category, You can specify whether the table is buffered
and whether changes to data records of the table are logged.
DataClass:
defines the physical area of the DB in which the table should be created.
The following Data Classes are available.
● APPL0[Master Data: Data in the tables of this class is not frequently changed.],
● APPL1[Transaction Data: Data in the tables of this class is frequently changed.],
● APPL2[Org. Data: Customizing data goes in here. Data in the tables of this class is not frequently
changed.]
● USR & USR1: Two further data classes, USR & USR1, are provided for the customer. These are
for user developments.
The size category:
defines the expected memory space required by the table on the database. You have 0 to 4 size
category to choose from for tables. It defines the size of the table extents.
Using the Logging flag , you can log/keep track of the changes [deletes, updates etc,.] made on
the table. You can also specify buffering type. The buffering permission defines whether the
table can be buffered. Buffering not allowed, Buffering allowed but switched off, Buffering
switched on.

14) If we use Logging where do the changes get stored? In CDPOS table.
15) What is Secondary Indexes? Have you created it? Why do you create? Where do you create?
Secondary Indexes are created for Non key Fields. Suppose while retrieving data from DB if we
are using non key fields in where clause, performance decreases. So in order to increase
performance we create Secondary indexes to those non key fields. Yes I have created. In Table
we have Index Pushbutton to create Index.

16) What is Currency/Quantity Fields? [Reference field & Reference Table]


Suppose you have a Price field in the database table. You want to store some value in it. But you
can only store a number in it. For example, it can be either 100 INR or 100 USD..... So, in order to
erase such ambiguity, we assign the Currency field to it. Similarly, whenever you want to store
some Quantity. The unit for it can be METERS, KGS, or SEC's etc. So, you assign UNIT to it.
You must specify a reference table for fields containing quantities (data type QUAN) or currency
amounts (data type CURR).
This reference table must contain a field with the format for the currency key (data type CUKY)
or unit of measure (data type UNIT). This field is called the reference field of the output field.
The reference field can also reside in the table itself. A field is only assigned to the reference
field at program runtime. For example, if a field is filled with currency amounts, the
corresponding currency is determined from the assigned reference field, that is the value
entered in this field at the moment defines the currency.

17) What is Table Maintenance Generator? What are the Parameters? After creating TMG, what will
be created?
TMG is a tool used to maintain data in DB tables through Data dictionary, only possible when
TMG is created for a table.
Parameters: Authorization group, Function group, & we have 1 step / 2 step maintenance
screen. one step table maintenance dialog: only one maintenance screen is processed. The
entries are displayed in list form.
Two step maintenance: two maintenance screens are processed . 1st one is overview screen ,
the entries are displayed in list form. In 2nd screen one entry is displayed .
A View is generated automatically when TMG is created for a table.

18) Why do we use Table Events? Where do we create?


While creating the tables, sometimes we may need to update the table fields in the background.
Lets take an example, create a table with 10 fields, in those 10 fields there are 2 fields which are
User name and the Date, these 2 fields should update automatically when a record
Inserted/Updated in the table. For this we use Table Events.
We need to create a table maintenance generator for that table. There in the table maintenance
generator we have an option to create EVENTS.
In the table maintenance generator, Go to Environment --> Modifications --> Events.

19) What is the use of Database Utility?


It is the interface between Data dictionary and actual database. It helps in making the
(adjustments)changes in the db server with respect to ABAP dictionary.[SE14].

20) Have you used Views? Types? Why do we use?


Yes. A view is a logical view which contains data from one or more tables. There are 4 types of
views. DB Views, Projection, Maintenance and Help views.
DB Views can be created on the database and are defined in the ABAP Dictionary once they are
activated.
Projection views can be created only on single tables. The relational operator projection is used
to remove fields from a cross product table created by join and selection. It also possible to
access Pooled and Cluster tables using Projection View.
Maintenance views give a business oriented view of the data and at same time allows you to
maintain the data.
Help views can be used as a selection method in search helps.

21) Have you created Lock Object? Why did you create? Types of locks? Difference btn them? 2
FM’s?
Yes I have created. For making other users for not editing / updating the table when 1 user is
working on this table.
SAP Provide three type of Lock objects. 
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other  transactions read access but not
write access to the locked area of  the table.
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other  transactions neither read nor
write access to the locked area of the  table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses
from the same transaction.
When you create a lock object, System automatically creates two function modules.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object which is being queued through above
FM. You have to use these function modules in your program.

22) What is Foreign Key Table, Primary Key Table? Uses of FK?
Table having a Foreign Key is called FKT. Table having Primary key is called PKT.
Uses of FK: A relationship which can be defined between tables and must be explicitly defined at
field level. FK’s are used to ensure consistency of data[ensures data integrity] & It helps for F4
help.
23) What is Table type? Type groups? Structure?
Table type is a global Internal table type. Type groups are global Types & global Constants.
A Structure is defined like a table in the ABAP Dictionary & can then be accessed within ABAP
programs. Contain data temporarily.

24) Difference between Append & Include Structure?


a) 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.
b) 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.

25) If Buffering is switched on & if you don’t want to access from buffer, what statement will you
use? BYPASSING BUFFER.
26) Difference between Index & Buffer?
Both are used for improving performance. Index is at DB layer level. Buffer is at application layer
level.
27) Can you create Transaction code for a table? Yes. In SE93.
28) What is Text Table?
Text table is a special SAP tables where it stores descriptions in different languages.

29) Can we create Secondary Index for View? No.


30) In how many ways we can modify SAP tables? 2 ways. Include & Append Structure.
31) How do you give fixed values to a field in a table? Value table is used for the fixed values. [i.e., if
we define some fixed possible values for the table field in its domain then that is value table.]

32) How do you know whether views are used or not in a program?
where used list or table - D010TAB
33) Difference between table & View?
a) Table contains data physically, but not views.
b) No Index,Append,.include
34) How do you find whether secondary index is created or not? We can find in ST05.
35) If you sort an internal table which is already sorted what will happen? It allows or gives error?
It allows but performance decreases.

36) Difference between table & Structure?


a) The data in the Transparent tables can be permanently saved. Structures are defined and
activated like tables, contains data during runtime.
b) Structures can be included in other tables such as table enhancements. Transparent table
cannot be included in any other transparent table.

********************BDC**********************************************************

1) Give real time work done by u in BDC ? Transactions used ?


I did a BDC Program for Re costing in SO. Recosting is getting the Material production cost from
production to Sales order. I did a recording to VA02 transaction. & used Call transaction method
of BDC to transfer the data.

2) Which technical field in the BDCDATA table holds the last cursor position?

3) Difference between DI/LSMW/BDC/BAPI?


Direct Input: (DI) programs work exactly similar to Batch Input programs. But the only difference
is, instead of processing screens they validate fields and directly load the data into tables using
standard function modules. For this reason, DI programs are much faster (RMDATIND - Material
Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited
for loading large volume data. DI programs are not available for all application areas.
LSMW: (Legacy System Migration Workbench) It is a predefined tool in SAP used to perform
data Migration from Legacy system to SAP system for predefined  screens. There are 14 steps
involved in performing data migration with this method. Tcode lsmw. No ABAP effort is required
for the SAP data migration. LSMW provides various methods for migration of data, namely
those of Direct Input, Batch Input recording, BAPI and IDOC.
BAPI vs BDC:
1) BAPI is directly updated to the database instead BDC run through the screen flow.
2) There is one more advantage using BAPI instead of BDC. When we go for upgradation, there
might be possibility to change the screen elements for transactions depending on the
requirement. In that case, our BDC pgm may or may not work (depending on the screen
changes they have made). Unless and until we prepare new BDC we cant use the old BDC
pgm. But in BAPI, SAP promises that they are going to keep the old BAPI and for new
functionality they will provide an upgraded BAPI. Until we write a new BAPI pgm, we can use
the existing BAPI pgm.

4) Difference between Call Transaction & Session Method?


Session Method Vs Call Transaction Method:
1) In Session, the SAP database is updated during the processing of the batch input session, not
the execution of the BDC program. If you use the “CALL TRANSACTION” or “CALL DIALOG”
statement, the SAP database is updated during the execution of the batch input program.
2) In Session Method, errors are handled automatically by the system during the processing of
the batch input session. Errors are recorded in a log and the batch input session in error is
kept. If you use the “CALL TRANSACTION” or “CALL DIALOG” statement, errors are not
handled automatically by the system. Errors must be handled in the batch input program.

5) Why you choose Call Transaction or Session Method?


If you want to use 2 txn codes for transferring data we choose Session method else Call txn
method. In CT method we can use only 1 txn code [ABAP Syntax].

6) What are the Function Modules used in Session Method?


BDC_OPEN_GROUP, BDC_INSERT, BDC_CLOSE_GROUP.

7) How many Sessions can be opened using BDC_OPEN_GROUP? One Session.


8) What do you do with errors in Batch Input Session? Download it into a list, correct the errors &
reupload.
9) How do you process Session?
In Session Overview [SM35] or Run RSBDCSUB Program & enter Session name & process.

10) Does Session Method allow multiple transactions to be processed? Yes.


11) How to assign multiple transaction codes in a session method? Write BDC_INSERT Function
module 2 times.
12) Does Call Transaction Method allow multiple transactions to be processed? Why cant you use?
No. ABAP Syntax.
13) Is it possible to run Call Transaction in the background? Yes, Using No Display mode.
14) What is the Syntax of Call Transaction?
CALL TRANSACTION ‘MM01’ USING ‘BDCDATA’ MODE ‘’ UPDAT E‘’ OPTION ‘’.

15) How do you handle errors in Call Transaction?


Errors must be handled Explicitly in CT Method using BDCMSGCOLL Structure.
16) What are the fields in BDCMSGCOLL Structure?

17) How do you handle screen resolution in BDC?


While recording you can check the Default size checkbox (or) In CT Method you can enter it in
CT Syntax – OPTION ‘CTU_PARAMS DEFAULT SIZE=0’.

18) What is the Structure of BDCDATA?


Program, DYNPRO, DYNBEGIN,FNAM, FVAL.

19) Difference between Synchronous & Asynchronous?


Synchronous updating means that an update is completed for one transaction before processing
continues to the next transaction. Asynchronous – Updation is done parallely.

20) What are the Processing modes in Batch Input?


CT - ‘A’ (display all), ‘E’ (display errors only), ‘N’ (no display). The default is ‘A’.
Session – Foreground, display errors only, background.

21) What are the Update modes in Call Transaction & Session Method?
CT – Synchronous & Asynchronous, Local. Session – Synchronous.

22) What is Recording? Why it is used?


Before writing BDC program we create a recording. Txn code is SHDB. Go to SHDB & create
Recording. Whatever actions are made during recording it will be recorded & a code is
automatically generated. Using this code we write Bdc program.

23) How do you handle Table Controls in BDC?


24) What does the message p
25) parameter indicates ?
26) What is a multiple line field ?
A multiple line field is a special kind of field which allows the user to enter multiple lines
of data into it.

27) How do you populate data into a multiple line field ?

28) How do you handle Currency/Quantity Fields, Time & Date Formats in BDC?
In BDC, for currency, quantity, date and time fields you need to take the data into a char variable
of enough length and use WRITE TO statement to take care of user settings.
Ex: DATA: l_char(25) TYPE c.
WRITE 'your currency field' TO l_char CURRENCY 'Pass the currency code like INR'.
**EG: WRITE l_curr TO l_char CURRENCY 'Currency code'.
CONDENSE l_char.
Pass l_char to BDC.

29) How do you handle Presentation Server Data? Using GUI_UPLOAD & GUI_DOWNLOAD FM’s.
30) How do you handle Application server Data? READ DATASET, TRANSFER.
31) What is the Transaction code for Application Directory? AL11.
32) Difference between SAP & ABAP Memory? Have you worked on it? How do you handle it?
Syntax?
1) Abap memory is the temporary memory that is assigned for processing between the internal
sessions of an external session. Sap memory is the temporary memory that is assigned for
processing between the external sessions.
2) Abap memory is Local memory for external session. Sap Memory is Global memory for
external session.
3) Abap memory is retained for the duration of EXTERNAL session. SAP memory is retained for
the duration of USER session.

33) Where do you download error records[report] in call transaction? Presentation Server.
34)
35)

************************Job Handling*****************************************

1) How do you handle Job Schedule Programatically?


We can do Job Schedule Programmatically using 3 function modules:
Job_Open – Opens a job. Export Parametes – Job Name, Import Parameter – Job No.
Job_Submit – Inserts a prog into the Job. Export Parametes – User, Job name, Job no, Report
prg.
Job_close – Closes the job. Export Parametes – Job name, Job no, dt & time, st Immed if req. &
only Import Parameter –Job Released.

2) What are the parameters to pass in Job Scheduling?


Job Name, Job number, User name, Program name, Variant, date & time.

3) How do you handle Events in Job Scheduling? Using EVENT_BP_RAISE event.


4) How do you know whether a program is running in the background or foreground?
you can check system variable, sy-batch during runtime. If it is 'X' it means the program runs in
background.
In my application a program can executed either in foreground or in background. when the
program is executed in the foreground , I dont want to execute certain portion of the code.
Similaly, when the job is executed as a background job,I dont want to execute certain portion of
the code. Is it possible? If yes, tell me how can you do it?
Use a simple if condition.
if sy-batch is initial.
<portion of code to be run in foreground>.
else.
<portion of code to be executed in background>.
endif.
(OR)
IF sy-batch = 'X'.
Do back ground processing.
ELSE.
Do foreground processing.
ENDIF.
5) If there are any Errors while running in the background, What will happen? Program will get
terminated.
6) Explain the EXPORT and IMPORT commands? How can you pass more than one group of data by
using IMPORT commands?
7) Difference between Logical File Path and Physical File Path?
8)

*********************OOPS***************************************************
1) What is a Class?
Class defines data and the behaviour common to all the objects of certain kind. Here methods
provide the behaviour. We can say classes describe objects.

2) What is Local & Global Class?


Classes can be declared either globally or locally. You define global classes and interfaces in the
Class Builder (Transaction SE24) in the ABAP Workbench. Local classes are defined within an
ABAP program. Local classes and interfaces can only be used in the program in which they are
defined.
3) What is an Object?
It signifies the real world. Technically we can say objects are instances of a class. We can create
any number of objects from a class template. All the objects created have unique identity and
each contain different set of attributes. Objects we create in a program exist only till the
program exists. 
4) How do you create an Object?
First create a reference variable, then create object using that reference variable.
Ex: Class CL_SUB IMPLEMENTATION.
DATA: REF1 TYPE REF TO CL_SUB.
CREATE OBJECT REF1.
Calling a method: CALL METHOD REF1 →ADD. [ADD is a method]
Calling Super class method: CALL METHOD SUPER →ADD.
5) How do you know whether an Object is created or not?
If object is created memory will be allocated to it, else it will be initial.

6) How do you create a Sub Class?


In SE24, Create a class. Enter the Description of the class and then select the inheritance button 
 , to inherit the super class. Enter the Super Class name. The Attributes and methods defined
in the super class will automatically come into the sub class.   If you try to redefine or modify the
super class method, go to the Methods tab, select the method and click on "Redefine" button.

7) What is Instance/Static Constructor?


Instance constructor is used to initialize instance variables. Static constructor is used to initialise
static variables.
8) Do you explicitly define static constructor or will it call automatically? It will call automatically.
9) Difference between Instance/Static Attributes, Methods, Events?
Static Methods & Events can access only Static Attributes, Instance Methods & Events can access
both Instance & Static Attributes.

10) How do you redefine a method?


If you redefine a method, you do not need to enter its interface again in the subclass, but only
the name of the method. The reason for this is that ABAP Objects does not support overriding.
In simple terms, it is using same method with different implementations.

11) What is Inheritance? Is Multiple Inheritance allowed in SAP?


Acquiring the properties from one class to another class is called Inheritance. Multiple
Inheritance is not allowed in SAP. To some extent Interfaces are used.

12) What is Polymorphism? Encapsulation?


Polymorphism: The name of method is same but they behave differently in different classes. It
means implementation of method (i.e. body of the method) is different in different classes. It
can be achieved in two different ways in OO ABAP. A) Interfaces. B) Overriding methods or
redefining methods in each class after inheritance.
Encapsulation: [ Hiding data is called Encapsulation[showing only relevant data]].
Through encapsulation we restrict the visibility of attributes and methods in the object. There
are three levels of visibility in OO ABAP. 1)Public. 2) Protected. 3) Private.
Public, Private, Protected.
All of the components declared in the public section are accessible to all users of the class, and
to the methods of the class and any classes that inherit from it.
All of the components declared in the protected section are accessible to all methods of the
class and of classes that inherit from it.
Components that you declare in the private section are only visible to the methods of the same
class.

13) What is Interfaces?


Interfaces are similarly defined as classes. They also contain attributes and methods. But
interfaces do not have implementation part. Their methods are implemented in the class that
implements the interface.
So we provide different implementation to the methods defined in the interface in different
classes that implements that interface. This way polymorphism is achieved. 
Interfaces are listed in the definition part of the class, and must always be in the PUBLIC
SECTION. All methods of the interface must be present in the implementation part of the class.
Create: Go to SE24, Enter Interface name starts with ZIF. Enter a method name & provide
Parameters for this method. Save, Check, Activate. We cannot implement the method of this
interface. Provide the name in the class in Interface tab. Then go to the methods tab. Then we
can see the interface method name in the class method. Then double click on the method then
write the logic.

14) How do you handle Events?


First register the Event using SET HANDLER statement.

15) Is it possible to create a constructor under a subclass? Yes.


16) How do you access Static Instance? Using Class name.
17) What is Garbage Collector?
It removes objects automatically when the object is no longer referenced.

18) How do you force Garbage collector to remove an object? Using Flush statement.
19) What is Abstract Class? Use?
Classes which contain one or more abstract methods or abstract properties, such methods or
properties do not provide implementation. These abstract methods or properties are
implemented in the derived classes (Sub-classes).  Abstract classes does not create any instances
to that class objects.
Use: We can define some common functionalities in Abstract class (Super-class) and those can
be used in derived classes (Sub classes).  
Creating Abstract Class. When you create a Class Select the Abstract from Instantiation Drop
Down List to define the class as abstract class.

20) What is Final? Use?


Class that is defined as final class cannot be inherited further. Also, a final method cannot be
redefined further. If only a method of a class is final then that class can be inherited but that
method cannot be redefined.
Use: If you don't want anyone else to change or override the functionality of your class then you
can declare it as final. Thus no one can inherit and modify the features of this class.  
In SE24 create a class & select the Check box Final to define the Class as Final Class.
To make a method Final: Define a method in a Class In Menu path Goto Method Definition. In
the Attributes Tab check the Checkbox Final & press change button.

21) What is Super?


Super is the key word used to represent the super class of a class in oops, you can access the
methods and attributes of the super class using this word Super.

22) Can we achieve everything using OOPS? Yes.


23) Can we achieve everything using Function Modules? No.
24) What cannot be achieved using Function modules & can be achieved using OOPs? Methods.
25) Name some of the Standard Classes you used?
CL_GUI_GRID_CONTROL, CL_GUI_CUSTOM_CONTAINER.
26)

***********************Reports & ALV*************************************************


1) What is Classic, Interactive Reports? Difference between them? Have you worked on?
In Classic Report we display output in one detailed & Extensive list.
In Interactive Reports, rather than displaying in one single list we can create an overview basic
list then we can show the detailed information in detail lists. We can create one basic list & 20
Detail/ Secondary Lists.

2) What is Selection Screen, List, Dialog Screen?


These are 3 types of screens in ABAP. Selection screen is for Input. List is for Output. Dialog
screen is used for both Input & Output.

3) What is Select-options, Parameters?


We can define SELECT-OPTIONS when client want the user to enter a range of values.
& Parameters, we can enter only single values.

4) What is Ranges? Have you used them? What is the use?


5) Difference between Ranges & Selection Table?
Here both SELECT-OPTIONS & RANGES works for the same purpose.  They both are used for the
range selection from selection screen.  The main diff. between them is, while we use SELECT-
OPTIONS system implicitly creates the select options internal table which contains the fields of
SIGN, OPTION, LOW & HIGH.  But in case of RANGES, this internal table should be defined
explicitly, because ranges doesn't show on the selection screen, you will have to fill it yourself.
We have to explicitly define the internal table with the above fields.
Ex: http://www.sap-img.com/abap/difference-between-select-options-ranges.htm

6) If you want show 2 Radio buttons in the same line in selection screen, what will you do?
Enter 2 radio buttons between SELECTION SCREEN BEGIN OF LINE…END OF LINE.

7) What is ALV?
ALV is ABAP List Viewer. It is a tool used to display the report output. It is used to enhance the
readability & functionality of the report output.

8) Difference between ALV List & ALV Grid?


a)ALV List gets generated by calling function module: REUSE_ALV_LIST_DISPLAY.
ALV Grid gets generated by 2 methods: By calling function module : REUSE_ALV_GRID_DISPLAY
By using (OOPS) concept i.e. to place a Custom Container on module pool screen.
b) Only one ALV List can be shown on report output screen. More than one ALV Grids can be
displayed (By using 2 or more custom container on same module pool screen).
c) ALV List is not used for editing. It can only display the data. ALV Grid can display as well
modify / edit the output data.
d) ALV List uses relatively lesser memory area which is same as normal output of report. ALV
Grid uses ActiveX control which consumes higher memory of presentation server. 

9) What is SLIS? What does it contain?


All the definitions of internal tables, structures & constants are declared in a type-pool called
SLIS.
10) What are Events used in Reports?
INITIALIZATION, AT SELECTION-SCREEN OUTPUT, AT SELECTION-SCREEN, START-OF-SELECTION,
END-OF-SELECTION, TOP-OF-PAGE, END-OF-PAGE, AT USER-COMMAND, AT LINE-SELECTION,
TOP-OF-PAGE DURING LINE-SELECTION.

11) What is New page, Reserve Statement?


To program unconditional page breaks we use new page. For conditional page breaks we use
Reserve statement.

12) How do you handle screen attributes dynamically?


We handle it in AT SELECTION-SCREEN OUTPUT Event. Loop through the screen, make necessary
changes and modify it.

13) What is the use of Hide, What is Get Cursor, Set Cursor statements?
Get Cursor: Used to find out the position of the cursor where the action has occurred.
Set Cursor: Used to place cursor on a input field.
Hide: It stores the values between lists in interactive reporting.

14) Mention some of the system fields used in Interactive Reports?


SY-LSIND – it stores the Index of the List created.
SY-LISTI – it stores the detail list number where user last interacted.
SY-LILLI – it stores the line number where user last interacted.
SY-LISEL – it stores the content of the line where user last interacted.

15) Up to how many Secondary Lists you can create? 21. 1 basic list & 20 secondary lists.
16) Can we move from one list to another list for ex: from 19 th List to 3rd List? Where do you write
the code? Yes in AT LINE-SELECTION Event.
17) Where do you handle Detail Lists Page Headings? In TOP-OF-PAGE DURING LINE-SELECTION
Event.
18) If you want to print Page numbers in Interactive Reports, How do you handle it?
19) Difference between Function Module & Subroutine?
Function modules are defined in Function group & can be tested independently. Subroutines are
defined in programs & cannot be tested individually, it has to be included in a program to test.

20) Difference between [OOPs] Classes & Function Modules?


Classes are more secured compared to Function Modules. How it more secure – we have Private
sections in class. If we don’t want someone to reuse our code we can define it in private section.

21) What are the steps for displaying ALV using OOPS?
Add a Custom Control Area on to the screen & give it a name. Declare the Custom Control name
added on the screen. Create Custom Container, ALV Grid Instance reference variables.
In PBO Event, We will check whether Container exits / not, if it exists we refresh it else we will
create it.
If ALV Grid is initial then create Custom Container Instance & pass Custom Control name.
Then create ALV Grid Instance & pass Custom container object. It will create a link between ALV
Grid & Screen.
Then call method SET_TABLE_FOR_FIRST_DISPLAY to display the output.
Parameters for SET_TABLE_FOR_FIRST_DISPLAY method:
I_STRUCTURE_NAME – Name of the Data Dictionary Table.
I_SAVE – for saving layout.
IS_LAYOUT – determines the properties of the GRID control.
IT_TOOLBAR_EXCLUDING - This table contains function codes of the toolbar that you want to hide for
the lifetime of the ALV Grid Control. The function codes are constant attributes and are prefixed with
MC_FC_.
IT_OUTTAB – Output table with the data to be displayed.
IT_FIELDCATALOG – Determines the structure of the output table and the format of the data to be
displayed.
IT_SORT – Table with sort properties for columns.
IT_FILTER – table with filter properties for columns.
[[[[[[[[[[As a control object, ALV Grid instance requires a container to be linked to the screen. Generally,
an instance of the class “cl_gui_custom_container” is used for this purpose. To create a custom
container instance, we need a custom control area on the screen.]]]]]]]]]]]]]]

22) Have you worked on OOPS? Did you create your own Classes / used Standard Classes? Mention
some of the classes you used? I used Standard Classes. CL_GUI_ALV_GRID.
CL_GUI_CUSTOM_CONTAINER.

23) What is Field Catalog? What are the ways of generating a Field Catalog? Parameters in FCAT?
Field Catalog is used to define Column properties. There are 3 ways of generating a Field catalog.
Fully Automatic, Semi Automatic & manually.
Fully Automatic, if our List Structure is similar to a Dictionary Table, we just pass the name of
the Dictionary Table to the parameter I_STRUCTURE_NAME of SET_TABLE_FOR_FIRST_DISPLAY
method.
For manual – we just fill the Internal table manually for the fieldcatalog.
Ex: CLEAR ls_fcat .
ls_fcat-fieldname = 'CONNID' .
ls_fcat-outputlen = '3' .
ls_fcat-coltext = 'Connection ID' .
APPEND ls_fcat to pt_fieldcat .
Semi Automatic. Ex: Suppose you have 100 fields in a table & you need to display only 90, then
we can generate a Field Catalog using LVC_FIELDCATALOG_MERGE Function Module. After
getting the generated field catalog, we loop at it and change whatever we want & Modify
the Field Catalog.
Parameters in Field Catalog:
Field Name – Use this to assign a Field Name to your output.
CheckBox – Outputing a Checkbox.
COL_POS – It places the field where the column position is specified.
DO_SUM – It calculates the total for the specified Column.
NO_OUT – It will not output the column.

24) What is Layout Structure? Parameters in Structure?


Layout Structure defines general appearance of the ALV Grid. We fill a structure of type
LVC_S_LAYO. Properties of Structure:
SMALLTITLE – The title size is set to the font size of the column header.
GRID_TITLE – Title between Grid Control & Toolbar.
NO_HEADERS – Columns headings are hidden.
NO_MERGING – Cells are not merged when a column is sorted.
NO_TOLLBAR – The toolbar is hidden.

25) How to Disable Buttons in the Toolbar?


26) How do you Delete/Exclude unwanted Standard Function Buttons?
To hide the entire toolbar, you can set the field “NO_TOOLBAR” of the layout structure to ‘X’.
In your list, you may want to exclude some of the standard function buttons since they are
not useful for your list. To exclude those buttons, you fill a table of type “UI_FUNCTIONS”
and pass it to the parameter “IT_TOOLBAR_EXCLUDING” of the method
“set_table_for_first_display”. [UI_FUNCTIONS]This table contains function codes of
the toolbar that you want to hide for the lifetime of the ALV Grid Control. The function codes
are constant attributes and are prefixed with MC_FC_.
Names beginning with “MC_FC_” are names for functions directly and the names beginning with
“MC_MB_” are for the function menus.
Ex: data : pt_exclude type ui_functions.
CALL METHOD gr_alvgrid->set_table_for_first_display
EXPORTING
i_save = 'A'
is_layout = gs_layout
IT_TOOLBAR_EXCLUDING = pt_exclude
FORM DELETE_UNWANTED_BUTTONS .
ls_exclude = cl_gui_alv_grid=>mc_fc_maximum.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_minimum.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_subtot.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_average.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_mb_sum.
APPEND ls_exclude TO pt_exclude.

27) How do you create Custom Button in the Toolbar/ To add new functional buttons to the ALV
toolbar? / How do you handle Events in ALV?
Use Class LCL_EVENT_HANDLER & declare a method for event. Create an Object for the Event &
register it using SET HANDLER method. In the method handling the “toolbar “event ,we define a
new button by filling a structure and appending it to the table attribute “mt_toolbar” of the
object to whose reference we can reach via the parameter “e_object” of the event.
Sample Code:
CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid IMPORTING e_object e_interactive.
CLASS lcl_event_handler IMPLEMENTATION . *Handle Toolbar
METHOD handle_toolbar.
PERFORM handle_toolbar USING e_object ."e_interactive .
ENDMETHOD .
start-of-selection.
DATA gr_event_handler TYPE REF TO lcl_event_handler .
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
*--Registering handler methods to handle ALV Grid events
SET HANDLER gr_event_handler->handle_toolbar FOR gr_alvgrid .
FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set .
DATA: ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
* MOVE 3 TO ls_toolbar-butn_type.
* APPEND ls_toolbar TO i_object->mt_toolbar.
* CLEAR ls_toolbar.
MOVE 'COL' TO ls_toolbar-function. "#EC NOTEXT
MOVE icon_display_text TO ls_toolbar-icon.
MOVE 'Color' TO ls_toolbar-quickinfo.
MOVE 'Color' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
APPEND ls_toolbar TO i_object->mt_toolbar.
CLEAR ls_toolbar.
ENDFORM . "handle_toolbar

28) How do you handle dynamically Editable/Disable in ALV Grid?


29) How to enter or hide a Column in ALV Grid?
30) How do you add Checkbox, Icon in ALV Grid?
In Field catalog we have Checkbox & Icon parameters. Enter X to those parameters.
Sample code:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
ls_fcat-icon = 'X'.
31) How do you handle subtotals in ALV?
32) How do you handle selecting records/How do you select Rows, Columns, Cells in ALV Grid?
33) How do you color Rows, Columns, Cells?
To make an entire column be painted with the color you want, you can use the
“emphasize” option of the field catalog.
To enable row coloring, you should add an additional field to your Internal table. It should
be of character type and length at least 4. Pass the name of the field containing color codes
to the field “INFO_FNAME” of the layout structure.
To Color an individual Cell, Include a structure of type LVC_T_SCOL.

34) How do you handle F4 help in Reports?


Call Function Module ‘F4IF_INT_TABLE_VALUE_REQUEST’.
Ex: data : begin of itab occurs 0,
matnr type mara-matnr,
end of itab.
select matnr into table itab from mara.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'P_MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_MATNR'
value_org = 'S'
TABLES
value_tab = itab
return_tab = it_return
35) What are Variants?
36) How do you create Authorization Checks in Reports?
37) Types of messages? WISAXE.
38) What is Check point, Watch point?
39) How do you reduce the execution time of a program?
40) I have 2 radio buttons with 2 fields each on selection screen.My requirement is like if click on 1st
radio button the second radio button field should be disabled and and vice versa.How can i do
that?
41) Start of selection event triggers automatically when we run a program so y do we need to use it
explicitly?
42) Why do we use END-OF-SELECTION event?
In an executable program without logical data base, there is no need to implement the event
block END-OF-SELECTION.
While retrieving data from LDB - After a program is executed by the user, the database is locked
when it encounters a START-OF-SELECTION statement and the lock is released when an END-OF-
SELECTION statement is encountered (to maintain the consistency). Data selection is done
between START-OF-SELECTION and END-OF-SELECTION. Now if we don’t write the END-OF-
SELECTION statement, the database will remain locked till the programs get terminated. Hence,
the performance will be reduced. So it is always good practice to write END-OF-SELECTION
statement after finishing the data selection from database.

*******************DP or MPP***************************************************
1) Have you worked on MPP? Why DP cannot be run alone?
Req is displaying SO number, SO item, new bay location & old bay location from customized
table & making the new bay location field editable. Whenever the user enter a value in new bay
location, the existing value need to be update in old bay location & new values has to be
updated in new bay location automatically when it is saved. Ex: 100 & 200. ABAP Syntax.

2) Difference between interactive and module pool program? 1 main diff in real time?
Write statement cannot be used in MPP.

3) What are the events used in DP? PBO, PAI, POH, POV.
4) What are the types of screens in DP? Normal, Subcreen, Modal Dialog Box.
5) What is the use of Field Statement, Chain…EndChain? Or How do you Validations in Dp?
For validating our own fields we use Field statement. Chain…EndChain will protect Screen
attributes. Automatic checks are available while processing screen when using Dictionary
objects.
6) What is Call Mode?
Sequence of related screens is called Call mode.
7) What is Subscreen? Tabstrips? Have you worked on it? Syntax of both?
8) How do you handle screen attributes dynamically? Where do you handle?
In PBO Event, Loop through the screen, make necessary changes & modify.

9) Have you worked on Table Controls? Table Control Syntax?


Yes. CONTROLS: <cntrl> TYPE TABLEVIEW USING SCREEN <scrn num>.

10) What is Top_Line, Current_Line, Lines, Fixed Columns in Table Control?


Top_Line – The line which is at the top of the TC. We can set using TC-Top_Line = 10.
Current_Line – The processing record of the TC will be the current line.
Lines – Total number of rows.

11) How do you control selecting records in DP?


12) How do you handle Enabling & Disabling Fileds/Columns in Tablwe Control?
13) What is Call Screen, Set Screen, leave Screen, Leave to Screen 0, Leave to Screen Srnno, Leave
List Processing, Leave To List processing.

*******************Enhancements************************************************

1) What is Enhancements? Have you worked on it?


Adding additional logic to Standard SAP Applications without having to modify it. Yes.

2) What are User Exits? How do you find it? Name some of the User Exits you used?
User Exits are empty subroutines that SAP developers provide us to add additional functions to
the standard sap applications. User Exits are considered as modifications. We need access key to
modify. User Exits are specially designed for SD.
Finding User Exit: Go to SPRO transaction code – Click on IMG – Choose SD – System
Modifications – User Exits.

3) What are Customer Exits? Types? How do you find Customer Exits?
Adding additional logic to Standard SAP Applications without having to modify it. There are 3
types: SAP creates Customer exits for specific programs , screens , menus within std applns.
i) Function module Exits: adds Functions to r/3 apllns.
ii) Menu Exits: add items to the pulldown menus in the std apllns.
iii) Screen Exits: adds fields to screens in r/3 apllns.
Finding Customer exits: 2 ways:
a) One way is through development class.
Go to Program & find the Package name. Go to SMOD, enter Package name & we get all
the Customer Exits. Copy the suitable Exit. Go to CMOD, create a project & assign the
Exit to the project & Implement.
b) Other way is using call customer function.
Go in Debug mode, use Breakpoint at Statement from Menu option & Enter Call
Customer Function & Execute. You get the appropriate Exit.
4) What is BADIs? Types? How do you find BADIs? What is Single & Multiple use, Filter BADI?
BADI [Business AddIns]: Add-ins are points in objects source code where additional functions or
statements can be inserted.
2 types of BADI: Normal & Filter.
Normal BADI, we have single use & multiple use.
In single use, A BADI can be implemented only once.
Multiple Use: A BADI can be implemented more than once.
Finding BADI: 2 ways:
One way is through development class.
Other way is using cl_exithandler class. Go to SE24, Enter cl_exithandler - click on get
instance method, put a breakpoint & run your aplln, you will find the accurate BADI Definition.
And you can implement in SE19 transaction code.

5) Can you create your own BADI Definitions? Yes in SE18 we can create.
6) Where do you implement BADIs? In SE19.

7) When you find BADI through CL_EXITHANDLER class, if you get 10 BADIs then how do you
choose which one is suitable?
Check the Import & Export Parameters.

8) What is Enhancement Framework? Types? How do you find?


Enhamcement framework is from ECC 6.o onwards. 2 types of enhancement FW: Implicit &
Explicit Enhancement.
In Implicit Enhancement, You can write code in Predefined places in the program.
In Explicit Enhancement, We explicitly define in SE19 transaction code.
Finding Enhancement FW: In ECC 6.o u have a spiral button on top of the aplln . click that. & in
menu option u have enhancement option click that. You will find all the options in the aplln
where u can insert your code. To Implement an implicit enhancement create ‘Enhancement
Implementation’ on the required enhancement point. Click on code button to create code
implementation. It will create ENHANCEMENT & ENDENHANCEMENT tags, between that you
write your code & activate.

9) Difference between Implicit & Explicit Enhancements?


In Implicit Enhancement, You can write code in Predefined places in the program.
In Explicit Enhancement, We explicitly define in SE19 transaction code.

10) Difference between Customer Exit & User Exit?


User Exit, access key is required. Customer Exit we don’t require any access key.
User Exit is specially for SD Module. Customer Exit is for all modules.

11) Difference between BADI & User Exit?


The main diff 
1) bet BADI and USEREXIT is that in USEREXIT u code in the standard SAP program, hence
any updation in the version of the standard program will lead to the loss of ur coding. But same
is not the case of BADI. Here the code remains outside the standard program.
2) USer exits will have only one project and one implementation. But for Badi you can have
multiple projects and Filter according to user input you can access different Implemetations.
12) What will happen if we use Exit in Enhancements?
Exit is not recommended to use in Enhancements. Suppose if you use Exit after your code in
User Exit, the other code by other developers will not get executed & it will come out of the
Include.

*******************SmartForms & Scripts*******************************************


1) Difference between SmartForms & Scripts?
a) SF’s are Client Independent. Scripts are Client dependent.
b) Multiple page formats are possible in SF’s. Not possible in Scripts.
c) Bg Images can be handled in SF’s. cannot be handle in Scripts.
d) User Interface in SF’s is more compared to Scripts.
e) Main window is not required in SF’s. At least one main window is required in Scripts.
f) Print program is not compulsory in SF’s. It is compulsory in Scripts to display.

2) Have you worked on Smart Forms/Scripts? Yes.


3) How multiple page formats can be achieved?
Go to SPAD txn code & create your own page settings & call them [F4] in your SF.

4) How do you handle background image handling?


In the main page we have Background Image tab, there you select your image.

5) How do you handle Page protection? Create a Folder & drag all the nodes into it which has to be
page protected. & Check the CheckBox Page protection.

6) Difference between Table & Template?


Table is dynamic – it increases size dynamically. Template is static – extra things will be
truncated.
7) How do you handle your own Page height & width? In SPAD txn code.
8) How do you handle subtotals in SmartForm?
9) How do handle Page numbers?
10) How do you send a SmartForm to Mail? Using SO_SEND_MAIL_AP11.
11) What is Text Element, Standard Text?
12) How do you upload logo? In SE78.
13) How do you Debug SmartForm & Script?
Using SFTRACE (or) put a break-point in the node which you have to debug.

14) What are Control Commands?


15) How do you call New Page? In Command node, you have a checkbox New-page check that.
16) What are the Function Modules available in Scripts?
17) Difference between Control_Form & Start_Form?
18) Can we create a SmartForm without a Main Window? Why do we create? Yes.
19) How do you transport SmartForm & Script from one client to another client?
SF is transported same as other objects.
20) How do you make sure that both, the SMARTFORM & it's function module gets transported? Or
does the FM with same name gets generated automatically in the transported client?
21) I have created a form with my own driver program,but, when im executing the driver program it
is giving "form is not in original language EN & has no errors" How can i correct it?
22) How do you assign SAPSCRIPT/FORM to Driver Program? How to modify standard Script Driver
program?
23) How do you assign a print program to a script?

*******************Webdynpro ABAP **************************************************

1) What is cardinality in WebDynpro ABAP?

Cardinality is a property which specifies how many records that can be stored in a node

3 )What is collection cardinality in WebDynpro ABAP?

It specifies how many records that can be stored in a node

4)What is MVC in WebDynpro ABAP?

Basically WebDynpro follows MVC M-Model(Business logic ) V-View(Screen) C-


Controller( Controls screen and Model)

5)What is a context in WebDynpro ABAP?

Context is a temporary place which stores data in the form of nodes and attributes.

6)What are the controllers available in WebDynpro ABAP and explain?

View Controller.

Window Controller.

Component Controller.

Interface Controller.

Custom Controller.

7)How to navigate from one view to other in webdynpro ABAP?

In webdynpro we can navigate from one view to another view using inbound and outbound
plugs

8)How to share data between view ? Is there any way other than component controller?

By using Component Controller and we can Pass data through plugs also
9)Difference between ABAP & Webdynpro ABAP applications?

ABAP applications are traditional GUI applications which runs on SAP GUI.

Web Dynpro applications are SAP web based applications which runs on web browser.

10)Difference between DDBK & DDBI in web dynpro ABAP?

DDBK(Drop Down by Key) is an UI element through which we can display domain fixed values in
the form of drop down.

DDBI(Drop Down by Index) is an UI element through which we can display any values in the
form of drop down.

11)Under which circumstances you will use DDBK & DDBI?

DDBK(Drop Down by Key) is used when we have fixed values for domain and when we know no
of drop down values at design time.

DDBI(Drop Down by Index) is used when we don't know no of drop down values at design time
and when we know them at run time only.

12)What are Events for Table, DDBK, DDBI, Itemlistbox?

Events for Table : onColSelect, onCustomFilter, onDrop, onFilter, onLeadSelect, onScrool,


onSelect and onSort.

Events for DDBI:- onSelect.

Events for DDBK:- onSelect.

Events for ItemListBox:- onDrop and onLeadSelect.

13)Can you bind id property for any UI Element with an attribute?

No. We can not bind ID property on any UI element in web dynpro for ABAP.

14)How many types of cardinality are there in web dynpro ABAP?

In web dynpro we have two types of cardinality.

1. Collection cardinality.

2. Selection cardinality.
15)What is selection cardinality & collection cardinality?

In web dynpro we have two types of cardinality.

1. Collection cardinality: It specifies how many records that can be stored in a node.

2. Selection cardinality : It specifies how many records that can be selected from a node.

16)Which combination of collection cardinality, the selection cardinality is not applicable?

Collection cardinality : 0-n with 1-1 or 1-n selection cardinality are not applicable.

17)What is context binding? Or Data binding?

Mapping the UI element property to the context attribute or node is called context mapping or
data binding.

18)What is context mapping? How many types? What are they?

Mapping the context of different controllers is called as context mapping.

In web dynpro ABAP we have two types of context mappings

1.Internal Context mapping.

2.External Context mapping.

19)What is internal context mapping?

Mapping the context of different controllers within the same component is called as internal
context mapping.

Ex: Mapping component controller context to view controller context.

20)What is external context mapping?

Mapping the context of different components (component controllers) is called as internal


context mapping.

Ex: Mapping component A's component controller context to component B's component
controller context.

21)Can we use data element & data type for context attributes?
Yes..We can use either data element or data type for context attributes.

Ex: We can create attribute with data element MATNR and we can create attribute with data
type CHAR10

22)Architecture is applicable in WDABAP apps?

Web dynpro ABAP follows MVC (Modal View Controller) Architecture.

23)What is MVC Architecture? explain?

Web dynpro ABAP follows MVC (Modal View Controller) Architecture.

Here M - Modal - actual business logic ex: calling Function modules, class methods etc

V - View - View is nothing but screen with UI elements that holds data.

C - Controller - This is responsible for communication between modal and view.

The main advantage of MVC is for better readability and re-usability

24)Can we embed one view in another view? How?

We can embed view in another view by using view container UI element.

ViewContainerUIElement : is an UI element which holds views.

25)What is purpose of "wd_This" in web dynpro ABAP ?

wd_this : is the instance on current controller, all methods and attributes in that controller can
be accessed by using this instance

26)What is purpose of wd_context ?

wd_context: is the instance of root context, technically all the node and attributes and sub-
nodes and sub-attributes for this, we can only access nodes and attributes using this root
context instance.

27)What is purpose of "wd_Comp_controller" in web dynpro ABAP?

wd_comp_controller: this is the instance of component controller, we can access all methods
and attributes in component controller with this.

28)How to navigate from one view to another view?

We can navigate from one view to another view using view plugs.
29)How to transfer data form one view to another view?

We can transfer data between two view in two ways.

1. Uisng component controller.

2. Through plugs.

30)What is navigation link in view plugs?

Navigation link is a link between outbound and inbound plugs, which is used to determine
target view of an outbound plug.

31)What is purpose of component controller? Different between view controller and


component controller ?

Component controller is a global controller, the data declared in this can be accessed by all
views and window in that component.

View controller is a local controller for that view, can not accessed by other controllers

31)What is lead selection in web dynpro abap? Is it an event?

Yes , the lead selection is an event in Web Dynpro ABAP.

At run time a context node may contain many records , but only one of those is selected .

The user can select any record from the Table/ALV/Drop Down/Radio and this selection is called
lead selection.

32)Can you use multiple layouts in one view in web dynpro ABAP?

Layouts can be assigned at the container level.

For example, you define the layout for your view at the ROOTUIELEMENT container level.

So if at all you want to use multiple layouts in one view, you can create multiple transparent
containers and assign different layouts to them.

33)Can you call one web dynpro application from another webdynpro application? explain ?

Yes, it is possible to call web dynpro application from other web dynpro application, to call a
web dynpro application first we need to get URL of the application using
cl_wd_utilities=>construct_wd_url method, and you need call url using
create_external_window method of IF_WD_WINDOW_MANAGER .
34)Can you create a T-code for Web dynpro Application?

Yes, you can create a T-code for web dynpro application. Go to SE93 , create Tcode, choose the
last option and maintain values. Check tutorial at :
https://www.sapnuts.com/tutorials/Creating-T-code-for-Web-Dynpro-ABAP-application.html

35)Can you run a Web dynpro Application in background?

This is a silly question to ask but it can check your knowledge on web dynpro ABAP, technically
it is possible to create background job for web dynpro application .

36)How to integrate ALV in Web Dynpro ABAP ? explain ?

Below is the process to integrate ALV in Web Dynpro ABAP.

Add SALV_WD_TABLE to the used components

Create a node in component controller

Pass data to node

Insert ViewContainer UI element in View

Embed interface view ‘TABLE’ into that ViewContainer UI Element

Map node to interface node Data

37)How many maximum number of rows can be visible at a time in web dynpro ALV ?

Maximum of 1000 rows can be visible in Web Dynpro ALV at a time .

Note : Web Dynpro ALV can handle millions of records but it can display maximum of 1000 rows
in screen.

38)What is the default number of rows displayed in web dynpro ALV ?

By default Web Dynpro ALV displays 10 rows


39)Tell me any five UI elements which you worked on in Web Dynpro ABAP ?

Input Field, Table, Button, Label, Interactive Form, ViewContainer, DDI, DDK etc

39)What is interface controller in Web Dynpro ABAP ?

Interface controller is a controller which is responsible for communicating with external web
dynpro components.

40)How to integrate Select-Options in Web Dynpro ABAP ?

To integrate Select-Options in Web Dynpro ALV, add standard component


‘WDR_SELECT_OPTIONS’ to the used component list and go to WDDOINIT and follow the
below steps .

Instantiate the select options

Instantiate the selection-screen using INIT_SELECTION_SCREEN method

Create range table using CREATE_RANGE_TABLE method

Add selected fields using ADD_SELECTION_FIELD method

Create a ViewContainer UI element and insert interface view ‘WND_SELECTION_SCREEN’


into it

41)What are the methods used for integrating Select-Options in Web Dynpro ABAP ?

We use below methods to integrate Select-Options in Web Dynpro ABAP.

INIT_SELECTION_SCREEN to initialize Select-Options screen

CREATE_RANGE_TABLE to create range table

ADD_SELECTION_FIELD to add a Select-Option to selection screen

42)How to display message in web dynpro ABAP ? Explain ?

We can display error, warning, success, attribute error etc messages in Web Dynpro ABAP using
interface IF_WD_MESSAGE_MANAGER, when we raise messages using
IF_WD_MESSAGE_MANAGER, the messages will be displayed in Message Area UI element, by
default Message Area UI element is at the top of the screen.

43)How to get Web Dynpro application URL dynamically ?

Web Dynpro Application URL is different in Development, QA and Production systems, we need
to use CL_WD_UTILITIES=>CONSTRUCT_WD_URL ( ) method to get URL dynamically.

44)What is service call in Web Dynpro ABAP ? What is the purpose of it?

Service call is Wizard based tool, call an existing function module or methods of an existing class
within a Web Dynpro component.

When we use service call context nodes and a web dynpro method will be automatically
created as per the Function Module/Class method parameters.

45)What is a purpose of Interactive form UI element in Web Dynpro ABAP ?

InteractiveForm is an UI element in Web Dynpro ABAP, you can insert a PDF document into a
view using InteractiveForm UI element.

46)What are the advantages of using Adobe forms in Web Dynpro ABAP apps?

Below are the general advantages of Adobe form in SAP

1. Flexible tool for designing the form(WYSIWYG Editor)

2. Graphics can be included in the form directly. No conversion is required.

3. Different page orientation like in smartforms

4. Existing PDF or word document can be imported

5. Barcodes can be printed on all printers of types Postscript, PCL, PDF, or Zebra

6. Form are regular repository objects and has version management

7. Forms can be integrated in the browser based environment and made interactive.

47)What is View Controller in Web Dynpro ABAP ?


View Controller: is a controller which is responsible for processing actions performedby a user
in that View.

Each view has exactly one View Controller, which processes the actions performed by the user
in the view.

A view also has exactly one view context, which contains the data required for the view.

A view controller and the corresponding context exist at least as long as the view is visible in the
browser.

48)What is the purpose of creating an "Application" for Web Dynpro component?

Web Dynpro application creates link between Web Dynpro Component and browser, it is used
to execute/test a Web Dynpro Component and it is the final link which user use to
process/execute the business applications.

49)Can we use multiple web dynpro components under one project?

Can't you create multiple ABAP programs under one project ? Yes, you can create multiple Web
Dynpro applications under one project

50)What is an empty view in Web Dynpro ABAP ?

The empty view is a special type of view. It is always generated automatically in a window or a
view set area, provided that no view has been embedded manually. It may also be preferable to
embed an empty view in a non-empty window as well. Just like a normal view, the empty view
occupies a certain area of a window at runtime and can be used to hide a different view, for
example, using specific controls.

When you create an empty view, an inbound plug with the default name ShowEmptyView is
created

51)Different between node & attribute in Web Dynpro ABAP ?

Node : is a collection of attributes.

Attribute : is a variable which stores single value at atime


52)How to provide multi select functionality for table UI element in Web Dynpeo ABAP ?

You can provide multi select functionality for a Web Dynpro table by binding a node with 0-n or
1-n selection cordiality.

*******************RealTime*****************************************************
1) What is the Landscape in your company?
We have 3 servers – Development, Quality, Production Servers. In development Server we have
2 clients – 1 is for development. The other is for testing. Dev Client no – 50, Test client no -150.
We will have test data in Testing Server not in development server. All the objects will be
present in both clients, SAPScripts has to be transported using SCC1 tcode.
[These all are different in different companys].

2) How do you transport Objects?


Usually we don’t transport objects, transporting will be done by Basis Team. We can check the
status in SE09 tcode.

3) Role of ABAPer in implementation & Support Projects?


In implementation:
Technical Spec will be sent to mail by PM/ need to download from client’s website. Analyze FS
and prepare TS. Discussing with functional people to understand more about FS/ for any doubts
while preparing TS. Source code development. Code review. Preparing documentation. Send a
mail to Basis team & PM that you have finished developing object & it has to be transported.
In Support:
First you will receive a mail from PM containing all the issues which has to be changed [ticket]/
you need to download from client’s website. Then discus with functional consultant whether
you can do it or not, then you send a mail to Basis team requesting to create a transport request
for your object. Then develop your object & save it in that transport request. Test the object &
send a mail to functional consultant mentioning your TR – [if the object has no errors, he will ask
basis team to transport else he will send back to us if any issues.]. Basis people will release.
[This will differ from company to company].

4) What are the Coding Standards you follow before & after writing Code?
Before writing code: [performance analysis]

SELECT related stuff:

➢ All the keys MUST be mentioned in SELECT SINGLE.?


➢ SELECT * must NOT be used
➢ Aggregate clauses should not be used in SELECT. (viz. SUM, COUNT, ORDER BY, GROUP BY)
➢ CHECK statement is not used in SELECT - ENDSELECT loop
➢ Are all SELECTs coded outside LOOP - ENDLOOP?
➢ Have implanted loops been used instead of implanted selects?
➢ There is no duplicate SELECT statements.
INTERNAL TABLE:

➢ In a where clause have the fields been put in the same order as the existing index ?
➢ In a where clause have the tests which restrict the data most been put in the first position ?
➢ Is the Binary search clause used with the read table statement ?
➢ Has the entire table key been specified in the select clause of the statement which contains
the addition "for all entries in " ?
➢ Have the internal tables been sorted by appropriate keys before being looped at or being
used in a read statement ?
➢ Are all the possible screen validations done.
➢ Clear work areas wherever required?
INTO CORRESPONDING FIELDS OF:

➢ Use clause "INTO TABLE <Internal table>" instead of INTO CORRESPONDING FIELDS OF
TABLE ?
➢ Use the clause "APPENDING TABLE Internal table" instead of APPENDING CORRESPONDING
FIELDS OF internal table
DELETE:

➢ Has the delete where clause been used instead of delete statement inside a LOOP
ENDLOOP ?
➢ Has "delete from internal table" been used instead of deleting the records inside a loop ?
MODIFY:

➢ Has the transporting clause been used along with the 'MODIFY internal table ' statement ?
➢ In case of mass updation has the modify table from tab been used instead of using modify
statement inside a loop ?
FOR ALL ENTRIES:

➢ Use 'FOR ALL ENTRIES' instead of a nested select.


➢ Has the internal table used in the "FOR ALL ENTRIES IN" been checked for emptiness and
sorted?
OTHERS:

➢ Does the program comply with requirements of the Workbench Organizer?


➢ If the development includes BDC, have the user default settings been taken into account
while posting numeric values ?
➢ In programs where file(s) are read from or written to, does the program check for the
emptiness of the file and hence terminate without proceeding further ?
➢ In case of SMARTFORM have all SELECT statements are coded in the INITIALIZATION block
➢ Has all the exceptions are handled during a CALL FUNCTION ?
➢ Appropriate message classes and types used.
Mention what all you remember from this when they ask you. They will not wait till you say all
this- will go for next qtn.
AFTER WRITING CODE:
We use code Inspector – tcode-SCI. It check performance, Security, Syntax Check, User Interface.

5) Tell me about ASAP Methodology?


We have 5 phases:
Initial Planning Preparation. Business Blueprint [Gap analysys comes here[the GAP between the
current org req and the solutions available in SAP]]. Realization [Preparation of FS, TS, coding
will be done]. Final preparation [like end user training, testing]. Go live and Support.

6) What are Tickets? Which tool you use?


Tickets are issues at production server. Will be sent by PM through mail or we need download it
from client’s website. We use clarify tool [amdox company]. We have 3 sevearities: 1[2 hours],
2[2 days], 3[5 days].

7) What are the types of requests in SAP?


Customizing [for functional people – client dependent].
Workbench [for tech. people – client independent] – 2 types [transportable & local workbench
requests].
Transport of copies and Relocations.

8) SD, MM, FI Flows? Transaction codes & Tables?


SD Flow:
First Inquiry [Customer inquires about the material]: tcode-VA11, tables-VBAK & VBAP.
Then Quotation will be sent to the customer. Tcode-VA21, tables-VBAK & VBAP.
Sales order will be generated. Tcode-VA01, tables-VBAK & VBAP.
Then delivery will be done. Tcode-VL01N, tables-LIKP & LIPS.
And invoice will be generated. Tcode-VF01, tables-VBRK & VBRP.
In some companys first invoice will be generated then delivery will be done.
MM Flow:
Purchase requisition will be done in Company. Tcode-ME51, tables-EBAN.
Purchase order will be generated based on Purchase requisition. Tcode-ME21N, tables-EKKO &
EKPO.
Then goods receipt will be issued. Tcode-MIGO,tables-MKPF & MSEG.
Then it goes to FI[Accounts payable]. Tcode-MIRO,tables-BKPF & BSEG.
FI Flow:
Accounts Payable – Company paying to the vendor. Tables- BSIK & BSAK.
Accounts Receivable – Customer paying to the company. Tables-BSID & BSAD.
To maintain these accounts we have GL Accounts. tables-BSIS & BSAS.
FB01 is the tcode for all these.
[[[[[[[[[from SDN
Basically there are 5 major topics/areas in FI,
1. GL Accounting -
related tables are SKA1, SKB1 Master data
BSIS and BSAS are the Transaction Data
2. Account Receivables- related to Customer
All the SD related data when transfered to FI these are created.
Related Tables BSID and BSAD

3. Account Payables - related Vendor


All the MM related documents data when transfered to FI these are created
Related Tables BSIK and BSAK
All the above six tables data is present in BKPF and BSEG tables
You can link these tables with the hlp of BELNR and GJAHR and with Dates also.
4. Special Purpose Ledger.. which is rarely used.
5. Asset Managment
In CO there are
Profit center Accounting
Cost center Accounting will be there.]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]

9) How do you write Technical Specifications? Tell me what all you write in it? Do you prepare
Documentation after developing the Object?
TS is prepared by ABAPer. This contains all the technical details such as starting from designing
selection screen, declarations, all the FM’s used and the processing logic to meet the customer’s
requirement, test cases etc,. Yes we do prepare documentation.

10) What is FS?


FS is the biz req spec doc which is prepared by functional consultant after discussing with END
Users. This is also called as GAP[the GAP between the current org req and the solutions available
in SAP] Analysis document. Note: It is simply a MS word Document which carries the client’s req.

11) What is Code review? Who will do that?


Before we send the code for testing, it should be reviewed first to avoid the frequent changes in
the source code. Code should be reviewed by another team member. The objective of the
source code is to make sure that the custom program should follow both naming and coding
standards.
12) Difference between Ecc 6.o & 4.7?
Webdynpro, WorkFlows, Enhancement framework are not available in 4.7.

13) How do you Logon?


We logon through VPN and connect to client. There we logon to SAP logon system.

14) Will you do Unit Testing?


Yes. utp will be done in 2 ways:-
1)negative testing (gvng wrong i/p & handling errors)
2)positive testing (gvng rght i/p getin rght o/p)

15) Which Object you faced as Challenging?


I was assigned to work on FI Report which I felt challenging & complex because I was new to FI
module, I had to learn the FI module flow & concept to work on that.
16) Which Object you felt Complexity & Difficult?

17) What is Open Purchase Order, Open Sales Order, Open Delivery, Open Invoice, Open Items?
Open purchase – SO is not generated.
Open sales order means not delivered to the client.
Open Delivery – Items are delivered to the client but not yet invoiced.
The open invoice is the value of the billing document items which have not yet been forwarded
to accounting.
The open items represent documents that have been forwarded to accounting but not yet
settled by the customer.

18) What is Client?


Client is the top most hierarchical object in SAP.
19) What is development Class? & who will create it?
Development is nothing but a package where we save all our objects. It will be created by us/
client if the project is more secured.

20) How do you transport Variants, Text elements from one server to another server?
These has to be transported explicitly.

21) Whom do you communicate for the issues or major info about FS?
To the Functional consultant who prepared FS.

22) When do you communicate with end users?


In the ideal cases, the abapers never communicate to the end users from off-shore. Abaper
often communicate with them from onsite to check the technical feasibility of the user req’s.
Note: sometimes, in support projects, we communicate to understand the tickets(issues) clearly.

23) What is change request?


It is not the different type of transport request no and it is not at all a transport request.
Note: is a change in the req.
The FS for the custom development is called work request and if the specification is changed to
meet the additional req’s then we call changed specification as Change Request.

24) What is issue log?


It is the doc to log all the Issues for which the clarifications required before or at the time of
developing the Technical solution(program). And the same will be sent to the onsite for
resolution.

*************

Debugging

1) Where we use watch point? what exactly watch point means?


IF YOU DEFINE A FIELD NAME IN A WATCH POINT AND YOU RUN YOU PROGRAM, IF THE
VALUE IN THAT PARTICULAR FIELD CHANGES THEN THE PROGRAM HAULT THERE. ITS VERY
MUCH USEFULL FOR DEBUGGING.
2) What is a spool?
THE SPOOL CONTAINS ALL THE PRINTING REQUEST. IT IS A WORK PROCESS IN THE
APPLICATION SERVER. YOU CAN SEE IT IN SPAD T-CODE.

****

Q) There is a BSEG table while fetching the data from it, the sap system is giving short dump due to
unable to hold crores of records what needs to be done in this case?
We have to use index tables (or) views, restrict tables fields.
Q) What is the use of Search Help Exit?
Search help exit is used to fetch data from multiple sources.

https://www.sapnuts.com/faq/what-is-the-event-that-will-be-triggered.html
AMDP :

importing select option in amdp method


CALL METHOD CL_SHDB_SELTAB=>COMBINE_SELTABS
  EXPORTING
    IT_NAMED_SELTABS = t_seltabs(name of field and select option )
  RECEIVING
    RV_WHERE         = v_where.

You might also like