‎2006 Oct 06 11:47 AM
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
‎2006 Oct 06 11:52 AM
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.
‎2006 Oct 06 11:52 AM
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.
‎2006 Oct 06 11:59 AM
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.
‎2006 Oct 06 12:03 PM
‎2006 Oct 06 12:15 PM
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
‎2006 Oct 10 10:34 AM
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
‎2006 Oct 10 10:40 AM
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
‎2006 Oct 10 10:47 AM
‎2006 Oct 11 11:50 AM
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