‎2005 Dec 12 5:23 PM
Hello All,
I have 1 function module which is being called by many other function Module .
I need to see which function modules call in runtime with my function module .
e.g
I have FM1,FM2 and FM3.
FM1 is being called by FM2 and/or FM3 .
So,dynamically I need to create a kind of trace that from which function module FM1 is called .
Hope I m clear to post my issue .
Looking for positive reply .
Bockya
‎2005 Dec 12 5:29 PM
‎2005 Dec 12 5:27 PM
‎2005 Dec 12 5:29 PM
‎2005 Dec 12 5:37 PM
yes ,
i need to insert in the database table .
so that we can see the FM1 called by FM1 and or FM2 .
dynamically .
Bockya
‎2005 Dec 12 5:47 PM
First read the FM and find includes.
*-Get includes
SELECT INCLUDE APPENDING TABLE IT_REP_INCL
FROM D010INC
WHERE MASTER = P_REPID.
*-Delete unecessary includes
DELETE IT_REP_INCL WHERE REPID = 'DB__SSEL'.
DELETE IT_REP_INCL WHERE REPID CS '%_'.
DELETE IT_REP_INCL WHERE REPID CA '<' AND
REPID CA '>'.
DELETE IT_REP_INCL WHERE REPID = 'DB__SSEL'.
and then LOOP that FUNCTION MODULE INCLUDE TABLE...
and FIND ANY FUNCTION MODULES used in the Includes USING condition <b>IT_REP_INCL-REPID(5) = 'SAPLZ'</b>
INCLUDES start with 'SAPLZ' will be the programs in include..
and search for FM's and try to accumulate all the FM's to table....
‎2005 Dec 12 5:56 PM
I m really confued ,
please give me a simple solution
Bockua
‎2005 Dec 12 6:02 PM
yeah i understood your problem...
1---> First Find functionmodule's main program
--->read the includes in it and accumulate the
function modules in it
add to itab
Go to Step1
-->till you end up with all includes...
‎2005 Dec 12 6:09 PM
I guess u have understodo the requirement yaar .
i would like to know which program is calling the perticular function module .
the way we use sy-cprog ,we get the caller program name the same i need to know which FM calls the perticular FM
Hope this is finr now
bockya
‎2005 Dec 12 6:12 PM
Yeah the same way we did, but we are using to find the
tables which are getting updated in programs,FMs
so the same way we did, but if you see that you will be confused...
regards
vijay
‎2005 Dec 13 2:47 AM
hi , try the following code in your FM1.
DATA: TMP(30) TYPE C.
GET PARAMETER ID 'LIB' FIELD TMP.
TMP will store the Function name which call FM1.
hope it will be helpful
thanks
‎2005 Dec 15 9:41 AM
hi thanks
but is is given the called function module
but i wann caller function module name
Praff
‎2005 Dec 15 9:49 AM
Hi Praful,
Still you have some problems with that...
regards
vijay