Wednesday, August 1, 2007

Modularization

1

What does modularization means.

Dividing the program in to sections so as to increase the appearance and readability of the code.

2

What are different modularizing techniques.

a. Includes.

b. Macros.

c. Subroutines.

d. Function Modules.

3

Are includes executables.

No.

4

Where do we create include.

IN SE38 just select type I instead of E as for reports in attributes.

5

Can includes be nested.

Yes.

6

What is a macro.

Macros are like small codes written inside the program or can be global , we can pass parameters to these macros.

7

How many parameters can we pass to the macros.

Maximum 9.

8.

Is it good practice to use macros.

Macros are inserted at the calling point during runtime which increase the length of the codes and hence the execution time so they should not be used frequently.

9

How do we define and call macros.

Definition.

Define <macro name>.

<Code>

End-of-Definition.

Calling a macro.

<Macro name > parameters.

10

What is a subroutine.

Subroutines are local calls made in the program which may or may not return a value.

11

Can parameter be passed to a subroutine.

Yes, They can be

a. Pass by value.

b. Pass by reference.

c. Pass by value and return or changing.

12

How are internal tables passed.

They are always passed as pass by reference.

13

Can a subroutine be called outside a program.

Yes, just put in the program name that contains the subroutine.

Syntax <Subroutine_name>(<Program_name)

14

What is a formal parameter and actual parameter.

Actual Parameter: This is the one that is actually passed to the subroutine.

Formal Parameter: Parameters that hold the values in the actual call in the subroutine are formal parameters.

15

What is a function group.

Logically related function modules are stored under one roof , function group. This is necessary for creating a function group.

16

What is the T-Code for creating function module.

SE37.

17

What are the types of function modules.

a. Normal.

b. Remote enables.

c. Update function module.

18

What are the important tabs in function module.

a. Import

b. Export

c. Changing

d. Tables

e. Exception

There are two more tabs

a. Source code

b. Attributes

19

What is an exception tab.

User can raise exception in the function using the raise statements these exceptions are stored in the exception tab and are handled where the function is called.

20

What is a remote enabled function module.

Function that can be called outside sap by any other application is a remote enabled function module.

21

What is an update function module and why is it used.

When user wants to update any data base table directly then we should use these FM as it work on the principal of commit all(If update is successful) or rollback all(If update fails).

No comments: