1.

Explain the types of function modules in SAP ABAP.

Answer»

Function Modules are encapsulated procedures in ABAP and are grouped in Function Groups. Function modules are created with the help of Function Builder(transaction SE37). The type of function module relies on the type of processing.

Function module types are:

  • Regular function module: It will be EXECUTED IMMEDIATELY and synchronously on the current SAP system of the user. It is the default option.
CALL FUNCTION funcname { parameter_list | parameter_tables }.
  • Remote-enabled function module: It is called by remote systems(R/2 or R/3) that utilize the RFC protocol. For example, it is possible to define a Remote Function Module in an EWM(Extended Warehouse Management) system which will be later called by your ERP(Enterprise Resource Planning) system for obtaining further information related to stock levels or shipment details.
CALL FUNCTION funcname DESTINATION dest parameter_list.

The above statement calls the target system mentioned under dest synchronously. The unique name of a destination should be used for the parameter dest.

  • UPDATE function module: This module will not be executed immediately. This update process will be triggered by the COMMIT WORK statement. The ROLLBACK WORK statement is responsible for deleting all update function module registrations.
CALL FUNCTION update_function IN UPDATE TASK [EXPORTING p1 = w1 p2 = w2 ...] [TABLES tab1 = itab1 tab2 = itab2 ...].

IN UPDATE TASK will bundle database modifications into a single database called LUW. Since the update happens asynchronously, it is proved beneficial for performance.

  • BAPI(Business Application Programming Interface) function module: BAPI is a Function Module that PROVIDES a standard interface for business objects available in SAP. Common usage of BAPI is to create/delete/update/read business objects such as Business PARTNERS, Purchase Orders, or Sales Orders.


Discussion

No Comment Found