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

function module download

Former Member
0 Likes
1,597

Hi Frnd's

In my appliction i want to download all the function modules and includes when i enter the package name how to do this using coding.

is there any sap function modules to downlaod it.

Can anybody help me.

Thanks in Advance

Suganya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
999

First check in tadir that the given package is valid

SELECT SINGLE devclass FROM tadir INTO ws_devclass WHERE devclass = p_devcls.

Select all the records from TADIR table where OBJECT = 'FUGR' and PGMID = 'R3TR '.

In this way u can get all the FUnction group for that package.

For getting the function module under the function module use the FM <b>RS_FUNCTION_POOL_CONTENTS</b> to get all the function module under the Function group.

Usign the table <b>tfdir</b> get the program name of the Function module.

Using the FM <b>'GET_INCLUDETAB'</b> get all the includes

for that PRogram name.

Loop at the internal table which you got from the function module.

Use the READ REPORT prog INTO itab.

Download the contents to the place where you want.

Hope it is helpfull.

Regards,

Prakash.

8 REPLIES 8
Read only

Former Member
0 Likes
1,000

First check in tadir that the given package is valid

SELECT SINGLE devclass FROM tadir INTO ws_devclass WHERE devclass = p_devcls.

Select all the records from TADIR table where OBJECT = 'FUGR' and PGMID = 'R3TR '.

In this way u can get all the FUnction group for that package.

For getting the function module under the function module use the FM <b>RS_FUNCTION_POOL_CONTENTS</b> to get all the function module under the Function group.

Usign the table <b>tfdir</b> get the program name of the Function module.

Using the FM <b>'GET_INCLUDETAB'</b> get all the includes

for that PRogram name.

Loop at the internal table which you got from the function module.

Use the READ REPORT prog INTO itab.

Download the contents to the place where you want.

Hope it is helpfull.

Regards,

Prakash.

Read only

Former Member
0 Likes
999

U can do the needful by following the below logic.

1. Check the validity of the function group.

2. Get the ABAPs information for the particular group from TaDIR.

3. Loop at the ABAPs.

read the report into an internal table.

append the report in output table.

endloop.

4. Download the output table with FM gui_download.

U can combine 3 and 4 steps if you wish to download it as individual ABAPs.

Read only

Former Member
0 Likes
999

Check this link:

check the program:

SAPBC405_OTH_DOWNLOAD_SOURCE iif you are on 4.7 or above.

Regards,

ravi

Read only

Former Member
0 Likes
999

Hi,

you can download includes using below logic

get all includes under function group using

table tadir

after this

DATA: PROGRAM LIKE SY-REPID VALUE 'lslsttop'.

DATA: BEGIN OF T OCCURS 500,

LINE(72),

END OF T.

READ REPORT PROGRAM INTO T.

IF SY-SUBRC <> 0.

...

ENDIF.

call function gui_download

exporting ..

tables = t.

regards

amole

Read only

0 Likes
999

Hi Frnd,

This Syntax is used to read data form the program.

READ REPORT PROGRAM INTO T.

But how to read data that is source code in the function module.

can any body help me.

thanks in advance

suganya

Read only

0 Likes
999

A FM is also has a ABAP name attached to it usually starting with SAPL*. But usually the code is all in the INCLUDE ABAPs.

So for FM, you need to get the module name ie SAPL<funcgroup>.

find all the includes L<funcgroup>.

read report <include> into t.

download t.

Please note to assign points to all helpful answers

Read only

0 Likes
999

Thnks Anurag

Read only

0 Likes
999

Hi

How to Download the screens used in the function module.

i downloaded screens in program but i am not able to download screens in fm.

How to do it

thanks in advnce

suganya