on ‎2007 Aug 03 4:44 AM
Hi
can any body explain me clear under standing of function module with examplese.
difference between BADI and Funtion module?
Any standard sap BADI and fucntion modules?
Thanks
Kris
Request clarification before answering.
ABAP Functions Modules Sample Programming Codes
The ABAP example program listed here uses the CALL FUNCTION found in 'SE37'. For e.g. ALV.
Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. All functions can be found at transaction code 'SE37'.
If you need any ABAP help, do feel free to asked it in the Abapers forum.
<a href="http://www.erpgenie.com/abap/functions.htm">Function Module Exemple</a><a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm">FUNCTION MODULE</a>
[url=http://abapcode.blogspot.com/2007/05/difference-between-badi-and-user-exits.html]differences[/url]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kris,
What is function module?
Ans. Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together,Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library,Unlike subroutines, you do not define function modules in the source code of your program.
3 types.
1)normal function module
2)remote function module
3)update function module
Step by step how to create function module?
Ans. Exercise 1: Creating a Function module
Use
Function modules are ABAP routines that are administered in a central function library. They apply across applications and are available throughout the system. You must assign function modules to a function pool that is called a function group. A function group is nothing but a container for the function modules. Now create a function group and then a function module, which you can use for the next exercise steps.
Procedure
Create a Function Group:
To open the Object Navigator choose from the SAP Menu Overview ® Object Navigator.
From the Object Selection window select Function group, enter FG_Tutorial as name of your function group, and choose Display.
Since the function group FG_Tutorial does not yet exist, the system asks you whether to create it. Confirm with Yes.
Enter a short description and choose Save.
In the window Create Object Catalog Entry choose Local object.
You created a local function group. Before it can receive function modules, you must activate it.
In the object list, use the right mouse button to select the function group FG_Tutorial you just created and choose Activate.
On the next screen choose Continue.
The function group is now active.
Create Global Data:
Within the function group you can declare global data. All function modules of this function group share this global data.
In the Object Selection window open the directory tree Includes and double-click on LFG_TutorialTOP.
Choose Create « Change ( STRG+F1 ) and enter the following data declarations in the tool area:
TABLES spfli.
DATA spfli_workarea LIKE spfli.
Check ( STRGF2 ) and activate ( STRGF3 ) the include file.
Create a Function Module:
Create a function module that reads data from table SPFLI .
If you are not yet in the Object Navigator, choose from the SAP Menu Overview à Object Navigator and display the function group FG_Tutorial .
In the Object selection window, use the right mouse button to select function group FG_Tutorial , and choose Create à Function module.
Enter as function module name XX_RFC_READ_SPFLI and replace XX with the initials of your name.
Enter a short description and choose Save.
The system lists the function module in the object list in a new directory Function modules, and displays it on the right side in the Function Builder.
Select the Attributes tab and under Processing type choose Remote-enabled module.
Select the Import tab and enter in the appropriate columns the names of the import parameters: carrid with reference type like spfli-carrid and connid with reference type like spfli-connid . For each parameter set the Pass value flag.
Select the Export tab and enter in the appropriate columns the names of the export parameters: ex_spfli with reference type like spfli and sys with reference type like sy-sysid . For each parameter set the Pass value flag.
Select the Exceptions tab and enter the exception invalid_data .
Select the Source code tab.
The system copies the entries you made in the other tabs and creates a source text.
Complete the function module with the actual flight data retrieval.
Compare your function with the model solution.
Save the function module ( STRG+S ). When the note on remote-enabled function modules appears, choose Continue.
Check the function for errors ( STRGF2 ) and then activate it ( STRGF3 ).
Test the Function Module:
Choose Test/Execute ( F8 ) or Function module à Test à Test function module.
As import parameter for CARRID enter LH ; for CONNID enter 400 . Leave the RFC target system line empty.
Choose Execute ( F8 ).
The system displays the export parameters EX_SPFLI and SYS in an additional table.
For a detailed display of the data select the value in line EX_SPFLI.
Result
You created a function module and assigned it to a function group.
Standard BADI's:
Business Add-in
FISPLIT Online Split: Cash Discount, Exchange Rate Differences
FI_AUTHORITY_ITEM Extended Authorization Check for Document Display (FB03)
FI_DOC_DISP_LI Diversion to Document Items (FB03)
FI_FB08_SUBST_BUDAT FB08: Check Posting Date for Reversal of FI Doc. with FB0
FI_GET_INV_PYMT_AMT BAdI for determining the payment amount for an invoice
FI_HEADER_SUB_1300 Screen Enhancement for Document Header SAPMF05A
FI_PAYREF_BADI_010 BAdI: Payment Reference Number
FI_RES_ITEM_CURRENCY Document of Residual Item with Invoice Currency
FI_TRANS_DATE_DERIVE Derive BKPF-WWERT from Other Document Header Data
BADI_MIRO_SPLT_ADD Append additional fields of ACCVS to ACCIT
BADI_PRKNG_NO_UPDATE BAdI for Deactivating Update of Parked Documents
RFESR000_BADI_001 BAdI for Own Processing of POR Item
FVFZ Replacement for Function Modules of Function Group FVFZ
Reward points
Regards,
Govind.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pls find the following links, they will be of use to you
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
http://help.sap.com/saphelp_45b/helpdata/de/1f/a862eec47411d2806300c04fada2a1/content.htm
For BAPIs
http://www.sap-img.com/bapi.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
For BADIs and user exits
http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
A standard function module is READ_TEXT(You can view this in SE37) to copy texts from documents to smartforms.
BAPIs
BAPI_CUSTOMERQUOTATION_CHANGE
BAPI_QUOTATION_CREATEFROMDATA
BAPI_QUOTATION_CREATEFROMDATA2
BAPI_SALESORDER_CHANGE
BAPI_SALESORDER_CONFIRMDELVRY
BAPI_SALESORDER_CREATEFROMDAT
BAPI_SALESORDER_CREATEFROMDAT
BAPI_SALESORDER_CREATEFROMDAT
BAPI_SALESORDER_GETLIST
BAPI_SALESORDER_GETSTATUS
BAPI_SALESORDER_SIMULATE
They also can be seen in SE37
BADIs
WSAM_BADI_SALES_CHECK
WSAM_BADI_SALES_FLDPROT_GET
Also can be seen in SE37
Reward if this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Function Modules: Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
Use: Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
You can use SE84 to know the list of functional modules realted to SD module
Check these links on function modules
http://www.geocities.com/victorav15/sapr3/abapfun.html
http://www.onestopsap.com/function-module/
http://www.erpgenie.com/abap/functions.htm
http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
Regards,
Rajesh Banka
Reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rajesh and navaneetha
very thank full to you.
If possible can you send me the SD standard function module list which you know.
To better understand BADI ,BAPI, Function module sample examples.
Reason to ask these type of question not clear with these.
If possible send me any list which you wrote for the above ones with exaples and functional requiremen.My mail id kris_k_kris@hotmail.com
Thanks
Kris
| User | Count |
|---|---|
| 42 | |
| 26 | |
| 16 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.