FUNCTION MODULES

FUNCTION MODULES

Module Objectives

  • Define Function Modules
  • Define Function Groups
  • Describe Function module Parameters
  • Explain Exception Processing
  • Define global data / local memory
  • Use Remote Function Call (RFC)
  • Search the Function Library

Introduction to Function Modules

•Function modules are procedures that are defined in special ABAP programs, so-called function groups, that can be called by all ABAP programs.

•Function groups act as containers for function modules that logically belong together.

•Function modules also play an important role during updating and in the interaction between different SAP systems, or between SAP systems and remote systems through remote communications.


function_module
function module

Navigating to Function Modules (SE37)

Navigating to function Modules

Navigating to Function Modules (ADT)

Navigation to function Modules

Function Groups


Function Groups

Function Groups

function groups
function groups

Calling a Function Module

Calling a function Module
Calling a function module

Parameters

Parameters
Parameters

Exception Processing

Exceptions

Exception Processing

Exception processing
exception Process

Remote Function Call

Remote function call
Remote function call

Example of RFC usage

example of RFC usage

Using Exceptions for RFC

Remote Function module calls with the addition DESTINATION can handle two special system exceptions:

     –SYSTEM_FAILURE

      This is triggered if a system crash or any failure occurs on the remote machine

     –COMMUNICATION_FAILURE

      This is triggered if there is a connection or communication problem.


Requesting Error messages

The system sets the message variable (g_msg) to the system message. You can then display the message or log it in a file. You should not try to interpret message text in your program.

Create function group

Create function group
Create function Group
Creation


ABAP Function Module
ABAP Function Module



Write the function module code. Activate when done.

Use the function module in your program

Comments

Popular posts from this blog

SAP ABAP SELECT STATEMENT

SAP ADOBE FORMS

ABAP AUTHORIZATION CONCEPT