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

Name of the Database Table where Function Module Code resides ??

Former Member
0 Likes
2,818

Hi Guys,

I was working on an ABAP Program to Download the code of a Function Module by provding the Function Group name, Function module name & Package name in the selection screen, this is working fine....My question is: In which Database Table all these Function Modules code reside??

Thanks in Advance,

Nawaz

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,095

Hi Guys,

Thanks for your response.

I am able to download the code of the Function Module
by following the procedure you guys posted. I want to know the Database table name where the Function module code resides, My aim here is to update a Function Modules code using a program without going to se37 tcode.

Thanks,

Nawaz

9 REPLIES 9
Read only

Former Member
0 Likes
2,095

Hi, the table TFDIR hold's the name of the function pool. You can use the function pool name to fetch the code from the table REPOSRC.

Read only

0 Likes
2,095

Hi vijay,

You can use table TFDIR to fetch the program name and include name for function module.

There is one more way to fetch,

You can use TADIR table to fetch the program name and program type (Field name SUBC)

and make inner join with REPOSRC table to get the program id , object, dev class.

Here you can find the sample program, to downlod all the function module code to PC.

http://www.dalestech.com/products/massdownload.htm

Regards,

Ramya R

Read only

0 Likes
2,095

Hi vijay,

If you get solution , pls update so it will be useful for others also.

Regards,

Ramya R

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,095

You don't need to know, I wil explain.

Hiow-to :

- Read table TFDIR to get main program and include number of the module

- From program and include number using FM FUNCTION_INCLUDE_CONCATENATE you get the include name

- Use statement READ REPORT to get the source code

Regards,

Raymond

Read only

Former Member
0 Likes
2,096

Hi Guys,

Thanks for your response.

I am able to download the code of the Function Module
by following the procedure you guys posted. I want to know the Database table name where the Function module code resides, My aim here is to update a Function Modules code using a program without going to se37 tcode.

Thanks,

Nawaz

Read only

0 Likes
2,095

Hi Faheem,

I guess REPOSRC has a field(DATA) which has the source code in a Compressed form.

You can try to decompress it using DECOMPRESS_TEXT of CL_ABAP_GZIP but I am not sure how much this will work. The data field could also be encrypted.

You can work with the READ REPORT, DELETE REPORT and INSERT REPORT in the same order and modify your source code.

Thanks,

Shambu

Read only

0 Likes
2,095

No need to use DELETE REPORT as INSERT REPORT will ovewrite existing code (without warning )

Regards,

Raymond

Read only

0 Likes
2,095

Hi Shambu,

Thanks for your help.

With your help I have fulfilled my Objective.

Can you please tell me how to upload an Excel file with multiple tabs into multiple Internal tables....??

Thanks in advance,

Nawaz

Read only

0 Likes
2,095

No complicated code required,  use the utility class CL_RECA_RS_SERVICES, method GET_SOURCE.  This class will work for object types : Program, Class, interface &  Function group.

Regards, Vinod

P.S: Will work only for extraction of source code and not for updating.

Message was edited by: Vinod Kumar