Skip to Content
author's profile photo Former Member
Former Member

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.

*  MESSAGE e000 WITH 'Entry not allowed to delete'.

Thanks in advance.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 18, 2008 at 02:04 PM

    I'm using that event too for a similar check, giving a message type I and setting extract-flags-vim_mark = '*' (de-select the marked line).

    Works fine here.


    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.