Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 8

Question :1

How to move the even records of one internal table to other ?


Answer ::
data: lv_div type f.
loop at itab.
lv_div = sy-index / 2.
if lv_div = 0.
move itab to itab1.
append itab1.
endif.
ndloop.
Question :2
How can we create Search Help, without using table field?
for example I have two fields in one table and I required one more field in search help
how?
Answer
!reate first a view of t"e two table in #11 transa!tion.$"en !reate t"e sear!" "elp based on t"at view.
Question :%
Difference between Drill Down and Interactive Reports,Events triggered in both reports
Answer
in drilldown reports we write statement &as listbox visible len't" (.
in intera!tive reports we us at line sele!tion even and fun!tion module &reuse_alv_'rid_display& or
&reuse_alv_list_display

Answer
)ntera!tive report means *suppose in 1st list u "ave to s"ow some "eader details and s"ow item
details in fut"er list.+ut drill down list means if u !li!, on t"e field spe!ified*it will ta,e u to t"e
!orrespondin' transa!tions li,e --01*./01 et! by !allin' t"e transa!tions and set parameter.)n bot"
!ases we use &01#_A23_40)5_5)#62A7&8)_9A22+A9/_1#0_9:--A;5<.); normal
intera!tive report*we use t"e events li,e at line-sele!tion*at user-!ommand.

Question : =
What is the use of update Function Module ?Where it is used and purpose ?
Answer
1pdate >un!tion -odules are used for #A6 2o'i!al 1nit of ?or,. $"is fun!tion modules are tri''ered
w"en an xpli!it or )mpli!it 9:--)$ ?:0/ is en!ountered.
Question :(
What are dynamic modifications of a screen? eplain in detail?
Answer
based on t"e user a!tion t"e s!reen s"ould be !"an'ed.
e'. let us ta,e a s!enario t"ere is a !"e!, box and five field in a s!reen. my re@uirement is w"en t"e
!"e!, box is !"e!,ed first two fields s"ould be disabled and ot"er field s"ould be enabled.
so to a!"ieve t"is a!tion fun!tion !ode s"ould be written to t"e !"e!, box. w"en t"e user !"e!,s t"e
!"e!, box. t"e fun!tion !ode will be tri''ered.
if t"e fun!tion !ode is tri''ered t"en t"e s!reen field of t"e first two field s"ould be set as 0.and ot"er
s!reen field s"ould be set input as 1.t"is is a way if dynami! modifi!ation of s!reen
Answer
9"an'e #!reen based on user a!tions....t"is !an be done by usin' A$ #29$):;-#90; :1$
61$ event....
0eferan!e:
"ttp://www.sapnuts.!om/!ourses/!ore-abap/!lassi!al-reports/!lassi!al-report-events."tml
Question : A
!an we use instance attributes inside a static attributes? say yes or no ?
Answer :: no we !an&t use be!ause stati! attributes are !reated w"en a !lass is de!lared and we !an
use before instan!e !reated to t"at !lass but t"e instan!e attributes are 'et initialiBed and a!tivated
only after t"e !lass is instantiated.
Question : C
"ow many pages in sap scripts ##to$% or ##to$$ &&&?
Answer
00 to DE

Answer
00 to DD
Question : E
what is the '()*E+E!(I,- E.E-(?
Answer
A$-#29$):; 3;$ $ri''ers ?"en a user enters t"e parameter on sele!tion s!reen dependin'
on t"e sele!tion w"i!" user made t"e followin' s!reen or followin' !"an'es would appear on t"e
s!reen
for e' A$ #29$):;-#90; :1$61$
Question D
what is the difference +smw and /dc?
Answer
lsmw
it&s for less amount of data up to (00 re!ords
it&s very easy to do !ompare wit" bd!
it&s no pro'rammin' !ode
it&s dire!tly update t"e db8wit"out s!reens<
most of times fun!tional !onsultants able to do very useful for master data i t"in, ,now t"e bd!

Answer
1. 2#-? is for normal #A6 appli!ation w"ere as +59 is for
!ustomiBed appli!ation
2. +ot" are for mi'ration of data into #A6. 2#-? "as % ways
- 5ire!t input*+at!" input and )5:!. ?"ere as +59 "as 9All
transa!tion and #ession met"od.

Question 10
W"I!" +'-01'0E I* 1*ED (, WRI(E '/'2 !,DI-0 2'R(?
Answer
A+A6 intern uses 9:+:2 stru!ture
Question 11
which commands are allowed if you are wor3ing with an internal
table of type sorted?
Answer
)nsert
5elete
0ead $able
w"enever u r wor,in' wit" a sorted internal table u !ant use
A66;5 stmt..rest of t"e operations u !an do...
Question 12
"ow to declare select)option as a parameter?
Answer
7ou !an a!"ieve by writin' below statement :
#ele!t-options: ,unnr for ,unnr no intervels no extension.
7:1 9A; A6627 $F)# #$A$-;$ >:0 A9$);4 2)/ 6A0A-$0#
#29$-:6$):;#:3+2; >:0 3+A/-3+2; ;:-);$032# ;: .$;#):;.

Question 1%
Eplain about factory calendar ?
Answer
>a!tory !alendar !ontain !ompany spe!ifi! dates su!" as alternate wor,in' #aturdays* 6lant
s"utdown et!.
7ou !an !reate your !ompany fa!tory !alendar via transa!tion !ode &#9A2&.
Assi'nment of t"e fa!tory !alendar by plant is done in transa!tion !ode &#-%0 - 3_$001?&.
An example of a #A6 appli!ation t"at uses t"e fa!tory !alendar is t"e #A6 -06 modules.
Assumin' t"at you "ave a spe!ified an alternate wor,in' #aturday* -06 will postponed t"e planned
orders to t"e next wor,in' day if it "appened to falls on a non-wor,in' #aturday.
>un!tion module related to >a!tory !al!ulator are
1.>A9$:075A$_9:;30$_$:_5A$
2.5A$_9:;30$_$:_>A9$:075A$
5oes every A+A6/= "ave a modular stru!tureG
7es.
?"at is -odulariBation and its benefitsG
)f t"e pro'ram !ontains t"e same or similar blo!,s of statements or it is re@uired to pro!ess t"e same
fun!tion several times* we
!an avoid redundan!y by usin' modulariBation te!"ni@ues. +y modulariBin' t"e A+A6/= pro'rams we
ma,e t"em easy to read and improve t"eir stru!ture.
-odulariBed pro'rams are also easier to maintain and to update.
;ame t"e A+A6/= -odulariBation te!"ni@ues.
#our!e !ode module.
#ubroutines.
>un!tions.
Fow !anwe !reate !allable modules of pro'ram !ode wit"in one A+A6/= pro'ramG

+y definin' -a!ros.
+y !reatin' in!lude pro'rams in t"e library.
- is t"e attribute type of t"e module pro'ram.
)s it possible to pass data to and from in!lude pro'rams expli!itlyG
;o. )f it is re@uired to pass data to and from modules it is re@uired to use subroutines or fun!tion
modules.
?"at are subroutinesG
#ubroutines are pro'ram modules* w"i!" !an be !alled from ot"er A+A6/= pro'rams or wit"in t"e
same pro'ram.
?"at are t"e types of #ubroutinesG
H
)nternal #ubroutines: $"e sour!e !ode of t"e internal subroutines will be in t"e same A+A6/= pro'ram
as t"e !allin' pro!edure 8internal !all<.
H
xternal #ubroutines: $"e sour!e !ode of t"e external subroutines will be in an A+A6/= pro'ram ot"er
t"an t"e !allin' pro!edure.
)t is
not possible to !reate an A+A6/= pro'ram* w"i!" !ontains only #ubroutines 8$/><.
>alse.
A subroutine !an !ontain nested form and endform blo!,s. 8$/><
>alse.
5ata !an be passed between !allin' pro'rams and t"e subroutines usin' 6arameters.
?"at are t"e different types of parametersG
>ormal 6arameters: 6arameters* w"i!" are
defined durin' t"e definition of subroutine wit" t"e >:0- statement.
A!tual 6arameters: 6arameters w"i!" are
spe!ified durin' t"e !all of a subroutine wit" t"e 60>:0- statement.
Fow !an one distin'uis" between different ,inds of parametersG
H
)nput parameters are used to pass data to subroutines.
H
:utput parameters are used to pass data from subroutines.
?"at are t"e different met"ods of passin' dataG
H
9allin' by referen!e: 5urin' a subroutine !all* only t"e address of t"e a!tual parameter is transferred
to t"e formal parameters. $"e formal parameter
"as no memory of its own* and we wor, wit" t"e field of t"e !allin' pro'ram wit"in t"e subroutine. )f
we !"an'e t"e formal parameter* t"e field
!ontents in t"e !allin' pro'ram also !"an'es.
H
9allin' by value: 5urin' a subroutine !all* t"e formal parameters are !reated as !opies of t"e a!tual
parameters. $"e formal parameters "ave memory of
t"eir own. 9"an'es to t"e formal parameters "ave no effe!t on t"e a!tual parameters.
H
9allin' by value and result: 5urin' a subroutine !all* t"e formal parameters are !reated as !opies of
t"e a!tual parameters. $"e formal parameters "ave
t"eir own memory spa!e. 9"an'es to t"e formal parameters are !opied to t"e a!tual parameters at
t"e end of t"e subroutine.
$"e met"od by w"i!" internal tables are passed is
+y 0eferen!e.
1A. Fow !an an internal table wit" Feader line and one wit"out "eader line be distin'uis"ed w"en
passed to a subroutineG
)tab IJ is used in t"e form and endform if
t"e internal table is passed wit" a "eader line.
?"at s"ould be de!lared expli!itly in t"e !orrespondin' A+A6/= #tatements to a!!ess
internal tables wit"out "eader lines K w"yG
?or, Area. $"is is re@uired as t"e ?or, Area is t"e interfa!e for transferrin' data to and from t"e
table.
A subroutine !an be terminated un!onditionally usin' .)$. 8$/><
$rue.
A subroutine !an be terminated upon a !ondition usin' 9F9/ #tatement.

>un!tion -odules are also external #ubroutines. 8$/><.
$rue.
?"at is t"e differen!e between t"e fun!tion module and a normal A+A6/= subroutineG
)n !ontrast to normal subroutines fun!tion modules "ave uni@uely defined interfa!e. 5e!larin' data as
!ommon parts is not
possible for fun!tion modules. >un!tion modules are stored in a !entral library.
?"at is a fun!tion 'roupG
A fun!tion 'roup is a !olle!tion of lo'i!ally related modules t"at s"are 'lobal data wit" ea!" ot"er. All
t"e modules in
t"e 'roup are in!luded in t"e same main pro'ram. ?"en an A+A6/= pro'ram !ontains a 9A22
>1;9$):; statement* t"e system loads t"e entire fun!tion 'roup
in wit" t"e pro'ram !ode at runtime. very fun!tion module belon's to a fun!tion 'roup.
?"at is t"e disadvanta'e of a !all by referen!eG
5urin' a !all by referen!e dama'e or loss of data is not restri!ted to t"e subroutine* but will instantly
lead to !"an'es to t"e
ori'inal data obLe!ts.
A fun!tion module !an be !alled from a transa!tion s!reen outside an A+A6/=
pro'ram. 8$/><.
$rue.
?"at is an update tas,G
)t is an #A6 provided pro!edure for updatin' a database.
?"at "appens if a fun!tion module runs in an update tas,G
$"e system performs t"e module pro!essin' asyn!"ronously. )nstead of !arryin' out t"e !all
immediately* t"e system
waits until t"e next database update is tri''ered wit" t"e M9:--)$ ?:0/N !ommand.
$"e fun!tion modules are !reated and stored in t"e >un!tion 2ibrary.
?"en a fun!tion module is a!tivated syntax !"e!,in' is performed automati!ally. 87/;<
$rue.
?"at is t"e use of t"e 0A)#);4 ex!eptionG
$"e raisin' ex!eption determines w"et"er t"e !allin' pro'ram will "andle t"e ex!eption itself or leave
t"e ex!eption to t"e
system.
?"at is t"e differen!e between internal tables and extra!t datasetsG
H
$"e lines of an internal table always "ave t"e same stru!ture. +y usin' extra!t datasets* you !an
"andle 'roups of data wit" different stru!ture and 'et
statisti!al fi'ures from t"e 'rouped data.
H 7ou "ave to define t"e stru!ture of t"e internal table at t"e be'innin'. 7ou
need not define t"e stru!ture of t"e extra!t dataset.
H )n !ontrast to internal tables* t"e system partly !ompresses exa!t datasets w"en
storin' t"em. $"is redu!es t"e stora'e spa!e re@uired.
H )nternal tables re@uire spe!ial wor, area for interfa!e w"ereas extra!t datasets
do not need a spe!ial wor, area for interfa!e.
)t is possible to assi'n a lo!al data obLe!t defined in a subroutine or fun!tion
module to a field 'roup. 8$/><.
>alse.
?"at is t"e differen!e between field-'roup "eader and ot"er field 'roupsG
$"e "eader field 'roup is a spe!ial field 'roup for t"e sort !riteria. $"e system automati!ally prefixes
any ot"er field
'roups wit" t"e "eader field 'roup.
9an a filed o!!ur in several field 'roups.
7es. +ut it leads to unne!essary data
redundan!y.
?"en sortin' t"e extra!t dataset t"e fields used as default sort ,ey lie in t"e
Feader field 'roup.
?"at does t"e insert statement in extra!t datasets doG
)t defines t"e fields of a field 'roup.
?"at does t"e extra!t statement do in extra!t datasetsG
$"e data is written to virtual memory by extra!t !ommands.
A field-'roups statement or an insert statement reverses stora'e spa!e and
transfers values. 8$/><.
>alse.
?"ile usin' extra!t datasets it is re@uired to "ave a spe!ial wor,area for interfa!e
8$/><
>alse.
$"e 2::6-;52::6 on extra!t datasets !an be used wit"out any ,ind of errors 8$/><
>alse. )t !auses runtime errors.
$"e -aximum no of ,ey fields t"at !an be used in a "eader is (0.
?"ile sortin' field 'roups we !annot use more t"an one ,ey field 8$/><.
>alse.
?"ile sortin'* if t"e main stora'e available is not enou'"* t"e system writes data
to an external "elp file. $"e #A6 profile parameter* w"i!" determines t"is "elp file* is
5)0_#:0$$-6.
=%. $"e extra!t statements in field 'roups !an be used before or after pro!essin' t"e
sort statements. 8$/><
- #ee more at: "ttp://sapbrainsonline.!om/fa@/sap-abap-modulariBation-interview-
@uestions."tmlOst"as".#BAae73:.dpuf

You might also like