‎2008 Apr 06 5:19 AM
hi,
i would like to check if the zFM that executed is allowed to be used or not.
when the control comes to zFM, i need to check against a customised table. if the FM is maintained in the table then zFM can be executed else control should come out of the zFM.
i check sy-repid but it is stored the main program name and not the zFM name.
may i know how to get the zFM name?
thanks
rgds
‎2008 Apr 06 5:52 AM
Hi,
I don't think there is a field for function module. You can just check if there is any runtime field for the same in structure SYST.
Regards,
Atish
‎2008 Apr 06 6:01 AM
Hello ,
You are right in the sense that we have the program name of the function group available in sy structure and not the function module name....
I will suggest you a work around... .create only one function module under a function group and definitely the name of function group and function module be the same....
So when a function module is executed the program name for the function group will be displayed as SAPLXXXX
where XXXX is the function group name
check if the ztable holds the value after the first 4 characters SAPL,ie XXXX in the ztable..using sy-repid..
Please let know if you found a variable for the same
Reward if helpful
Regards
Byju
‎2014 Feb 13 1:23 PM
Hi,
please check the following in fm:
DATA: xt_ctm_rfc_call TYPE sys_callst. "Callstack Table
DATA: xs_ctm_rfc_call TYPE sys_calls. "Callstack Line
CLEAR xt_ctm_rfc_call.
CALL FUNCTION 'SYSTEM_CALLSTACK'
IMPORTING
et_callstack = xt_ctm_rfc_call.
READ TABLE xt_ctm_rfc_call INDEX 1
INTO xs_ctm_rfc_call.
xv_ctm_rfc_fm = xs_ctm_rfc_call-eventname.
Regards,
Klaus