Modularization Techniques
Modularization Techniques
2. How can we create callable modules of program code within one ABAP/4 Program?
A. By defining macros.
B. By creating include programs in the library.
8. What is the difference between the function module and a normal ABAP/4 subroutine?
-You CAN NOT CALL subroutiune out of SAP system.Means subroutines are used only in SAP R3
system.But as we seen earlier FM can be called by any system having valid RFC connection.
So suppose the requirement is to transfer data from SAP to NON SAP sytem then you have only one option to
use FM as you can’t use Subroutine there.
-In contrast to normal subroutines function modules have uniquely defined interface for defining parameters.
-Sub routines do not return values/exceptions whereas FM does.
-Sub routines cannot be tested independently where as we can execute FM through SE37 independently..
Declaring data as common parts is not possible for function modules. Function modules are stored in a central
library. (Function Group)
10. What is the difference between internal tables and Extract datasets?
A. The lines of an internal table always have the same structure. By using extract
datasets, you can handle groups of data with different structure and get statistical figures from the grouped
data.
B. You have to define the structure of the internal table at the beginning. You need
not define the structure of the extract dataset.
C. In contrast to internal tables, the system partly compresses extract datasets
when storing them. This reduces the storage space required.
D. Internal tables require special work area for interface whereas extract datasets
do not need a special work area for interface.
15. It is NOT possible to create an ABAP/4 program, which contains only Subroutines (T/F).
-False.
16. A subroutine can contain Nested Form and End Form blocks. (T/F)
-False.
17. How to pass the data between calling programs and the subroutines/FM?
Using Parameters.
18. How can an internal table with Header line and one without header line be distinguished when
passed to a subroutine?
-Itab [] is used in the form and end form if
the internal table is passed with a header line.
19. What should be declared explicitly in the corresponding ABAP/4 Statements to access
internal tables without header lines & why?
-Work Area (As we need to define IT & WA differently in Explicite option).
Reason- This is required as the Work Area is the interface for transferring data to and from the Body of the
Internal Table.
22. A function module can be called from a transaction screen outside an ABAP/4 program (T/F).
-True. We can it by SE37.
25. When a function module is activated syntax checking is performed automatically. (Y/N)
-True.
28. What is the difference between field-group header and other field groups?
-The header field group is a special field group for the sort criteria. The system automatically prefixes any
other field groups with the header field group.
30. What does the INSERT & EXTRACT Statement in Extract datasets do?
-It defines the fields of a field group.
-The data is written to virtual memory by extract commands.
31. A field-groups statement or an insert statement reverses storage space and
transfers values (T/F).
-False.
32. While using Extract datasets it is required to have a special work area for interface (T/F).
-False.
33. The LOOP-ENDLOOP on Extract datasets can be used without any kind of errors (T/F).
-False. It causes runtime errors. The Maximum no of key fields that can be used in a header is 50.
34. While sorting field groups we CAN NOT use more than one key field (T/F).
-False. While sorting, if the main storage available is not enough, the system writes data
to an external help file. The SAP profile parameter, which determines this help file, is DIR_SORTTMP.
35. What is the difference between the Function module and External Subroutine?
-Internal Table work area is not shared between the function module and calling program whereas subroutine
shared same work area.
-We can leave a function module using Raise statement whereas check, exit or stops are
used to leave a subroutine.
-Function module has special interface to define parameters whereas subroutine don’t
have.
39. How RFC function module differs from normal function module?
RFC stands for remote function call. As the name itself reveals, this function
module can be called remotely by using RFC destination. Here remote means,
external system, it may be a SAP system or Non-SAP system like Java system.
41. How to know whether a given function module is normal or RFC function module?
1) Go to SE37.
2) Enter the name of the function module you are provided.
3) Click on DISPLAY
4) Choose Attributes tab
5) under this tab, you can see Processing Type block.
6) If remote-enabled module is checked, then it is RFC otherwise normal function
module.
42. How many types of RFCs are there?
There are five types of RFCs-
1) Synchronous RFC
2) Asynchronous RFC
3) Transactional RFC
4) Queued RFC
5) Parallel RFC
44. What are the two includes that got created automatically whenever we create “Function module”.
-Whenever we create any FM SAP automatically creates “Function Pool” along with following two includes.
1. Lfm_nameTOP************* for Global Data declarations.
2. Lfm_nameUXX************* for Function module which has got created.
45. What are different “Processing Types” for the Functional Modules?
-Following are the various “Processing Types” for the FM.
1. Normal Function Module
2. Remote-Enabled Module
3. Update Module
46) What are the differences between Subroutines and Function Modules?
Subroutines Function modules
1. These are local. We can access the 1. These are global. We can access the
Subroutine within the server only. function module with in server as well as
Outside the server.
2. We can’t execute the subroutine 2. we can execute function module
independently independently using the T-code SE37
3. Subroutines can’t handle the Exceptions. 3. Function module can handle the errors
through Exceptions.