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

Deletion programm

Former Member
0 Likes
1,079

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
Read only

Former Member
0 Likes
999

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

Read only

Jens-K
Product and Topic Expert
Product and Topic Expert
0 Likes
999

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

Read only

Private_Member_49934
Product and Topic Expert
Product and Topic Expert
0 Likes
999

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

Read only

Former Member
0 Likes
999

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.

Read only

RaymondGiuseppi
Active Contributor
999

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