Sei sulla pagina 1di 52

SAP ABAP Interview

Questions
Part-2
49.What should be the approach for writing a BDC
program?

STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE to internal


table CALLED "CONVERSION".

STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED "SAP DATA
TRANSFER".

STEP 3: DEPENDING UPON THE BDC TYPE i)call transaction(Write the program explicity)
ii) create sessions (sessions are created and processed.if success data will transfer).
50.What is Field symbol ?

You can use field symbols to make the program more dynamic. In this example the
name of a table control is substituted by a field symbol. Thus you cal call the form with any
internal table, using the name of the table control as a parameter.
Example
forminsert_row
usingp_tc_name.
field-symbols<tc> type cxtab_control. “Table control
assign (p_tc_name) to <tc>.
* insert 100 lines in table control
<tc>-lines = 100.
51.The various numeric types definable in an ABAP
program are:

a) I, F, P, N

b) I, F, P

c) I, F, N

d) I, P, N

Ans: b
52.What is a batch input session?

BATCH INPUT SESSION is an intermediate step between internal table and


database table.
Data along with the action is stored in session ie data for screen fields, to which
screen it is
passed,program name behind it, and how next screen is processed.
53.Why BAPI need then BDC ?

BAPI”S provide the standard interface to other applications apart from SAP and
within differntvesions of SAP too. Also it is OOD bases so dosen”t depends on
screen flow.
BDC gets failed if we make changes for screen changes through IMG
customization.
54.Variables in an ABAP code can be defined as being
similar to data-dictionary elements, using:

a) LIKE

b) FOR

c) TYPE

d) None of the above

Ans: a, b, c
55.What are the problems in processing batch input
sessions?

PROBLEMS:-
i) If the user forgets to opt for keep session then the session will be automatically
removed
from the session queue(log remains). However if session is processed we may
delete it
manually.
ii)if session processing fails data will not be transferred to SAP database table.
56.What are the advantages and disadvantages of
using views in ABAP programming ?

advantages: view is used to retrieve the data very fastly from the database tables
*memory wastage is reduced
*faster than joins to retrieve the data from database tables
disadvantages:
view is not a container,it will not hold the data.
57.Constants and internal tables are defined using the
keywords (respectively):

a) CONSTANTS and TABLES

b) DATA and DATA

c) DATA and TABLES

d) CONSTANTS and DATA

Ans: a
58.How many types of tables exists and what are they
in data dictionary?

4 types of tables
i)Transparent tables - Exists with the same structure both in dictionary as well as in
database exactly with the same data and fields. Both Opensql and Nativesql can
be used.
ii)Pool tables & iii)Cluster tables -
These are logical tables that are arranged as records of transparent tables.one
cannot use
native sql on these tables
(onlyopensql).They are not managable directly using database system tools.
iv)Internal tables -
59.Have you used performance tuning? What major
steps will you use for these?

First of all tunning can be done


In three ways: disk i/o ,sqltunning , memory tunning,
Before tunning u have to get the status of your database using
Oracle utility called statpack ,tkprof, then you should go for tunning
60.There are 8 elementary data-types, and hence, 64
possible conversions. Of these,

a) Type D and T cannot be inter-converted

b) None of the other types can be converted into D and T.

c) D and T cannot be converted into any other type.

d) Only C can convert into D/T and vice-versa.

Ans: a
61.What is the step by step process to create a table in
data dictionary?

step 1: creating domains(data type,fieldlength,range).

step 2: creating data elements(properties and type for a table


field).

step 3: creating tables(SE11).


62.How to create client independent tables?

client independent tables:


the table in which the first field is not mandt is the client independent tables
*mandt is the field with mandt as the data element
*automatically client which we login is populated to mandt.
63.If a structure does not contain internal tables as
components, we can equate two structures of
incompatible types

a) TRUE

b) FALSE

Ans: a
64.Question. Can a transparent table exist in data
dictionary but not in the data base
physically?

NO.

TRANSPARENT TABLE DO EXIST WITH THE SAME STRUCTURE BOTH IN


THE DICTIONARY
AS WELL AS IN THE DATABASE,EXACTLY WITH THE SAME DATA AND
FIELDS.
65.What type of user exits have you written?

there are four types


1.function exit
2.menuixit
3.screen exit.
4.field exit.
these are the user exits
66.For an inequality check between two variables, the
symbol used is:

a) NE

b) <>

c) ><

d) NEQ

Ans: a, b, c
67.What are the domains and data elements?

DOMAINS : FORMAL DEFINITION OF THE DATA TYPES.THEY SET


ATTRIBUTES
SUCH AS DATA TYPE,LENGTH,RANGE.
DATA ELEMENT : A FIELD IN R/3 SYSTEM IS A DATA ELEMENT.
68. How do we debug sapscript?

First we need to put Break point in Print program where ever you want to stop the
execution.
After in SE71 give your form name and go to Utilities–>Active De-bugger.
Then go to your transcation like VF03(for Invoice or Credit memo) etc to see the
print preview
or print the form execute it.
When you execute it the the form Debugging will get activated and you can see
your Form
execution step by step.
69. S1 = ‘ABCAB’.S2 = ‘ABCD ‘.IF S1 CN S2.WRITE
‘a’.ELSE.WRITE ‘b’.ENDIF.Output of above code is:

a) a
b) b
c) Compilation error
d) Blank

Ans: b
70.What is a collect statement? How is it different from
append?

If an entry with the same key already exists, the COLLECT statement does not
append a new line, but adds the contents of the numeric fields in the work area to
the
contents of the numeric fields in the existing entry.
71.What are the different types of data dictionary
objects?

Data Dictionary Objects


* Tables
* Views
* Domain
* Data Element
* Type Groups
* Search Helps/Matchcode Objects
* Lock objects
* Structures
* Table Types
72.The statement
IF NUM IS BETWEEN 3 AND 7. Is a valid syntax?

a) TRUE

b) FALSE

Ans: B
73.What is open sql vs native sql?

Open SQL , native SQL are the interfaces to create the database applicatons.
Open SQL is consistant across different types of existing Databases.
Native SQL is the database language specific to database.Its API is specific to the
databse.
Open SQL API is consistent across all vendors
74.What is the step by step process to create a table in
data dictionary?

steps to create database tables


1.go to se11
2.give name the database table
3.give short description for the table
4.Give delivery class name as A and data browser / table view maint as
Display/maintenence
allowed
5.select fields tab
6.give field name data type(user defined element type/built-in-type),short text
7.select technical settings tab ,give data class as appl0 and size category as 0
8.save it
9.goutillities menu click table contents select create and enter the field values then
select display
in table contents and u can view the table values with field lables
75.Is it possible to call a subroutine of one program
from another program?

a) True

b) False

Ans: A
76.What is an interactive report?

An Interactive report is a dynamic drill down report that produces the list on
users choice.
diff:-
a) THE LIST PRODUCED BY CLASSICAL REPORT DOESN'T allow user to
interact with the
system
the list produced by interactive report allows the user to interact with the system.
b) ONCE A CLASSICAL REPORT EXECUTED USER LOOSES CONTROL.IR
USER HAS
CONTROL.
c) IN CLASSICAL REPORT DRILLING IS NOT POSSIBLE.IN INTERACTIVE
DRILLING IS
POSSIBLE.
77.Can a transparent table exist in data dictionary but
not in the data base physically?

NO. TRANSPARENT TABLE DO EXIST WITH THE SAME STRUCTURE BOTH


IN THE
DICTIONARY AS WELL AS IN THE DATABASE,EXACTLY WITH THE SAME
DATA
AND FIELDS.
No,
at the point you will activate your table a same transparent table is going to be
create in database.
78.Can ABAP control statements be used within a sap
script?

a) YES

b) NO

Ans: a
79.How do you write a function module in SAP?
describe.?

creating function module:-


called program - se37-creating funcgrp,funcmodule by assigning
attributes,importing,exporting,tables,exceptions.
calling program - SE38-in pgm click pattern and write function name- provide
export,import,tables,exception values.
80.What are the domains and data elements?

domains:
___________
domains are the dictionary objects that are assigned with constants and data types
data elements:
______________
data elements are dictionary objects that are assigned with the domains.
uses:‟
* data elements are used to create relation between tables.
* data elements are used to transfer the data from one R/3 to another R/3.
* to create search helps.
81.The presentation server is actually the program
named SAPGUI.

a) True

b) False

Ans: a
82.What are internal tables? How do you get the
number of lines in an
internal table? How to use a specific number occurs
statement?

i)It is a standard data type object which exists only during the runtime of the
program.
They are used to perform table calculations on subsets of database tables and for
reorganising
the contents of database tables according to users need.
ii)using SY-DBCNT.
iii)The number of memory allocations the system need to allocate for the next
record
population.
83.What is a collect statement? How is it different from
append?

APPEND :
IT IS USED TO GET THE RECORD FROM THE INTERNAL TABLE HEADER TO
THE
BODY AREA
IT ALLOWS DUPLICATION
COLLECT:
IT IS USED TO A GET A RECORD FROM HEADER TO THE BODY AREA BUT
IT WILL
NOT ALLOW ANY DUPLICATION EXCEPT IF THERE IS ANY NUMERIC FIELS
IT
ADDS THAT FIELDS DATA BUT NOT AS A NEW RECORD.
84.On ABAP: Did you set up a workflow? Are you
familiar with all steps for setting
up a workflow?
Yes.
Execute the TxnSWDD(Creating a new Workflow).
In the header of the Workflow, define the Business Object and Event you refer to
for triggering
the Wf.
Create the Steps required for your workflow(Activity).
Inside the Activity, Create the task and assign the Business Object and the related
method for
that business object.
Activate the Workflow.
85.When is Top-of-page event executed

a) Triggered by a New-page statement

b) When the First Write Statement of the program is encountered.

c) Before outputting the first line on a new page.

Ans: b, c
86.How do you take care of performance issues in your
ABAP programs?

Performance of ABAPs can be improved by minimizing the amount of data to be


transferred.
The data set must be transferred through the network to the applications, so
reducing the
amount OF time and also reduces the network traffic.
Some measures that can be taken are:
- Use views defined in the ABAP/4 DDIC (also has the advantage of better
reusability).
- Use field list (SELECT clause) rather than SELECT *.
- Range tables should be avoided (IN operator)
- Avoid nested SELECTS.
i)system tools
ii)field symbols and field groups.
87.In the „select‟ statement what is “group by”?

Group by clause is used to fetch the data from the table by the specified field
ex.select count (*) from emptable group by deptno where deptno = 1.
It is used to find the number of employees present in the specified department no.
88.What are logical databases? What are the
advantages/disadvantages of logicaldatabases?

To read data from a database tables we use logical database.


A logical database provides read-only access to a group of related tables to an ABAP/4
program.
adv:-
The programmer need not worry about the primary key for each table.Because Logical
database knows how the different tables relate to each other,and can issue the SELECT
command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by
the application logic.
disadv:-
i)If you donot specify a logical database in the program attributes,the GET events never
occur.
ii)There is no ENDGET command,so the code block associated with an event ends with
the next event
statement (such as another GET or an END-OF-SELECTION).
89.How can I copy a standard table to make my own z_table?

WE CAN CREATE A STRUCTURE LIKE THE SAME STRUCTURE AS


DATABASE TABLE AND WE CAN USE
SELECT* FROM DATABASE TABLE INTO TABLE ITAB
OR
INSERT INTO ITAB VALUES DATABASE TABLE
90.What do you do with errors in BDC batch sessions?

We look into the list of incorrect session and process it again. To correct
incorrect session we analyize the session to determine which screen and value produced
the error.For small errors in data we correct them interactively otherwise
modify batch input program that has generated the session or many times even the
datafile.
91.What are screen painter? menu painter? Gui status?

dynpro - flow logic + screens.


menu painter -
GUI Status - It is subset of the interface elements(title bar,menubar,standard tool
bar,push buttons) used for a certain screen.
The status comprises those elements that are currently needed by the transaction.
92.What is screen flow logic? What are the sections in
it? Explain PAI and PBO.

The control statements that control the screen flow.


PBO - This event is triggered before the screen is displayed.
PAI - This event is responsible for processing of screen after the user enters the data and
clicks the pushbutton.
93.What are the include programs?

When the same sequence of statements in several programs are to be written


rapidly they are coded in include programs (External programs) and are included in
ABAP/4 programs.
94.What are presentation and application servers in
SAP?

The application layer of an R/3 System is made up of the application servers


and the message server. Application programs in an R/3 System are run on
application
servers. The application servers communicate with the presentation components,
the
database, and also with each other, using the message server.
95.What are different data types in ABAP/4?

Elementary -
predefined C,D,F,I,N,P,T,X.
userdefined TYPES.
ex: see in intel book page no 35/65
Structured -
predefined TABLES.
userdefined Field Strings and internal tables.
96.What is the difference between a pool table and a
transparent table and
how they are stored at the database level.

Pool tables is a logical representation of transparent tables. Hence no existence


at database level. Where as transparent tables are physical tables and exist at
database
level.
97.What is cardinality?

For cardinality one out of two (domain or data element) should be the same for
Ztest1 and Ztest2 tables. M:N
Cardinality specifies the number of dependent(Target) and independent (source)
entities
which can be in a relationship.
THANK YOU..!!
For regular Updates on SAP ABAP please like our Face book page:-
Face book:- https://www.facebook.com/bigclasses/
Twitter:- https://twitter.com/bigclasses
LinkedIn:-https://www.linkedin.com/company/bigclasses/
Google+:https://plus.google.com/+Bigclassesonlinetraining
SAP ABAP Course Page:-https://bigclasses.com/sap-abap-online-
training.html
Contact us: - India +91 800 811 4040
USA +1 732 325 1626
Email us at: - info@bigclasses.com

Potrebbero piacerti anche