Application Development 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: 

Deletion programm

Former Member
0 Kudos

As part of custom cleanup ,i want have a program that will delete all custom function modules starting with Z and Y from my Ec4 server.So please help me out in this.

5 REPLIES 5

Former Member
0 Kudos

Hi,

I dont think we have a direct command to programatically delete FMs. But you can try a workaround.

table TFDIR stores detailst for the FMs.

You can fetch all z fms from it.

Then you can use DELETE REPORT XXXXX , to delete the program associated with it.

Might work

Message was edited by: sap wiz

0 Kudos

Hi,

The workaround of sap wiz shall work. As alternative to DELETE REPORT you can use also function module RS_DELETE_PROGRAM.

Kind regards,

Jens Klingelhöfer

Private_Member_49934
Contributor
0 Kudos

You will have to write a custom program for this.

it invovles geting z functino modues from   v_fdir -> find it's fg -> scan fg source code for includes-> delete all includes ( inluding the fms i.e. FMs are also includes in FG ). -> delete the function group.

Regarding the logic check the mass download program in the link below. Check the logic how function group are scanned and all includes can be dtermined.

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

Former Member
0 Kudos

Record the deletion of any z function.

use this recording in LSMW or BDC and delete all the z functions.

you can get the list of all the z functions from TFDIR.

Hope this helps.

raymond_giuseppi
Active Contributor

Some solutions

- Loop at function group, and use FM RS_FUNCTION_POOL_DELETE (use parameter SUPPRESS_POPUPS) You can find function group per function module in TFDIR (PNAME+4 or FUNCTION_INCLUDE_SPLIT) or directly access to function group in table TLIFG or via object direcory TADIR for R3TR FUGR objects.

- Loop at function modules in TFDIR and use RS_FUNCTION_DELETE (but you will then have to delete function groups)

Regards,

Raymond