‎2006 Sep 08 11:19 AM
Hi all,
Can any body please say why we need to create Function Modules in real time, Please say me any situation where we need to create Function Modules
Thanks in Advance
Ranjith
‎2006 Sep 08 11:20 AM
Basically the need to create Function module arises when you wish to write a code to do a functionality which can be reused in other programs...
example...
You wish to read data from a customer control table you can create a function module for the same to read the table and do the necessary processing depending on the input parameters.
Message was edited by: Anurag Bankley
‎2006 Sep 08 11:20 AM
Basically the need to create Function module arises when you wish to write a code to do a functionality which can be reused in other programs...
example...
You wish to read data from a customer control table you can create a function module for the same to read the table and do the necessary processing depending on the input parameters.
Message was edited by: Anurag Bankley
‎2006 Sep 08 3:36 PM
Hi Anurag
Thanks for your reply Can you please tell me what is customer Control Table, and explain it more briefly
Thanks in advance
Ranjith
‎2006 Sep 08 3:44 PM
Please do not confuse it with customer master..We have written a function module to read a control table created by us eg ZLL_GEN_CTRL, where we define certain parameters and corresponding arguments.
ZLL_GEN_CTRL.
Ctrl Argument.
EMAILTO_MPC XYZ@test.com
EMAILCC_MPC ABC@test.com,DEF@test.com
We use the same in many programs so to make it standard and easy to fetch the data...we have created a fm.
call function 'Get_control_data'
exporting
ctrl = 'EMAILCC_MPC'
delimeter = ','
importing
arg = larg
tables
dtab = itab.
In the function module we return the result of the select statement and in dtab we split the argument on the delimeter and update the internal table with the data as individual row.
Regards
anurag
Hope the above is clear and please assign points for helpful answers !!
‎2006 Sep 09 4:08 PM
Hi anurag,
Thank you very much for your good answer, please be in touch mail me my id is vrkranjit@gmail.com
Ranjith
‎2006 Sep 08 11:21 AM
hi Ranjith,
If there exists no Function Moudle which meets your requirement you put your logic in to that and create .. sometimes few report programs needs to be converted to FM based on the requirement ..
Regards,
Santosh
‎2006 Sep 08 11:23 AM
Hi,
1. Goto SE37.
2. Follow the path
Goto --> Function Group --> Create Group
3. Then enter a function name Z***** and click create.
The following link gives you more information about the functions and groups and others:
http://cma.zdnet.com/book/abap/ch19/ch19.htm
If you are looking for ENHANCEMENT kind of a thing then follow the following path:
1. Log onto R/3
2. TCODE: SMOD
3. Enhancement RSAP0001.
4. Double click on the one you are looking for i.e. Transaction / Master Data.
5. In the Function Module Double click on the INCLUDE.
Regards,
Ram
Pls reward points if helpful
‎2006 Sep 08 11:28 AM
Function modules are blocks of code that can be reused in other programs.
When you know that a for a specific set of inputs, you will have to follow the same procedure to get you a diferent output, and this procedure is very generic in nature, then you can go for writing a function module.
eg: a function module to send mails.
a function module to create sales orders etc.
2) If there is a certain part of the code which has to be triggered in an update task, or an external system wants to communicate with the r/3 system, you will have to create RFCs which are also one type of function modules.
Regards,
ravi