SAP ABAP Interview Question - SAP Consultancy at SC
SAP ABAP Interview Question - SAP Consultancy at SC
About Us
Shop
Cart
Checkout
My Account
Follow Us!
APRIL 6, 2013
ABAP
SAPCONS2
Connect+
SAP Cons
2.1k likes
Like Page
Archives
1/34
9/21/2015
Ans.
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,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.
7. How to debug sapscripts ?
Ans.
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 u vll notice that the print prgm is automatically
diverted to debugging mode.
8. What is partner selection?
Ans. This concept is mainly used in IDOC where u select the partner
profile using Tcode We20 .with Tcode SM59 you create RFC(remote
function call) to create communication link to a remote system.
10. What is occurs in internal table?
Ans. Occurs addition to the Declaration will give initial size to that
table.occur statement allocates 8kb of memory to the internal table.
11. What is page window?
Ans : page window is nothing but a container of a page ,which
uniquely identifies a set of data for example while creating invoice
we create logo window , billing document header window , customer
window , terms and condition window etc
12. What is the difference between scrolling a table horizontally
and vertically..??
Ans: In table control when you scroll a table vertically presentation
server needs to call application server to fetch the next record and
display in the table while in case of horizontal scroll there is no need
to call application server.
13. What are Field Groups?
Ans: A group that combines several fields fewer than one name, at
runtime, the INSERT command is used to define which data fields are
assigned to which field group are called Field Groups. It should always
be a HEADER field group that defines how the extracted data will be
sorted; the fields grouped under the HEADER field group sort the data.
14. List the events in ABAP/4 Language?
Ans: The events in ABAP/4 are load of program ,Initialization,
Selection Screen, Start of Selection, End of Selection, Top of page,
Line selection, User command, End, First.
15.How the values will be passed to RFC Function module
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
December 2014
October 2014
September 2014
March 2014
February 2014
December 2013
September 2013
August 2013
June 2013
May 2013
April 2013
March 2013
Recent Posts
SAP HANA Modelling Views
A Revisit to Calculation Views
SAP HANA Basics Part 5
Reporting on SAP HANA
Hiring for SAP MM & SAP SD
Bangalore Location Walkin
6 Dec
Freshers CV Required ( For
Mumbai Location )
SAP Online/Remote Access
at the most competitive price
in the Industry
Categories
Coffee Corner
Current Openings
2/34
9/21/2015
PassbyValue or Passbyreference?
Ans: always Pass by Value.
RFC is Remote Function call so it cant access the values with Pass
by reference.
16. Buffering concept usage?
Ans: 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
17. Select up to 1 row and select single difference ?
Ans: 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. Where as
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)
18. What are the different buffering methods?
There are two different buffering methods
The system ensures that data transfer between the R/3 System and
the database system is as efficient as possible. To do this, it uses the
following techniques:
Table buffering: The program accesses data from the buffer of the
application server.
Database request buffering: Individual database entries are not read or
passed to the database until required by an OPEN SQL statement.
19. Different types of locks?
v Read lock (shared lock)
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.
v o 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.
v o Enhanced write lock (exclusive lock without cumulation)
Works like a write lock except that the enhanced write lock also
protects from further accesses from the same transaction.
20. CHAIN END CHAIN?
Ans: Chain and end chain are used for multiple field validation in
Module pool programming .It is written inside the screen flow logic.
21.How to Debug RFC Function module?
Ans:
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
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
Interview Questions
JOBS
SAP
SAP ABAP
SAP BASIS
SAP Certification
SAP HANA
SAP Online/Remote Server
SAP Server
SAP Webdynpro
Uncategorized
Tags
ABAP OOPS
Coffee Corner
Enhancement
Framework Interview
Questions JOBS
SAP ABAP
SAP BASIS SAP
SAP
HANA SAP
Certification
Online/Remote
Server SAP Openings
SAP Server
Webdynpro
9/21/2015
posts by email.
Email Address
SUBSCRIBE
4/34
9/21/2015
5/34
9/21/2015
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_k unnr[] IS INITIAL.
* Read the very first entry of the range table and pass it to
* dynpro screen field
*READ TABLE rng_k unnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_k unnr-low.
ENDIF.
ENDIF.
You can use the return table rng_kunnr to populate your own internal
range table with the values entered by the user. Basically here you are
just simulating the work of a select-options parameter by module pool
screen elements.
30.how we can retrive data using secondary index.explain with
simple example
Ans: First create secondary indexes on required fields of a particular
database table.
We can create one primary index and 15 secondary indexes.Once the
respective secondary indexes are created write select queries and
within select queries specify secondary indexes field name with where
clause.
31.How can we handle table control in BDC?
Ans.We can handle table control using line index
Line index indicates which line of Table control is to be use for BDC
transaction
Ex
perform bdc_field using RC29K-AUSKZ(01)
Indicates 1st line of table control is going to be used for transaction
which is Line index of Table Control
32. If i want to execute a BDC program only in background not
in foreground is there any option for this?
Ans.The sm37 transaction can be used for running a program in the
background. Also in the session method while processing the session
you can specify the processing type as background or foreground.
33.How Can We upload a text file having Delimiters in to
Legacy System
Ans.For up loading text file we use the pre-defined FM gui_upload. in
that FM we have the parameter has_field_seperator for that we assign
the default delimiter x.
HAS_FIELD_SEPERATOR X
X can provide the Whatever delimiter we used in flat file for
separation.
34. What is the land scape in sap.
Ans. In every organisation sap landscape involves three servers viz,
Development server, Quality server and Production server. Whatever
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
6/34
9/21/2015
7/34
9/21/2015
8/34
9/21/2015
9/34
9/21/2015
10/34
9/21/2015
11/34
9/21/2015
12/34
9/21/2015
13/34
9/21/2015
Customer Exit
Function exit
Screen Exit
Menu Exit
Field Exit
Example: CALL
Customer function xxx
INCLUDE xxx.
You modify this include.
A customer exit is
considered an
enhancement.
To activate a function
exit, you need to create a
project in SMOD and
activate the project.
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
14/34
9/21/2015
RFC
No Business Object is
associated with a RFC.
SMARTFORM
SAPSCRIPT is client
dependent.
SMARTFORM is client
independent.
SMARTFORM generates a
Function Module when
activated.
SMARTFORMS cannot be
converted to SCRIPT.
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
15/34
9/21/2015
PROTECT ENDPROTECT
command is used for Page
protection.
Call Transaction
BDC
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
16/34
9/21/2015
Transaction method.
Subroutine
SAP Memory
ABAP Memory
Important
Question 8: What is the difference between AT SELECTIONSCREEN and AT SELECTION-SCREEN OUTPUT?
AT SELECTION-SCREEN is the PAI of the selection screen whereas
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
17/34
9/21/2015
18/34
9/21/2015
Important
Question 14: What will you use SELECT SINGLE or SELECT
UPTO 1 ROWS ?
What will you use SELECT SINGLE or SELECT UPTO 1 ROWS ?
There is great confusion over this in the SAP arena.
If you Google, you will see lots of results that will say SELECT
SINGLE is faster and efficient than SELECT UPTO 1 ROWS.
But that is 100% incorrect.
SELECT UPTO 1 ROWS is faster than SELECT SINGLE.
If for a WHERE condition, only one record is present in DB, then both
are more or less same.
However, If for a WHERE condition multiple records are present in DB,
SELECT UPTO 1 ROWS will perform better than SELECT SINGLE.
Question 15: What is the difference between .Include Structure and
.Append structure?
I have seen ridiculous answers for this at many places on the Web.
The true answer is this:
Lets say you want to use the Structure X in your table Y.
With .Include X, you can include this structure in multiple tables.
With .Append X, you specify that structure X has been used in table
Y and that this cannot be used in any other table now. So you restrict
structure X only to Table Y.
Important
Question 16: Can you describe the events in ABAP?
LOAD-OF-PROGRAM:
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
19/34
9/21/2015
If you are using Normal ALV, You can use the following FMS:
1.
REUSE_ALV_BLOCK_LIST_INIT
2.
REUSE_ALV_BLOCK_LIST_APPEND
3.
REUSE_ALV_BLOCK_LIST_DISPLAY
Question 19: A system has two clients 100 and 500 on the same
application server. If you make changes to a SAPSCRIPT on client
100, will the changes be available in client 500?
No. SAPSCRIPT is client dependent. You will have to transport
changes from client 100 to client 500. However, for SMARTFORMS,
Changes will be made both for client 100 and client 500.
Question 20: There are 1000s of IDOCs in your system and say you
no longer need some of them? How will you get rid of those IDOCs?
One way is to archive the IDOCs using transaction SARA.
But what the interviewer was expecting was How do you change IDoc
Status?
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
20/34
9/21/2015
21/34
9/21/2015
EKKO?
In other words can you have PO line items without the PO header?
How does this happen? The answer is foreign key relationship.
So foreign keys come into picture when you define relationship
between two tables.
Foreign keys are defined at field level.
Check the foreign key relation for field EBELN of table EKPO.
The check table is EKKO. This just means that whenever an entry is
made in EKPO, it is checked whether the entered value for EBELN
already exists in EKKO. If not, entry cannot be made to EKPO table.
Question 25 : What is the difference between a value table and
a check table?Check table is maintained when you define foreign
key relationships.
For Check table, read question above.
.
Value table is defined and maintained at a domain level.
At a domain level, you can mention allowed values in the form of:
1) Single values
2) Ranges
3) Value tableFor example, have a look at domain SHKZG. Only
allowed values are S and H for Debit/Credit indicator. Whenever and
wherever you use this domain, the system will force you to use only
these two values: S and H.
Another example is domain MATNR. For this domain the value table is
MARA.
So whenever and wherever, you use this domain the system will force
you to use values for MATNR in table MARA.
Question 26: How do you find BAPI?Approach1:
You can go to Transaction BAPI and then search for your desired
object.
Say you want to find a BAPI for creating users in the system, in such
case you can search for the User and find the relevant BAPIs.
Approach2:
Another way is to find a Business Object. Say you want to find a
BAPI for creating Material in SAP and you know the BO for Material is
BUS1001006. You can go to Transaction SWO1 and enter the BO
BUS1001006 in the BOR. Then have a look at the methods for this
BO.
Important
Question 27: How do you find BADI?
Approach1:
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
22/34
9/21/2015
23/34
9/21/2015
24/34
9/21/2015
25/34
9/21/2015
26/34
9/21/2015
Call Transaction
Call transaction method is when
the data volume is low
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
27/34
9/21/2015
Important:
Question 2: 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.
Important:
Question3: Is there any method apart from BDC for data upload
to SAP?Apart from BDC and LSMW, you can use BAPIs to upload
data into SAP.
BAPIs should be preferred over BDCs, because they process data
faster than BDC.
A BAPI is faster since it updates Database directly. Whereas BDC
calls transaction and goes through the whole screen sequence as any
user would do.
BAPI
BDC
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
28/34
9/21/2015
29/34
9/21/2015
Sample Screenshot:
30/34
9/21/2015
Once the recording is done , one can Transfer it to the Batch input
program.
In the batch Input program , The transactional data is read from the file
to an internal table.
Then one can loop over the transactional data in the internal table and
start uploading the data in SAP either by CALL TRANSACTION
method or by creating sessions through the batch input program.
Question 10: How do you process errors in Session method ?
You can go to Transaction SM35 , Choose the session name and
click on Process.
Question 11: What are the different modes of processing batch
input sessions?
31/34
9/21/2015
Tumblr
StumbleUpon
Reddit
Pinterest
Like this:
Like
Be the first to like this.
Related
Best practices
working with SAP
ABAP :
DATABASE
Looking For best
practices to follow
SAPs New
Enhancement and
http://sapconsultancy.in/wordpress/2013/04/06/sap-abap-interview-question/
Source Code
Enhancements 32/34