Table Maintenance Generator-Before Delete event not working with sort

Hi All,
I have requirement to sort the TMG for a custom table with non primary key and also to put condition for deleting entries, so that only specific entries can be deleted.
I did the sorting by adding MODULE SORT in the PBO of the Screen and providing the logic to sort EXTRACT and TOTAL tables with the required field. This is working correctly.
Also I used BEFORE_DELETE (Event 03) to unmark all entries selected, which is not satisfying the condition. This is also working as expected.
But, though they are working independently, these changes are not working together.
Please help me in resolving this issue.
Thanks,
Savitha

Hello,
Read my answer on this thread :
Maintenance View with Subset Fields
I think It can help you about finding examples for table maintenance events
and solution to your problem.

Similar Messages

  • Eventing not working with FLASH

    Hello,
    My VC application events will not work if i choose FLASH(Flex2) in the "Runtime" attribute of the Compiler settings.
    Can anybody give me a hand with this?
    thanks,
    Alejandro.

    Hi Alejandro,
    Things to check:
    1. Do you have the "Select" event coming form the table to display further info?
    2. Does it work with Web Dynpro?
    Did you know that if the compiler option is portal and on deployment you would see 2 deployed versions 1. HTML and the 2. Flex?
    Let me know.
    Good luck,
    Dharmi

  • DELETE does not work with XP

    Hi
    I am using Apple Keyboard. The keyboard doesnot have backspace, but it has DELETE button only. I cannot use that DELETE button to lock the window or log in. Does any one have any idea.
    Thanks

    Hi Kuchel
    Apple keyboards have a backspace key but don't have a "Delete" button like Windows keyboards. When your are in Windows (assuming you have the Bootcamp drivers installed), you can hold the "FN" key down and push "Backspace" and Windows recognises it as "Delete".
    Peter

  • How to see column in table maintenance  generator?

    Hi All,
    Can we write code in table maintenance generator ? where can we write code?
    suppose I have created table maintenance generator but column is not visible what might be reason? How to deal with this?
    Can any 1 help me in this regard?
    Thanks in advance.

    Hi,
    column is not visible
    This may be because of additioni of a new field in the table after you have generated the TMG.
    Delete and re-create the object in TMG again.
    writing code in table maintenance generator
    Yes, you can write.
    SE54 --> Environmnt --> Events --> New Entry
    Select the event ..eg.
    01 for Before saving the data in the database
    02 for After saving the data in the database
    Press enter. Click on the editor button and start writing your codes in the routine.
    Regards,
    Firoz.

  • Changing the table maintenance generator

    hi expert if table maintenance generator is created for a table and after the creation table is changed then how to change the old table maintenance generator?
    Thanks
    Avadhesh
    Moderator message: standard functionality, please search for available information/documentation before asking.
    locked by: Thomas Zloch on Oct 1, 2010 1:37 PM

    Hi Abbu_sap
    I am agree with Rock's answere.
    go to utilities->table maintenance generator and delete it.
    After it recreate it in a similar manner as you created earlier and save it.
    it will work fine.
    As I also do this every time I change the table and it works fine for me.
    Thanks
    Lalit Gupta
    Moderator message: please do not just repeat what somebody before you already said, there is no added value.
    Edited by: Thomas Zloch on Oct 1, 2010 1:37 PM

  • Regarding table  maintenance generator

    hi
    i have one scenario . supppose there are 4 fields in a table. user enters data into it using table maintenance generator. he enters data only for 2 fields remaining 2 fields should get populated automatically.
    is it possible?

    Go to SE11->Table Maintenance generator -> Environment->Modification-> Events
    Here you can define events and the form routines that will be invoked on that particular event.
    Say for example you want to populate details for the user who created the records, define the form FRM_CR_DATE (any form routine name) for populating the Create Details using event 05.
    Event 05 is fired for "Creating a new entry".
    Click on the EDITOR Button and write the following code for saving the user details while creating a new record.
    *       FORM FRM_CR_DATE                                              *
    form frm_cr_date .
      ztablename-created_by      = sy-uname .
      ztablename-created_on      = sy-datum .
      ztablename-create_time     = sy-uzeit.
    endform .
    The current username, system date and time will be moved to the table work area for each record created.

  • Search Help for field on table maintenance generator ECC 6.0

    Hi All.
    To maintain search help for a custom field on table maintenance generator.
    Only through coding.
    Cannot use domain or data element or table field search helps.
    Have to code only.
    Is there any way?
    Can I do modifications/additions to screen code and achieve this?
    Regards,
    Veeranji Reddy P.

    Scenarion:
    1. table with 2 fields.
    2. table maintenance generator.
    3. Function group with one screen(0001-mentioned in table maintenance) created.
    4. For one field on table maintenance generator...where we add new entries to table, i want a search help.
    Conditions : only coding has to be done..no search helps I can use.
    Coding where and what?
    one option is to code on the screen 0001- either in PBO/PAI.
    Is it a rite place...? or any other option? But no search helps as mentiond in my first message can be used.
    Thanks and Regards,
    Veeranji Reddy P.

  • Recovery did not work with new hard drive

    The original Toshiba HD(250G, sata1) of my laptop( ) crashed.
    I bought new one (320G, sata 2, Western digit )
    The problem is that, when I tried to use the recovery CD that I used to use it with old HD before, it did not work with this new HD well!?
    After cd1 and cd2 finish installing it ask to take it out then restart, I do so, but when it comes to setup setting of windows.
    An error message come out says " Windows Setup could not configure Windows on this computer’s hardware”
    It restart and says again " Windows could not complete the installation. To install Windows on theis compuiter, restart the installation."
    I have been trying to solve this a lot, but no way
    I tried what in this link, but it drive me with another problem http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/windows-could-not-complet...
    I hope that I get the right thing to do, from ur forum by this post.
    Thanks a lot

    Did you folks search here for "advanced format drive"?    People have had numerous weird problems with the new advanced format hard drives in older Toshibas.    I can't look up all the threads for you.    But here is one:
    http://forums.toshiba.com/t5/System-Recovery-and-Recovery/Recovery-won-t-work-on-new-upgraded-hardri...

  • EVENT problem in Table maintenance generator

    Hello all
                 I m working on 4.6C sytem. I m facing  2 problems in events in table maintenance generator
    (1) I am using 04 event (After deleting records from table)   I have written BREAK-POINT in the Form .....ENDFORM... But the control doesnt stop there , when i select  an existing record and press delete record button? not able to understand  this
    (2) When i implement even t 03( Before deleting records from table) , and select  an existing record and press delete record button . Control successfully Go  to corresponding FORM ...   BREAK-POINT ENDFORM . 
    But now the problem is.. in debuggin i can see the contents in TOTAL table  but when i try to code LOOP at TOTAL ..ENDLOOP...it gives me syntax error saying "  table TOTAL doesnot exists or not defined..but similar field TOTAL_S , TOTAL_M , TOTAL_L  exists.. ???
      how come i can see the same during debugging but cannot code it ?
    Plese help
    Nilesh

    Hi Nilesh,
    (1)  I think the control will stop there after you delete AND save. Not sure about that but give it a try.
    (2) I believe you are trying to access fields inside table TOTAL, is that right?
    Actually you have to declare a work area with your Z table type.
    DATA: w_workarea type ztable.
    LOOP at total.
      w_workarea = total.
    endoop.
    Then you can work with w_workarea.
    Best regards.

  • Event 03 in table maintenance generator

    Hello All,
    I have created a event 03 in table maintenance generator. Because I need to check if the deleted key is still referenced in an other table.
    I tried the following code, but only if I use the message the entry will not be deleted.
      MOVE uebergehen TO <mark>.
      MODIFY total INDEX sy-tabix.
      <xmark> = <mark>.
      MODIFY extract INDEX nextline.
      IGNORED_ENTRIES_EXIST = abap_true.
    *  MESSAGE e000 WITH 'Entry not allowed to delete'.
    Thanks in advance.
    Marcus

    had to put it in a generic form, hope it still works:
    FORM event_03.
      TYPES: BEGIN OF typ_extract,
               zview TYPE zview,   "or ztable, the one with the maintenance dialog!
               flags TYPE vimtbflags,
             END OF typ_extract.
      DATA: ls_extract TYPE typ_extract.
    * loop at marked lines
      LOOP AT extract INTO ls_extract.
        CHECK ls_extract-flags-vim_mark EQ 'M'.
    *   place existence check here!
    *   using the values in ls_extract-zview-...
    *   if value still being used, send message
        IF sy-dbcnt > 0.
          MESSAGE i...
          ls_extract-flags-vim_mark = '*'.
          MODIFY extract FROM ls_extract.
        ENDIF.
      ENDLOOP.
    ENDFORM.

  • Event code in table maintenance generator

    Hi All,       Need to call event in Table maintenance generator of the z table. I have to use 1st event (Select ’01’ – Before saving data in the database).     Need to do fallowing job: Table cleaning : Delete all records with value year =< 2011 -New rule :      No save can be done with value (Pst Var, PA,PSA, Cost = ‘ *,*,*,*’). I am attaching table entry with this mail, I have written the code for this but not sure please suggest me modification if required for this.Because i have never done this before. Thanks and Regards Sankil     

    hi Sankil
    Some variable is not available in your code and you did not modify EXTRACT table.
    Try to modify your code as blow:
    This event has no standard routine. The following global data is available for the realization of the user routine:
    •internal table TOTAL
    •field symbols
    •field symbols <ACTION> and <ACTION_TEXT>
    •<STATUS>-UPD_FLAG
    If internal table data are to be changed before saving, t he changes should be made in both the internal table
    TOTAL and in the internal table EXTRACT.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM
    refer event 01: http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    regards,
    Archer

  • Table maintenance generator events

    Hi,
    I have created a table maintenance generator and want to populate sy-uname and sy-datum into two fields during SAVE. So I went to Environment -> Modification -> Events and selected "01" event i.e. "Before saving the data in the database" and entered Form routine as "F_UPDATE_UNAME_UDATE". Then if I go to SM30 transaction it goes to dump.
    Could you please tell whether I am missing any point?
    Regards,
    Balaji Viswanath.

    Hi,
    Pasted it below.
    Runtime Error          PERFORM_NOT_FOUND
    Except.                CX_SY_DYN_CALL_ILLEGAL_FORM
    Date and Time          01/31/2008 09:26:52
    ShrtText
         Call (PERFORM) to a non-existent routine.
    What happened?
         The current program attempted to call an externally defined routine
         that does not exist.
         Error in ABAP application program.
         The current ABAP program "SAPLZTEST321" had to be terminated because one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
         The current ABAP program had to be terminated because the
         ABAP processor detected an internal system error.
         The current ABAP program "SAPLZTEST321" had to be terminated because the ABAP
         processor discovered an invalid system state.
    What can you do?
         Print out the error message (using the "Print" function)
         and make a note of the actions and input that caused the
         error.
         To resolve the problem, contact your SAP system administrator.
         You can use transaction ST22 (ABAP Dump Analysis) to view and administer
          termination messages, especially those beyond their normal deletion
         date.
        is especially useful if you want to keep a particular message.
    Error analysis
        An exception occurred. This exception is dealt with in more detail below
        . The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_FORM',
         was neither
        caught nor passed along using a RAISING clause, in the procedure
         "PREPARE_SAVING" "(FORM)"
        Since the caller of the procedure could not have expected this exception
         to occur, the running program was terminated.
        The reason for the exception is:
        The program "SAPLZTEST321" is meant to execute an external PERFORM,
        namely the routine "F_UPDATE_UNAME_UDATE " of the program "SAPLZTEST321 ", but
        this routine does not exist.
        This may be due to any of the following reasons:
        1. One of the programs "SAPLZTEST321" or "SAPLZTEST321 " is currently being
         developed.
        The name "F_UPDATE_UNAME_UDATE " of the called routine may be incorrect, or
        the routine "F_UPDATE_UNAME_UDATE " is not yet implemented in the program
         "SAPLZTEST321 ".
        2. If the program SAPMSSY1 is involved in the runtime error, one of
        the function modules called via RFC is not flagged as remote-capable.
        (see Transaction SE37  Goto->Administration->RFC flag)
        3. There is an inconsistency in the system. The versions of the
        programs "SAPLZTEST321" and "SAPLZTEST321 " do not match.
    How to correct the error
        - Check that transports to the system are complete.
        - Conclude any developments already begun ("SAPLZTEST321" and/or "SAPLZTEST321
        - Check routine names
        You may able to find an interim solution to the problem
        in the SAP note system. If you have access to the note system yourself,
        use the following search criteria:
        "PERFORM_NOT_FOUND" CX_SY_DYN_CALL_ILLEGAL_FORMC
        "SAPLZTEST321" or "LSVIMF14"
        "PREPARE_SAVING"
        If you cannot solve the problem yourself and you wish to send
        an error message to SAP, include the following documents:
        1. A printout of the problem description (short dump)
           To obtain this, select in the current display "System->List->
           Save->Local File (unconverted)".
        2. A suitable printout of the system log
           To obtain this, call the system log through transaction SM21.
           Limit the time interval to 10 minutes before and 5 minutes
           after the short dump. In the display, then select the function
           "System->List->Save->Local File (unconverted)".

  • Table maintenance generator : EVENTS : please help me

    I need to use table maintenance generator to maintain a custom table through a custom transaction.
    I am using  event  BEFORE SAVE (01). It is working fine but small issues.
    1)After entering new entries for some fields(KEY FIELDS), when I press save button, remaining fields values to be populated. Seletion statements have written in FORM of the EVENT 01 (BEFORE SAVE).
    But the values for remaining fieldsare not populating immediately and but populating when I press BACK (F3). My requirement is with out presssing BACK  or F3 , fields to be populated.
    (note: SAP internal code..values are coming into TOTAL  structure..then I manipulated this internal table)
    PLEASE GUIDE ME, WHICH EVENT TO BE USED. importantly, which internal table/structure (like TOTAL we used for this requirement ) to be used for the proposed new EVENT? (Because lot of R&D to be done to find SAP structure)
    2) second requirement is: even after entering new entries, if we press ENTER, then also it should behave like SAVE like in the previous requirement. Please help me to find the EVENT and Internal SAP generated structure (like TOTAL we used for this requirement ).

    Hi Glen Anthony,
        Thanks for replay,
         I used foreign key relationship between those 2 internal tables....
    I used event 05: When creating a new entry. I want to know the custom logic by which my 2nd Internal table gets automatically updated when i update my 1st Internal table
    Thanks Glen.

  • Button "Position" can't work in sm30 when use Table maintenance generator

    Hello guys,
      i have created a table and use 'Table Maintenance Generator' to generate the code. When i run sm30 and click the button 'Position', it can not work.
       i enter '/h' to debug it and find the value'POSI' is not assigned to ok_code.
        Some tables created before are OK. What's the matter with it?
    Many Thanks

    hello daniel,
    there is very possibility that some inconsistency might be occured while generating table maintenance generator. So i would advice u to create ur table maintenance generator once more after deleting the current one.
    Reward properly.

  • How to forbid some deletes in table maintenance generator

    Hey gurus,
    I'm using table maintenance generator on my table and I would like to achieve that I could check whether to allow or not allow the delete action.
    In other words I would like to forbid to delete those entries, which are referenced in some other tables, but I have no idea how to do it. I don't know where in the code is the Delete button is handled, or what to write in the right event to achieve my goal.
    Can you tell me how. In details would be the best Thank you very much.
    Best regards,
    Robert

    Did you add some foreign key relation between the maintained table and the dependant one, not a bad idea to add some...
    You can also use Event 03: Before Deleting the Display Data create a form in your dialog. (Look for samples with search tool, e.g. Thomas's answer at thread event 03 in table maintenance generator)
    Regards,
    Raymond

Maybe you are looking for

  • Can not edit file on network shared folder after upgrading to windows 7

    Merry Christmas and happy new year, Due to some configuration changes on a specific application, I have forced to upgrade OS of a few number of workstations from Windows XP to windows 7. After upgrading I am facing a strange problem on WIN7 workstati

  • Can iPod touch 4gen play games on Airplay

    I wanted to buy an ipod touch 4th gen since it's so cool with the music the movies and especially the gaming. I wanted to know whether its possible to play games on the ipod touch 4gen on Apple TV with Airplay?

  • Urgent help pls -  an authenticate codes

    hi every1 can u pls help me. i need a jsp program where it authenticates the mem_ID and password which is in the login table in the database. if valid then will forward to the login.jsp or else index.jsp thanks for helping.

  • Single form for secure zone registration and web app submission?

    Hi Is it possible to setup a form where a user can simultaneously register for a secure zone and submit a web app entry? The knowledge base / tutorials describe a two step process (web form for secure zone registration and web app input form for web

  • Firefox software update won't run with parental controls

    Running mac 0S X 7.5, firefox has recently been updated 27.0.1 I have parental controls in place on my child's account on the mac. When that account is running and attempt to open firefox a dialog box appears saying the account does not have permissi