Você está na página 1de 3

Does every ABAP/4 have a modular structure?

Yes.
What is Modularization and its benefits?
If the program contains the same or similar blocks of statements or it is required to process the same function
several times, we can avoid redundancy by using modularization techniques. By modularizing the ABA!"
programs we make them easy to read and improve their structure. #odularized programs are also easier to
maintain and to update.
Name the ABAP/4 Modularization techniques
$ %ource code module.
$ %ubroutines.
$ &unctions.
!o" can "e create callable modules of #ro$ram code "ithin one ABAP/4 #ro$ram?
$ By defining #acros.
$ By creating include programs in the library.
# is the attribute type of the module program.
%s it #ossible to #ass data to and from include #ro$rams e&#licitly?
'o. If it is required to pass data to and from modules it is required to use subroutines or function modules.
What are subroutines?
%ubroutines are program modules, which can be called from other ABA!" programs or within the same program.
What are the ty#es of 'ubroutines?
$ Internal %ubroutines( )he source code of the internal subroutines will be in the same ABA!" program as the
calling procedure *internal call+.
$ ,-ternal %ubroutines( )he source code of the e-ternal subroutines will be in an ABA!" program other than the
calling procedure.
%t is not #ossible to create an ABAP/4 #ro$ram( "hich contains only 'ubroutines )*/+,
&alse.
A subroutine can contain nested form and endform bloc-s )*/+,
&alse.
Data can be #assed bet"een callin$ #ro$rams and the subroutines usin$ Parameters
What are the different ty#es of #arameters?
&ormal arameters( arameters, which are defined during the definition of subroutine with the &./# statement.
Actual arameters( arameters which are specified during the call of a subroutine with the ,/&./# statement.
!o" can one distin$uish bet"een different -inds of #arameters?
$ Input parameters are used to pass data to subroutines.
$ .utput parameters are used to pass data from subroutines.
What are the different methods of #assin$ data?
$ 0alling by reference( 1uring a subroutine call, only the address of the actual parameter is transferred to the
formal parameters. )he formal parameter has no memory of its own, and we work with the field of the calling
program within the subroutine. If we change the formal parameter, the field contents in the calling program also
changes.
$ 0alling by value( 1uring a subroutine call, the formal parameters are created as copies of the actual
parameters. )he formal parameters have memory of their own. 0hanges to the formal parameters have no effect
on the actual parameters.
$ 0alling by value and result( 1uring a subroutine call, the formal parameters are created as copies of the actual
parameters. )he formal parameters have their own memory space. 0hanges to the formal parameters are copied
to the actual parameters at the end of the subroutine.
)he method by which internal tables are passed is By /eference.
!o" can an internal table "ith !eader line and one "ithout header line be distin$uished "hen #assed
to a subroutine?
Itab 23 is used in the form and endform if the internal table is passed with a header line.
What should be declared e&#licitly in the corres#ondin$ ABAP/4 'tatements to access internal tables
"ithout header lines . "hy?
4ork Area. )his is required as the 4ork Area is the interface for transferring data to and from the table.
A subroutine can be terminated unconditionally usin$ /0%* )*/+,
)rue.
A subroutine can be terminated u#on a condition usin$ 1!/12 'tatement
+unction Modules are also e&ternal 'ubroutines )*/+,
)rue.
What is the difference bet"een the function module and a normal ABAP/4 subroutine?
In contrast to normal subroutines function modules have uniquely defined interface. 1eclaring data as common
parts is not possible for function modules. &unction modules are stored in a central library.
What is a function $rou#?
A function group is a collection of logically related modules that share global data with each other. All the modules
in the group are included in the same main program. 4hen an ABA!" program contains a 0A55 &6'0)I.'
statement, the system loads the entire function group in with the program code at runtime. ,very function
module belongs to a function group.
What is the disadvanta$e of a call by reference?
1uring a call by reference damage or loss of data is not restricted to the subroutine, but will instantly lead to
changes to the original data ob7ects.
A function module can be called from a transaction screen outside an ABAP/4 #ro$ram )*/+,
)rue.
What is an u#date tas-?
It is an %A provided procedure for updating a database.
What ha##ens if a function module runs in an u#date tas-?
)he system performs the module processing asynchronously. Instead of carrying out the call immediately, the
system waits until the ne-t database update is triggered with the 80.##I) 4./9: command.
)he function modules are created and stored in the &unction 5ibrary.
When a function module is activated synta& chec-in$ is #erformed automatically )3/N,
)rue.
What is the use of the 4A%'%N5 e&ce#tion?
)he raising e-ception determines whether the calling program will handle the e-ception itself or leave the
e-ception to the system.
What is the difference bet"een internal tables and e&tract datasets?
$ )he lines of an internal table always have the same structure. By using e-tract datasets, you can handle groups
of data with different structure and get statistical figures from the grouped data.
$ You have to define the structure of the internal table at the beginning. You need not define the structure of the
e-tract dataset.
$ In contrast to internal tables, the system partly compresses e-act datasets when storing them. )his reduces the
storage space required.
$ Internal tables require special work area for interface whereas e-tract datasets do not need a special work area
for interface.
%t is #ossible to assi$n a local data ob6ect defined in a subroutine or function module to a field $rou#
)*/+,
&alse.
What is the difference bet"een field7$rou# header and other field $rou#s?
)he header field group is a special field group for the sort criteria. )he system automatically prefi-es any other
field groups with the header field group.
1an a filed occur in several field $rou#s
Yes. But it leads to unnecessary data redundancy.
4hen sorting the e-tract dataset the fields used as default sort key lie in the ;eader field group.
What does the insert statement in e&tract datasets do?
It defines the fields of a field group.
What does the e&tract statement do in e&tract datasets?
)he data is written to virtual memory by e-tract commands.
A field7$rou#s statement or an insert statement reverses stora$e s#ace and transfers values )*/+,
&alse.
While usin$ e&tract datasets it is required to have a s#ecial "or-area for interface )*/+,
&alse.
*he 899P7/ND899P on e&tract datasets can be used "ithout any -ind of errors )*/+,
&alse. It causes runtime errors.
)he #a-imum no of key fields that can be used in a header is <=.
While sortin$ field $rou#s "e cannot use more than one -ey field )*/+,
&alse.
4hile sorting, if the main storage available is not enough, the system writes data to an e-ternal help file. )he
%A profile parameter, which determines this help file, is 1I/>%./))#.
*he e&tract statements in field $rou#s can be used before or after #rocessin$ the sort statements
)*/+,
&A5%,.

Você também pode gostar