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

Similar Messages

  • Need to update table from Maintenance view (Very Urgent !!!)

    Hi Abap Guru's,
    I got a requirement where in I need to create a new Zprog so that it shld give  a call to view v_abc and thru this view I need to update the table abc if any duplicate entries are entered then I shld popup a message.
    Cld u plz help me out how to go further with this requirement and any suggestions...
    if we create a table maintenance generator for the table abc then it will check for the duplicate entries are not ? if it checks for the duplicate entries then my job is done esaily but how to assign the zt-code to the table maintenance ?
    awaiting for u r answer's and realyy appreciated with lots of points.
    Regards,
    Ravi V Ganji

    Hi,
       table generator will check duplicate entries as any
       other table .
        table maintanance Generator is used to manually
        input values using transaction sm30
        follow below steps
       1) go to se11 check table maintanance check box under
          attributes tab
       2) utilities-table maintanance Generator->
          create function group and assign it under
          function group input box.
          also assign authorization group default &NC& .
       3)
        select standard recording routine radio in table
        table mainitainence generator to move table
        contents to quality and production by assigning
        it to request.
       4) select maintaience type as single step.
       5) maintainence screen as system generated numbers
          this dialog box appears when you click on create
         button
        6) save and activate table
       using sm30 you can create entries manually.
    also check below thread to assign transaction code to
    table generator
    Re: Table Maintanance Generator  
    create transaction use se93
    select parameter transaction and give below attributes
      Transaction code      ZTX1                                                                               
    Transaction text      Maintain View ZSDCZTVIEW                                                                               
    Transaction        SM30            Screen             0           
                                              From module pool                                                                               
    Name of screen field           Value                                
       VIEWNAME                       ZSDCZTVIEW                           
       UPDATE                         X

  • Custom fields not getting updated in Mass Maintenance-MM17

    Hi,
    I have created a custom field in MARC table and the data is getting updated to the MARC table through MM01/MM02 but it is not getting updated by MM17.  I have checked the notes 44410, 576160, 414020 and 116311.  I have done the following changes as per the sap notes.
    1. Created a custom segment ZE1MARCM by copying the standard segment E1MARCM and added the custom field in that  
        segment.
    2. I have extended the IDOC 'MATMAS03' and added the custom segment ZE1MARCM to E1MARAM.
    3. Created a new entry in we82 and provided the extension type 'ZMATMAS03' and release '701'.
    4. Adjusted the partner profile in we20 for matmas with port and providing the extension idoc type.
    5. Added the custom field in the table MASSFLDLST.
    6. Implemented the code in BADI 'MG_MASS_NEWSEG' and exits 'EXIT_SAPLMV01_002' , 'EXIT_SAPLMV02_002' as per the 
        sap notes.
    The custom field is not getting updated through mass maintenance.  Please let me know if i have missed anything?
    Thanks,
    Geeta

    I had this same question several years ago. Please check my answer at Initialize MARC Custom Fields Using MM17 Does Not Work

  • How to Access Maintenance View from a program

    Hi Experts,
    I have created a maintenance view for a table. i want to insert data's into the table through the maintenance view. I don't know how to access the view, how to insert data into the Maintenance view. Please suggest me how to access the view from the program.
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    What is the need to search for a program.
    Use transaction SM30 or SE16 to create or maintain entries in the table.
    e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
    Regards,
    Himanshu

  • 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

  • Problem regarding updation of Z-table through maintenance view

    hi ,
    I m facing problem in updation of Z-table through maintenance view (SM30).
    The scenario is that I have one customizing field in my Z-table which is checkbox.
    Now I need to populate 2 fields in Z-table on tick of this checkbox and clicking of SAVE button.
    For this I have created one module  ''change_field''  in PAI.
    Actually my database table is being updated but as soon as the control left my module all the updation that take place vanishes away.....
    So please help me in this matter.

    Thanks for ur previous effort it is updating the database but its effect is not shown immediately on screen.After i referesh the transaction it is dispalying the data.
    So can u please suggest me any way....
    Now i have one scenario infront of me....
    I need to restrict the data shown in maintenance view.
    I think it would be same as pop-up window displayed when we tick on 2nd radiobutton ("ENTER CONDITIONS")
    of intial screen of t-code SM30.
    Please suggest what shud i do....
    Thanks and reagrds,
    Amit
    Edited by: amit gupta on Jul 18, 2008 1:35 PM

  • Update a maintenance view.

    Hi ,
    I want to update a maintenance view.
    Data is coming from a text file which i am uplaoding.
    Which function module should I use to update the maintenence view.
    Thanks,
    Ram.

    hi,
    use this FM VIEW_MAINTENANCE_CALL
    hope it will work.
    use this code .
    &----& Report  Z_TEST_PROGRAM&--*& Demo program for blog http://abap-explorer.blogspot.com/&--
    REPORT  z_test_program.DATA:i_sellist TYPE STANDARD TABLE OF vimsellist INITIAL SIZE 0,i_header  TYPE STANDARD TABLE OF vimdesc INITIAL SIZE 0,i_namtab  TYPE STANDARD TABLE OF vimnamtab INITIAL SIZE 0.PARAMETERS: p_view TYPE viewname MATCHCODE OBJECT viewmaint OBLIGATORY.AT SELECTION-SCREEN.CALL FUNCTION 'VIEW_GET_DDIC_INFO' EXPORTING   viewname                    = p_view     VARIANT_FOR_SELECTION       = ' ' TABLES   sellist                     = i_sellist   x_header                    = i_header   x_namtab                    = i_namtabEXCEPTIONS  no_tvdir_entry              = 1  table_not_found             = 2  OTHERS                      = 3         .IF sy-subrc <> 0. data: l_message type NATXT. CONCATENATE 'Table/View' p_view INTO l_message SEPARATED BY space. MESSAGE e001(00) WITH l_message ' not in the Dictonary'.ENDIF.START-OF-SELECTION.CALL FUNCTION 'VIEW_MAINTENANCE_CALL' EXPORTING action                               = 'S' view_name                            = p_viewEXCEPTIONS  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  maintenance_prohibited               = 14  OTHERS                               = 15         .IF sy-subrc <> 0. MESSAGE i001(00) WITH 'Error while calling the view'. LEAVE LIST-PROCESSING.ENDIF.
    Edited by: katigiri linganna on Apr 20, 2009 4:31 PM

  • Add fields to maintenance view and update then using events

    Hi experts:
      I've created a table with 4 fields, one of them is userid. Also, there is a maintenance view to add new entries.
      I want to display user name when typing userid using events (1 or 21). I know how to do it if username is one of the fields of the table, but there is a requirement to not store username in the table, just userid.
    My question is: is possible to add a field into the maintenance view and update it using events but not store the value in DB?.
    Thanks in advance for your help.
    Regards,
    Carlos.

    In the save event just clear the entries of the field(user name) in the internal table.

  • Very urgent:Updating maintenance view

    Hi
    I would like to know that if i update a maintenance view and attach the same to the
    request,will it be included in the correction instructions ?
    Or do i need to do anything special for the same?
    Please let me know
    Regards
    Leon

    Any relavance to Oracle?

  • Very urgent : Update maintenance view

    Hi
    I would like to know if i update a maintenance view ,will that change be included
    in the correction instruction or do i need to do anything special for the same.
    Regards
    Leon

    Hi,
           it should update the data in views( and corresponding tables ) .
    and we need these changes should be stored in change request also .
    you can use FM
    VIEW_MAINTENANCE_NO_DIALOG
    with action parameter = 'SAVE'
    just do a where used list of this FM to check how this can be used
    <b>Reward points</b>
    Regards

  • True about updates through a view

    hi frds
    i just need the right answer for the choices mentioned below with explanation
    plz help me
    What is true about updates through a view?
    A. You cannot update a view with group functions.
    B. When you update a view group functions are automatically computed.
    C. When you update a view only the constraints on the underlying table will be in effect.
    D. When you update a view the constraints on the views always override the constraints on the underlying tables.

    And a very tricky only it is.
    Peter, you are correct that view constraints are not enforced in the sense of PKs and FKS, but there are two other view constraints that are enforced.
    SQL> CREATE TABLE t AS
      2  SELECT rownum id, object_name
      3  FROM all_objects
      4  WHERE rownum < 11;
    Table created.
    SQL> CREATE VIEW t_read AS
      2  SELECT * FROM t
      3  WITH READ ONLY;
    View created.
    SQL> CREATE VIEW t_check AS
      2  SELECT * FROM t
      3  WHERE mod(id,2) = 0
      4  WITH CHECK OPTION;
    View created.
    SQL> CREATE VIEW t_nocheck AS
      2  SELECT * FROM t
      3  WHERE MOD(id, 2) = 0;
    View created.
    SQL> INSERT INTO t_read VALUES (100, 'READ ONLY');
    INSERT INTO t_read VALUES (100, 'READ ONLY')
    ERROR at line 1:
    ORA-01733: virtual column not allowed here
    SQL> INSERT INTO t_check VALUES (100, 'EVEN ID');
    1 row created.
    SQL> INSERT INTO t_check VALUES (101, 'ODD ID');
    INSERT INTO t_check VALUES (101, 'ODD ID')
    ERROR at line 1:
    ORA-01402: view WITH CHECK OPTION where-clause violation
    SQL> INSERT INTO t_nocheck VALUES(100, 'EVEN ID');
    1 row created.
    SQL> INSERT INTO t_nocheck VALUES(101, 'ODD ID');
    1 row created.
    SQL> UPDATE t_check SET id = 201
      2  WHERE id = 2;
    UPDATE t_check SET id = 201
    ERROR at line 1:
    ORA-01402: view WITH CHECK OPTION where-clause violation
    SQL> UPDATE t_nocheck SET id = 201
      2  WHERE id = 2;
    1 row updated.The WITH READ ONLY constraint bars all changes to the view. The WITH CHECK OPTION stops any changes that would make the record invisible to the view. It is essentially a CHECK constraint on the view.
    John

  • Update maintenance view data by FM .

    Hi friends,
             I want to update Maintenance view data  not by using sm30,sm34,transactions . i want to update by FM . i will pass the data and view name  so that it should update the data in views( and corresponding tables ) .
    and  we need these changes should be stored in change request also .
    Regards,
    Shiva.

    you can use FM
    VIEW_MAINTENANCE_NO_DIALOG
    with action parameter = 'SAVE'
    just do a where used list of this FM to check how this can be used
    Regards
    Raja

  • Maintenance View - update field on SAVE

    Hi folks,
    I need to create a maintenance view on top of a table. If a user modifies and saves one field I would like to set a time stamp in a further field of the same table. How do I have to do that?
    Thanks for your help.

    In the se11 -> table maintenance generator ->  Environment -> Modification -> Events
    Here you can create routine to add a time stamp to automatically add when some user will modify / update any table row.
    Kuntal

  • FM to Update Maintenance View

    Hi There,
            I want to update the Maintenance View so that the dependent tables must be updated as in SM30 transaction, rather by using Update statement.
    However can I update the maintenance view using the Update statement, as I am unable to select the data from it.
    Is there any FM which serves this purpose.
    Regards,
    Anil .

    Check the ENQUEUE_MODE... if it is 'S' or 'E' type.
    Lokesh

  • Using DYNP_VALUES_UPDATE with a Maintenance View

    Hi,
    I am using a maintenance view to insert values into a table. When user creates a new entry, based on the value provided for a field,I need to fill a read-only field. In PAI, when user enters a value for one field, I am using FM 'DYNP_GET_STEPL' to  get the current line and then DYNP_VALUES_UPDATE to fill the contents to the read-only field. But this does not seem to work. Any idea?
    Regards
    Rachana

    Hi Tamas,
    I tried both the options suggested by you.
    I am updating the underlying structure, still its not visible when the screen loads again. But if you see the same field gets filled with DYNP_VALUES_UPDATE if an F4 help is used for teh first(editable) field and then my read-only field is also filled in the PROCESS ON VALUE REQUEST module.
    So my guess is that, since it is a table control, it loops through the rest of the table control which is empty and my underlying structure gets cleared. So the problem could be where I am actually filling the field.
    Is it possible to somehow fill the <EXTRACT> table so that teh value is not lost?
    Regards
    Rachana

Maybe you are looking for

  • Front Row won't read most of the music in iTunes

    When I go to my iTunes folder playlists from the desk top I get everything that I expect to see there. When I open with the remote, almost everything I see, for every playlist, says it can "shuffle songs" but there are no individual songs listed. Thi

  • Why doesnt my export button work?

    I have PE (premiere elements 12) and i cant access my export button. Im trying to change my videos format so i can upload it on youtube. I NEED HELP ASAP. I have a windows 7 computer.

  • Settings for Idoc Creation on Transaction

    Hi , what setting we need to do to ensure that whenever a Sales Order (or any tcode) is created via transaction Idocs are created. Are there any settings required to be done in the Output Types (System->Services-Output Types)? How to proceed for this

  • My scenario CSV - RFC

    Hi, I have a scenario, and would appreciate any input. Such as, "I would do it this way" or "that is a pipe dream" I have a an excel file that will be saved as a csv. My plan is to have XI read the csv file from a windows share,  and transform the da

  • Dynamic types with CL_ABAP_TYPEDESCR

    Hi, I have a problem. I want to read out the output_length of dynamic types to evaluate inputs. I do something like the code below. DATA type_ref      TYPE REF TO cl_abap_typedescr. DATA elem_descr TYPE REF TO cl_abap_elemdescr. DATA struc_descr TYPE