‎2006 Oct 11 6:01 PM
Hi,
How to determine the INCLUDE name for the function module name?
Program input: function module name
Program output: INCLUDE name (like SAPLZ....U01)
TIA
regards,
Clemens
‎2006 Oct 11 6:07 PM
Hi Clemens,
Try this function module FUNCTION_INCLUDE_INFO
Cheers
‎2006 Oct 11 6:07 PM
Hi, the assumption is that all function groups main programs start with SAPL and then the function group name.
So this would be just a concatenation of the two, to derive the main program for the function group.
To get the include names for a function module, use the following function module to get all functions in a group, and this will also give the include name for each function module.
RS_FUNCTION_POOL_CONTENTS
Regards,
Rich Heilman
‎2006 Oct 11 6:09 PM
Here is a sample program.
report zrich_0001.
data: ifunct type table of rs38l_incl.
data: xfunct type rs38l_incl.
data: xmain_program type sy-repid.
parameters: p_area type tlibt-area.
call function 'RS_FUNCTION_POOL_CONTENTS'
exporting
function_pool = p_area
tables
functab = ifunct
exceptions
function_pool_not_found = 1
others = 2.
xmain_program = 'SAPL'.
xmain_program+4 = p_area.
write:/ xmain_program.
loop at ifunct into xfunct.
write:/ xfunct-FUNCNAME, xfunct-include.
endloop.
Regards,
Rich Heilman
‎2006 Oct 11 6:07 PM
Hi Clemens,
Try this function module FUNCTION_INCLUDE_INFO
Cheers
‎2006 Oct 11 6:21 PM
Hi,
Try this.
TABLES: TFDIR.
DATA: V_INCLUDENAME TYPE CHAR50.
PARAMETERS: P_FM LIKE TFDIR-FUNCNAME.
START-OF-SELECTION.
SELECT SINGLE * FROM TFDIR
WHERE FUNCNAME = P_FM.
CONCATENATE TFDIR-PNAME 'U' TFDIR-INCLUDE INTO V_INCLUDENAME.
WRITE: / V_INCLUDENAME..
Thanks,
Naren