Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

INCLUDE of a Function Module

Former Member
0 Likes
10,503

Hi All,

On the Function Module (SE37) Attributes screen, there is a field name "INCLUDE name" which is related to the FM. Is there any table that we can use to search by FM to get this Include?

I am developing program to read the source code in the FM, I am planning to use the syntax READ REPORT program INTO it_code. Due to this syntax not able to read the source code in FM directly, but can read through Include. So the table that can get the relationship of FM and include is important.

Or anybody can suggest a way to read the FM's source code?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,382

Hi Aaron,

Please close the request in case you get the answer.

If not refer this FM FUNC_GET_OBJECT where the PTRDIR holds the program for the function module.

Cheers,

Jacks.

9 REPLIES 9
Read only

Former Member
0 Likes
5,382

Hi,

Use Table TFDIR inputting FUNCNAME and get the program name PNAME and INCLUDE. Use these two fields to get a concatenated value which will suffice the requirement . I have n't tried yet but suggest you to please check the same.

Cheers,

Jacks.

Read only

Former Member
0 Likes
5,382

Hi,

Use TFDIR table to get the include name. This include is the include created for the function module in the main program of the Function group. Program name of the TFDIR table is the main program of Function Group.

Regards,

Sankar

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
5,382

Hi,

If you have FUNCTIONGROUP with the name FM_FUNCTION_GROUP and if this function group as 10 function modules then these 10 function modules are stored in includes of names

LFM_FUNCTION_GROUP_U01,LFM_FUNCTION_GROUP_U02, ... so on till LFM_FUNCTION_GROUP_U10.

SO now if you want to read a function module then find out the include of that function module from the function group.

In the function group there will be an include with the name LFM_FUNCTION_GROUPUXX. This include will have the entries of the includes that are specific to each function module.

Check the include which ends with UXX in a function group to find out the includes of each function module in that function group.

Regards,

Sesh

Read only

Former Member
0 Likes
5,382

Hi,

You cannot directly read function module.

You can get the name of include of function modules in Table CROSS

CROSS-Name = Function Module name.

Cross-Include-->Include Name (It will start will L*)

Regards,

Gurpreet

Read only

Former Member
0 Likes
5,382

Hi,

I did check table TFDIR before, the Include column in this table is just a number but not the Include name.

Just check the CROSS table that is suggested, but it only listed the Include that is using in the FM source code, not the Include that contains the FM.

Any other ideas?

Thanks

Read only

0 Likes
5,382

Hi,

Did you check out my previous reply. The FMs are stored in the include with name

L<FG_NAME>_U01..etc.

Check out L<FG_NAME>_UXX include of any fuction group once.

If you know the include name then you can use READ REPORT.

Regards,

Sesh

Read only

Former Member
0 Likes
5,383

Hi Aaron,

Please close the request in case you get the answer.

If not refer this FM FUNC_GET_OBJECT where the PTRDIR holds the program for the function module.

Cheers,

Jacks.

Read only

Former Member
0 Likes
5,382

try this table : D010INC.

Read only

0 Likes
5,382

Hello Aron,

Use FM 'SVRS_GET_VERSION_FUNC_40' to read function module code. It worked for me.

You need to pass OBJECT_NAME alone and you can get the result (FM code) in the table UINCL_TAB.

further, you can use the same FM to read FM code from another server (if both are in same land scape), here you need to pass DESTINATION also.

Please reply me back if you need any further clarifications.

Bala