Free SAP Training & Tutorial A Free SAP Functional And Technical Tutorial And Training For ABAP, SAP QUERY, ALV, SMARTFORMS, SD, PP, MM, QM, FICO
26.02.2011 | Author: | Posted in ABAP 

FUNCTION MODULES:  SAP function modules are procedures with interfaces that are defined in Function groups. R/3 system consists of a number of predefined function modules , besides we can create our own function modules  to reuse  any specific functionality  in our programs. We can define function modules from simple calculations to complex reports in SAP.

Function group : Function groups act as containers for function modules. A group of related function modules can be defined under one Function Group. We can assign our newly defined function module to an existing function group or can define our own function group. Function groups are o f program  type F . Function modules that are in the same function group share global data of the group.

1)   Importing parameter : These are export parameters that has to be supplied with data to the function module. They have to be supplied with data unless they are flagged as optional. We cannot change these parameter values in the function module. We have another type called changing parameters for them.

2)   Exporting parameters :  The calling program receive result as  export paramaters from the  function module.

3)    Changing : Changing parameters performs both the functions like importing and exporting data to and from the function module.  The supplied variable can be changed in the function module and returned to the calling program.

4)    Tables : Table parameters are especially used to pass internal tables. They also function like changing parameters. They have to be supplied with values unless they are marked as optional.

5)    Exceptions:  Exceptions are for handling situations where in which normal execution of program becomes difficult.  For example if there are not entries in the table TAB1 that meet the selection criteria. We need NOT_FOUND exception for this.

SELECT * FROM MARA INTO TABLE I_MARA WHERE MATNR = mat1.
IF SY-SUBRC NE 0.
MESSAGE E007(AT) RAISING NOT_FOUND.
ENDIF.

6)    Source code : The coding between FUNCTION and ENDFUNCTION STATEMENT is called the source code of the function module.

7)    SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
IF SY-SUBRC NE 0.
MESSAGE E007(AT) RAISING NOT_FOUND.
ENDIF.

Popularity: 1% [?]

 


 
 

Related Tutorial " ABAP" 

  •  
     
    Recent Tutorials
    Create Table Maintenance Display In SAP Create table display to maintain tables values using SM30
    Create Table Maintenance Generator In SAP Maintaining SAP Transparent table values using maintenance generator
    Table Relationship In SAP Learn How To Find Tables Relationships in SAP
    Convert Number To words Using ABAP Find out how to convert numbers into words Using ABAP
    How To Maintain Long Text Object in SAP Maintain long text object in SAP
    How To Know What TCODE Used In ABAP Program Find TCODE For your ABAP Program Report
    How does CRM Work? Learn how CRM system works to run your business
    Why SAP CRM is the Best Choice? The reasons why CRM application is the best choice
    Difference Between CRM System and CRM Strategy What's the difference between CRM system and its strategy
    CRM for a Better Customer Service Learn how CRM could make your customer service much better
    Costs of Implementing CRM Software Learn the how much cost you need to prepare when implementing CRM
     
    Popular Tutorials
  • (none)
  •  
    Categories
    ABAP   Basis & Configuration  
    ALV SAP BW (Business Warehouse)
    BAPI   SAP Interview Questions
    SAP Tables   SAP Overview
    Transaction Codes FI SAP Query
      MM SAP Script  
      PP SAP Tutorial FI Module
      QM   MM Module
      SD   PM Module
    SAP Functional MM   PP Module
      SD   QM Module
    White Papers     SD Module
    Uncategorized   SmartForms  
      User-Exits  
     
     

     

    Home | About | Contribute | Privacy

    Copyright 2011 freesaptutorial.com.

    Free SAP Tutorial is not associated with SAP AG in Germany or in any other country.

    SAP is a registered trade mark of SAP AG.