Вы находитесь на странице: 1из 4

Lesson 15:

There are four types of MODULARISATION Techniques are available

1. MACROS (OBSOLUTE. Reason is that this cannot be debugged)


2. SUBROUTINES
3. INCLUDES
4. FUNCTION MODULES

Program does not start at declaration portion and it will always skips.

SUBROUTINES: Syntax will be “PERFORM XXX”. Once we write and double click on “XXX”, system will
form “FORM” and “ENDFORM” automatically. We can write any function we want inside this piece
of Code. Please note that we should not write anything after ENDFORM.

If Declaration is done at start of the Program, it is Global Data. But we declare inside the PERFORM
Statement, then it is local and cannot be accessed outside and even PERFORM inside the PERFORM
will not access it.

To pass the Data from One SUBROUTINE to another SUBROUTINE, we should use the keywords
USING, CHANGING and TABLES. “TABLES” keyword is OBSOLETE now and no more it is used.
Parameters or the variables which are passed along with the PERFORM statement are called
“ACTUAL PARAMETERS”. VARIABLES written along with FORM Statement are called “FORMAL
PARAMETERS”. Actual parameter names can be different than formal parameters but they should be
passed in the same order.

Lesson 16 & 17:

There are two ways of passing variables from one subroutine to another subroutine. If the variable
passed is by “PASS BY VALUE” method and if the value in FORMAL PARAMETER is changed and value
in ACTUAL PARAMETER is not changed. If we pass by “CALL VY REFERENCE”, value in the ACTUAL
PARAMETER is also changed.

USING keyword is used for passing variables and work area. CHANGING keyword is used for passing
Internal Tables and for performing PASS BY VALUE.

Difference between PARAMETERS and SELECT-OPTIONS.


1. SELECT-OPTIONS can accept multiple values
2. We cannot create Check Boxes and Radio Buttons using SELECT-OPTIONS
3. IN Operator is used in WHERE Condition for SELECT-OPTIONS.

When a parameter is created using SELECT-OPTIONS, system creates an Internal Table with four
parameters with Header Line and they are SIGN (I for inclusive and it is default, E for exclusive),
OPTION (ex. BT), LOW and HIGH.

FUNCTION MODULE:

SE37 is used to create FM and it is block of Code for used in any Program. Function Group can hold
number of Function Modules and it can hold Global

FG can be created thru SE37 -> Goto -> Function Group -> Create Group.

Then, Goto SE38 -> SIPL(Functional Group) and Activate.


We can export or import work area and internal tables from Functional Module where TYPING
would be TYPE with respective TABLE Type is chosen. Keyword “RAISE” is used for mentioning
EXCEPTION.

Lesson 18:

INCLUDES Programs cannot be directly executed and must be called under either executable
program or Main Program. An INCLUDE Program can call another INCLUDE Program.

Reports are classified into Classical and ALV Reports. Both are again classified into Basic and
Interactive Reports.

Events, and ON HELP REQUEST), START-OF-SELECTION and END-OF-SELECTION, TOP-OF-PAGE and


END-OF-PAGE.

INITIALISATION: It is used to assign some initial value to the parameter

AT SELECTION SCREEN OUTPUT: It is used to modify screen layout

AT SELECTION SCREEN ON FIELD: It is used to validate only particular field

AT SELECTION SCREEN ON VALUE REQUEST: it is used to provide search help for a particular field.

AT SELECTION SCREEN ON HELP REQUEST: It is used to provide Documentation help for particular
field.

START-OF-SELECTION: It is generally used to put something related to output.

TOP-OF-PAGE: It is used to put something at the top of the Page.

Events in Interactive Reports:

AT LINE-SELECTION:

AT USER COMMAND:

AT PF:

TOP-OF-PAGE DURING LINE SELECTION

BOTTM-OF-PAGE DURING LINE SELECTION

We can maintain Text Symbols thru Goto Menu.

SELECTION-SCREEN: Keyword is used to create a block with syntax BEGIN OF BLOCK and END OF
BLOCK.

SELECTION-SCREEN: BEGIN OF BLOCK A WITH FRAME TITLE TEXT-001.

PARAMETERS: ABC TYPE ABC.

END OF BLOCK A.

Lesson 19:

AT SELECTION SCREEN is used for Screen validation at the input screen and program flow stops here.

There are five types of Messages i.e. E for Error, I for Information, S for status, W for Warning and A
for Abort. Message Class can hold group of messages.

Вам также может понравиться