HR Function Modules and HR Macros
Hi ,
I have to create one interface program for SAP HR.
For that I am trying to use Function module HR_READ_INFOTYPE , but I think we should not use LDB PNP if we use this Function module.
Further I tried to use RP_PROVIDE_FROM_LAST macro also for this LDB is mandatory.
I need to know which one i can use the Function module or Macros in regards to performance.
Which one will take more time for execution Function Module or the Macro? If Function Module why ? If Macro why?
Please help me out becoz am new to SAP HR coding.
Thanks in Advance
You can use th get runtime statements in code to find out how much time a part of the source takes to run.
HR macros are stored in table TRMAC, so you can find out what the source is behind these.
Kind regards, Rob Dielemans
Similar Messages
-
Calling a function module from APO Macro
Hi,
Can I call a function module from a macro directly without going through the user exit? If so, how should I pass the parameters to the function module? I don't have to get the results back to macro.
RegardsHi Asokan - you can call a function module directly from a macro providing it is designed to be called from a macro. For example if you are in the Macrobuilder and use the menu path Edit -> Edit User Function then you will get a list of existing function modules that you can call directly by inserting a Operator/function into your macro. If you want to call a function module not listed in the User Function drop down list then you will either need the user exit or create a custom function module as a wrapper and register the wrapper function module in the Edit User Function menu path. Calling a function module will always return a value - but you can choose to ignore that value depending on how you build your macro.
Regards
Andy -
Required help on Function Modules and Bapis
Web portal publishing of ERS invoice letters. This involves modification in the BAPI screens to show the invoice PDF instead of printing??
can anyone help me in fixing this issue.hi Anjaneyulu,
open the t-code --> and go to menu system->status-->select the program and open the program-->
selct the tree structure----in the left side the includes screen and function module everthing will show..
or
open the t-code --> and go to menu system->status-->select the program and open the program-->
go to attributes and select the Package..
next----
go to se80--> enter the package --> and dispalay it shows the list of Program , include transaction function modules and bapi's under the pakage
Regards,
Prabhudas -
Examples for using function modules and BApis.
My Dear FRNDS,
I am very new to ABAP. And I have read the documentation for function modules but i am not that clear to practice them.So I would be very happy if u people share a little bit of ur experience with me.
Please provide me some examples of all the use cases in function modules and specially exception handling.
Frnds, i am going to work with bapis so i feel practicing function module will give me a edge.
and please tell me after calling a BAPI FM why we have to perform 'BAPI_TRANSACTION_COMMIT' and 'BAPI_TRANSACTION_ROLLBACK'.
.Ur efforts will be greatly rewarded.
thx,
reshaliHi,
Please check this sample codes.
DATA: BAPI_Z05DOGI_DELIVERY LIKE BAPIOBDLVHDRCON-DELIV_NUMB ,
BAPI_Z05DOGI_HEADER_DATA LIKE BAPIOBDLVHDRCON OCCURS 0 WITH HEADER LINE ,
BAPI_Z05DOGI_HEADER_CONTROL LIKE BAPIOBDLVHDRCTRLCON OCCURS 0 WITH HEADER LINE,
BAPI_Z05DOGI_ITEM_DATA LIKE BAPIOBDLVITEMCON OCCURS 0 WITH HEADER LINE,
BAPI_Z05DOGI_ITEM_CONTROL LIKE BAPIOBDLVITEMCTRLCON OCCURS 0 WITH HEADER LINE ,
BAPI_Z05DOGI_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE .
CLEAR: BAPI_Z05DOGI_DELIVERY , BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA ,BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
REFRESH: BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA , BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
BAPI_Z05DOGI_DELIVERY = ZMM_WB1-ISSUE .
BAPI_Z05DOGI_HEADER_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
APPEND BAPI_Z05DOGI_HEADER_DATA.
BAPI_Z05DOGI_HEADER_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_HEADER_CONTROL-POST_GI_FLG = 'X'.
APPEND BAPI_Z05DOGI_HEADER_CONTROL.
BAPI_Z05DOGI_ITEM_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_ITEM_DATA-DELIV_ITEM = 10.
BAPI_Z05DOGI_ITEM_DATA-DLV_QTY = LFIMGGIA.
BAPI_Z05DOGI_ITEM_DATA-SALES_UNIT = XTAB-MEINS.
BAPI_Z05DOGI_ITEM_DATA-DLV_QTY_IMUNIT = LFIMGGIA.
BAPI_Z05DOGI_ITEM_DATA-FACT_UNIT_NOM = UMVKZLIPS.
BAPI_Z05DOGI_ITEM_DATA-FACT_UNIT_DENOM = UMVKNLIPS.
APPEND BAPI_Z05DOGI_ITEM_DATA.
BAPI_Z05DOGI_ITEM_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_ITEM_CONTROL-DELIV_ITEM = 10.
BAPI_Z05DOGI_ITEM_CONTROL-CHG_DELQTY = 'X'.
APPEND BAPI_Z05DOGI_ITEM_CONTROL.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
EXPORTING
DELIVERY = BAPI_Z05DOGI_DELIVERY
HEADER_DATA = BAPI_Z05DOGI_HEADER_DATA
HEADER_CONTROL = BAPI_Z05DOGI_HEADER_CONTROL
TABLES
ITEM_DATA = BAPI_Z05DOGI_ITEM_DATA
ITEM_CONTROL = BAPI_Z05DOGI_ITEM_CONTROL
RETURN = BAPI_Z05DOGI_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPI_Z05DOGI_RETURN.
Go thru this link
http://www.planetsap.com/LIST_ALL_BAPIs.htm
BAPI_TRANSACTION_COMMIT
Execute external Commit when using BAPIs
This method executes a COMMIT WORK command. It is required for
transactions developed externally to the R/3 System that change data in
the R/3 System via BAPI calls.
When you call BAPIs in your program that change data in the R/3 System,
afterwards you must call this method to write the changes to the
database.
COMMIT WORK
The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the currenta SAP LUW in the process
there are some FM that we use for creating trasaction . for example FM : that use for creating production order . if you execut the FM , the system will not create any data in the system so you need to excute the FM : BAPI_TRANSACTION_COMMIT to commit that creating the production order .
in case of commit work, that is a syntax in abap program . if you use this syntax after you insert ,update or delete table in the sap ,system will do it immediately otherwise the system will do it after execution is complete.
ROLLBACK WORK.
for confirming or undoing database updates. COMMIT WORK always concludes a database LUW and starts a new one. ROLLBACK WORK always undoes all changes back to the start of the database LUW.
Regards,
Raj. -
Function modules and BAPIs for a transactio code
Hi friends,
How i can find the List of function modules and BAPIs being used for a particular transaction code?
for example: I would like to find List function modules and BAPIs being used for the Transaction code
"FBRA"(Reset cleared items)?
Any sort of help on this will be helpful.
Thanks,
Punjaalahi Anjaneyulu,
open the t-code --> and go to menu system->status-->select the program and open the program-->
selct the tree structure----in the left side the includes screen and function module everthing will show..
or
open the t-code --> and go to menu system->status-->select the program and open the program-->
go to attributes and select the Package..
next----
go to se80--> enter the package --> and dispalay it shows the list of Program , include transaction function modules and bapi's under the pakage
Regards,
Prabhudas -
Table name in which function module and function group store
Hai,
Any one help me, What is the table name, the function modules and fouction groups are stored.
Thanks,
Elamaran...and table enlfdir has additional info.... function module RS_GET_ALL_INCLUDES is useful for getting a list of includes used by an fm.
Message was edited by: Neil Woodruff -
What is the difference b/w ALV Function Module and ALV Methods?
Hello Friends,
Can anybody help me in finding out the difference between ALV Function Modules and ALV methods?
Thanks & Regards
Sathish KumarHi Sathish,
Plz go through this info. It is very useful.
hi,
chk these excellent links.
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
OOPs:
Check this for basic concepts of OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
Tabstrip
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
Editable ALV
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
Tree
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
General Tutorial for OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
Rewords some points if it is helpful.
Rgds,
P.Naganjana Reddy -
What is the difference between the normal function module and bapi function
hi,
what is the difference between the normal function module and bapi function module.Hi
BAPI stands for Business API(Application Program Interface).
A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
Regards
Anji -
Call an executable program inside function module and pass the table values
Hi,
i'm pretty new to HR Abap programming. I have a requirement like "calling an executable program within a function module and the output of the program data(Stored in internal tables) should be passed to the function module tables".
I've some idea about SUBMIT keyword and i used it in the function module..
Please do the needful to solve this.
Regards,
Selvi.Hi,
Thanks for all your reply.
I've used Option 3 as per dsouzajovito suggestion. Now i'm getting data in function module tables using import/ export table to memory concept.
Again a small issue arises, while i'm executing function module it fetches all pernr available in the server and displays the details of last pernr. GET pernr statement is used in the Z report and submit statement is used like this as follows.
SUBMIT ZHR_RFC_PAYSLIP WITH PERNR-PERNR EQ EMPCODE
WITH PYBEGDA EQ FDATE
WITH PYENDDA EQ LDATE
AND RETURN.
Pls suggest if there is any corrections in the code.
If i give a pernr as input in the function module, then it should fetch the details related only to that pernr.
FYI, No selection screen is used here as per requirement.
Regards,
Selvi. -
Generic extraction using function module and view
hi every one ,
iam new to bw and can anyone plz tell me how to extract the data from R/3 to bw using generic extractor by creating function module and a view
thank u,
kishoreHi Kishore,
Check this blog:
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Also Check this doc:
http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/frameset.htm
Generic Extractors
Generic data sources
Generic DS
Bye
Dinesh -
Badi's, user exits, function modules and reports
Hi all,
Can anybody tell me the exact diff among Badi's, user exits, function modules and reports? I mean what are their functions?
thanksHi,
This is a beginners question,but still you can check the below links.
BAdis:
Regarding Enhancements/User-Exits in ABAP
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/ee/a1d548892b11d295d60000e82de14a/content.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/779183#
FM:
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
Reports:
http://it.toolbox.com/wiki/index.php/How_many_types_of_reports_are_there_in_ABAP_and_what_is_the_difference_between_them%3F
Regards,
saurabh -
Comparing ALV using Function modules and OO ALV
Hi All,
Please provide me what are the advantages of developing ALV using Objects compared to creation using function modules. What are the disadvantages of creating using the conventional FM way.
I have not worked much on ALV using Function modules, have been developing using standard abap classes. I wanted to have an detailed understanding and differences between the two.
Please provide your views on the same.
I have searched SDN forum, but didnt find much information, so it will be of great help if you provide some inputs.
Thanks & Regards,
Navneeth K.Hello,
Check this link
ALV FUNCTION MODULE AND OBJECT ORIENTED ?
Example programs
http://saplab.blogspot.com/2007/10/sample-abap-program-of-alv-grid-control.html
http://www.abapcode.info/2007/06/object-oriented-alv-using-two.html -
RFC enabled function module and BAPI?
What is the difference between RFC enabled function module and BAPI?
I have requirement to develop a new BAPI which will update a custom table and read the same table in SAP from an external application.
Do we need define a port or RFC destination for the external application to use the new BAPI?
I am clear how the external application access the BAPI.
Thank youBAPI are business objects which are basically object oriented. Created and linked with business objects in <b>SWO1</b>. Those business objects will be listed under BAPI tcode.
Where are RFC enabled Function call are not like that. They are just Function modules which can be accessed remotely from an SAP application.
For your example updating table, you may need to create BAPIs in SWO1 and access using those using object oriented methods from external application.
Cheers,
Thomas. -
Documentation of Function Modules and Class Methods
Hi
I would like to know the function modules that handle the documentation of function modules and class methods.Is it possible to assign the same documentation of a function module to a method as method documentation?
Are these documentations stored in some system tables?
Thanks in advance,
HemaThe documentation text is stored as Standard text.
you can see these details in the function module->
goto->documentation->
you will now see a screen, there GOTO->HEADER.
YOU will see a screen with the below details.
Text Name Z0MM_SCM_FNC_EVCOR_DELIVERY
Language EN
Text ID FU Function module
Text object DOKU Online Documentation
in this case TEXT NAME = FUNCTION MODULE NAME.
These details are stored in STXH &STXL . But you can use select from these tables. you have to use READ_TEXT to read the documentation to the program.
regards
srikanth -
List of Functional Module and BADIs
Hi Forum,
I m new in this CRM, started as a CRM functional.
Just want to know from where can i get list of all FUNCTIONAL MODULES and BADI.
and also is it mandatory for functional consultant to have gud knowledge and expert in usage of mentioned BADI and Functional Modules..
Kindly reply soon...
Points will surely be awarded.
Regards
Rajeev SinghHi Rajeev,
Your can view the function modules in transaction SE37.
And BADIs in SE18.Its not mandatory to know the function module details or Badi details for a functional consultant , but it always good to have a knowledge. It will reduce the task of technical consultant.
Like Function Module CRM_ORDER_READ, is used to get the details of any business transaction. Simlarly BADI ORDER_SAVE is called every time u save a transaction etc.
Regards,
Shalini Chauhan
Maybe you are looking for
-
How to keep an image in thimble?
where should i add my image and how to get that ink an d how add that source?
-
FM for getting employees by JOB
Hi All, Does anybody know the function module to be used to get a list of employees with a particular job code in SAP HR? Thanks for the help. Regards, Krishnakumar PM
-
UserControl not marked as serializable
Hello, I have a 2 projects in a C++ solution. First project has a form with user control. User control class (deriving from UserControl, has [Serializable] attribute; its List<Byte> private field has [NonSerialized]) is in second DLL project. When
-
how do I make safari work again? I was trying to open an article on mashablaw when this happened. Please help
-
Find out what user accounts are tied to
Spicework Team,Wanted to know some thoughts on when an employee leaves the company. We have a employee termination sheet that we go through when someone leaves the company. My question is we recently had somebody from our IT department leave who has