Delete all the objects in a package

Hi Guys,
My requirement is that i need to write a program to delete all the objects in a package. In the selection screen i enter the package name and then i get all the objects in the package from TADIR table and display them in an ALV.
There when i select a object and press the delete button ,the object (program ,table, domain,data element etc..) should be deleted .
For this i tried to DEBUG in SE80 and tried to know how SAP is trying to delete the object. But i couldnot unterstand which Function Module or which Class and Method it uses to delete an object.
Guys please let me know how it can be done.
Regards,
Chaithanya.

hi
check this ...
REPORT  zxxxxxx.
TYPE-POOLS: slis.
DATA: x_fieldcat  TYPE lvc_s_fcat,
      it_fieldcat TYPE lvc_t_fcat,
      g_grid    TYPE REF TO cl_gui_alv_grid,
      x_layout TYPE lvc_s_layo,
       g_custom_container type ref to cl_gui_custom_container,
        g_container type scrfname value 'I_CONTAINER'.
types: BEGIN OF ty_itab ,
        check(1) TYPE c,
       PGMID LIKE TADIR-PGMID,
             END OF ty_itab,
data:itab type standard table of ty_itab,
       itab1 type TADIR.
  call screen 100.
*&      Module  STATUS_0100  OUTPUT
      text
module STATUS_0100 output.
  SET PF-STATUS 'ZSTATUS100'.
  if g_custom_container is initial.
    create object g_custom_container
           exporting container_name = g_container.
    create object g_grid
           exporting i_parent = g_custom_container.
SELECT PGMID
  FROM TADIR
   INTO CORRESPONDING FIELDS OF TABLE itab where DEVCLASS = selection screen package
x_fieldcat-fieldname = 'CHECK'.
x_fieldcat-seltext = 'CHECK'.
x_fieldcat-checkbox = 'X'.
x_fieldcat-edit = 'X'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 1.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'PGMIDt'.
x_fieldcat-seltext = 'PGMIDt'.
*x_fieldcat-edit = 'X'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 2.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
CALL METHOD g_grid->set_table_for_first_display
  EXPORTING
    IS_LAYOUT                     = x_layout
  CHANGING
    it_outtab                     = itab
    IT_FIELDCATALOG               = it_fieldcat.
endif.
endmodule.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
      text
module USER_COMMAND_0100 input.
DATA: ls_outtab LIKE LINE OF itab.
DATA: l_valid TYPE c,
      ok_code like sy-ucomm,
       r_ucomm LIKE sy-ucomm,
       ls_celltab TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl,
      l_index TYPE i.
CALL METHOD g_grid->check_changed_data
  IMPORTING
    e_valid = l_valid.
IF l_valid EQ 'X'.
case sy-ucomm.
when 'DELETE'.
LOOP AT itab INTO ls_outtab where check = 'X'.
   move ls_outtab-object to itab1.
  delete TADIR from itab1.
ENDLOOP.
endcase.

Similar Messages

  • How to Download the Custom Package Created with all the objects

    Hi All,
    Could any body let me know how to download a custom package created in sap with all the objects including webdynpros and modulepool programs.
    Thanks.

    Hi,
    U can use open source programs available in net like Mass Download, ZAPLINK, SAPLINK.
    Mass Download --> Download the objects
    SAPLINK, ZAPLINK --> Used for downloading and also for importing the downloaded objects to other system.
    Regards,
    Arun

  • Delete all the BI objects

    Hi!
    I have implemented a BI example and would like to start from scratch.
    Question
    What is the procedure (tcode, BEx-Tools, reports, programs) to delete all the included objects?
    - Queries, Infosources, Objects from Integerated Planning?
    Thank you very much!
    regards
    Thom

    Hi......
    As already told........The transaction RSZDELETE enable delete only queries and their objects.......
    Hre r some programs...........these can help u.......
    RSDG_CUBE_DELETE/RSDG_IOBC_DELETE >> Deleting InfoCubes
    RSDG_MPRO_DELETE >> Delete MultiProviders
    RSDRD_DELETE_FACTS >> rogram for deleting selecteld entries from the data target
    RSZW_DELETE_VARIABLE_ENTRY >> Deletion of a Variable
    Delete Tcode >> Use Tcode SE93 (Transaction maintenance) and delete it.
    Delete Program >> Use Tcode SE38 ->Give the program name -> then press shift+ F2 or press trash on the application bar.............
    Hope this helps.........
    Regards,
    Debjani.....

  • Is there a way to delete all the messages for a user in CUC 8.6 ?

    With Unity it was possible as an administrator, to delete all the messages in a user's mailbox, directly from the server (Windows).  Now, with Unity Connection (8.6.1) is there a way to do the same ?  When I'm logged as an administrator, I can see, for every user, the number of messages and the size (Mailbox menu) that they have in their mailbox, but what I want to do is to be able to delete all the messages for a specific user... Is it possible with CUC 8.6.1 ?

    Hi there,
    The best way with Unity Connection is with the use of this excellent tool from
    the great suite of Unity Tools (** "reset" feature);
    Unity Connection Bulk User Delete   
    For resetting users you have the option of emptying the mailbox, resetting greetings, deleting voice names, resetting passwords, removing private lists and a number of other options you may choose.  For installations where the user base “changes over” frequently such as schools this may be a nicer option.  This option is also allowed for CoRes installations since it does not involve the removal of user objects from the Connection database.
    http://www.ciscounitytools.com/Applications/CxN/BulkUserDelete/BulkUserDelete.html
    Cheers!
    Rob

  • How can i access all the objects of one schema from another schema

    Dear All,
    How can i access all the objects(Tables,Views,Triggers,Procedures,Functions,Packages etc..) and do the modifications of one schema from another schema (Without using synonyms concept).
    Thanks in advance,
    Mahi

    First of all, synonyms only help you easy reference the object. It doesn't have any implication of object privilege.
    As long as you have proper privilege on target object. You can access it with or without synonyms.
    Assuming you have proper privilege of objects, you can use following command to assume schema owner.
    ALTER SESSION SET CURRENT_SCHEMA = Schema_owner

  • How do I find out all the objects I use in my application.

    As I am creating my documentation, I realized it would be helpful to know all the objects that my application uses ( tables, views, packages etc). Is there a way to find that out i.e. any script or simple alternative etc ?
    Thanks, folks!

    I am on version 3.0.1.00.08 and am trying to figure this out for this version.The navigation path is different but the report is available somewhere.
    Also, is there a way to get the sql from all the pages out ?What do you mean?
    Scott

  • Repeating successful uploads - procedure to delete all the requests/packets

    Hi friends,
    I have a sort of hypothetical question, so never mind if this makes sense in real life (actually, I can think of a few situations where it makes sense, but only as a last resort).
    Let's say I want to repeat the upload that was successful (request is green in the cube). Or another point of view, let's say I want to delete all successful uploads except the initial one. The load is delta load and straight from R/3 into the cube (no DSOs or other objects in between).
    What do I need to do/check? I obviously need to delete the requests in the cube, but where else can the data be stored? PSA is probably the first place to check, but it seems to be empty most of the times. How do I delete all the data from the PSA? The BI delta queue is always empty when I look at it from the Administration menu. Again, must I delete it and how? I guess I should delete the delta queue in R/3 as well (through SBIW)?
    How do I do the same thing when there ARE other objects (like DSOs) before the cube?
    Thanks in advance for your advice/help.
    Kind regards,
    K.

    Probably it does not )
    Anyway, i was thinking of a hypothetical situation where an administrator accidentally repeats an upload at some point and thus doubles the figures. Then he does not notice it immediately and the system keeps loading requests for some time.
    I actually wanted to predict a solution to this problem, since it would be difficult (if not impossible) to find the duplicate records, especially after "compress". I thought that simply deleting all the requests and reloading through normal delta would solve this hypothetical situation. But again, where and how to delete all (and be sure you deleted all) to ensure that the records will not be doubled.
    K.

  • To capture all the objects from an tablespace and restore.

    Hi All,
    I have a situation in the  Schema  refresh process where i may have  to delete a tablespace  and its datafiles.
    Then I have to recreate it as it was before and restore all it objects .
    Is there any way that i can capture all the objects of that tablespace before it is deleted  and then later restore it back as it was .
    Any Expert sugggestion is highly apprciated .
    The Platform is as below ..
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Thanks In Advance .

    There are 2 methods you could use with Data Pump.
    1. tablespace mode export.  expdp user/password tablespaces=<your list here> ...
    2. transportable tablespace mode.  expdp user/password transport_tablespaces=<your tablespace list here> ...
      NOTE:  for #2, you need to have your tablespaces in read only mode, then you need to copy the data files, and the
                    tablespaces need to be self contained.
    Hope this helps.
    Dean

  • How to copy a database with all the objects and relationship but with no data

    Hello Experts
    I am here for your advise as usual, I  want to create a copy of my current database from an existing one on SQL Server 2008r2 Standard Edition, here is what I need, I want all the objects including any relationship between the objects and I do
    not need any data. I have some idea for using the general script in SSMS, but I still need you expertise advise please, thank you kindly for your help.
    Regards

    One option is to run BACKUP/RESTORE, once you have restored you run:
    SELECT 'ALTER TABLE ' + quotename(s.name) + '.' + quotename(o.name) +
           ' DISABLE TRIGGER ALL '
    FROM   sys.schemas s
    JOIN   sys.objects o ON o.schema_id = s.schema_id
    WHERE  o.type = 'U'
      AND  EXISTS (SELECT *
                   FROM   sys.triggers tr
                   WHERE  tr.parent_id = o.object_id)
    Copy result and paste into a query window do to run. Next:
    SELECT 'DELETE ' + quotename(s.name) + '.' + quotename(o.name)
    FROM   sys.schemas s
    JOIN   sys.objects o ON o.schema_id = s.schema_id
    WHERE  o.type = 'U'
    Run this result until you don't get any more errors.
    Run the first query again, but change DISABLE to ENABLE.
    This is more long-winding than scripting, particularly if you have lots of data. But you know that you will not make any changes whatsoever to the schema.
    The scripting in SSMS generally does it right, I believe, but some items are not scripted by default. If you run BACKUP/RESTORE, you know that you get a faithful copy.
    Of course, the best way is to keep your code under version control and take the version control system as your ultimate truth.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Function Module to delete all the red requests in Info Cube

    Dear Friends,
    Is there any standard FM which can delete all the red requests in the infocube ?
    Thanks & Regards,
    Ashutosh Singh

    you can use RSDD_INFO_REQUID_DELETE.
    you've got to create a program in which you first read table rsbkrequest (where you can find the status of the request)
    then you can use these id's in the function module.
    as a lead check this paper (other objective but same principle)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a7ba9523-0b01-0010-18ab-cf8b3b8c374a?quicklink=index&overridelayout=true
    M.

  • An action that deletes all hidden objects

    Hello
    In a constant effort to save and place smaller files...I was wondering if there was a way to script illustrator files so that it deletes all the hidden objects.
    I end up with so many hiden objects in these files, I am sure that would be a great help, if I could set an action either inside of illustrator or through a script to drag and drop files onto to that would delete the hidden files.
    I cannot find any commands on this in the program, so I did not know if it is possible, but I figures I would try.
    thanks!
    babs

    Here's a script that I have to delete hidden layers in a file. It could be reworked to target page items. Remember you can only delete something if it is visible.
    --get a sourceFolder that holds the files to process
    set sourceFolder to (choose folder with prompt "Choose a folder with files to process:") as text
    -- get a list of files of the files to process in the sourceFolder
    tell application "Finder" to set workingFiles to (every file of folder sourceFolder) as alias list
    repeat with aFile in workingFiles
        tell application "Adobe Illustrator"
            open aFile
            set currentFile to front document
            tell application "Adobe Illustrator"
                set myLayers to every layer of currentFile
                repeat with i from 1 to count of items in myLayers
                    set myLayer to item i of myLayers
                    set locked of myLayer to false
                    if visible of myLayer is true then
                        set visible of myLayer to false
                    else if visible of myLayer is false then
                        set visible of myLayer to true
                    end if
                end repeat
                delete (every layer of currentFile whose visible is true)
            end tell
            tell application "Adobe Illustrator"
                set visible of (every layer of currentFile) to true
            end tell
            close currentFile with saving
        end tell
    end repeat

  • HOW TO DELETE ALL INFO OBJECTS IN A SYSTEM

    HI! gurus,
    I want to know how to delete all user created info objects in my laptop.the situation is while practicing SAP in my laptop ...creation of user info objects occured heavily resulting in degrading the system performance.so is there any procedure to delete all info objects(user created)making a system a newly SAP installed one....please help me....
    Regards
    Ravikanth Pinipolu

    Hi Ravi,
    u can try it manually to delete the User defined objects..
    or u can use the prg: RSDG_IOBJ_DELETE and in that u can give some selection of objects for the deletion..
    Give it a try..
    Thanks
    Hope this helps

  • Delete all inactive objects in a Transport Request

    Hi,
    I want to delete all the inactive objects in a transport Request . How can i do this ? I have many inactive objects in a request so i want to delete them first and then transport it . How can i do this . Please help..

    Hi,
      go to transaction se10 click on display individually enter teh request and click display and then you would get the list of all objects in that request so you can check which one are inactive and delete.
    Or you can also go to se80 in the repository browser you can choose inactive objects so it would show all inactive objects for a user from there also you can delete objects.
    Regards,
    Himanshu

  • Deleting all the materials with deletion flag

    Hi all.
    How is it posiible to delete all the materials in the system that have a deletion flag using tcode MM71?
    Regards, Nikolai.

    MM71 is an archiving transaction. You have to do customizing for archiving.
    Create logical and physical file names and paths. Define the size of an archive. and define what you want execute in what sequence.
    Create a variant with your selection.
    But if you want delete material masters that were already in use, then be prepared that your success may be very limited. As you would have to archive all dependend data first.
    Materials are the very last step in an archiving cycle.
    Click the network button right of the executing button to see what objects you have to archive first, to be able to finally archive a material

  • Report to find out all the unused components in package

    Hi experts
    I have a reqment for report where in
    the selection screeen has got one field package name .
    This package can contain any r3 objects (like tables , Function modules, Function groups, Dictionary objects , classes etc)
    The report shud list out all the objects which are not used any where ( ie empty result from whereused list )
    Is there any Func Module or Class methods to do the above?
    Thanks
    Kallu

    You can see them in SM37 of course but tables TBTCO and TBTCP cointain the info you're looking for
    Regards
    Juan

Maybe you are looking for

  • How do you put edge animation in Magento?

    How do  you put edge animation in Magento please?

  • Duplicate Contacts / Calendars

    We have 12 Blackberry devcies and are running BES 4.1.6.10. 25% of the devices have issues where calendar items or contacts are duplicated. The only common thread seems to be that if you go into the options, you see duplicated Desktop lists. There do

  • Adobe photoshop cc 2014 has stopped working (on startup)

    This was the event log for the error: Description: Faulting application name: Photoshop.exe, version: 15.2.0.236, time stamp: 0x542531ba Faulting module name: igdfcl64.dll, version: 8.1.0.2932, time stamp: 0x50c924e2 Exception code: 0xc0000005 Fault

  • CS6: Ps 3D Rotation Z Axis Motion?

    Hey guys, how do you add keyframes to 3D Rotation Z Axis on the Ps timeline?

  • Creative way to give backordered Apple watch as a gift

    Hi Everyone, I ordered the Apple watch for my husband for his 50th birthday.  Unfortunately, it will not be here on time. Anybody have any creative ideas for how to give a gift that's backordered?  I don't want to just print out the receipt or a pict