Monday, April 8, 2013

ABAP-Modularization-Techniques-Real-Time-Interview-Questions


SAP ABAP Modularization Techniques, in ABAP/4 programming environment we use modularization techniques very frequently. It's a very good programming practice to use modularization techniques in our SAP ABAP applications. Modularization techniques provides better understandability, readability, and for better maintainability of our ABAP applications. We use subroutines, include programmes, and functions very often. Here we are going to provide real time interview questions on SAP ABAP Modularization Techniques. Refer this post to know more about this SAP Modularization. Click on read more to explore.


SAP-ABAP Modularization Techniques Real Time Interview Questions-2


SAP ABAP Modularization Techniques, in ABAP/4 programming environment we use modularization techniques very frequently. It's a very good programming practice to use modularization techniques in our SAP ABAP applications. Modularization techniques provides better understandability, readability, and for better maintainability of our ABAP applications. We use subroutines, include programmes, and functions very often. Here we are going to provide real time interview questions on SAP ABAP Modularization Techniques. Refer this post to know more about this SAP Modularization.


ABAP Modularization Techniques Interview Questions Part-1 : Click Here


Part-2 Starts here:


16. What happens if a function module runs in an update task?

The system performs the module processing asynchronously. Instead of carrying out the call immediately, the system waits until the next database update is triggered with the   
‘COMMIT WORK’ command.


17. The function modules are created and stored in the Function Library.



18. When a function module is activated syntax checking is performed automatically. (Y/N)

True.


19. What is the use of the RAISING exception?

The raising exception determines whether the calling program will handle the exception itself or leave the exception to the system.


20. What are the Componentents of functional modules?

•Importing parameters

•Exporting parameters

•Changing parameters

•Tables parameters

•Exceptions


21. what are the 2 includes creaated automatically whenever we create a function module?

Ans: 
1) Lfm_nameTOP

2) Lfm_nameUXX


22.What are the different Processing Types of Function Modules?

Ans: 

The different types of function modules are:

    a) Normal function modules

    b) Remote enabled function modules

    c) Update function modules

   
23.What are the various ways of raising exceptions in fuction modules?

Ans: 

There are two ABAP statements for raising exceptions. They can only be used in function modules:

  1)RAISE <except>.

  2)MESSAGE..... RAISING <except>.


The effect of these statements depends on whether the calling program handles the exception or not. If the name <except> of the exception or OTHERS occurs in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is handled by the calling program. 


If the calling program does not handle the exception .The RAISE statement terminates the program and switches to debugging mode. The MESSAGE ..... RAISING statement display the specified message. 


How the processing continues depends on the message type. If the calling program handles the exception, both statements return control to the program.


No values are transferred. The MESSAGE ..... RAISING statement does not display a message.Instead, it fills the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.


24.What are the difference between Function Modules and Form Routines?

Ans: 

There are significant differences between function modules and form routines:

     1)Function modules must belong to a pool called a function group.

      They possess a fixed interface for data exchange. This makes it easier for you to pass input and output parameters to and from the function module. For example, you can assign default values to the input parameters.


     2)The interface also supports exception handling. 

      This allows you to catch errors and pass them back to the calling program for handling.


     3 )They use their own memory area. 

         The calling program and the function module cannot  exchange data using a shared memory area - they must use the function module interface. This avoids unpleasant side effects such as accidentally overwriting data.

     4)The Function Builder allows you to develop, test, and document new function modules. You can also use it to display information about existing function modules.


25. Explain the following tabs appearing in SE37:

     a) import

     b) export

     c) changing

    d) tables

     e) exceptions

     f)source code

Ans:

     a)import:

Contains a list of the formal parameters that are used to pass data to a
function module. For further information, refer to Displaying Information about Interface Parameters .


     b)export: 

Contains a list of the formal parameters that are used to receive data from a function module. For further information, refer to Displaying Information about Interface Parameters


     c)changing:

Contains a list of the formal parameters that are used both to pass data to
and receive data from a function module. For further information, refer to Displaying Information about Interface Parameters .


     d) tables:

Specifies the tables that are to be passed to a function module. Table
parameters are always passed by reference. For further information, refer to Displaying Information about Interface Parameters


   e)exceptions:

Shows how the function module reacts to exceptions. For further
information, refer to Displaying Information about Interface Parameters


     f)source code: 

Program code of the function module.



26) What are the steps invloved in documenting a function module?

ans: 

1)Open the Function Builder and enter the name of the function module that you want to document.
     
2)Select Interface.

3)Choose Change.

4)Choose the Documentation tab.

5)A list of all parameters and exceptions appears.

6)Enter a short text for each entry.
     
7)Save your entries.



27) What is the difference between Function module and BAPI ?

Ans: 

Each Bapi Object has  Interface, Key Fields, Attributes,Methods and Events.  

Bapi Function Modules can be attached to these Bapi objects .Function module has a single bound functionality  while a BAPI object can contain many functionalities.



28) Explain the ways in which UPDATE FUNCTION MODULE is used in a BDC?

Ans: 

Function modules that run in the update task can run synchronously or asynchronously. You determine this by the form of the commit statement you use:

  • COMMIT WORK
  • This is the standard form, which specifies asynchronous processing. Your program does not wait for the requested functions to finish processing.

  • COMMIT WORK AND WAIT
  • This form specifies synchronous processing. The commit statement waits for the requested functions to finish processing. Control returns to your program after all high priority (V1) function modules have run successfully.
  • The AND WAIT form is convenient for switching old programs to synchronous processing without having to re-write the code. Functionally, using AND WAIT for update-task updates is just the same as dialog-task updates with PERFORM ON COMMIT.


29 What is Modularization and its benefits?

   Ans.  

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 ABAP/4 programs we make them easy to read and improve their structure. Modularized programs are also easier to maintain and to update.



30)  What is the difference between macro and subroutine?

Ans . 

Macros can only be used in the program they are defined in and only after the definition are expanded at compilation/generation. Subroutines (FORM) can be called from both the program they are defined in and other programs . 

A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice.  A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. 

Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. 




"You found the information helpful and want to say thanks? Your donation is enough to inspire us to do more. Thanks a bunch!"

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Categories

ABAP (1) ABAP Interview Questions (112) ABAP Open SQL Statements (1) ABAP Syntax Rules (6) ABAP WORKBENCH (2) ABAP-Interview-Questions (52) ALE IDOC (6) ALE IDOC Interview Questions (6) ale-idoc (6) ALE-IDOC-Interview-Questions (19) ALV Interview Questions (5) ALV-Interview-Questions (22) BADI (2) BAPI (1) BAPI Interview Questions (1) BAPI-Interview-Questions (14) BDC (6) BDC Interview Questions (6) BDC-Interview-Questions (9) big data (2) big data interview questions (1) Classical Reports Interview Question (3) Classical-Reports-Interview-Questions (22) Conditional Statements (1) Cross Applications (3) Cross-Applications (14) Data Dictionary (22) Data Type Questins (1) Data types (1) Data-Dictionary (48) Data-Type-Questins (6) Dialog programming (5) Dialog Programming Interview Questions (4) Dialog-Programming (30) DOMAIN Interview Questions (1) Domain-Interview-Questions (8) Function Module (2) hadoop (2) hadoop interview questions (2) hdfs (1) IDoc Tutorials (6) Interactive Report Interview Questions (4) Interactive-Reports-Interview-Questions (22) Internal Tables (1) interview questions (1) Lock Object Interview Questions (1) Lock-Objects-Interview-Questions (10) Logical Database (1) Modularization Interview Questions (4) Modularization-Interview-Questions (25) Module Pool Programming (5) Module-Pool-Programming (39) modules in sap (1) Object Oriented ABAP (19) Object Oriented ABAP Interview Questions (15) object-oriented-abap (2) Object-Oriented-ABAP-Interview-Questions (34) OOABAP (9) Reports (14) Reports Interview Questions (9) Reports-Interview-Questions (19) RFC (1) RFC Interview Questions (1) RFC-Interview-Questions (14) RICEF (1) RICEF Objects (1) SAP (4) SAP ABAP (4) SAP ABAP Interview Questions (42) SAP ABAP Introduction (46) SAP ABAP Message Types (2) SAP BADI Interview Questions (2) SAP Basics (71) SAP Books (2) SAP Certification (1) SAP CONSULTANTS (5) SAP CRM (1) SAP ENHANCEMENTS (3) SAP EXITS (2) SAP EXITS ( SAP ENHANCEMENTS ) Interview Questions (1) SAP Free Books (1) SAP HR (2) SAP Lock Object (1) sap modules (2) SAP Open SQL Statements (1) SAP R/3 Architecture (4) SAP Search help (1) SAP Smartforms (1) SAP Smartforms Interview Questions (2) SAP Tables (5) SAP Tcodes (10) SAP Views (1) SAP Webdynpro ABAP (12) SAP Work Processors (2) SAP Workflow (3) SAP-BADI-Interview-Questions (11) SAP-Enhancements (39) SAP-Exits (39) SAP-Exits-Enhancements-Interview Questions (3) SAP-HANA (1) SAP-HANA-Interview-Questions (1) SAP-Smartforms-Interview-Questions (2) SAP-Workflow (3) Scripts (3) Scripts Interview Questions (2) Scripts-Interview-Questions (32) Search Help Interview Questions (1) Search-Help-Interview-Questions (9) Smartforms (1) Table Maintenance Generator (1) Table-Maintenance-Generator (4) Tables in SAP (2) Tables Interview Questions (3) Tables-Interview-Questions (3) Type Group Interview Questions (1) Type-Group-Interview-Questions (7) Variable Declaration (1) Views Interview Questions (1) Views-Interview-Questions (5) Webdynpro (12) what is big data (1)

Protected Blog

 
This blog is not affiliated to SAP AG |SAP is trademark of SAP AG |The information collected from various sources use information with your own risk.