Wednesday, February 6, 2008
Creating a Function Module in SAP ABAP. DownLoad PDF
Function modules are very important in SAP ABAP. Once you create a function module then it can be called from any program. You just need to pass some parameters to this function module and once the function module runs it passes back the desired result in the form of a variable. SAP has provided a transaction to create a function module.
Execute transaction SE37 and create a function group as shown in the figure below.
Give the desired function group name and a short text.
Once the function group is created type the desired function module name as shown below.
And click on create.
Enter the function group name created earlier and the desired short text for function module.
and click on save.
Save the function module as a $tmp object.
Now the following screen will be presented to you, here you need to enter the
import and export parameters. These are nothing but the variables that you
would be passing to the function module and the returned values from the
function module.
The following screen shot shows the returned values from the function module.
Type the following code in the source code area.
Active the function module and the related code.
Call the above created function module from an ABAP Report. The following screen shot
shows the details to insert the code.
Type the code shown below. And run the report.
Function modules are very important in SAP ABAP. Once you create a function module then it can be called from any program. You just need to pass some parameters to this function module and once the function module runs it passes back the desired result in the form of a variable. SAP has provided a transaction to create a function module.
Execute transaction SE37 and create a function group as shown in the figure below.
Give the desired function group name and a short text.
Once the function group is created type the desired function module name as shown below.
And click on create.
Enter the function group name created earlier and the desired short text for function module.
and click on save.
Save the function module as a $tmp object.
Now the following screen will be presented to you, here you need to enter the
import and export parameters. These are nothing but the variables that you
would be passing to the function module and the returned values from the
function module.
The following screen shot shows the returned values from the function module.
Type the following code in the source code area.
Active the function module and the related code.
Call the above created function module from an ABAP Report. The following screen shot
shows the details to insert the code.
Type the code shown below. And run the report.
Subscribe to:
Post Comments (Atom)
ABAP TIPS
|
Always use Pretty Printer and Extended Program Check before releasing the code. Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive. |
1 comment:
How to change the screen to open the ABAP report?
I got a problem below these step
"
Active the function module and the related code.
Call the above created function module from an ABAP Report. The following screen shot
shows the details to insert the code."
Post a Comment