Ztables ,maintenance view , delete record , consistency

hello , i create a few ztables one with code and other with descriptions
let called it ztable01 -header , ztable02-descriptions
make ztable01 foreignkey of ztable02 , and i create 2 maintenance view for they ( one per table )
i create a record ( a new code ) in the ztable01 then i go to the ztable01 and create a new record using the code in create ztable01 ( search help show the new record ) now i go back to the ztable01 and delete that record of code used in the ztable02 and it allow me to delete it!!!! the abap dictionary don't do this kind of check ? i need config something special ? some info about ?
Thanks

>
Lavanya K wrote:
> HI
>
> For ur requirement, create a custom table and a text table for description following below steps.
>
> 1. Create custom table . Eg- MANDT, COUNTRY are key fields
> 2. Create text table with field SPRAS (language), Country (this should have a foreign key field relationship with table from step 1. check radiobutton for -Key Fields of a text table) & Country Name.
> 3. Maintain Table maintain generator for table in step1.
> 4. If first table is maintained in step1 then description can also be maintained there. In background the text table will be automatically filled with the same entry in the logon language in which first table is maintained
> 5. If entry from first table is deleted , in turn it is deleted from text table too
thanks for that but i already known how do that , my question was if sap don't do that integrity check for itself i mean in the abap dictionary , example that let me delete data that have relationship with other ( foreign keys relationship ).
the step 5 only happen with you do a maintained view with the second table how dependency ( maintained both table with the same view ) if that is you try to say i already known that , i was try maintained it with different maintenance view.

Similar Messages

  • How to delete records from standard maintenance view

    Dear Sir/Madam,
            i want to delete records from standard view " v_mmim_rep_cust "
    This is a standard maintenance view , used in MBLB report.
    here i found the records with different report name but same fields as shown below...
    REPORT             TABLE NAME     FIELD NAME 
    RM07DOCS         MKPF                 BKTXT
    RM07DOCS         MKPF                 BLDAT
    RM07DOCS         MKPF                 BUDAT
    RM07DOCS         MSEG                 ANLN1
    RM07DOCS         MSEG                 ANLN2
    RM07DOCS         MSEG                 APLZL
    YRM07DOCS         MKPF                 BKTXT
    YRM07DOCS         MKPF                 BLDAT
    YRM07DOCS         MKPF                 BUDAT
    YRM07DOCS         MSEG                 ANLN1
    YRM07DOCS         MSEG                 ANLN2
    YRM07DOCS         MSEG                 APLZL
    I WANT TO DELETE THE RECORDS FROM THE VIEW WITH REPORT = YRM07DOCS.
    PLEASE HELP ME.
    Thanks in Advance,
    Dastagiri.

    Dear Sir,
          when i did so , it displays a message that  " entry mseg zeile  must not be deleted ".
    hense i went through writing a program to delete the records from table mmim_rep_cust
    but it says that record not found.
    program logic : 
    delete from mmim_rep_cust
        where report in report
          and TABNAME in TABNAME.
    if sy-subrc = 0.
    write ' RECORDS DELETED SUCCESSFULLY'.
    else.
    write ' RECORD NOT FOUND'.
    endif.
    please guide me to delete the records from the view.
    Thanks in advance,
    Dastagiri.

  • About Maintenance View has 2 ZTABLEs

    Hello ALL.
    I created a Maintenance View has 2 tables.
    2 tables are linked to one another with foreign keys.
    (2 tables are ZTABLEs.) (Cardinality is 1:1)
    I'm trying to entry records using Maintenance view.(SM30)
    I can insert new records to 2 tables at the same time,
    BUT I can't update records at the same time.
    ONLY 1 table (check table) 's data is updated.
    I don't know why.
    also I can't delete records at the same time.
    ONLY 1 table (check table) 's data is deleted.
    please let me know how to do.
    Thanks.

    Hi Rie,
    When you define a view maintenance with 2 or more tables, you select fields from each table, and map tables with foreign keys.
    When a record of a view is updated, then the view fields are split into the data of the underlying tables, depending on which field comes from which table. Correspondingly, only those tables are affected, whose fields have changed.
    This confirms to 2 points -
    1) If you have 2 tables in a maintenance view, you must include the key fields of both the tables in the view. If there are common key-fields, you can them from either of the table.
    2) If there are other non-key fields which are common, then you can assign them to only one of the tables in the view. But if you like an extended logic to change their values in the other table also, then you must maintain seperate logic to do so. Events!
    You can try using an After Save, or any such events.
    Regarding events, you will find a lot of documentation and links by searching the forum itself.
    Cheers
    Rekha

  • Disable delete button in a maintenance view

    Hi,
    Does anyone knows how can I disable the delete button in a maintenance view so when a user that is not authorized can´t delete any row, or how can I lock the delete subroutine.
    Thanks!

    Hello Moises
    The problem with this solution is that if you ever need to modify your maintenance view (i.e. regenerate the dynpros because you may want to add new fields) your coding is gone.
    This is not the case if you are using event 19. Below you see same sample coding:
    ***INCLUDE LZUS_SDN_MAINTF01 .  " Function Group with maintenance views
    * Event 19: After Init. Global Variables, Field Symbols, etc.
    * http://help.sap.com/saphelp_nw2004s/helpdata/en/91/ca9f44a9d111d1a5690000e82deaaa/content.htm
    FORM exclude_gui_function.
    * define local data
      DATA: ls_excl   TYPE vimexclfun.
      ls_excl-function = 'DELE'.  " taken from standard GUI-status 'ZULG'
    BREAK-POINT.
      AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
               ID 'BUKRS' FIELD '1000'
               ID 'ACTVT' FIELD '02'.
      IF ( syst-subrc NE 0 ).
        APPEND ls_excl TO excl_cua_funct.
      ENDIF.
      APPEND ls_excl TO excl_cua_funct.  " Just for the purpose of demonstration
    ENDFORM.                    "exclude_gui_function
    Regards
      Uwe

  • How to update or delete records in a Complex View in Forms?

    Hi,
    I have a requirement to create a Form by using Complex View. Insertion is possible but updation and deletion is not working properly . I got FRM-40501 Error. I need How to update or delete records in a Complex View in Forms?
    Thanks & Regards,
    Hari Babu

    Depending on how complex your view is, forms is not able to determine how to appropiately lock a record, when you try to update or delete a record.
    One approach to using complex views in forms:
    1. Set the Key-mode of the block to "Non-Updateable"
    2. Mark the column which can be used to build the WHERE-condition to uniquely identify a record with "Primary Key" = "Yes"
    3. For doing INSERT, UPDATE and DELETE, create an INSTEAD-OF-trigger on the view.
    4. Create your own ON-LOCK-trigger in forms which does the locking of the records to update.

  • Using user-defined transport recording routine with table maintenance view?

    Hi,
    I have  a table that is maintained through a maintenance view. I need to record the changes to a dedicated transport object (not TABU) with my own recording routine instead of teh standard recording routine.Could someone tell me which/how the events can be used to achieve this?
    Regards
    Rachana

    Hi Rajeev,
    I have changed TMG to choose the option - User defined routine. And I have created a new transport object in SOBJ for the table. Is this enough to record the object to the transport as the object i defined instead of TABU? Do I need to write some subroutine for any view event to achieve this? Do you mean to use the menu option to include the object to a request?
    I have a bigger problem where this view is actually part of a view cluster. Even in that case is teh above steps enough?
    Regards
    Rachana

  • Deleting lines in maintenance view

    Hi,
    I have a table that have a maintenance view, in that maintenance i have one user event to fill hidden fields. What appens is that when i am maintening the table i select some lines to delete, i delete, save and exit.And when i enter again the lines are still there. Can you help me?

    Hi,
    You can delete data using a view only if the view refers to a single table and was created in the ABAP/4 Dictionary with the maintenance status '<b>No restriction'</b> ...
    Look at the Transaction code <b>SE57</b>
    Regards
    Sudheer

  • How to see deleted records in delta extraction from view

    Hi folks,
    i am currently reflecting about delta extraction from a view:
    The view contains a date field (change date) which is used to identify new or changed records.
    So the delta extraction of new and changed records works without problems.
    But what is happening with records that are deleted in the source system?
    My current understanding is that deleted records will not be shown in the view. Therefore the deletion is not visible in the extraction.
    - Is there a workaround for this problem?
    - How is deletion of records normaly handled in generic extractors? 
    - Is it impossible to extract a deletion when using views?
    any suggestions and help will be appretiated...
    bye

    Hello Florian,
    Generally records will not be deleted (until if you physically delete it from table) but will have a status deleted.
    So it doesn't matter whether you use view or tables the deleted records will be extracted through the view to update the BW data targets.
    Thanks
    Chandran

  • Deleting records from ztable??

    hi there....
    i have arequirement to delete records from a ztable using coding .....
    i hav tried the delete command but its not working properly.
    can anyone suggest a proper method for this....
    urgent requirement.... useful ans wil be rewarded.
    regards'

    DELETE { {FROM target [WHERE sql_cond]}
           | {target FROM source} }.
    PARAMETERS p_carrid TYPE sflight-carrid.
    DELETE FROM sflight
    WHERE  carrid = p_carrid AND
           fldate = sy-datum AND
           seatsocc = 0.
    PARAMETERS p_carrid TYPE sflight-carrid.
    TYPES: BEGIN OF sflight_key,
             mandt  TYPE sflight-mandt,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
             fldate TYPE sflight-fldate,
          END OF sflight_key.
    DATA sflight_key_tab TYPE TABLE OF sflight_key.
    SELECT carrid connid fldate
           FROM sflight
           INTO CORRESPONDING FIELDS OF TABLE sflight_key_tab
           WHERE carrid = p_carrid AND
                 fldate = sy-datum AND
                 seatsocc = 0.
    DELETE sflight FROM TABLE sflight_key_tab.

  • Unable to edit maintenance view in SM30

    hi everyone.
    need your help, I have one custom table, let's call it YTAB.  This table has several maintenance views created for it, depending on company code.  For YTAB, i have created a maintenance view YTABX. 
    When we moved YTABX to PRD, we cannot edit it in SM30.  The user ID has the right authorization.  The error message is "client 100 not modifiable".  When I try to edit the mother table YTAB in PRD, I am able to go in and do the changes.
    I have already compared the settings for YTABX with the other existing views, they are the same.  My settings for the view are:
    Access: Read, change, delete & insert
    Delivery Class: C
    In the table maintenance generator, i have a 2-step maintenance type, recording routine is Standard recording routine and compare flag is automatically adjustable. 
    Attributes for table YTAB also has delivery class C, table category is transparent table, table maintenance is allowed.
    Thank you in advance.

    Hello roch,
    the direction in which mark points is right but i think you should get some more information on the principles of table types and sap system landscape.
    Usually you should not be able to directly maintain any table. This is not only bad style but also a huge risk for the system consistency. That's why application data is always maintained via some kind of application which ensures that the data is vilidated before it is stored.
    Customizing data should only be maintained within a development system and then transported through the landscape. To maintain these table you can use generated views, customer developed maintenance views, view clusters which all include automatical link to the transport system. If you would maintain these tables directly in the productiion system it would have another configuration than the development and the quality/test system which makes them more or less useless as you can no longer make any serious test if the server configurations differ.
    To prohibit changes of customizing tables on production and test servers the admins lock the systems which results in the message you got. This setting is made in TCODE SCC4. Even if you have for any reason the authorization to use this transaction you should in no case change these settings without approval of basis / system owner. 
    Kind Regards
    Roman

  • Updates through a maintenance view

    Hi,
    I'm having difficulty with maintenance views. I thought it ws possible to construct a maintenance view consisting of two or more tables and be able to update non-key fields in any table, provided the tables were linked via FK and had suitable cardinality of C:1.
    However, this seems to be what I've found: you can only update non-key fields in the primary table. Although fields in the secondary tables appear as though you can update them (via SM30), any data changes you make are erased (as you look at it!) when you hit Save - the original value returns.
    Is my assessment correct? SAP Help is vague and ambiguous on the matter.
    Also, maybe someone could explain the cardinality requirements. SAP Help states the FKs must have N:1 cardinality, but as far as I can see it should be C:1.
    Thanks,
    T.

    Hello Tenchy
    You are talking about view clusters (SE54) where you have hierarchical linked tables that can be maintained together.
    Obviously, you cannot edit key fields of the primary table. Instead you need to use execute two operations:
    - DELETE entry
    - CREATE new entry
    It goes without saying that the same operations are propagated to the dependent entries in secondary tables.
    The cardinality between primary table and secondary table should be 1:N meaning
    - for each entry in the primary table you can have none or multiple entries in the secondary table
    - you cannot have secondary records for which the corresponding primary record does not exist
    Regards
      Uwe

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           exceptions
                client_reference             = 1
                foreign_lock                 = 2
                invalid_action               = 3
                no_clientindependent_auth    = 4
                no_database_function         = 5
                no_editor_function           = 6
                no_show_auth                 = 7
                no_tvdir_entry               = 8
                no_upd_auth                  = 9
                only_show_allowed            = 10
                system_failure               = 11
                unknown_field_in_dba_sellist = 12
                view_not_found               = 13
                others                       = 14.
    Regards,
    RIch Heilman

  • Refresh data in Table Maintenance view

    Hi,
    I have created a table maintenance view for db table A and added my function button to this view. When I click the button I append  a few records to the table A from table B. But this recoreds are not displaied in the view.
    If I rerun the view I can see added records.
    How I have to refresh the view to display added records?
    Regards,
    Ilya

    Hi Jesus,
    COMMIT WORK isn't help me.
    I found that I have to use TOTAL and EXTRACT structures to modify data in maintenance view.
    It's fine. I do something like this in my FM
    MODULE 9CUSTOM_PF_BUTTON INPUT.
    lt_total[] = total[].
    lt_extract[] = extract[].
    CASE function.
          WHEN '9DOWNSH'.
             modify lt_total from wa_total.
             modify lt_extract from wa_extract
    ENDCASE.
    total[]   = lt_total[].
    extract[] = lt_extract[].
    ENDMODULE.                 " 9CUSTOM_PF_BUTTON  INPUT
    But TOTL and EXTRACT tables contain data of  the current maintenance view.
    I work with a view cluster and I have to append or delete records from one view if I do something in other view.
    How I can modify data one view from another maintenance view?
    If I have modified database tables directly I don't see changes in the view cluster.
    Regards,
    Malnor
    Edited by: Malnor on Nov 23, 2010 9:19 AM
    Edited by: Malnor on Nov 23, 2010 9:38 AM

  • Aotu numbering in table maintenance view

    Hi experts,
    Can anybody help me in auto genereating serial number in table maintenance view. I have created table maintanance view for a z table for which first field is serial no. The requirement is this serial number should be auto genereted. increment by 1. I have writeen the code for the same in PAI event, but it getting incremented by number of rows. e.g for secind row counter is incremented by +2. for thrid row it is +3 and so on....
    plz help to achieve consistency .
    Thnks n regards,
    Ashmita Singh

    What happens if the user deletes a recird from the table?
    Suhas,
    Happy New Year
    Disable delete function and provide a deletion indicator. This should be fine right.
    The problem would be when the maintenance dialog is regenerated.
    @OP - So as suggesgted use events.
    Similar threads were discussed before many times. May be you culd search it once.

  • Activate Delimit in Table maintenance view

    Hi,
    I am creating a maintenance view for a custom table which has begin and end dates as part of the key fields. I want to activate the Delimit functionality on SM31 so we can have a history of the changes. Do you know how to activate this option? Please help!
    Thanks, Chuong

    It is not possible via SE11 . in SAP HR you define u201Ctime constrain u201C in table u201CV_T582Au201D for all ITs . If I want to do something like this ,  I will probably look at  module pool logic of any IT .
    Thanks,
    Saquib Khan
    FYI
    Time Constraint
    A time constraint indicates whether more than one infotype record may be available at one time. The following time constraint indicators are permissible:
    o     1: An infotype record must be available at all times. This record may have no time gaps. You may not delete the record last stored on the database because all records of this infotype would otherwise be deleted.
    o     2: Only one record may be available at one time, but time gaps are permitted.
    o     3: Any number of records may be valid at one time, and time gaps are permitted.
    Other possible time constraint indicators are as follows:
    o     A: Only one record may ever exist for this infotype. It is valid from 01/01/1800 to 12/31/9999. Splitting is not permissible.
    View V_T582B Infotypes Which are Created Automically controls whether the system automatically creates the infotype record for an employee hiring or an applicant data entry action.
    Infotypes with time constraint A may not be deleted.
    o     B: Only one record may ever exist for this infotype. It is valid from 01/01/1800 to 12/31/9999. Splitting is not permissible.
    Infotypes with time constraint B may be deleted.
    o     T: The time constraint varies depending on the subtype.
    o     Z: Refers to time management infotypes. The time constraint for these infotypes depends on the time constraint class defined in view V_T554S_I Absence: General Control. Collision checks are defined in view V_T554Y Time Constraint Reaction.

Maybe you are looking for

  • Error Messages and iTunes

    I have been using iTunes for years, but have recently been encountering several problems since upgrading to a new tower. A computer geek friend of mine (his term, not mine)transferred everything from the old tower to the new one. I have no issues wit

  • No sound for AVI files with Quicktime

    I know this is a well discussed topic, but I can't seem to fix this problem. I upgraded to Quicktime 7.5 and quickly found that I cannot get audio/sound out of my AVI files (most are short clips taken with my Casio Exlim Digital Camera). I tried inst

  • How to use LayoutAdjustmentPreference using javascript?

    Hi All, I am a beginner in Javascript scripting and need your help on this. I have a need to change the US letter size Indesign document into A4 letter document using Javascript. I tried to change the layout and succeed but when I tried LayoutAdjustm

  • "The document contains multiple page sizes"

    I am using ID 2014.1 on Windows 7. I have a 60-page document, and whenever I want to print a page on my desktop printer, I get this message: I have not changed the size of any of the pages, and I can't see anything unusual when I go through the whole

  • Question on embedding

    i have a client that we did a intro video for, for her website. We were using youtube but they pulled it saying it was promotional. Now she embedded quicktime player but she's freaked out because people get the "active x control" message. She wants i