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

Similar Messages

  • 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

  • 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

  • Maintenance View issues with an ABAP program

    Hi,
    I need to update a Maintenance view(V_JURIC) from a txt file. I created an ABAP module to do this and when I update the tables that compose the view(TABLE_A and TABLE_B), the view is not completely getting updated in the last field. Any suggestions? Here is  sample of the code:
    REPORT zbr_loc_mast_data_1 MESSAGE-ID fb.
    TABLES: j_1btxjurt,
            j_1btxjur.
    DATA wa_j_1btxjurv TYPE j_1btxjurv.
    DATA wa_j_1btxjurt TYPE j_1btxjurt.
    DATA wa_j_1btxjur TYPE j_1btxjur.
    DATA: BEGIN OF i_j_1btxjurt OCCURS 2000.
            INCLUDE STRUCTURE j_1btxjurt.
    DATA: END OF i_j_1btxjurt.
    DATA: i_j_1btxjurv LIKE j_1btxjurv OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF rec OCCURS 0,
          tbl_name(10)     TYPE c,        " Table name(Constant 'J_1BTXJURV')
          field_2(1)       TYPE c,        " Constant "X"
          jur_code(10)     TYPE c,        " Jurisdiction code
          municip(60)      TYPE c,        " Municipality Name
    END OF rec.
    DATA: w_num_recs TYPE i.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    PARAMETERS: in_file TYPE localfile OBLIGATORY
                DEFAULT 'C:\lista de municipios.txt'.
    SELECTION-SCREEN END OF BLOCK block1.
    START-OF-SELECTION.
      PERFORM read_file.
      IF sy-subrc = 0.
        PERFORM update_table.
      ENDIF.
    END-OF-SELECTION.
    *Summary
        WRITE: / 'Number of records read: ' COLOR COL_TOTAL INVERSE OFF INTENSIFIED ON,
             32 w_num_recs COLOR COL_POSITIVE INVERSE OFF
                INTENSIFIED ON.
    *       Form  read_file
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM read_file.
      DATA: l_filename TYPE string.
      MOVE in_file TO l_filename.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename                = l_filename
          filetype                = 'DAT'
    *      HAS_FIELD_SEPARATOR     = SPACE
    *      HEADER_LENGTH           = 0
    *      READ_BY_LINE            = 'X'
    *      DAT_MODE                = SPACE
    *      CODEPAGE                = SPACE
    *      IGNORE_CERR             = ABAP_TRUE
    *      REPLACEMENT             = '#'
    *      VIRUS_SCAN_PROFILE      =
    *    IMPORTING
    *      FILELENGTH              =
    *      HEADER                  =
        CHANGING
          data_tab                = rec[]
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          not_supported_by_gui    = 17
          error_no_gui            = 18
          OTHERS                  = 19.
      IF sy-subrc <> 0.
        MESSAGE e039 WITH in_file.
      ENDIF.
    ENDFORM.                    " read_file
    *       Form  update_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM update_table.
      CLEAR: w_num_recs,
             w_num_recs_btable,
             w_num_recs_atable,
             w_num_recs_inserted.
        LOOP AT rec.
        w_num_recs = w_num_recs + 1.
        MOVE 'BR'          TO wa_j_1btxjur-country.
        MOVE rec-jur_code  TO wa_j_1btxjur-taxjurcode.
        MOVE 'PT'          TO wa_j_1btxjurt-spras.
        MOVE 'BR'          TO wa_j_1btxjurt-country.
        MOVE rec-jur_code  TO wa_j_1btxjurt-taxjurcode.
        MOVE rec-municip   TO wa_j_1btxjurt-text.
        INSERT into j_1btxjurt values wa_j_1btxjurt.
        IF sy-subrc = 0.
          COMMIT WORK.
        ENDIF.
        INSERT into j_1btxjur values wa_j_1btxjur.
        IF sy-subrc = 0.
          COMMIT WORK.
        ENDIF.
      ENDLOOP.
      ENDFORM.                    " update_table
    Edited by: Thomas Zloch on Nov 5, 2010 9:24 AM - please use code tags

    MOVE 'PT'          TO wa_j_1btxjurt-spras.
    maybe change that to:
    MOVE 'P'          TO wa_j_1btxjurt-spras.

  • 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

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

  • 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

  • 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

  • How to create transaction for a maintenance view, Thank you.

    How to create transaction for a maintenance view,
    Thank you.
    deniz...

    Hi Deniz,
    Go to se93.
    Then create the new T.code.
    Under that select parameter Transaction.
    Then give the sm30 in the t.code in default values tab.
    check the checkbox skip initial screen.
    in classification tab.
    click checkbox inherit gui attributes..
    Now below..
    In the default values..
    select
    viewname and give ur table name.
    UPDATE= Xsave
    view - table name ( Should be upper case
    update X ( should be upper case).
    http://www.sap-basis-abap.com/sapbs011.htm
    Hope this helps you.
    Regards,
    Viveks

  • 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

  • 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

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • Create a Maintenance view for table T500P

    Hi Experts,
    We have a requirement where customer want an additional field in table T500P and for the same a custom maintenanve view has to be created.Moreover, If there is any update insert or change in the ZView/Ztable the same should be reflected in standard table T500P.
    Steps already taken :-
    We have created a ztable (copy of T500P ) and add the required custom field to it.
    We have also copied the view i.e V_T500P to our custom view and also use base table as T500P .
    We also create a foreign key for PERSA in Ztable and use T500P as check table for that with cardinality 1:1.
    To update the MOLGA & BUKRS field data in ztable we have set both the field as a primary key & create a foreign key with check table T500L & T001 & cardianality as 1:CN for key fields.
    In custom maintenance view we have set the realtionship of ztable t500l & t001 with the base table T500P.
    Now, if we are trying to maintain the view only T500P table is getting updated and Ztable is updated with only PERSA value.
    Please provide some directions for the resolution of this issue.
    Thanks,
    Pooja Goel.

    Scheduler007 --
    The view you selected by clicking File > Options > Project View is the default view for every new project you create from a blank project template.  This is a global option, so setting it from the checked out Enterprise Global file serves no purpose. 
    When you select a view as your default view, you will see that view applied to the blank project that is opened when you launch Microsoft Project 2010, and you will see it applied if you create new blank projects.  If you create enterprise templates for
    people to use in your organization, you should simply apply the view to the template that you want as the default so that users will see this view immediately when they create a new project from the template.  In addition, if you apply a view to an open
    project, close and check in the project, and then reopen the project, you will see the last view applied in that project (as Guillaume correctly points out).
    Beyond this, there is no method possible for the Project Server administrator to specify a default view for the Microsoft Project application used by the project managers in your organization.  This is an option each PM must set.  Hope this helps.
    Dale A. Howard [MVP]

Maybe you are looking for

  • Unable to create a connection for Discussion Forums.

    Hi, I have my WC_Spaces and WC_Colloboration Servers running actively. When I try to create a new connection by right-clicking Connections in Applications Resources and choose Discussion Forums and too I entered the URL and admin fields, I find its u

  • Temp file in the itunes folder

    Hy i am french guy and i apologize for my bad english I find some temp files in the itunes folder What they need for ? Someone can help me because i want to trash this files (they take me so much space on my HDD. Thaks a lot for your answers Best Reg

  • Mail not responding

    It started yesterday morning with delayed emails and now I am receiving email but no content in the mails. This is happening on my iPhone, my iPad and on my Mac Book Pro and M

  • Why doesn't the length of a new event correspond to the size?

    I see three new events with the following length and size:      97.43 minutes     -     29.34 gb      107.3 minutes     -     22.86 gb      103.2 minutes     -     24.08 gb Why does the shortest file (97 min) have the most size (29 gb) while the oppo

  • Part of app wont work

    Hi Folks, I have been a long time user of rapidweaver. I have a plug in called rapidalbum, amongst others. Well, I had to install a new hard drive and hadnt used the plug until recently. I originally had permission problems with some items when rebui