How to Measure Function Module Performance?
Please can you tell me how I can measure the performance and trace the actions of a Function Module in R/3?
The function module in R/3 is run when a user calls a WebDynpro action from a WebDynpro screen within the SAP Portal.
I have tried running a trace on a user (ST05) but that only shows table actions (e.g. reads/fetch etc.). Also it does not appear in ST04 or ST03N. I would like to know how long the program actually takes to run.
Thanks.
Paul
Hi,
if I want to measure the runtime required to run some Abap, I use SE30. However i used it only for normal Dynpro application, not WebDynpro.
The detail level of the created trace can be configured. The aggregation level should be set to "Full" or "By call" at the beginning. Disabling aggregation leads to huge trace files.
You can select which statements should be traced. If you disable an option it's runtime is not lost but add to the traced action in the next level. If for example "Open SQL" is disabled, the time used by it is added into the net time of the method, function module of subroutine. Otherwise if "Open SQL" is enabled the net time of a function module does not include SQL time. SQL time is then listed separately.
Greetings
Similar Messages
-
HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM
PLEASE ANYONE TELL ME, ABOUT HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM. IT IS VERY URGENT!!!!!!!!!1
Hi,
Under Global Definitions, we have 'Form Routines' tab. Under this tab, u can have a dynamic subroutine call. With in FORM and ENDFORM, you can call the Function Module.With in the Program Lines editor, u can define the subroutine........PERFORM.
If helpful, reward points.
Rgds,
CK -
How to create function module for getting customer name
Hi Experts,
How to create function module? when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
how to write the logic in source code....
Regards,
Thiru. R1. First of all create function group.
2. Create function module using this function group.
3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
4. Fetch name1 for each kunnr from KNA1 table.
"->> if many kunnr
if not t_kunnr[] is initial.
select kunnr as kunnr name1 as name1
into table t_kunnr_name1
from kna1
for all entried in table t_kunnr
where kunnr = t_kunnr-kunnr.
endif.
sort t_kunnr_name1 by kunnr name1.
delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
table t_kunnr_name1 will contain kunnr and its name1.
I hope logic is clear for you now.
Regards,
Aparna -
How to create function module in abap for VirtualProvider in bi
how to create function module in abap for VirtualProvider in bi ???????????????
can any one help me with simple example ?????????????????
Moderator message : Duplicate post locked. Read forum rules before posting.
Edited by: Vinod Kumar on Jun 15, 2011 4:40 PMHi ,
Thanks for replies about my question??.
If i am using the exit in my char relation ship how can i debugg that exit???
if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
Thanks. -
How to Use Function Module READ_TEXT
Hi
Anyone give me code or link or example for how to use function module READ_TEXT
and what are the parameters which we have to pass in module.
Regards.
MohsinHi,
refer the given below code.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = 'KOPF'uF0E0 these details we will get thru transaction , where we enter these details.
language = 'EN'uF0E0 these details we will get thru transaction , where we enter these details.
name = TNAME "table name
object = 'AUFK' " these details we will get thru transaction , where we enter these details.
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
IMPORTING
HEADER = HTEXT
tables
lines = LTEXT
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* NOT_FOUND = 4
* OBJECT = 5
* REFERENCE_CHECK = 6
* WRONG_ACCESS_TO_ARCHIVE = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks
Arun -
How to use functional module " DETERMINE_DUE_DATE"
Hi All,
Can anyone suggest how to use functional module " DETERMINE_DUE_DATE" as it is used in an FI transaction code "FBL5N" and i have to use it in my zprogram to capture the net due date..please suggest..
Regards,
Shanuhi,
CALL FUNCTION 'DETERMINE_DUE_DATE'
EXPORTING
I_FAEDE = LS_FAEDE
IMPORTING
E_FAEDE = LS_FAEDE
EXCEPTIONS
OTHERS = 1 -
How to assign function module with process code in IDOC ?
how to assign function module with process code in IDOC ? and what code i have to write in that function module for custom IDOC ?
helpful answer will be rewarded?Hi,
First goto transaction we42 -->editing mode --> new entries -->give name of your process code and description --> processing with alv service and function module -->then press enter -->after that enter the name of the function module you want to associate from the drop down and save it.
Thats the way to assign function module with process code.
In that process code we will have the Function modules and Bapi's which will take the data which we are sending through IDOC and then process it.
for example: i am triggering the IDOC for every purchase order created then this process code in the receiver system will take the data which i have enetered in the sender system to create the purchase order and process it and creates the same purchase order in the receiver's system.
Reward if helpful.
with regards,
Syed -
How to Debug Functional Module called via RFC?
Hi Experts,
Please, can someone explain to me how to debug functional module that is called via RFC? Thanks in advance.
Best Regards,
AleksandarHi Laxman,
First of all thank you very much for giving attention to my post. Ok, I am trying to debug function module in RM-CA (FICA), function module is called by CRM system (via RFC) and in addition all this chain is triggered by WebClient.
I have user that can login on the CRM as well as on RM-CA (ECC 6.0) system, but those users are different (unfortunately I do not have administration permission so I cant change profiles of my users but I can ask for it). I can without any problem debug calls that come from WebClient, so setting an external break point in CRM system I can catch whatever I want but when process comes to point where actually call to back-end (RM-CA) takes place I simply cant get into functional module, that resides on RM-CA side. Actually what happens is that processing continues as was chosen NEXT STEP (F6).
To resume, two systems and two different users. Where XCM user should be created? (on RM-CA system or CRM). Should I change something in Menu option Utilities -> Settings -> ABAP Editor tab -> Debugging tab, in field users? If you need any additional info please tell me.
Thanks again for your support.
Aleksandar -
How to Add function modules to retrieve current month
how to Add function modules to retrieve current month from TVARV variables (currently we have functions to do close month).
Hi
Double click on the CODE for the line..
SET PF-STATUS 'XYZ'.
It will open the Menu Painter (SE41). Click on the Function Keys Tree Node and And assign the
Function Keys and Function codes for the Menu Items.
Hope this would help you.
Murthy -
Function Module performance in Crystal Reports - Best practices
Hi all,
We are following a function module based approach for our crystal reporting needs. We tried to follow an infoset approach, but found that most of the critical fields required for reports were retrieved from function modules and bapis.
Our reports contain some project filters/parameter fields based on which the task reports would be created. I was wondering what would be the best approach/best practices to be considered while designing the FM so as not to impact the crystal report performance?
We created a sample FM in our test system with just the table descriptions ( without the input parameters) which would retrieve all the projects and found that crystal reports crashed while trying to retrieve all the records. I am not sure if this is the right approach since this is our project in using FMs for crystal reports.
Thank you
Vinnieyes. We did try following the infoset approach against the tables however since our project reports contain long text fields and status texts ( retrieved via FMs), we opted for the FM approach. Do you know how texts can be handles from ABAP to Crystal reports?
-
How to use function module 'MC_POPUP_TO_MARK_VALUES' ?
Hai,
I used CALL FUNCTION 'MC_POPUP_TO_MARK_VALUES' to delete duplicates in the F4 help but in my program ,When we press F4 help , radio buttons are appearing in the F4 help window. How to avoid that ? Or is there any other function module which will give me the same result without radio button ?
Plz help me out to solve this , and get rewards ..........See MMCP3FG0
INCLUDE MMCP3FG0 *
FORM GET_VALUES.
Funktionscode ist nur aktiv, wenn auch Daten besorgt werden können
sollte später so sein! => jetzt message wenn nicht möglich
DATA: GV_HLP_VALUES LIKE MCVALUES OCCURS 0 WITH HEADER LINE,
GV_MRK_VALUES LIKE MCMARKED_VALUES OCCURS 0 WITH HEADER LINE,
GV_HLP_KEYS LIKE IKEYF OCCURS 0 WITH HEADER LINE,
GV_ICONTEXT LIKE RSEU1-ICON_TEXT,
GV_ICONINFO LIKE RSEU1-ICON_INFO,
GV_OFFSET TYPE I,
GV_MITAB_INDEX TYPE I,
GV_POPUP_TITLE(30),
GV_AKTION,
GV_FLG_APPEND.
feststehende Ausprägungen der drüberliegenden Ebenen besorgen:
GV_HLP_KEYS[] = KEYS[].
PERFORM FILL_KEYFELDERVALUES IN PROGRAM (PNAME)
TABLES GV_HLP_KEYS
USING H_PLOBO.
zuerst darf der User mal versuchen Ausprägungen vorzuschlagen:
CALL CUSTOMER-FUNCTION '018'
EXPORTING
I_GSTRU = TMC4-GSTRU
I_FIELDNAME = PFAD_ALLG_HIER-FIELDNAME
TABLES
T_CHARACTERISTIC_VALUES = GV_HLP_KEYS
T_VALUE_TAB = GV_HLP_VALUES
EXCEPTIONS
OTHERS = 0.
READ TABLE GV_HLP_VALUES INDEX 1.
IF SY-SUBRC <> 0.
jetzt im Standard versuchen Ausprägungen vorzuschlagen:
CALL FUNCTION 'MC_HIERARCHIE_ANREICHERN'
EXPORTING
I_GSTRU = TMC4-GSTRU
I_FIELDNAME = PFAD_ALLG_HIER-FIELDNAME
TABLES
T_MCDDOWN = SAV_MCDDOWN
T_CHARACTERISTIC_VALUES = GV_HLP_KEYS
T_VALUE_TAB = GV_HLP_VALUES
EXCEPTIONS
OTHERS = 0.
READ TABLE GV_HLP_VALUES INDEX 1.
IF SY-SUBRC <> 0.
MESSAGE S363.
Es kann keine Ausprägung vorgeschlagen werden.
EXIT.
ENDIF.
ENDIF.
doppelte rausschmeißen
PERFORM KILL_DOUBLED_ENTRIES IN PROGRAM (PNAME)
TABLES GV_HLP_VALUES
USING PFAD_ALLG_HIER-FIELDNAME.
READ TABLE GV_HLP_VALUES INDEX 1.
IF SY-SUBRC <> 0.
MESSAGE S363.
Es kann keine Ausprägung vorgeschlagen werden.
EXIT.
ENDIF.
aus den vorgeschlagenen welche aussuchen lassen:
LOOP AT GV_HLP_VALUES.
GV_MRK_VALUES-VALUE = GV_HLP_VALUES-VALUE.
GV_MRK_VALUES-MARKED = TRUE.
APPEND GV_MRK_VALUES.
ENDLOOP.
Popuptitel setzen:
READ TABLE GV_HLP_KEYS WITH KEY FIELDNAME = PFAD_ALLG_HIER-FIELDNAME.
GV_POPUP_TITLE = TEXT-301.
GV_OFFSET = STRLEN( GV_POPUP_TITLE ).
ADD 2 TO GV_OFFSET.
WRITE GV_HLP_KEYS-FTEXT TO GV_POPUP_TITLE+GV_OFFSET.
Icontext setzen: (Übernehmen)
GV_ICONTEXT = TEXT-300.
GV_ICONINFO = TEXT-300.
Popup:
CALL FUNCTION 'MC_POPUP_TO_MARK_VALUES'
EXPORTING
I_MAX_MARKED_VALUES =
I_MIN_MARKED_VALUES = 0
I_POPUP_TITLE = GV_POPUP_TITLE
i_textline = ' '
I_TEXT_LENGTH = 40
I_ICONTEXT_FOR_ENTER = GV_ICONTEXT
I_ICONINFO_FOR_ENTER = GV_ICONINFO
TABLES
T_VALUES_FOR_MARKING = GV_MRK_VALUES
EXCEPTIONS
CANCEL_PUSHED = 1
OTHERS = 2.
IF SY-SUBRC = 1.
Abbrechen wurde gedrückt oder es ist nix markiert:
EXIT.
ENDIF.
die markierten Ausprägungen übernehmen und zwar jeweils
Strategie: es wird so getan als ob die Ausprägungen per Hand
eingetragen worden sind: (siehe MODULE zeile_uebern_5510.)
die letzte Ausprägung suchen:
GV_MITAB_INDEX = 1.
LOOP AT MITAB_PLOBJ WHERE PLOBU <> SPACE.
ADD 1 TO GV_MITAB_INDEX.
ENDLOOP.
LOOP AT GV_MRK_VALUES WHERE MARKED = TRUE.
1. value im generierten Coding setzen
PERFORM SET_FIELDVALUE_IN_SXYZ IN PROGRAM (PNAME)
USING PFAD_ALLG_HIER-FIELDNAME
GV_MRK_VALUES-VALUE.
READ TABLE MITAB_PLOBJ INDEX GV_MITAB_INDEX.
IF SY-SUBRC <> 0.
GV_FLG_APPEND = TRUE.
ENDIF.
CLEAR GV_AKTION.
PERFORM CHECK_FIELD IN PROGRAM (PNAME)
TABLES KEYS
USING GV_MITAB_INDEX
PFAD_ALLG_HIER-FIELDNAME
PFAD_ALLG_HIER-KEYID
H_PLOBO
KZ_AKTION
H_PLOBU
RMCP3-HPRGR
RMCP3-HWERK.
CASE KZ_AKTION.
WHEN 'S'.
M-Auspraegung hat sich nicht geaendert + ist <> space.
darf nicht vorkommen
CONTINUE.
WHEN 'C'.
M-Auspraegung hat sich nicht geaendert + ist space.
darf nicht vorkommen
CONTINUE.
WHEN 'D'.
Doppeleintrag
darf nicht vorkommen
CONTINUE.
WHEN 'N'.
Neueintrag
darum geht's
MITAB_PLOBJ-MANDT = SY-MANDT.
MITAB_PLOBJ-PLOBO = H_PLOBO.
MITAB_PLOBJ-PLOBU = H_PLOBU.
MITAB_PLOBJ-FIXKZ = KZ_FIXIERUNG.
MITAB_PLOBJ-GSTRU = TMC4-GSTRU.
MITAB_PLOBJ-DATUM = BISDATUM.
MITAB_PLOBJ-PRKOF = 1.
MITAB_PLOBJ-ANTEI = 0.
keine Einheitenverprobung, weil nur konsistente Planung
MODIFY MITAB_PLOBJ INDEX GV_MITAB_INDEX.
Anfuegen Leerzeilen sowohl in MITAB_PLOBJ als auch in gener.
PERFORM CLEAR_MERKMAL IN PROGRAM (PNAME)
TABLES KEYS
USING PFAD_ALLG_HIER-FIELDNAME
PFAD_ALLG_HIER-KEYID.
PERFORM PLUS_MITGLIEDER IN PROGRAM (PNAME) USING 1.
CLEAR MITAB_PLOBJ.
APPEND MITAB_PLOBJ.
KZ_AENDERUNG_STUFE = TRUE.
ADD 1 TO GV_MITAB_INDEX.
ENDCASE.
ENDLOOP.
ENDFORM.
FORM GET_VALUES_CHECK
CHANGING GV_FLG_GETV.
eventuell Prüfungen durchführen, ob values besorgt werden können
CHECK T445A-FLGPL = 'K'.
GV_FLG_GETV = TRUE.
ENDFORM.
übergeordnetes Material der Planungshierarchie besorgen
FORM GET_MATERIAL_OF_TREE USING GM_MATNR LIKE MARC-MATNR.
DATA: GM_HLP_KEYS LIKE IKEYF OCCURS 0 WITH HEADER LINE.
CLEAR GM_MATNR.
feststehende Ausprägungen der darüberliegenden Ebenen besorgen:
GM_HLP_KEYS[] = KEYS[].
PERFORM FILL_KEYFELDERVALUES IN PROGRAM (PNAME)
TABLES GM_HLP_KEYS
USING H_PLOBO.
READ TABLE GM_HLP_KEYS WITH KEY KEYID = 'M'.
IF SY-SUBRC = 0.
GM_MATNR = GM_HLP_KEYS-VALUE.
ENDIF.
ENDFORM.
übergeordnetes Clint der Planungshierarchie besorgen
FORM GET_CLINT_OF_TREE USING GC_CLINT LIKE KLAH-CLINT.
DATA: GC_HLP_KEYS LIKE IKEYF OCCURS 0 WITH HEADER LINE.
CLEAR GC_CLINT.
feststehende Ausprägungen der darüberliegenden Ebenen besorgen:
GC_HLP_KEYS[] = KEYS[].
PERFORM FILL_KEYFELDERVALUES IN PROGRAM (PNAME)
TABLES GC_HLP_KEYS
USING H_PLOBO.
READ TABLE GC_HLP_KEYS WITH KEY KEYID = 'C'.
IF SY-SUBRC = 0.
GC_CLINT = GC_HLP_KEYS-VALUE.
ENDIF.
ENDFORM. -
How to use function module to update data
Hello ,
Can any body have idea how we can use function module SAVE_TEXT to update the master recipe header and operation long text.
I want to use this functional module to update the master recipe long text
step by step procedure is highly appreciated
thanks & regards
siddhasrthHi
SAVE_TEXT
SAVE_TEXT writes a text module back to the text file or the text memory, depending on the storage mode of the corresponding text object.
You can use this module either to change existing texts or to create new texts. If you know for sure that the text is new, use the parameter INSERT to indicate this. The system then does not have to read the text first, which improves the performance of the function module.
If the lines table passed with the function module is empty, the system deletes the text from the text file.
Function call:
CALL FUNCTION 'SAVE_TEXT'
EXPORTING CLIENT = SY-MANDT
HEADER = ?...
INSERT = SPACE
SAVEMODE_DIRECT = SPACE
OWNER_SPECIFIED = SPACE
IMPORTING FUNCTION =
NEWHEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
check thi sample code
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = t_header
SAVEMODE_DIRECT = 'X'
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
TABLES
LINES = t_long
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
Reward all helpfull answers
Regards
Pavan -
How to remove function module error?
Hi Iam using a FM to get the database value of project name(PROJ-PSPID),Iam using this in my module pool program,when I enter wrong project name,the FM itself throwing the error,I want my own error message rather FM error message.How to achieve it?
Thanks in advance.Hi Rock,
After executing the function module , check for sy-subrc value as shown below
data: w_return type bapiret2,
it_return type table of bapiret2.
call function '.....'
IF SY-SUBRC EQ 0.
PERFORM fm_update_return_msg
USING 'E'
your Message class
'msg no'
CHANGING w_return.
APPEND w_return TO IT_RETURN.
clear w_return.
ENDIF.
FORM fm_update_return_msg USING p_msgty TYPE sy-msgty
p_msgid TYPE sy-msgid
p_msgno TYPE sy-msgno
p_msg_v1 TYPE sy-msgv1
p_msg_v2 TYPE sy-msgv2
p_msg_v3 TYPE sy-msgv3
p_msg_v4 TYPE sy-msgv4
CHANGING p_return TYPE bapiret2.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = p_msgty
cl = p_msgid
number = p_msgno
par1 = p_msg_v1
par2 = p_msg_v2
par3 = p_msg_v3
par4 = p_msg_v4
IMPORTING
return = p_return.
ENDFORM. "fm_update_return_msg -
How to release function module...
Hi All,
I have created one function module and activated that. How to release that function module?
But Release option is in deactive state...how can i release the FM....please let me know the resons for that.
thank you.hi,
change to edit mode and come to attribute tab then you release option will be activated and then you can release it
thanks
shivraj
Edited by: ShivrajSinha on Feb 8, 2010 11:14 AM -
How to call Function Module in Selection Screen
Hi All,
I have developed one HR Report (Qualification Overview Report: To display all active employees and their Qualifications along with their Proficiency).
Already it has 3 selection fields on selection screen and now I want one more field on selection screen like Qualification Id.
But when the end user press F4 it should display the Popup which comes in TCode: PA30 at the time of Creating Qualification.
I have debugged the Standard Code and searched the Function Module: 'RH_OBJID_REQUEST' which shows Popup which I wanted to show at Selection screen for newly added field.
So I have to define new field like 'Qualification Id' and want to attach above Function Module so that it will cater my requirement.
If anybody has worked on this type of requirement then please let me know.
Thanks,
Jay.Hi Raymond,
I have written following code:
s_quali is used in selection screen for Qualification Id.
SELECT-OPTIONS : s_quali FOR hrp1000-objid NO INTERVALS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_quali-low.
CALL FUNCTION 'RH_OBJID_REQUEST'
EXPORTING
plvar = '01'
otype = 'Q'
seark = '*'
seark_begda = '18000101'
seark_endda = '99991231'
set_mode = 'X'
TABLES
sel_objects = git_objects.
LOOP AT git_objects INTO wa_objects. " Logic is to fill up the Selection screen field
s_quali-low = wa_objects-objid.
APPEND s_quali TO s_quali.
CLEAR : s_quali, wa_objects.
ENDLOOP.
Now problem is that, its not populating all values in selection screen which I select from Popup screen (Choose Qualification).
I checked that the first value in the internal Table is over written by second records in the internal table
For e.g.: If I select 001,002,003,004 from Popup screen then I am able to see only 002,003,004 in the Multiple selection view of that field though it is available in the internal table s_quali (because I am filling up the table using Loop-Endloop)
Please advise me how to overcome this issue. (How to fill up selection screen)
Thanks,
Jay.
Maybe you are looking for
-
Info record report with sub ranges
Hello there, I've been searching the net for a while to find out whether there's already existing program in SAP that shows you info record report. I've found t-codes ME1L, ME1M, etc., but even though you can filter materials by subranges on an entry
-
Z order of freeframe and freetext
I have a z ordering problem. I create some freeframes and text for statistics. If i run the attached code on blank page, it works fine. If I run with axis and other stuff, the frames are 'over' the text. Oddly changing the order text before box
-
Pixel size for epub books?
Should the pixel size when creating a book for iTunes with an epub format be different or the same as with ibooks author?
-
I've just purchased a blackberry passport and my 1st time using blackberry. When creating the blackberry ID I've given a wrong email address which I does not own, and the system does not check validity. Now I cannot reset my password and they will se
-
IMessage won't work no matter what I try?
I have an iPhone 4s, just upgraded to iOS 6.1.3. My iMessage has stopped working for a few days. 1) It is turned on and activated. 2) It won't work with any other iPhones I attempt to iMessage. 3) I have a stable internet and cellular connection. 4)