This video tutorial is a continuation of a series on working with Function Modules in ABAP, a high-level programming language created by SAP. In this particular video, the instructor focuses on how to create a custom Function Module. The tutorial uses a scenario where the custom Function Module takes a date as an input and provides the year, month, and day as output. The tutorial also covers how to use this custom Function Module in a program.
Key topics covered in the video session:
- Introduction and Scenario Explanation: The instructor begins by explaining the scenario for which the custom Function Module will be created. The Function Module will take a date as an input and provide the year, month, and day as output.
- Creating a Function Module: The instructor demonstrates how to create a Function Module using transaction code SE37. The naming convention for the Function Module starts with a ‘Z’ or ‘Y’. The instructor creates a Function Module named ‘ZFM_GET_DATE_INFO’.
- Defining Import and Export Parameters: The instructor defines the import parameter as ‘DATE’ and the export parameters as ‘YEAR’, ‘MONTH’, and ‘DAY’. The instructor explains that the import parameter is the input to the Function Module, while the export parameters are the outputs.
- Writing the Source Code: The instructor writes the source code for the Function Module, which uses the input date to derive the year, month, and day. The instructor explains how to use the offset operator to extract specific parts of the date.
- Testing the Function Module: The instructor tests the Function Module by providing a date as input and checking the output. The Function Module correctly provides the year, month, and day based on the input date.
- Using the Function Module in a Program: The instructor demonstrates how to use the custom Function Module in a program. The program takes a date as input from the user, calls the Function Module with this date, and displays the derived year, month, and day.
- Debugging the Function Module: The instructor explains how to debug the Function Module and the program that uses it. The instructor sets a breakpoint in the program, runs the program, and steps through the execution of the Function Module.
- Creating Another Function Module: Towards the end of the video, the instructor mentions that they will create another Function Module in a future tutorial to further understand Function Modules.