Upload
khaleelinnovator
View
1
Download
0
Embed Size (px)
DESCRIPTION
Ex on Append_updatedFunctiom Modules Theory
Citation preview
A R J U N . L E A R N R E A L T I M E S C E N A R I O S D O N E B Y M E
Page 1
A B A P & W E B D Y N P R O A B A P @ A R J U N IGROWSOFT
Function modules A Function module is a sub program which contains a piece of abap code which is used for
specific functionality or a task.
Function modules contains importing and exporting parameters
Function modules also contains Exceptions to raise Error messages
Function modules can be tested independently
Function modules can be debugged independently
Function modules are mainly used for global modularization i.e., once a function module is
created it can be used by multiple program throughout SAP.
Function Group:
It is a Group or container of function modules
Whenever we create a function module, it must be saved under a group called as
function group.
Diff Function modules in a function group can share global data.(TOP include prog)
There are two ways to create a function group.
1. From Tcode SE80
2. From Tcode SE37 click on Menu Go to Function groupscreate group
STEPS TO CREATE A FUNCTION GROUP:
Go to SE80
Give the function group name as ZFGRP
Press enter
Click on yes button
Function Group will be created
Whenever a function Group is created, by default a main program and to include programs will be
created
Ex: SAPL < Function Group Name> Main group
Ex: L< function grp name> Top Include prgs
L< function grp name> UXX Include prgs
Note: Always the function group should be activated immediately
A R J U N . L E A R N R E A L T I M E S C E N A R I O S D O N E B Y M E
Page 2
A B A P & W E B D Y N P R O A B A P @ A R J U N IGROWSOFT
Components of a Function Module:
1. Import Input to a fmod are called as Importing parameter
2. Export Output from a fmod are called as exporting
3. Changing A variable/wa which acts as Imports/ Export are called as changing parameters
4. Tables Internal tables as Input & output are called as table parameters
5. Exception Are used to catch certain type of errors
6. Source code Contain the ABAP code for a FMOD
Note: TABLES PARAMETERS are OBSOLETE in SAP
They are no longer used in SAP
So we create a table type which act as internal table
We create table types in SE11
Table types are used in advanced ABAP, i.e., OOABAP. We will discuss in OO ABAP.